[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Add .vimrc for yuvipanda

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: admin: Add .vimrc for yuvipanda
..


admin: Add .vimrc for yuvipanda

Tired of hard tabs

Change-Id: I6e9d1d8f55ed64efee207934f47d1c0952bf428f
---
A modules/admin/files/home/yuvipanda/.vimrc
1 file changed, 51 insertions(+), 0 deletions(-)

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



diff --git a/modules/admin/files/home/yuvipanda/.vimrc 
b/modules/admin/files/home/yuvipanda/.vimrc
new file mode 100644
index 000..8ee2f67
--- /dev/null
+++ b/modules/admin/files/home/yuvipanda/.vimrc
@@ -0,0 +1,51 @@
+set nocompatible   " be iMproved
+filetype off   " required!
+
+filetype plugin indent on " required!
+
+syntax on
+set hidden  " Allow more than one buffer open at a time
+set autoindent  " Copy current indent level to newline
+set smartindent " Smart indent / oudent based on context (extra indent 
level after a if (...) { for example
+set incsearch   " Search as you type
+set nohlsearch  " Do not highlight all search results
+set tabstop=4
+set shiftwidth=4
+set softtabstop=4
+set expandtab   " Fuck hard tabs
+set autoread
+set history=1000
+set synmaxcol=400
+set ignorecase
+set smartcase
+set title
+set gdefault
+set relativenumber  " Number lines relatively based on diff from current 
location.
+set cursorline  " Highlight line cursor is currently on
+set laststatus=2
+set wildmenu
+set wildmode=list:longest
+set showmatch   " Automatically highlight matching braces
+" Use the system keyboard for everything!
+set clipboard+=unnamedplus
+
+
+" When you open a file as normal user but need to sudo to write to it
+cmap w!! w !sudo tee % >/dev/null
+
+let mapleader=","   " Much easier to hit than /
+
+"fix regex searching
+nnoremap / /\v
+vnoremap / /\v
+
+" Much easier to hit than shift+;
+nnoremap ; :
+
+"visual line movements - makes working with wrapped lines easier
+:map j gj
+:map k gk
+:map ' `
+
+"autosave on lost focus
+:au FocusLost * silent! wa

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Add .vimrc for yuvipanda

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: admin: Add .vimrc for yuvipanda
..

admin: Add .vimrc for yuvipanda

Tired of hard tabs

Change-Id: I6e9d1d8f55ed64efee207934f47d1c0952bf428f
---
A modules/admin/files/home/yuvipanda/.vimrc
1 file changed, 51 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/319787/1

diff --git a/modules/admin/files/home/yuvipanda/.vimrc 
b/modules/admin/files/home/yuvipanda/.vimrc
new file mode 100644
index 000..8ee2f67
--- /dev/null
+++ b/modules/admin/files/home/yuvipanda/.vimrc
@@ -0,0 +1,51 @@
+set nocompatible   " be iMproved
+filetype off   " required!
+
+filetype plugin indent on " required!
+
+syntax on
+set hidden  " Allow more than one buffer open at a time
+set autoindent  " Copy current indent level to newline
+set smartindent " Smart indent / oudent based on context (extra indent 
level after a if (...) { for example
+set incsearch   " Search as you type
+set nohlsearch  " Do not highlight all search results
+set tabstop=4
+set shiftwidth=4
+set softtabstop=4
+set expandtab   " Fuck hard tabs
+set autoread
+set history=1000
+set synmaxcol=400
+set ignorecase
+set smartcase
+set title
+set gdefault
+set relativenumber  " Number lines relatively based on diff from current 
location.
+set cursorline  " Highlight line cursor is currently on
+set laststatus=2
+set wildmenu
+set wildmode=list:longest
+set showmatch   " Automatically highlight matching braces
+" Use the system keyboard for everything!
+set clipboard+=unnamedplus
+
+
+" When you open a file as normal user but need to sudo to write to it
+cmap w!! w !sudo tee % >/dev/null
+
+let mapleader=","   " Much easier to hit than /
+
+"fix regex searching
+nnoremap / /\v
+vnoremap / /\v
+
+" Much easier to hit than shift+;
+nnoremap ; :
+
+"visual line movements - makes working with wrapped lines easier
+:map j gj
+:map k gk
+:map ' `
+
+"autosave on lost focus
+:au FocusLost * silent! wa

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Add sniff for cast operator spacing

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

Change subject: Add sniff for cast operator spacing
..


Add sniff for cast operator spacing

When type-casting, do not use a space within or after the cast operator.

This change adds the sniff to check for this, and relies on the existing
'generic' test to ensure its operation.

Bug: T149544
Change-Id: Ibd0feeef941b080a4e1f2a517552a15b7440f980
---
M MediaWiki/ruleset.xml
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/MediaWiki/ruleset.xml b/MediaWiki/ruleset.xml
index f6c7a54..8f1db2b 100644
--- a/MediaWiki/ruleset.xml
+++ b/MediaWiki/ruleset.xml
@@ -45,12 +45,11 @@

0

-   
-   
+
+   

+   
+




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd0feeef941b080a4e1f2a517552a15b7440f980
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Samwilson 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Samwilson 
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] mediawiki...mobileapps[master]: Hygiene: Use native methods in place of underscore offerings...

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

Change subject: Hygiene: Use native methods in place of underscore offerings; 
add a test
..


Hygiene: Use native methods in place of underscore offerings; add a test

Gets rid of some underscore method calls in favor of native methods
where available.

Added a test for random result selection.

Change-Id: Ib32b8cb95899560339ac8611e41073e4fead977b
---
M lib/feed/random.js
M lib/mobile-util.js
A test/features/random/sample-results.json
M test/features/random/title.js
4 files changed, 99 insertions(+), 11 deletions(-)

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



diff --git a/lib/feed/random.js b/lib/feed/random.js
index a539e65..30cdae3 100644
--- a/lib/feed/random.js
+++ b/lib/feed/random.js
@@ -6,7 +6,6 @@
 
 var api = require('../api-util');
 var mwapi = require('../mwapi');
-var underscore = require('underscore');
 var BBPromise = require('bluebird');
 
 var MAX_EXTRACT_LENGTH = 512;
@@ -75,8 +74,8 @@
 }
 
 function pickBestResult(scoredResults) {
-return underscore.max(scoredResults, function(result) {
-return result.score;
+return scoredResults.reduce(function(prev, curr) {
+return curr.score > prev.score ? curr : prev;
 });
 }
 
@@ -115,7 +114,6 @@
 result.score = relativeScoreForResult(result);
 return result;
 });
-
 var bestResult = pickBestResult(scoredResults);
 
 return BBPromise.props({
@@ -133,5 +131,8 @@
 }
 
 module.exports = {
-promise: promise
+promise: promise,
+
+//visible for testing
+pickBestResult: pickBestResult
 };
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index ca85513..6e66ab4 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -123,15 +123,15 @@
 // Merge two arrays of objects by the specified property.
 // Stolen from https://jsfiddle.net/guya/eAWKR/.
 mUtil.mergeByProp = function(arr1, arr2, prop, pushIfKeyNotFound) {
-underscore.each(arr2, function(arr2obj) {
-var arr1obj = underscore.find(arr1, function(arr1obj) {
+arr2.forEach(function(arr2obj) {
+var arr1obj = arr1.find(function(arr1obj) {
 return arr1obj[prop] === arr2obj[prop];
 });
 
 // If the object already exists, extend it with the new values from
 // arr2, otherwise conditionally add the new object to arr1.
 if (arr1obj) {
-underscore.extend(arr1obj, arr2obj);
+Object.assign(arr1obj, arr2obj);
 } else {
 if (pushIfKeyNotFound) {
 arr1.push(arr2obj);
diff --git a/test/features/random/sample-results.json 
b/test/features/random/sample-results.json
new file mode 100644
index 000..e24167f
--- /dev/null
+++ b/test/features/random/sample-results.json
@@ -0,0 +1,80 @@
+[ { "pageid": 629838,
+"ns": 0,
+"title": "List of state leaders in 1690",
+"extract": "This is a list of heads of state, government leaders, and 
other rulers in the year 1690",
+"score": -8.822265625 },
+  { "pageid": 2984164,
+"ns": 0,
+"title": "ABS-CBN Lingkod Kapamilya Foundation",
+"extract": "ABS-CBN Lingkod Kapamilya Foundation Inc. (formerly ABS-CBN 
Foundation Inc.) is the non-stock, non-profit socio-civic organization of the 
ABS-CBN Corporation that facilitates social programs and outreach to the 
public. Initially, the organization's primary responsibilities were to generate 
welfare funds by broadcasting the plight of those in need of assistance and 
ensuring the proper allocation and utilization of solicited help. Eventually, 
AFI restructured itself to compensate an all-around developmental approach...",
+"score": 1 },
+  { "pageid": 18855401,
+"ns": 0,
+"title": "School Hill, Wisconsin",
+"extract": "School Hill is an unincorporated community in the town of 
Meeme located in Manitowoc County, Wisconsin, United States. School Hill is 
located in southern Manitowoc County along County \"X\" at its intersections 
with Marken Road and County \"M\"",
+"thumbnail":
+ { "source": 
"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/School_Hill_Wisconsin_Looking_North_November_2011.jpg/640px-School_Hill_Wisconsin_Looking_North_November_2011.jpg;,
+   "width": 640,
+   "height": 426 },
+"score": 2.4765625 },
+  { "pageid": 23012787,
+"ns": 0,
+"title": "1627 in poetry",
+"extract": "Nationality words link to articles with information on the 
nation's poetry or literature (for instance, Irish or France)",
+"thumbnail":
+ { "source": 
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Diego_Rodr%C3%ADguez_de_Silva_y_Vel%C3%A1zquez_-_Luis_de_G%C3%B3ngora_y_Argote_-_Google_Art_Project.jpg/515px-Diego_Rodr%C3%ADguez_de_Silva_y_Vel%C3%A1zquez_-_Luis_de_G%C3%B3ngora_y_Argote_-_Google_Art_Project.jpg;,
+   "width": 515,
+   "height": 640 },
+

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add test for parseInfobox

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

Change subject: Add test for parseInfobox
..


Add test for parseInfobox

Change-Id: I09f7ba57891cdf6d0523fe7ef935fc87be8b83eb
---
M test/lib/app-transforms/transforms.js
R test/lib/bill-clinton.html
A test/lib/parseProperty/parseInfobox.js
3 files changed, 16 insertions(+), 2 deletions(-)

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



diff --git a/test/lib/app-transforms/transforms.js 
b/test/lib/app-transforms/transforms.js
index aa30470..cc07553 100644
--- a/test/lib/app-transforms/transforms.js
+++ b/test/lib/app-transforms/transforms.js
@@ -1,11 +1,10 @@
 'use strict';
 
 var fs = require('fs');
-var preq = require('preq');
 var domino = require('domino');
 var assert = require('../../utils/assert.js');
 var a = require('../../../lib/transformations/anchorPopUpMediaTransforms');
-var html = fs.readFileSync(__dirname + '/bill-clinton.html', 'utf-8');
+var html = fs.readFileSync(__dirname + '/../bill-clinton.html', 'utf-8');
 
 describe('lib:app-transforms', function() {
 it('fixVideoAnchor should apply app_media class to all video anchors', 
function() {
diff --git a/test/lib/app-transforms/bill-clinton.html 
b/test/lib/bill-clinton.html
similarity index 100%
rename from test/lib/app-transforms/bill-clinton.html
rename to test/lib/bill-clinton.html
diff --git a/test/lib/parseProperty/parseInfobox.js 
b/test/lib/parseProperty/parseInfobox.js
new file mode 100644
index 000..5b20365
--- /dev/null
+++ b/test/lib/parseProperty/parseInfobox.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var fs = require('fs');
+var domino = require('domino');
+var assert = require('../../utils/assert.js');
+var parseProp = require('../../../lib/parseProperty');
+var html = fs.readFileSync(__dirname + '/../bill-clinton.html', 'utf-8');
+
+describe('lib:parseInfobox', function() {
+it('Parsed infobox should have correct number of rows', function() {
+var doc = domino.createDocument(html);
+var infobox = parseProp.parseInfobox(doc);
+assert.deepEqual(infobox.length, 31);
+});
+});
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09f7ba57891cdf6d0523fe7ef935fc87be8b83eb
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: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikipediaExtracts[master]: Requested fixes

2016-11-03 Thread Sophivorus (Code Review)
Sophivorus has uploaded a new change for review.

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

Change subject: Requested fixes
..

Requested fixes

- Break code into smaller methods
- Add error handling
- Build  with Html::rawElement
- Short array syntax
- Remove  from wikipediaextracts-credits
- Add Parser typehint
- Remove extract()
- API requests to formatversion=2
- Add user agent to API requests
- Validate language codes
- Remove  tag and duplicate code
- Declare public and private variables and methods
- Add \n to EOF

Bug: T149766
Change-Id: I1c1296c0381000c75ddfa2577bf5588343abdf72
---
M WikipediaExtracts.php
M extension.json
M i18n/ast.json
M i18n/bn.json
M i18n/de.json
M i18n/en.json
M i18n/es.json
M i18n/fr.json
M i18n/gl.json
M i18n/it.json
M i18n/ko.json
M i18n/lb.json
M i18n/lt.json
M i18n/mk.json
M i18n/pl.json
M i18n/pt.json
M i18n/qqq.json
M i18n/ru.json
M i18n/sv.json
M i18n/zh-hans.json
20 files changed, 215 insertions(+), 165 deletions(-)


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

diff --git a/WikipediaExtracts.php b/WikipediaExtracts.php
index cdfa55a..201bfb2 100644
--- a/WikipediaExtracts.php
+++ b/WikipediaExtracts.php
@@ -2,174 +2,219 @@
 
 class WikipediaExtracts {
 
-   static function onParserFirstCallInit( &$parser ) {
-   $parser->setHook( 'WikipediaExtract', 
'WikipediaExtracts::onHook' );
+   /**
+* Parser object
+*/
+   private static $parser;
+
+   /**
+* Language code of the local wiki
+*/
+   public static $contentLanguage;
+
+   /**
+* Associative array of the parameters passed to the parser function
+*/
+   private static $params;
+
+   /**
+* Title of the Wikipedia article to extract
+*/
+   private static $wikipediaTitle;
+
+   /**
+* Language code of the Wikipedia to query
+*/
+   private static $wikipediaLanguage;
+
+   /**
+* Existing Wikipedia language codes
+*/
+   private static $wikipediaLanguages = 
['ace','af','ak','als','an','roa-rup','frp','ast','gn','ay','az','bjn','id','ms','bm','zh-min-nan','map-bms','jv','min','su','bug','bcl','bi','bar','bs','br','ca','ceb','cs','ch','cbk-zam','ny','sn','tum','co','cy','da','pdc','de','nv','dsb','na','lad','et','eml','ang','en','es','eo','ext','eu','ee','to','hif','fo','fr','fy','ff','fur','ga','gv','sm','gag','gd','gl','ki','haw','hsb','hr','io','ig','rw','ilo','ia','ie','ik','xh','zu','is','it','kl','pam','csb','kw','kg','rn','sw','ht','ku','ltg','la','lv','lb','lt','lij','li','ln','jbo','lg','lmo','hu','mg','mt','mi','cdo','mwl','fj','nah','nl','nds-nl','cr','nap','frr','pih','no','nrm','nov','nn','uz','oc','om','pfl','pag','pap','pcd','pms','nds','pl','pt','kaa','crh','ty','ksh','ro','rmy','rm','qu','se','sg','sc','sco','stq','nso','st','tn','sq','scn','simple','ss','sk','sl','szl','so','srn','sh','fi','sv','tl','kab','roa-tara','tt','tet','vi','tpi','chy','ve','tr','tk','tw','za','vec','vep','vo','fiu-vro','wa','vls','war','wo','ts','yo','diq','zea','bat-smg','el','pnt','av','kbd','ab','ba','be','тарашкевіца','be-tarask','bxr','bg','os','kv','krc','ky','mrj','kk','lbe','lez','mk','mdf','mn','ce','mhr','koi','rue','ru','sah','cu','sr','tg','tyv','udm','uk','xal','cv','myv','hy','xmf','ka','got','yi','he','ur','ar','ps','sd','pnb','fa','glk','mzn','arz','azb','ha','lrc','ug','ckb','arc','dv','ks','new','ne','pi','bh','gom','mai','mr','sa','hi','as','bpy','bn','pa','gu','or','ta','te','kn','ml','si','th','my','dz','bo','lo','km','iu','chr','ti','am','ko','zh','zh-classical','wuu','hak','ja','zh-yue','gan'];
+
+   /**
+* Main hook
+*/
+   public static function onParserFirstCallInit( Parser &$parser ) {
$parser->setFunctionHook( 'WikipediaExtract', 
'WikipediaExtracts::onFunctionHook' );
-   return true;
}
 
-   static function onHook( $input, array $args, Parser $parser, PPFrame 
$frame ) {
-   // Set the defaults
-   $title = $parser->getTitle()->getRootText();
-   $language = $parser->getTargetLanguage()->getCode();
-   $chars = null;
-   $sentences = null;
-   $limit = null;
-   $intro = null;
-   $plaintext = null;
-   $sectionformat = null;
-   $continue = null;
-   $variant = null;
+   /**
+* Parser function hook
+*/
+   public static function onFunctionHook( Parser $parser, $input = null ) {
+   try {
+   self::$parser = $parser;
+   self::$contentLanguage = $parser->getTargetLanguage();
+   self::$params = self::parseParams( array_slice( 
func_get_args(), 2 ) );
+   self::$wikipediaTitle = 

[MediaWiki-commits] [Gerrit] mediawiki...TrustedXFF[master]: Use IPSet for matching IPv6 ranges

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

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

Change subject: Use IPSet for matching IPv6 ranges
..

Use IPSet for matching IPv6 ranges

Change-Id: I98ca8943ac9430eaf4690e2fb174fbef7718f966
---
M TrustedXFF.body.php
1 file changed, 10 insertions(+), 5 deletions(-)


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

diff --git a/TrustedXFF.body.php b/TrustedXFF.body.php
index d907ed5..4042400 100644
--- a/TrustedXFF.body.php
+++ b/TrustedXFF.body.php
@@ -1,6 +1,7 @@
 = $start && $hex <= $end ) {
-   return true;
-   }
+   if ( !self::$ipv6Set ) {
+   self::$ipv6Set = new IPSet( self::$ipv6Ranges );
}
+
+   return self::$ipv6Set->match( $ip );
}
 
return false;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Disable magic links by default

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

Change subject: Disable magic links by default
..


Disable magic links by default

And add release notes for all the magic links changes in 1.28.

Bug: T147536
Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
(cherry picked from commit 91e5e4132509ac8161d622a76c9d0842a31719c9)
---
M RELEASE-NOTES-1.28
M includes/DefaultSettings.php
2 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 1e9193c..7009e94 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -34,6 +34,12 @@
   instead of just administrators ('sysop'). Documentation for this feature is
   available at .
 * $wgRevisionCacheExpiry is now set to one week by default instead of being 
disabled.
+* Magic links are now disabled by default, and can be re-enabled by modifying 
the value
+  of $wgEnableMagicLinks. Their usage is discouraged, but if they are manually 
enabled,
+  a tracking category will be added to help identify usage and make it easier 
to migrate
+  away from. If you depend upon magic link functionality, it is requested that 
you comment
+  on 
 and
+  explain your use case(s).
 
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 1fc8da6..0ab987b 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4363,9 +4363,9 @@
  * @since 1.28
  */
 $wgEnableMagicLinks = [
-   'ISBN' => true,
-   'PMID' => true,
-   'RFC' => true
+   'ISBN' => false,
+   'PMID' => false,
+   'RFC' => false
 ];
 
 /** @} */ # end of parser settings }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Legoktm 
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] mediawiki/core[REL1_28]: Don't cache replacement patterns in wfEscapeWikitext() durin...

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

Change subject: Don't cache replacement patterns in wfEscapeWikitext() during 
tests
..


Don't cache replacement patterns in wfEscapeWikitext() during tests

Parser tests depend upon being able to change the value of
$wgEnableMagicLinks at runtime, so skip caching the replacement patterns
while parser tests or phpunit tests are being run.

Change-Id: Ic9fe4fe898aa353bdefa2bf8207b77d2ac14887f
(cherry picked from commit 643b1b40a8f854695ea4e91281bb78c30d3ccd09)
---
M includes/GlobalFunctions.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 2b6088e..901581d 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1668,7 +1668,9 @@
 function wfEscapeWikiText( $text ) {
global $wgEnableMagicLinks;
static $repl = null, $repl2 = null;
-   if ( $repl === null ) {
+   if ( $repl === null || defined( 'MW_PARSER_TEST' ) || defined( 
'MW_PHPUNIT_TEST' ) ) {
+   // Tests depend upon being able to change $wgEnableMagicLinks, 
so don't cache
+   // in those situations
$repl = [
'"' => '', '&' => '', "'" => '', '<' => 
'',
'=' => '', '>' => '', '[' => '', ']' => 
'',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9fe4fe898aa353bdefa2bf8207b77d2ac14887f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Legoktm 
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] mediawiki/core[REL1_28]: Add tracking categories when magic links are used

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

Change subject: Add tracking categories when magic links are used
..


Add tracking categories when magic links are used

This adds 3 tracking categories, one for each type of magic link (ISBN,
RFC, PMID). This will allow wikis to gauge usage and identify pages that
need migrating.

These will only show up if the respective magic links are enabled via
$wgEnableMagicLinks.

Change-Id: Ic483f0c493112bf6373e1b37961e1241c20c3582
(cherry picked from commit 0ca156364425e959e8447ee00f9abd555c9904ae)
---
M includes/parser/Parser.php
M includes/specials/SpecialTrackingCategories.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 29 insertions(+), 0 deletions(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 669e9fc1..c681779 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1446,6 +1446,7 @@
$keyword = 'RFC';
$urlmsg = 'rfcurl';
$cssClass = 'mw-magiclink-rfc';
+   $trackingCat = 'magiclink-tracking-rfc';
$id = $m[5];
} elseif ( substr( $m[0], 0, 4 ) === 'PMID' ) {
if ( !$this->mOptions->getMagicPMIDLinks() ) {
@@ -1454,12 +1455,14 @@
$keyword = 'PMID';
$urlmsg = 'pubmedurl';
$cssClass = 'mw-magiclink-pmid';
+   $trackingCat = 'magiclink-tracking-pmid';
$id = $m[5];
} else {
throw new MWException( __METHOD__ . ': 
unrecognised match type "' .
substr( $m[0], 0, 20 ) . '"' );
}
$url = wfMessage( $urlmsg, $id 
)->inContentLanguage()->text();
+   $this->addTrackingCategory( $trackingCat );
return Linker::makeExternalLink( $url, "{$keyword} 
{$id}", true, $cssClass, [], $this->mTitle );
} elseif ( isset( $m[6] ) && $m[6] !== ''
&& $this->mOptions->getMagicISBNLinks()
@@ -1473,6 +1476,7 @@
' ' => '',
'x' => 'X',
] );
+   $this->addTrackingCategory( 'magiclink-tracking-isbn' );
return $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Booksources', $num ),
"ISBN $isbn",
diff --git a/includes/specials/SpecialTrackingCategories.php 
b/includes/specials/SpecialTrackingCategories.php
index 4c892b2..3b502f8 100644
--- a/includes/specials/SpecialTrackingCategories.php
+++ b/includes/specials/SpecialTrackingCategories.php
@@ -145,6 +145,19 @@
ExtensionRegistry::getInstance()->getAttribute( 
'TrackingCategories' ),
$this->getConfig()->get( 'TrackingCategories' ) // 
deprecated
);
+
+   // Only show magic link tracking categories if they are enabled
+   $enableMagicLinks = $this->getConfig()->get( 'EnableMagicLinks' 
);
+   if ( $enableMagicLinks['ISBN'] ) {
+   $categories[] = 'magiclink-tracking-isbn';
+   }
+   if ( $enableMagicLinks['RFC'] ) {
+   $categories[] = 'magiclink-tracking-rfc';
+   }
+   if ( $enableMagicLinks['PMID'] ) {
+   $categories[] = 'magiclink-tracking-pmid';
+   }
+
$trackingCategories = [];
foreach ( $categories as $catMsg ) {
/*
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 3d272a3..6e1aec4 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1934,6 +1934,12 @@
"booksources-search": "Search",
"booksources-text": "Below is a list of links to other sites that sell 
new and used books, and may also have further information about books you are 
looking for:",
"booksources-invalid-isbn": "The given ISBN does not appear to be 
valid; check for errors copying from the original source.",
+   "magiclink-tracking-rfc": "Pages using RFC magic links",
+   "magiclink-tracking-rfc-desc": "This page uses RFC magic links. See 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links 
mediawiki.org] on how to migrate.",
+   "magiclink-tracking-pmid": "Pages using PMID magic links",
+   "magiclink-tracking-pmid-desc": "This page uses PMID magic links. See 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Disable magic links by default

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

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

Change subject: Disable magic links by default
..

Disable magic links by default

And add release notes for all the magic links changes in 1.28.

Bug: T147536
Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
(cherry picked from commit 91e5e4132509ac8161d622a76c9d0842a31719c9)
---
M RELEASE-NOTES-1.28
M includes/DefaultSettings.php
2 files changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/319784/1

diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 1e9193c..7009e94 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -34,6 +34,12 @@
   instead of just administrators ('sysop'). Documentation for this feature is
   available at .
 * $wgRevisionCacheExpiry is now set to one week by default instead of being 
disabled.
+* Magic links are now disabled by default, and can be re-enabled by modifying 
the value
+  of $wgEnableMagicLinks. Their usage is discouraged, but if they are manually 
enabled,
+  a tracking category will be added to help identify usage and make it easier 
to migrate
+  away from. If you depend upon magic link functionality, it is requested that 
you comment
+  on 
 and
+  explain your use case(s).
 
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 1fc8da6..0ab987b 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4363,9 +4363,9 @@
  * @since 1.28
  */
 $wgEnableMagicLinks = [
-   'ISBN' => true,
-   'PMID' => true,
-   'RFC' => true
+   'ISBN' => false,
+   'PMID' => false,
+   'RFC' => false
 ];
 
 /** @} */ # end of parser settings }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Add tracking categories when magic links are used

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

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

Change subject: Add tracking categories when magic links are used
..

Add tracking categories when magic links are used

This adds 3 tracking categories, one for each type of magic link (ISBN,
RFC, PMID). This will allow wikis to gauge usage and identify pages that
need migrating.

These will only show up if the respective magic links are enabled via
$wgEnableMagicLinks.

Change-Id: Ic483f0c493112bf6373e1b37961e1241c20c3582
(cherry picked from commit 0ca156364425e959e8447ee00f9abd555c9904ae)
---
M includes/parser/Parser.php
M includes/specials/SpecialTrackingCategories.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 29 insertions(+), 0 deletions(-)


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

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 669e9fc1..c681779 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1446,6 +1446,7 @@
$keyword = 'RFC';
$urlmsg = 'rfcurl';
$cssClass = 'mw-magiclink-rfc';
+   $trackingCat = 'magiclink-tracking-rfc';
$id = $m[5];
} elseif ( substr( $m[0], 0, 4 ) === 'PMID' ) {
if ( !$this->mOptions->getMagicPMIDLinks() ) {
@@ -1454,12 +1455,14 @@
$keyword = 'PMID';
$urlmsg = 'pubmedurl';
$cssClass = 'mw-magiclink-pmid';
+   $trackingCat = 'magiclink-tracking-pmid';
$id = $m[5];
} else {
throw new MWException( __METHOD__ . ': 
unrecognised match type "' .
substr( $m[0], 0, 20 ) . '"' );
}
$url = wfMessage( $urlmsg, $id 
)->inContentLanguage()->text();
+   $this->addTrackingCategory( $trackingCat );
return Linker::makeExternalLink( $url, "{$keyword} 
{$id}", true, $cssClass, [], $this->mTitle );
} elseif ( isset( $m[6] ) && $m[6] !== ''
&& $this->mOptions->getMagicISBNLinks()
@@ -1473,6 +1476,7 @@
' ' => '',
'x' => 'X',
] );
+   $this->addTrackingCategory( 'magiclink-tracking-isbn' );
return $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Booksources', $num ),
"ISBN $isbn",
diff --git a/includes/specials/SpecialTrackingCategories.php 
b/includes/specials/SpecialTrackingCategories.php
index 4c892b2..3b502f8 100644
--- a/includes/specials/SpecialTrackingCategories.php
+++ b/includes/specials/SpecialTrackingCategories.php
@@ -145,6 +145,19 @@
ExtensionRegistry::getInstance()->getAttribute( 
'TrackingCategories' ),
$this->getConfig()->get( 'TrackingCategories' ) // 
deprecated
);
+
+   // Only show magic link tracking categories if they are enabled
+   $enableMagicLinks = $this->getConfig()->get( 'EnableMagicLinks' 
);
+   if ( $enableMagicLinks['ISBN'] ) {
+   $categories[] = 'magiclink-tracking-isbn';
+   }
+   if ( $enableMagicLinks['RFC'] ) {
+   $categories[] = 'magiclink-tracking-rfc';
+   }
+   if ( $enableMagicLinks['PMID'] ) {
+   $categories[] = 'magiclink-tracking-pmid';
+   }
+
$trackingCategories = [];
foreach ( $categories as $catMsg ) {
/*
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 3d272a3..6e1aec4 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1934,6 +1934,12 @@
"booksources-search": "Search",
"booksources-text": "Below is a list of links to other sites that sell 
new and used books, and may also have further information about books you are 
looking for:",
"booksources-invalid-isbn": "The given ISBN does not appear to be 
valid; check for errors copying from the original source.",
+   "magiclink-tracking-rfc": "Pages using RFC magic links",
+   "magiclink-tracking-rfc-desc": "This page uses RFC magic links. See 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links 
mediawiki.org] on how to migrate.",
+   "magiclink-tracking-pmid": "Pages using PMID magic links",
+   "magiclink-tracking-pmid-desc": "This page uses PMID magic links. See 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Don't cache replacement patterns in wfEscapeWikitext() durin...

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

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

Change subject: Don't cache replacement patterns in wfEscapeWikitext() during 
tests
..

Don't cache replacement patterns in wfEscapeWikitext() during tests

Parser tests depend upon being able to change the value of
$wgEnableMagicLinks at runtime, so skip caching the replacement patterns
while parser tests or phpunit tests are being run.

Change-Id: Ic9fe4fe898aa353bdefa2bf8207b77d2ac14887f
(cherry picked from commit 643b1b40a8f854695ea4e91281bb78c30d3ccd09)
---
M includes/GlobalFunctions.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 2b6088e..901581d 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1668,7 +1668,9 @@
 function wfEscapeWikiText( $text ) {
global $wgEnableMagicLinks;
static $repl = null, $repl2 = null;
-   if ( $repl === null ) {
+   if ( $repl === null || defined( 'MW_PARSER_TEST' ) || defined( 
'MW_PHPUNIT_TEST' ) ) {
+   // Tests depend upon being able to change $wgEnableMagicLinks, 
so don't cache
+   // in those situations
$repl = [
'"' => '', '&' => '', "'" => '', '<' => 
'',
'=' => '', '>' => '', '[' => '', ']' => 
'',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9fe4fe898aa353bdefa2bf8207b77d2ac14887f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Apply role secondary::backup::tools-project to lab...

2016-11-03 Thread Madhuvishy (Code Review)
Madhuvishy has submitted this change and it was merged.

Change subject: labstore: Apply role secondary::backup::tools-project to 
labstore2003
..


labstore: Apply role secondary::backup::tools-project to labstore2003

Bug: T149870
Change-Id: If4ae32b7b79161d0196fe7edfb4fa9809d7a364d
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 09d4eb3..277996c 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1518,7 +1518,7 @@
 }
 
 node 'labstore2003.codfw.wmnet' {
-# role(labs::nfs::secondary_backup::tools)
+role(labs::nfs::secondary_backup::tools)
 include standard
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Apply role secondary::backup::tools-project to lab...

2016-11-03 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review.

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

Change subject: labstore: Apply role secondary::backup::tools-project to 
labstore2003
..

labstore: Apply role secondary::backup::tools-project to labstore2003

Bug: T149870
Change-Id: If4ae32b7b79161d0196fe7edfb4fa9809d7a364d
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/319781/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 09d4eb3..277996c 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1518,7 +1518,7 @@
 }
 
 node 'labstore2003.codfw.wmnet' {
-# role(labs::nfs::secondary_backup::tools)
+role(labs::nfs::secondary_backup::tools)
 include standard
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Disable magic links by default

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

Change subject: Disable magic links by default
..


Disable magic links by default

And add release notes for all the magic links changes in 1.28.

Bug: T147536
Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
---
M RELEASE-NOTES-1.28
M includes/DefaultSettings.php
2 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index a2a986f..b70074b 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -34,6 +34,12 @@
   instead of just administrators ('sysop'). Documentation for this feature is
   available at .
 * $wgRevisionCacheExpiry is now set to one week by default instead of being 
disabled.
+* Magic links are now disabled by default, and can be re-enabled by modifying 
the value
+  of $wgEnableMagicLinks. Their usage is discouraged, but if they are manually 
enabled,
+  a tracking category will be added to help identify usage and make it easier 
to migrate
+  away from. If you depend upon magic link functionality, it is requested that 
you comment
+  on 
 and
+  explain your use case(s).
 
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 0b0016c..68e4f5d 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4363,9 +4363,9 @@
  * @since 1.28
  */
 $wgEnableMagicLinks = [
-   'ISBN' => true,
-   'PMID' => true,
-   'RFC' => true
+   'ISBN' => false,
+   'PMID' => false,
+   'RFC' => false
 ];
 
 /** @} */ # end of parser settings }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66b2c4424b17cc86bbd7339de588f1c00cd2f18d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Kghbln 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't cache replacement patterns in wfEscapeWikitext() durin...

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

Change subject: Don't cache replacement patterns in wfEscapeWikitext() during 
tests
..


Don't cache replacement patterns in wfEscapeWikitext() during tests

Parser tests depend upon being able to change the value of
$wgEnableMagicLinks at runtime, so skip caching the replacement patterns
while parser tests or phpunit tests are being run.

Change-Id: Ic9fe4fe898aa353bdefa2bf8207b77d2ac14887f
---
M includes/GlobalFunctions.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bae9c77..15a73cf 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1670,7 +1670,9 @@
 function wfEscapeWikiText( $text ) {
global $wgEnableMagicLinks;
static $repl = null, $repl2 = null;
-   if ( $repl === null ) {
+   if ( $repl === null || defined( 'MW_PARSER_TEST' ) || defined( 
'MW_PHPUNIT_TEST' ) ) {
+   // Tests depend upon being able to change $wgEnableMagicLinks, 
so don't cache
+   // in those situations
$repl = [
'"' => '', '&' => '', "'" => '', '<' => 
'',
'=' => '', '>' => '', '[' => '', ']' => 
'',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9fe4fe898aa353bdefa2bf8207b77d2ac14887f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[REL1_28]: Revert ThrottleOverride to manifest_version 1

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

Change subject: Revert ThrottleOverride to manifest_version 1
..


Revert ThrottleOverride to manifest_version 1

Bug: T149759
Change-Id: Idfd6c80d6b4aae5ee4f2a5b78bcdae80524ab88a
---
M extension.json
1 file changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/extension.json b/extension.json
index 2b0e2e2..a95dab6 100644
--- a/extension.json
+++ b/extension.json
@@ -40,11 +40,9 @@
},
"config": {
"ThrottleOverrideCIDRLimit": {
-   "value": {
-   "IPv4": 16,
-   "IPv6": 19
-   }
+   "IPv4": 16,
+   "IPv6": 19
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfd6c80d6b4aae5ee4f2a5b78bcdae80524ab88a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ThrottleOverride
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
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] mediawiki...TrustedXFF[REL1_28]: Revert TrustedXff to manifest_version 1

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

Change subject: Revert TrustedXff to manifest_version 1
..


Revert TrustedXff to manifest_version 1

Bug: T149759
Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
---
M TrustedXFF.body.php
M extension.json
2 files changed, 10 insertions(+), 5 deletions(-)

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



diff --git a/TrustedXFF.body.php b/TrustedXFF.body.php
index b84ba0c..d907ed5 100644
--- a/TrustedXFF.body.php
+++ b/TrustedXFF.body.php
@@ -18,6 +18,13 @@
'2001:4c28:3000::/36'
];
 
+   public static function onRegistration() {
+   global $wgTrustedXffFile, $IP;
+   if ( $wgTrustedXffFile === null ) {
+   $wgTrustedXffFile = $IP . '/cache/trusted-xff.cdb';
+   }
+   }
+
/**
 * @param string $ip
 * @param bool $trusted
diff --git a/extension.json b/extension.json
index 498509f..421c639 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,9 @@
"Tim Starling"
],
"type": "other",
+   "callback": "TrustedXFF::onRegistration",
"config": {
-   "TrustedXffFile": {
-   "value": "cache/trusted-xff.cdb",
-   "path": true
-   }
+   "TrustedXffFile": null
},
"AutoloadClasses": {
"TrustedXFF": "TrustedXFF.body.php"
@@ -27,5 +25,5 @@
"TrustedXFF::onIsTrustedProxy"
]
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TrustedXFF
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
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] mediawiki/core[master]: Add tracking categories when magic links are used

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

Change subject: Add tracking categories when magic links are used
..


Add tracking categories when magic links are used

This adds 3 tracking categories, one for each type of magic link (ISBN,
RFC, PMID). This will allow wikis to gauge usage and identify pages that
need migrating.

These will only show up if the respective magic links are enabled via
$wgEnableMagicLinks.

Change-Id: Ic483f0c493112bf6373e1b37961e1241c20c3582
---
M includes/parser/Parser.php
M includes/specials/SpecialTrackingCategories.php
M languages/i18n/en.json
M languages/i18n/qqq.json
4 files changed, 29 insertions(+), 0 deletions(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 27c9535..eafccd9 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -1446,6 +1446,7 @@
$keyword = 'RFC';
$urlmsg = 'rfcurl';
$cssClass = 'mw-magiclink-rfc';
+   $trackingCat = 'magiclink-tracking-rfc';
$id = $m[5];
} elseif ( substr( $m[0], 0, 4 ) === 'PMID' ) {
if ( !$this->mOptions->getMagicPMIDLinks() ) {
@@ -1454,12 +1455,14 @@
$keyword = 'PMID';
$urlmsg = 'pubmedurl';
$cssClass = 'mw-magiclink-pmid';
+   $trackingCat = 'magiclink-tracking-pmid';
$id = $m[5];
} else {
throw new MWException( __METHOD__ . ': 
unrecognised match type "' .
substr( $m[0], 0, 20 ) . '"' );
}
$url = wfMessage( $urlmsg, $id 
)->inContentLanguage()->text();
+   $this->addTrackingCategory( $trackingCat );
return Linker::makeExternalLink( $url, "{$keyword} 
{$id}", true, $cssClass, [], $this->mTitle );
} elseif ( isset( $m[6] ) && $m[6] !== ''
&& $this->mOptions->getMagicISBNLinks()
@@ -1473,6 +1476,7 @@
' ' => '',
'x' => 'X',
] );
+   $this->addTrackingCategory( 'magiclink-tracking-isbn' );
return $this->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Booksources', $num ),
"ISBN $isbn",
diff --git a/includes/specials/SpecialTrackingCategories.php 
b/includes/specials/SpecialTrackingCategories.php
index 4c892b2..3b502f8 100644
--- a/includes/specials/SpecialTrackingCategories.php
+++ b/includes/specials/SpecialTrackingCategories.php
@@ -145,6 +145,19 @@
ExtensionRegistry::getInstance()->getAttribute( 
'TrackingCategories' ),
$this->getConfig()->get( 'TrackingCategories' ) // 
deprecated
);
+
+   // Only show magic link tracking categories if they are enabled
+   $enableMagicLinks = $this->getConfig()->get( 'EnableMagicLinks' 
);
+   if ( $enableMagicLinks['ISBN'] ) {
+   $categories[] = 'magiclink-tracking-isbn';
+   }
+   if ( $enableMagicLinks['RFC'] ) {
+   $categories[] = 'magiclink-tracking-rfc';
+   }
+   if ( $enableMagicLinks['PMID'] ) {
+   $categories[] = 'magiclink-tracking-pmid';
+   }
+
$trackingCategories = [];
foreach ( $categories as $catMsg ) {
/*
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index c759984..767e1fa 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1935,6 +1935,12 @@
"booksources-search": "Search",
"booksources-text": "Below is a list of links to other sites that sell 
new and used books, and may also have further information about books you are 
looking for:",
"booksources-invalid-isbn": "The given ISBN does not appear to be 
valid; check for errors copying from the original source.",
+   "magiclink-tracking-rfc": "Pages using RFC magic links",
+   "magiclink-tracking-rfc-desc": "This page uses RFC magic links. See 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links 
mediawiki.org] on how to migrate.",
+   "magiclink-tracking-pmid": "Pages using PMID magic links",
+   "magiclink-tracking-pmid-desc": "This page uses PMID magic links. See 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links 
mediawiki.org] on how to migrate.",
+   

[MediaWiki-commits] [Gerrit] mediawiki...Sentry[master]: Replace raven/raven with sentry/sentry

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

Change subject: Replace raven/raven with sentry/sentry
..


Replace raven/raven with sentry/sentry

Also bumped to 0.12.1 (small bugfix)

https://github.com/getsentry/sentry-php/compare/0.12.0...0.12.1

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

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



diff --git a/composer.json b/composer.json
index fe0c6c1..f1e6d9f 100644
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
"license": "MIT",
"require": {
"composer/installers": ">=1.0.1",
-   "raven/raven": "0.12.0"
+   "sentry/sentry": "0.12.1"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I029122a16383ee86680defed65dfe44b2c7819df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sentry
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] mediawiki/core[master]: installer: Make help link in sidebar same as default Main Pa...

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

Change subject: installer: Make help link in sidebar same as default Main Page 
one
..


installer: Make help link in sidebar same as default Main Page one

Point to www.mediawiki.org instead of meta.wikimedia.org.

Bug: T148004
Change-Id: I1bc8a84773e69529aed719ce36f1196f12b56226
---
M includes/installer/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 1f7333a..b25ff2c 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -308,5 +308,5 @@
"config-nofile": "File \"$1\" could not be found. Has it been deleted?",
"config-extension-link": "Did you know that your wiki supports 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions 
extensions]?\n\nYou can browse 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category
 extensions by category] or the 
[https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] to see the 
full list of extensions.",
"mainpagetext": "MediaWiki has been installed.",
-   "mainpagedocfooter": "Consult the 
[https://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on 
using the wiki software.\n\n== Getting started ==\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings
 Configuration settings list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* 
[https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki 
release mailing list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources
 Localise MediaWiki for your language]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn 
how to combat spam on your wiki]"
+   "mainpagedocfooter": "Consult the 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents] for 
information on using the wiki software.\n\n== Getting started ==\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings
 Configuration settings list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* 
[https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki 
release mailing list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources
 Localise MediaWiki for your language]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn 
how to combat spam on your wiki]"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1bc8a84773e69529aed719ce36f1196f12b56226
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Legoktm 
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] mediawiki...TrustedXFF[master]: Revert TrustedXff to manifest_version 1

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

Change subject: Revert TrustedXff to manifest_version 1
..


Revert TrustedXff to manifest_version 1

Bug: T149759
Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
---
M TrustedXFF.body.php
M extension.json
2 files changed, 10 insertions(+), 5 deletions(-)

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



diff --git a/TrustedXFF.body.php b/TrustedXFF.body.php
index b84ba0c..d907ed5 100644
--- a/TrustedXFF.body.php
+++ b/TrustedXFF.body.php
@@ -18,6 +18,13 @@
'2001:4c28:3000::/36'
];
 
+   public static function onRegistration() {
+   global $wgTrustedXffFile, $IP;
+   if ( $wgTrustedXffFile === null ) {
+   $wgTrustedXffFile = $IP . '/cache/trusted-xff.cdb';
+   }
+   }
+
/**
 * @param string $ip
 * @param bool $trusted
diff --git a/extension.json b/extension.json
index 498509f..421c639 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,9 @@
"Tim Starling"
],
"type": "other",
+   "callback": "TrustedXFF::onRegistration",
"config": {
-   "TrustedXffFile": {
-   "value": "cache/trusted-xff.cdb",
-   "path": true
-   }
+   "TrustedXffFile": null
},
"AutoloadClasses": {
"TrustedXFF": "TrustedXFF.body.php"
@@ -27,5 +25,5 @@
"TrustedXFF::onIsTrustedProxy"
]
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TrustedXFF
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] mediawiki...PageImages[REL1_28]: Revert PageImages to manifest_version 1

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

Change subject: Revert PageImages to manifest_version 1
..


Revert PageImages to manifest_version 1

Bug: T149759
Change-Id: I22f3bf68509e1bc6cb99d5b65e3c32030a344de1
---
M extension.json
1 file changed, 40 insertions(+), 54 deletions(-)

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



diff --git a/extension.json b/extension.json
index 7c9bc0a..8146e81 100644
--- a/extension.json
+++ b/extension.json
@@ -31,61 +31,47 @@
},
"config": {
"PageImagesScores": {
-   "value": {
-   "position": [
-   8,
-   6,
-   4,
-   3
-   ],
-   "width": {
-   "@doc119": "Very small images are 
usually from maintenace or stub templates",
-   "119": -100,
-   "400": 10,
-   "@doc600@": "Larger images are 
panoramas, less suitable",
-   "600": 5,
-   "601": 0
-   },
-   "galleryImageWidth": {
-   "99": -100,
-   "100": 0
-   },
-   "ratio": {
-   "3": -100,
-   "5": 0,
-   "20": 5,
-   "30": 0,
-   "31": -100
-   },
-   "rights": {
-   "@doc": "don't show nonfree images",
-   "nonfree": -100
-   }
+   "position": [
+   8,
+   6,
+   4,
+   3
+   ],
+   "width": {
+   "@doc119": "Very small images are usually from 
maintenace or stub templates",
+   "119": -100,
+   "400": 10,
+   "@doc600@": "Larger images are panoramas, less 
suitable",
+   "600": 5,
+   "601": 0
+   },
+   "galleryImageWidth": {
+   "99": -100,
+   "100": 0
+   },
+   "ratio": {
+   "3": -100,
+   "5": 0,
+   "20": 5,
+   "30": 0,
+   "31": -100
+   },
+   "rights": {
+   "@doc": "don't show nonfree images",
+   "nonfree": -100
}
},
-   "PageImagesBlacklist": {
-   "value": [
-   {
-   "type": "db",
-   "page": 
"MediaWiki:Pageimages-blacklist",
-   "db": false
-   }
-   ]
-   },
-   "PageImagesBlacklistExpiry": {
-   "value": 900
-   },
-   "PageImagesExpandOpenSearchXml": {
-   "value": false
-   },
-   "PageImagesNamespaces": {
-   "value": [
-   0
-   ]
-   },
-   "PageImagesUseGalleries": {
-   "value": false
-   }
+   "PageImagesBlacklist": [
+   {
+   "type": "db",
+   "page": "MediaWiki:Pageimages-blacklist",
+   "db": false
+   }
+   ],
+   "PageImagesBlacklistExpiry": 90,
+   "PageImagesExpandOpenSearchXml": false,
+   "PageImagesNamespaces": 0,
+   "PageImagesUseGalleries": false
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[REL1_28]: Revert OAuth to manifest_version 1

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

Change subject: Revert OAuth to manifest_version 1
..


Revert OAuth to manifest_version 1

Bug: T149759
Change-Id: I11e7dec9b8289cda2b3bb5c00f5a501da3ddfe78
---
M extension.json
1 file changed, 12 insertions(+), 28 deletions(-)

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



diff --git a/extension.json b/extension.json
index 57592c3..d0d4899 100644
--- a/extension.json
+++ b/extension.json
@@ -135,34 +135,18 @@
"ApiRsdServiceApis": 
"MediaWiki\\Extensions\\OAuth\\MWOAuthHooks::onApiRsdServiceApis"
},
"config": {
-   "MWOAuthCentralWiki": {
-   "value": false
-   },
-   "MWOAuthSharedUserIDs": {
-   "value": false
-   },
-   "MWOAuthSharedUserSource": {
-   "value": null
-   },
-   "MWOAuthRequestExpirationAge": {
-   "value": 2592000
-   },
-   "MWOAuthSecureTokenTransfer": {
-   "value": true
-   },
-   "MWOauthDisabledApiModules": {
-   "value": [
-   "ApiLogin",
-   "ApiLogout"
-   ]
-   },
-   "MWOAuthReadOnly": {
-   "value": false
-   },
-   "OAuthGroupsToNotify": {
-   "value": []
-   }
+   "MWOAuthCentralWiki": false,
+   "MWOAuthSharedUserIDs": false,
+   "MWOAuthSharedUserSource": null,
+   "MWOAuthRequestExpirationAge": 2592000,
+   "MWOAuthSecureTokenTransfer": true,
+   "MWOauthDisabledApiModules": [
+   "ApiLogin",
+   "ApiLogout"
+   ],
+   "MWOAuthReadOnly": false,
+   "OAuthGroupsToNotify": []
},
"load_composer_autoloader": true,
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11e7dec9b8289cda2b3bb5c00f5a501da3ddfe78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
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] labs...grrrit[master]: Fix gerrit restarting irc command

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

Change subject: Fix gerrit restarting irc command
..


Fix gerrit restarting irc command

Change-Id: Ia7a7fc155230455d6405a1cd161f280dc879194a
---
M src/relay.js
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/src/relay.js b/src/relay.js
index b82c2b7..0cdb053 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -1,4 +1,5 @@
 /* jshint unused: vars */
+/*global startRelay */
 
 var _ = require('underscore'),
 irc = require('irc'),
@@ -34,10 +35,6 @@
 function subscribeToGerritStream(host, port, username, keypath, listener) {
 logging.info('Connecting to gerrit..');
 
-if (sshConn) {
-sshConn.end();
-}
-
 sshConn = ssh2.Client();
 sshConn.on('ready', function() {
 logging.info('Connected; requesting stream-events');
@@ -55,6 +52,7 @@
 console.log('Client error: ' + err);
 }).on('close', function() {
 console.log('Client disconnected');
+startRelay();
 }).connect({
 host: host,
 port: port,
@@ -169,8 +167,11 @@
 
 ircClient.say(to, "re-connecting to gerrit");
 
-startRelay();
+if (sshConn) {
+sshConn.end();
+}
 
 ircClient.say(to, "reconnected to gerrit");
 }
+
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7a7fc155230455d6405a1cd161f280dc879194a
Gerrit-PatchSet: 3
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Fix gerrit restarting irc command

2016-11-03 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Fix gerrit restarting irc command
..

Fix gerrit restarting irc command

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit 
refs/changes/80/319780/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7a7fc155230455d6405a1cd161f280dc879194a
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Make SearchConfig non-optional in the Searcher constructor

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

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

Change subject: Make SearchConfig non-optional in the Searcher constructor
..

Make SearchConfig non-optional in the Searcher constructor

In a followup patch I needed access to the configuration in
InterwikiSearcher::__construct before calling parent::__construct. Could
have added the SearchConfig to only InterwikiSearcher, but it seemed
like things might be a little easier to follow if we always passed the
relevant configuration from the edges of the extension into the center
anyways.

Change-Id: I7ed08f4e00b78765d94d85d52fc2a187ffe7bbbe
---
M includes/CirrusSearch.php
M includes/Dump.php
M includes/Hooks.php
M includes/InterwikiSearcher.php
M includes/Maintenance/Validators/CacheWarmersValidator.php
M includes/Searcher.php
M maintenance/saneitize.php
7 files changed, 16 insertions(+), 24 deletions(-)


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

diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index c6302c7..900be4a 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -155,7 +155,7 @@
 * @return ResultSet|null|Status results, no results, or error 
respectively
 */
public function searchText( $term ) {
-   $config = null;
+   $config = $this->config;
if ( $this->request && $this->request->getVal( 'cirrusLang' ) ) 
{
$config = new SearchConfig( $this->request->getVal( 
'cirrusLang' ) );
}
@@ -272,7 +272,7 @@
$rewritten = $oldResult->getSuggestionQuery();
$rewrittenSnippet = $oldResult->getSuggestionSnippet();
$this->showSuggestion = false;
-   $rewrittenResult = $this->searchTextReal( $rewritten );
+   $rewrittenResult = $this->searchTextReal( $rewritten, 
$this->config );
if (
$rewrittenResult instanceof ResultSet
&& $rewrittenResult->numRows() > 0
@@ -329,10 +329,8 @@
 *local wiki (e.g. avoid searching on commons)
 * @return null|Status|ResultSet
 */
-   protected function searchTextReal( $term, SearchConfig $config = null, 
$forceLocal = false ) {
-   if ( $config ) {
-   $this->indexBaseName = $config->get( 
SearchConfig::INDEX_BASE_NAME );
-   }
+   protected function searchTextReal( $term, SearchConfig $config, 
$forceLocal = false ) {
+   $this->indexBaseName = $config->get( 
SearchConfig::INDEX_BASE_NAME );
 
$searcher = new Searcher( $this->connection, $this->offset, 
$this->limit, $config, $this->namespaces, null, $this->indexBaseName );
 
@@ -416,7 +414,7 @@
( $dumpQuery || $dumpResult || method_exists( $result, 
'addInterwikiResults' ) )
) {
 
-   $iwSearch = new InterwikiSearcher( $this->connection, 
$this->namespaces );
+   $iwSearch = new InterwikiSearcher( $this->connection, 
$config, $this->namespaces );
$iwSearch->setReturnQuery( $dumpQuery );
$iwSearch->setDumpResult( $dumpResult );
$iwSearch->setReturnExplain( $returnExplain );
@@ -641,7 +639,7 @@
 * @return SearchSuggestionSet
 */
protected function prefixSearch( $search ) {
-   $searcher = new Searcher( $this->connection, $this->offset, 
$this->limit, null, $this->namespaces );
+   $searcher = new Searcher( $this->connection, $this->offset, 
$this->limit, $this->config, $this->namespaces );
 
if ( $search ) {
$searcher->setResultsType( new FancyTitleResultsType( 
'prefix' ) );
diff --git a/includes/Dump.php b/includes/Dump.php
index f316003..a13cb2b 100644
--- a/includes/Dump.php
+++ b/includes/Dump.php
@@ -37,7 +37,8 @@
->makeConfig( 'CirrusSearch' );
/** @suppress PhanTypeMismatchArgument $config is actually a 
SearchConfig */
$conn = new Connection( $config );
-   $searcher = new Searcher( $conn, 0, 0, null, [], 
$this->getUser() );
+   /** @suppress PhanTypeMismatchArgument $config is actually a 
SearchConfig */
+   $searcher = new Searcher( $conn, 0, 0, $config, [], 
$this->getUser() );
 
/** @suppress PhanUndeclaredMethod Phan doesn't know $config is 
a SearchConfig */
$docId = $config->makeId( $this->getTitle()->getArticleID() );
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 5e13c98..6071979 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -551,7 +551,7 @@
 * @return 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Do a better job normalizing stored query fixtures

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

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

Change subject: Do a better job normalizing stored query fixtures
..

Do a better job normalizing stored query fixtures

While working on another patch that makes changes to some of the
queries, i noticed that the fixtures that are stored are really not
repeatably generated. Minor changes, that are not in any way important,
like the timestamp attached to 'now' or the ordering of some keys, don't
fail the test but when regenerating the fixture make for dirty diffs.

Attempt to do a better job normalizing the query before it gets written
out, such that minor changes to ordering don't make dirty diffs when
regenerating.

Also removes file_00{1..8}.expected. These files are no longer used, and
were recreated as file_00{1..8}.default.expected in a previous patch.

Change-Id: Id0911969d90c18b2fbe6dc41598d8930d50a3617
---
M tests/unit/SearcherTest.php
M tests/unit/fixtures/searchText/boost_templates_001.default.expected
M 
tests/unit/fixtures/searchText/boost_templates_001.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/boost_templates_001.fullyfeatured.expected
M tests/unit/fixtures/searchText/boost_templates_002.default.expected
M 
tests/unit/fixtures/searchText/boost_templates_002.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/boost_templates_002.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_001.default.expected
M 
tests/unit/fixtures/searchText/browsertest_001.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_001.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_002.default.expected
M 
tests/unit/fixtures/searchText/browsertest_002.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_002.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_003.default.expected
M 
tests/unit/fixtures/searchText/browsertest_003.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_003.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_004.default.expected
M 
tests/unit/fixtures/searchText/browsertest_004.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_004.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_005.default.expected
M 
tests/unit/fixtures/searchText/browsertest_005.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_005.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_006.default.expected
M 
tests/unit/fixtures/searchText/browsertest_006.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_006.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_007.default.expected
M 
tests/unit/fixtures/searchText/browsertest_007.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_007.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_008.default.expected
M 
tests/unit/fixtures/searchText/browsertest_008.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_008.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_009.default.expected
M 
tests/unit/fixtures/searchText/browsertest_009.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_009.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_010.default.expected
M 
tests/unit/fixtures/searchText/browsertest_010.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_010.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_011.default.expected
M 
tests/unit/fixtures/searchText/browsertest_011.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_011.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_012.default.expected
M 
tests/unit/fixtures/searchText/browsertest_012.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_012.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_013.default.expected
M 
tests/unit/fixtures/searchText/browsertest_013.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_013.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_014.default.expected
M 
tests/unit/fixtures/searchText/browsertest_014.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_014.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_015.default.expected
M 
tests/unit/fixtures/searchText/browsertest_015.fullyfeatured-interwiki.expected
M tests/unit/fixtures/searchText/browsertest_015.fullyfeatured.expected
M tests/unit/fixtures/searchText/browsertest_016.default.expected
M 
tests/unit/fixtures/searchText/browsertest_016.fullyfeatured-interwiki.expected
M 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Send error responses in the requested format

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

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

Change subject: Send error responses in the requested format
..

Send error responses in the requested format

Change-Id: I1efdf840dc28275cfa664fad6b82c0ba15c2c793
---
M lib/api/apiUtils.js
M lib/api/routes.js
2 files changed, 139 insertions(+), 106 deletions(-)


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

diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index d300c87..6f029d7 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -26,20 +26,16 @@
  *
  * @method
  * @param {Response} res The response object from our routing function.
- * @param {MWParserEnvironment} env
  * @param {String} path
  * @param {Number} [httpStatus]
  */
-apiUtils.relativeRedirect = function(res, env, path, httpStatus) {
+apiUtils.relativeRedirect = function(res, path, httpStatus) {
+   if (res.headersSent) { return; }
var args = [path];
if (typeof httpStatus === 'number') {
args.unshift(httpStatus);
}
-   if (env.responseSent) {
-   return;
-   } else {
-   res.redirect.apply(res, args);
-   }
+   res.redirect.apply(res, args);
 };
 
 /**
@@ -47,77 +43,117 @@
  *
  * @method
  * @param {Response} res The response object from our routing function.
- * @param {MWParserEnvironment} env
- * @param {String} name
- * @param {String|String[]} value
+ * @param {String|Object} field
+ * @param {String} [value]
  */
-apiUtils.setHeader = function(res, env, name, value) {
-   if (env.responseSent) {
-   return;
+apiUtils.setHeader = function(res, field, value) {
+   if (res.headersSent) { return; }
+   if (typeof field === 'string') {
+   res.set(field, value);
} else {
-   res.setHeader(name, value);
+   res.set(field);
}
 };
 
 /**
- * Send response, but only if response hasn't been sent.
+ * Send an html response, but only if response hasn't been sent.
  *
  * @method
  * @param {Response} res The response object from our routing function.
- * @param {MWParserEnvironment} env
  * @param {String} body
  * @param {Number} [status] HTTP status code
+ * @param {String} [contentType] A more specific type to use.
  * @param {Boolean} [omitEscape] Be explicit about omitting escaping.
  */
-apiUtils.sendResponse = function(res, env, body, status, omitEscape) {
-   if (env.responseSent) {
-   return;
-   } else {
-   env.responseSent = true;
-   if (status) {
-   res.status(status);
-   }
-   body = String(body);
-   if (!omitEscape) {
-   body = Util.entityEncodeAll(body);
-   }
-   res.send(body);
-   // Flush log buffer for linter
-   env.log('end/response');
+apiUtils.htmlResponse = function(res, body, status, contentType, omitEscape) {
+   if (res.headersSent) { return; }
+   if (typeof status === 'number') {
+   res.status(status);
}
+   contentType = contentType || 'text/html; charset=utf-8';
+   console.assert(/^text\/html;/.test(contentType));
+   apiUtils.setHeader(res, 'content-type', contentType);
+   // Explicit cast, since express varies response encoding by argument 
type
+   // though that's probably offset by setting the header above
+   body = String(body);
+   if (!omitEscape) {
+   body = Util.entityEncodeAll(body);
+   }
+   res.send(body);  // Default string encoding for send is text/html
+};
+
+/**
+ * Send a plaintext response, but only if response hasn't been sent.
+ *
+ * @method
+ * @param {Response} res The response object from our routing function.
+ * @param {String} text
+ * @param {Number} [status] HTTP status code
+ * @param {String} [contentType] A more specific type to use.
+ */
+apiUtils.plainResponse = function(res, text, status, contentType) {
+   if (res.headersSent) { return; }
+   if (typeof status === 'number') {
+   res.status(status);
+   }
+   contentType = contentType || 'text/plain; charset=utf-8';
+   console.assert(/^text\/plain;/.test(contentType));
+   apiUtils.setHeader(res, 'content-type', contentType);
+   // Explicit cast, since express varies response encoding by argument 
type
+   // though that's probably offset by setting the header above
+   res.send(String(text));
+};
+
+/**
+ * Send a JSON response, but only if response hasn't been sent.
+ *
+ * @method
+ * @param {Response} res The response object from our routing function.
+ * @param {Object} json
+ * @param {Number} [status] HTTP status code
+ * @param {String} [contentType] A more specific type to use.
+ */
+apiUtils.jsonResponse = function(res, json, status, 

[MediaWiki-commits] [Gerrit] mediawiki...Thanks[wmf/1.29.0-wmf.1]: Don't register flow-thank when Flow is not installed

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

Change subject: Don't register flow-thank when Flow is not installed
..


Don't register flow-thank when Flow is not installed

This causes issues with uninstalling Flow.

Bug: T148611
Change-Id: I2a282b06848e0e2074bb69d12b7aed143204fd2e
---
M Thanks.hooks.php
1 file changed, 12 insertions(+), 10 deletions(-)

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



diff --git a/Thanks.hooks.php b/Thanks.hooks.php
index b6a519f..a851787 100644
--- a/Thanks.hooks.php
+++ b/Thanks.hooks.php
@@ -187,16 +187,18 @@
],
];
 
-   $notifications['flow-thank'] = [
-   'category' => 'edit-thank',
-   'group' => 'positive',
-   'section' => 'message',
-   'presentation-model' => 
'EchoFlowThanksPresentationModel',
-   'bundle' => [
-   'web' => true,
-   'expandable' => true,
-   ],
-   ];
+   if ( class_exists( 'Flow\FlowPresentationModel' ) ) {
+   $notifications['flow-thank'] = [
+   'category' => 'edit-thank',
+   'group' => 'positive',
+   'section' => 'message',
+   'presentation-model' => 
'EchoFlowThanksPresentationModel',
+   'bundle' => [
+   'web' => true,
+   'expandable' => true,
+   ],
+   ];
+   }
 
$icons['thanks'] = [
'path' => 'Thanks/ThankYou.png',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a282b06848e0e2074bb69d12b7aed143204fd2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: wmf/1.29.0-wmf.1
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
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] operations...nginx[wmf-1.11.4]: nginx (1.11.4-1+wmf14) jessie-wikimedia; urgency=medium

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

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

Change subject: nginx (1.11.4-1+wmf14) jessie-wikimedia; urgency=medium
..

nginx (1.11.4-1+wmf14) jessie-wikimedia; urgency=medium

  * Bugfix for ECDHE curve logging

 -- Brandon Black   Fri, 04 Nov 2016 01:18:59 +

Change-Id: Ib24e15b42ba1a46f121632b5787d9a17691de504
---
M debian/changelog
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/nginx 
refs/changes/76/319776/1

diff --git a/debian/changelog b/debian/changelog
index 84634e2..ad6bb4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nginx (1.11.4-1+wmf14) jessie-wikimedia; urgency=medium
+
+  * Bugfix for ECDHE curve logging
+
+ -- Brandon Black   Fri, 04 Nov 2016 01:18:59 +
+
 nginx (1.11.4-1+wmf13) jessie-wikimedia; urgency=medium
 
   * Silence crits from SSLv3 handshakes - T148893

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib24e15b42ba1a46f121632b5787d9a17691de504
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/nginx
Gerrit-Branch: wmf-1.11.4
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] operations...nginx[wmf-1.11.4]: Bugfix for ECDHE curve logging

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

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

Change subject: Bugfix for ECDHE curve logging
..

Bugfix for ECDHE curve logging

I think we've been logging X25519 any time the client fails to
send the supported curves extension (which surely results in a
P-256 default), and thus our X25519 numbers are artficially
inflated.  This variant explicitly checks for the supported curves
extension first (but I'm not 100% sure how that works for session
resumption, we may end up with artificially-deflated values from
that).

Change-Id: I7ae010f8f62159d6ebf730e53567a19e8866cc7f
---
M debian/patches/0500-ssl-curve.patch
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/nginx 
refs/changes/75/319775/1

diff --git a/debian/patches/0500-ssl-curve.patch 
b/debian/patches/0500-ssl-curve.patch
index 549e25e..a8796be 100644
--- a/debian/patches/0500-ssl-curve.patch
+++ b/debian/patches/0500-ssl-curve.patch
@@ -17,7 +17,7 @@
 +ngx_ssl_get_ecdhe_curve_name(ngx_connection_t *c, ngx_pool_t *pool, ngx_str_t 
*s)
 +{
 +const char *ciph = SSL_get_cipher_name(c->ssl->connection);
-+if (ciph && !strncmp("ECDHE-", ciph, 6))
++if (ciph && !strncmp("ECDHE-", ciph, 6) && 
SSL_get1_curves(c->ssl->connection, NULL))
 +s->data = (u_char *) 
OBJ_nid2sn(SSL_get_shared_curve(c->ssl->connection, 0));
 +else
 +s->data = (u_char *) OBJ_nid2sn(NID_undef);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ae010f8f62159d6ebf730e53567a19e8866cc7f
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/nginx
Gerrit-Branch: wmf-1.11.4
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] mediawiki...Sentry[master]: Replace raven/raven with sentry/sentry

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Replace raven/raven with sentry/sentry
..

Replace raven/raven with sentry/sentry

Also bumped to 0.12.1 (small bugfix)

https://github.com/getsentry/sentry-php/compare/0.12.0...0.12.1

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Sentry 
refs/changes/74/319774/1

diff --git a/composer.json b/composer.json
index fe0c6c1..f1e6d9f 100644
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,7 @@
"license": "MIT",
"require": {
"composer/installers": ">=1.0.1",
-   "raven/raven": "0.12.0"
+   "sentry/sentry": "0.12.1"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I029122a16383ee86680defed65dfe44b2c7819df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sentry
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...Thanks[wmf/1.29.0-wmf.1]: Don't register flow-thank when Flow is not installed

2016-11-03 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Don't register flow-thank when Flow is not installed
..

Don't register flow-thank when Flow is not installed

This causes issues with uninstalling Flow.

Bug: T148611
Change-Id: I2a282b06848e0e2074bb69d12b7aed143204fd2e
---
M Thanks.hooks.php
1 file changed, 12 insertions(+), 10 deletions(-)


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

diff --git a/Thanks.hooks.php b/Thanks.hooks.php
index b6a519f..a851787 100644
--- a/Thanks.hooks.php
+++ b/Thanks.hooks.php
@@ -187,16 +187,18 @@
],
];
 
-   $notifications['flow-thank'] = [
-   'category' => 'edit-thank',
-   'group' => 'positive',
-   'section' => 'message',
-   'presentation-model' => 
'EchoFlowThanksPresentationModel',
-   'bundle' => [
-   'web' => true,
-   'expandable' => true,
-   ],
-   ];
+   if ( class_exists( 'Flow\FlowPresentationModel' ) ) {
+   $notifications['flow-thank'] = [
+   'category' => 'edit-thank',
+   'group' => 'positive',
+   'section' => 'message',
+   'presentation-model' => 
'EchoFlowThanksPresentationModel',
+   'bundle' => [
+   'web' => true,
+   'expandable' => true,
+   ],
+   ];
+   }
 
$icons['thanks'] = [
'path' => 'Thanks/ThankYou.png',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a282b06848e0e2074bb69d12b7aed143204fd2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: wmf/1.29.0-wmf.1
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...Thanks[master]: Don't register flow-thank when Flow is not installed

2016-11-03 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Don't register flow-thank when Flow is not installed
..

Don't register flow-thank when Flow is not installed

This causes issues with uninstalling Flow.

Change-Id: I2a282b06848e0e2074bb69d12b7aed143204fd2e
---
M Thanks.hooks.php
1 file changed, 12 insertions(+), 10 deletions(-)


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

diff --git a/Thanks.hooks.php b/Thanks.hooks.php
index b6a519f..a851787 100644
--- a/Thanks.hooks.php
+++ b/Thanks.hooks.php
@@ -187,16 +187,18 @@
],
];
 
-   $notifications['flow-thank'] = [
-   'category' => 'edit-thank',
-   'group' => 'positive',
-   'section' => 'message',
-   'presentation-model' => 
'EchoFlowThanksPresentationModel',
-   'bundle' => [
-   'web' => true,
-   'expandable' => true,
-   ],
-   ];
+   if ( class_exists( 'Flow\FlowPresentationModel' ) ) {
+   $notifications['flow-thank'] = [
+   'category' => 'edit-thank',
+   'group' => 'positive',
+   'section' => 'message',
+   'presentation-model' => 
'EchoFlowThanksPresentationModel',
+   'bundle' => [
+   'web' => true,
+   'expandable' => true,
+   ],
+   ];
+   }
 
$icons['thanks'] = [
'path' => 'Thanks/ThankYou.png',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a282b06848e0e2074bb69d12b7aed143204fd2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...Sentry[master]: "load_composer_autoloader": true

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

Change subject: "load_composer_autoloader": true
..


"load_composer_autoloader": true

Change-Id: I08a2e4185d781f29655319659396744872c038cc
---
M SentryHooks.php
M extension.json
2 files changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/SentryHooks.php b/SentryHooks.php
index 3481b9b..18f85f2 100644
--- a/SentryHooks.php
+++ b/SentryHooks.php
@@ -62,15 +62,6 @@
}
 
/**
-* Fake hook that is called at the end of Sentry.php.
-*/
-   public static function onRegistration() {
-   if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
-   require_once ( __DIR__ . '/vendor/autoload.php' );
-   }
-   }
-
-   /**
 * @param Exception $e
 * @param bool $suppressed True if the error is below the level set in 
error_reporting().
 * @return bool
diff --git a/extension.json b/extension.json
index 1588466..df1dbc3 100644
--- a/extension.json
+++ b/extension.json
@@ -6,7 +6,6 @@
"descriptionmsg": "sentry-desc",
"license-name": "MIT",
"type": "other",
-   "callback": "SentryHooks::registerExtension",
"MessagesDirs": {
"Sentry": [
"i18n"
@@ -51,5 +50,6 @@
"SentryLogOnError": true,
"SentryLogPhpErrors": true
},
+   "load_composer_autoloader": true,
"manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I08a2e4185d781f29655319659396744872c038cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sentry
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: MtDu 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Adds a grrrit-wm restarting command for you to type in irc

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

Change subject: Adds a grrrit-wm restarting command for you to type in irc
..


Adds a grrrit-wm restarting command for you to type in irc

@Dzhan helped with some of this.

@mscdex  helped me too (https://github.com/mscdex/ssh2/issues/491)

You will need to be on the whitelist to run the following commands.

Commands that can be used

This command will disconnect and reconnect to ssh.

grrrit-wm: restart

Bug: T149609
Bug: T149689
Change-Id: Ie8bfeab1374036d5a2049c8faf5ae99cb0237195
---
M src/relay.js
1 file changed, 33 insertions(+), 9 deletions(-)

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



diff --git a/src/relay.js b/src/relay.js
index 026515b..b82c2b7 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -9,6 +9,7 @@
 yaml = require('js-yaml'),
 logging = require('winston'),
 ssh2 = require('ssh2'),
+sshConn = null,
 // Sane? defaults
 config_defaults = {
 nick: 'grrrit',
@@ -31,17 +32,16 @@
 });
 
 function subscribeToGerritStream(host, port, username, keypath, listener) {
-var conn = ssh2.Client();
 logging.info('Connecting to gerrit..');
-conn.connect({
-host: host,
-port: port,
-username: username,
-privateKey: require('fs').readFileSync(keypath),
-});
-conn.on('ready', function() {
+
+if (sshConn) {
+sshConn.end();
+}
+
+sshConn = ssh2.Client();
+sshConn.on('ready', function() {
 logging.info('Connected; requesting stream-events');
-conn.exec('gerrit stream-events', function(err, stream) {
+sshConn.exec('gerrit stream-events', function(err, stream) {
 if (err) {
 logging.error(err);
 throw err;
@@ -51,6 +51,15 @@
 listener(err, JSON.parse(data));
 });
 });
+}).on('error', function(err) {
+console.log('Client error: ' + err);
+}).on('close', function() {
+console.log('Client disconnected');
+}).connect({
+host: host,
+port: port,
+username: username,
+privateKey: require('fs').readFileSync(keypath),
 });
 }
 
@@ -150,3 +159,18 @@
 }
 }
 ircClient.addListener('join', waitForChannelJoins);
+//To do see Whitelist.js //
+var whitelist = [ "paladox", "mutante", "Zppix", "legoktm", "Krenair", 
"hashar", "ostriches", "greg-g", "twentyafterfour", "apergos", "robh", 
"marktraceur" ];
+ircClient.addListener('message', function (from, to, text) {
+
+if (text.indexOf('grrrit-wm: restart') === 0 && whitelist.indexOf(from) >= 
0) {
+console.log(from + ' => ' + to  + ' ' + text);
+logging.info('Connecting to gerrit..');
+
+ircClient.say(to, "re-connecting to gerrit");
+
+startRelay();
+
+ircClient.say(to, "reconnected to gerrit");
+}
+});

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8bfeab1374036d5a2049c8faf5ae99cb0237195
Gerrit-PatchSet: 22
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Luke081515 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Zppix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Disable Flow on enwiki

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

Change subject: Disable Flow on enwiki
..


Disable Flow on enwiki

Bug: T148611
Change-Id: If645ee863bec35e8ff696493515ac61f7ebf199e
---
M dblists/flow.dblist
M dblists/nonflow.dblist
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/dblists/flow.dblist b/dblists/flow.dblist
index 8006761..64dbb4f 100644
--- a/dblists/flow.dblist
+++ b/dblists/flow.dblist
@@ -181,7 +181,6 @@
 elwikivoyage
 elwiktionary
 emlwiki
-enwiki
 enwikibooks
 enwikinews
 enwikiquote
diff --git a/dblists/nonflow.dblist b/dblists/nonflow.dblist
index 84ad529..9dafd13 100644
--- a/dblists/nonflow.dblist
+++ b/dblists/nonflow.dblist
@@ -1,5 +1,6 @@
 betawikiversity
 dewikivoyage
+enwiki
 enwikiversity
 jawikiversity
 loginwiki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If645ee863bec35e8ff696493515ac61f7ebf199e
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Catrope 
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] apps...wikipedia[master]: Prefer normalizedtitle over title when deserializing RbPageS...

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

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

Change subject: Prefer normalizedtitle over title when deserializing 
RbPageSummary.
..

Prefer normalizedtitle over title when deserializing RbPageSummary.

It looks like we were throwing away the "normalizedtitle" field in the
RbPageSummary response, when in fact this field is more presentationally
relevant, and should be the text upon which PageTitle objects are built.

For a good example, refer to today's featured article ([[Agharta (album)]]).

Change-Id: Ib40c66bc071439dab520556dd5bd661a52ee3a48
---
M app/src/main/java/org/wikipedia/server/restbase/RbPageSummary.java
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/java/org/wikipedia/server/restbase/RbPageSummary.java 
b/app/src/main/java/org/wikipedia/server/restbase/RbPageSummary.java
index 28d31e1..3bcc947 100644
--- a/app/src/main/java/org/wikipedia/server/restbase/RbPageSummary.java
+++ b/app/src/main/java/org/wikipedia/server/restbase/RbPageSummary.java
@@ -11,6 +11,7 @@
 public class RbPageSummary implements PageSummary {
 @SuppressWarnings("unused") private RbServiceError error;
 @SuppressWarnings("unused") @Nullable private String title;
+@SuppressWarnings("unused") @Nullable private String normalizedtitle;
 @SuppressWarnings("unused") @Nullable private String extract;
 @SuppressWarnings("unused") @Nullable private String description;
 @SuppressWarnings("unused") @Nullable private Thumbnail thumbnail;
@@ -37,7 +38,7 @@
 
 @Override @Nullable
 public String getTitle() {
-return title;
+return normalizedtitle != null ? normalizedtitle : title;
 }
 
 @Override @Nullable

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add shadow to the notifications top toolbar

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

Change subject: Add shadow to the notifications top toolbar
..


Add shadow to the notifications top toolbar

Bug: T140964
Change-Id: I5d795bc9c6601d874dfd58010399832b2727b811
---
M modules/styles/mw.echo.ui.NotificationsInboxWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.NotificationsInboxWidget.less 
b/modules/styles/mw.echo.ui.NotificationsInboxWidget.less
index 5533717..500e297 100644
--- a/modules/styles/mw.echo.ui.NotificationsInboxWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationsInboxWidget.less
@@ -50,6 +50,7 @@
background: #fff;
padding-top: 0.5em;
padding-bottom: 0.5em;
+   box-shadow: 0 2px 0 0 rgba( 0, 0, 0, 0.1 );
}
 
&-settings {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d795bc9c6601d874dfd58010399832b2727b811
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Kmuthu 
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] mediawiki...JsonConfig[REL1_28]: Revert JsonConfig to manifest_version 1

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

Change subject: Revert JsonConfig to manifest_version 1
..


Revert JsonConfig to manifest_version 1

Bug: T149759
Change-Id: I9535a96c0924eabf06f65c90aed7f45912836890
---
M extension.json
1 file changed, 8 insertions(+), 20 deletions(-)

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



diff --git a/extension.json b/extension.json
index cd7b05b..f10828b 100644
--- a/extension.json
+++ b/extension.json
@@ -120,28 +120,16 @@
},
"config": {
"JsonConfigs": {
-   "merge_strategy": "array_replace_recursive",
-   "value": {}
+   "_merge_strategy": "array_replace_recursive"
},
"JsonConfigModels": {
-   "merge_strategy": "array_replace_recursive",
-   "value": {}
+   "_merge_strategy": "array_replace_recursive"
},
-   "JsonConfigDisableCache": {
-   "value": false
-   },
-   "JsonConfigCacheKeyPrefix": {
-   "value": "1"
-   },
-   "JsonConfigEnableLuaSupport": {
-   "value": false
-   },
-   "JsonConfigAllowedLicenses": {
-   "value": [ "CC0-1.0" ]
-   },
-   "JsonConfigInterwikiPrefix": {
-   "value": "commons"
-   }
+   "JsonConfigDisableCache": false,
+   "JsonConfigCacheKeyPrefix": "1",
+   "JsonConfigEnableLuaSupport": false,
+   "JsonConfigAllowedLicenses": [ "CC0-1.0" ],
+   "JsonConfigInterwikiPrefix": "commons"
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9535a96c0924eabf06f65c90aed7f45912836890
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
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] operations/puppet[production]: confluent::kafka::mirror::jmxtrans: key attr is declared mor...

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

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

Change subject: confluent::kafka::mirror::jmxtrans: key attr is declared more 
than once
..

confluent::kafka::mirror::jmxtrans: key attr is declared more than once

I tried "puppet-check" from https://github.com/mschuchard/puppet-check
and it told about this.

"The key 'attrs' is declared more than once at 171:33"

Change-Id: Ief80a7e70cd9d913075e7f1e6fd85b76ee5418ca
---
M modules/confluent/manifests/kafka/mirror/jmxtrans.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/319770/1

diff --git a/modules/confluent/manifests/kafka/mirror/jmxtrans.pp 
b/modules/confluent/manifests/kafka/mirror/jmxtrans.pp
index 296672f..669b740 100644
--- a/modules/confluent/manifests/kafka/mirror/jmxtrans.pp
+++ b/modules/confluent/manifests/kafka/mirror/jmxtrans.pp
@@ -168,7 +168,6 @@
 'name'  => 
"kafka.consumer:type=FetchRequestAndResponseMetrics,name=FetchResponseSize,clientId=${client_id},brokerHost=*,brokerPort=*",
 'resultAlias'   => 
'kafka.consumer.FetchRequestAndResponseMetrics.FetchResponseSize',
 'attrs' => $kafka_timing_jmx_attrs,
-'attrs' => $kafka_timing_jmx_attrs,
 },
 
 # Consumer Lag

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief80a7e70cd9d913075e7f1e6fd85b76ee5418ca
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] operations/puppet[production]: tools: Add docker-builder class hosts to clush

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Add docker-builder class hosts to clush
..


tools: Add docker-builder class hosts to clush

Change-Id: I98ce57e7f1955c90c5b7f23c209fa626f6945c57
---
M modules/role/files/toollabs/clush/tools-clush-generator
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/role/files/toollabs/clush/tools-clush-generator 
b/modules/role/files/toollabs/clush/tools-clush-generator
index 175379e..4fbf845 100644
--- a/modules/role/files/toollabs/clush/tools-clush-generator
+++ b/modules/role/files/toollabs/clush/tools-clush-generator
@@ -40,6 +40,7 @@
 'k8s-etcd': 'k8s-etcd',
 'logs': 'logs',
 'precise-dev': 'precise-dev',
+'docker-builder': 'docker-builder',
 'prometheus': 'prometheus',
 '': 'all',
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Add docker-builder class hosts to clush

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Add docker-builder class hosts to clush
..

tools: Add docker-builder class hosts to clush

Change-Id: I98ce57e7f1955c90c5b7f23c209fa626f6945c57
---
M modules/role/files/toollabs/clush/tools-clush-generator
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/319769/1

diff --git a/modules/role/files/toollabs/clush/tools-clush-generator 
b/modules/role/files/toollabs/clush/tools-clush-generator
index 175379e..4fbf845 100644
--- a/modules/role/files/toollabs/clush/tools-clush-generator
+++ b/modules/role/files/toollabs/clush/tools-clush-generator
@@ -40,6 +40,7 @@
 'k8s-etcd': 'k8s-etcd',
 'logs': 'logs',
 'precise-dev': 'precise-dev',
+'docker-builder': 'docker-builder',
 'prometheus': 'prometheus',
 '': 'all',
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Properly give the clush user sudo rights

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Properly give the clush user sudo rights
..


tools: Properly give the clush user sudo rights

Change-Id: Ibcad9e63fd215eca182ac2fdd71ef78f8333628b
---
M modules/role/manifests/toollabs/clush/master.pp
M modules/role/manifests/toollabs/clush/target.pp
2 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/role/manifests/toollabs/clush/master.pp 
b/modules/role/manifests/toollabs/clush/master.pp
index db2cf76..eb869a2 100644
--- a/modules/role/manifests/toollabs/clush/master.pp
+++ b/modules/role/manifests/toollabs/clush/master.pp
@@ -75,10 +75,4 @@
 mode=> '0444',
 content => ini($groups_config),
 }
-
-# Give it complete sudo rights
-sudo::user { 'clushuser':
-ensure => present,
-privileges => 'ALL = (ALL) NOPASSWD: ALL',
-}
 }
diff --git a/modules/role/manifests/toollabs/clush/target.pp 
b/modules/role/manifests/toollabs/clush/target.pp
index 630c893..ffd24be 100644
--- a/modules/role/manifests/toollabs/clush/target.pp
+++ b/modules/role/manifests/toollabs/clush/target.pp
@@ -26,4 +26,10 @@
 port   => 22,
 srange => "@resolve((${master}))",
 }
+
+# Give it complete sudo rights
+sudo::user { 'clushuser':
+ensure => present,
+privileges => ['ALL = (ALL) NOPASSWD: ALL'],
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: Properly give the clush user sudo rights

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Properly give the clush user sudo rights
..

tools: Properly give the clush user sudo rights

Change-Id: Ibcad9e63fd215eca182ac2fdd71ef78f8333628b
---
M modules/role/manifests/toollabs/clush/master.pp
M modules/role/manifests/toollabs/clush/target.pp
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/319767/1

diff --git a/modules/role/manifests/toollabs/clush/master.pp 
b/modules/role/manifests/toollabs/clush/master.pp
index db2cf76..eb869a2 100644
--- a/modules/role/manifests/toollabs/clush/master.pp
+++ b/modules/role/manifests/toollabs/clush/master.pp
@@ -75,10 +75,4 @@
 mode=> '0444',
 content => ini($groups_config),
 }
-
-# Give it complete sudo rights
-sudo::user { 'clushuser':
-ensure => present,
-privileges => 'ALL = (ALL) NOPASSWD: ALL',
-}
 }
diff --git a/modules/role/manifests/toollabs/clush/target.pp 
b/modules/role/manifests/toollabs/clush/target.pp
index 630c893..ffd24be 100644
--- a/modules/role/manifests/toollabs/clush/target.pp
+++ b/modules/role/manifests/toollabs/clush/target.pp
@@ -26,4 +26,10 @@
 port   => 22,
 srange => "@resolve((${master}))",
 }
+
+# Give it complete sudo rights
+sudo::user { 'clushuser':
+ensure => present,
+privileges => ['ALL = (ALL) NOPASSWD: ALL'],
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update stil/gd-text to v1.1.0

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Update stil/gd-text to v1.1.0
..

Update stil/gd-text to v1.1.0

https://github.com/stil/gd-text/compare/v1.0.0...v1.1.0

Change-Id: I49b0eb6de1bf928bde81641effbeaced9f1fe3b9
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_psr4.php
M composer/installed.json
M stil/gd-text/.gitignore
M stil/gd-text/README.md
M stil/gd-text/composer.json
A stil/gd-text/examples/background.gif
A stil/gd-text/examples/stroke.gif
A stil/gd-text/phpunit.xml
M stil/gd-text/src/Box.php
M stil/gd-text/src/Color.php
A stil/gd-text/src/HorizontalAlignment.php
A stil/gd-text/src/TextWrapping.php
A stil/gd-text/src/VerticalAlignment.php
A stil/gd-text/tests/ColorTest.php
A stil/gd-text/tests/LinLibertine_R.ttf
A stil/gd-text/tests/TestCase.php
A stil/gd-text/tests/TextAlignmentTest.php
A stil/gd-text/tests/TextWrappingTest.php
A stil/gd-text/tests/images/owl.gif
A stil/gd-text/tests/images/owl_png24.png
A stil/gd-text/tests/images/owl_png8.png
A stil/gd-text/tests/images/test_align_bottom_center.png
A stil/gd-text/tests/images/test_align_bottom_left.png
A stil/gd-text/tests/images/test_align_bottom_right.png
A stil/gd-text/tests/images/test_align_center_center.png
A stil/gd-text/tests/images/test_align_center_left.png
A stil/gd-text/tests/images/test_align_center_right.png
A stil/gd-text/tests/images/test_align_top_center.png
A stil/gd-text/tests/images/test_align_top_left.png
A stil/gd-text/tests/images/test_align_top_right.png
A stil/gd-text/tests/images/test_wrap_NoWrap.png
A stil/gd-text/tests/images/test_wrap_WrapWithOverflow.png
35 files changed, 615 insertions(+), 119 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/68/319768/1

diff --git a/composer.json b/composer.json
index e76e58c..fd28390 100644
--- a/composer.json
+++ b/composer.json
@@ -32,7 +32,7 @@
"pimple/pimple": "2.1.1",
"psr/log": "1.0.0",
"ruflin/elastica": "3.1.1",
-   "stil/gd-text":  "1.0.0",
+   "stil/gd-text":  "1.1.0",
"symfony/process": "3.0.4",
"wikimedia/assert": "0.2.2",
"wikimedia/avro": "1.7.7",
diff --git a/composer.lock b/composer.lock
index f1b4965..13d4e2f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "a9c582c2f13146cc5682614bde9bc333",
-"content-hash": "0171af9b056239fa57ab253b819a93a2",
+"hash": "edaca4a6dce7d749ea568a6c571f4c72",
+"content-hash": "6cd392587426ac45cd8b325f74822b93",
 "packages": [
 {
 "name": "composer/semver",
@@ -1159,26 +1159,30 @@
 },
 {
 "name": "stil/gd-text",
-"version": "v1.0.0",
+"version": "v1.1.0",
 "source": {
 "type": "git",
 "url": "https://github.com/stil/gd-text.git;,
-"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66"
+"reference": "ae2bd5736dbd6d45a4af1e4b9c573dd4d8d06b11"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/stil/gd-text/zipball/a3e561afd5a53a6a4b0c1d64ebaf51e768348a66;,
-"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66",
+"url": 
"https://api.github.com/repos/stil/gd-text/zipball/ae2bd5736dbd6d45a4af1e4b9c573dd4d8d06b11;,
+"reference": "ae2bd5736dbd6d45a4af1e4b9c573dd4d8d06b11",
 "shasum": ""
 },
 "require": {
 "ext-gd": "*",
 "php": ">=5.3"
 },
+"require-dev": {
+"phpunit/phpunit": "^5.4"
+},
 "type": "library",
 "autoload": {
 "psr-4": {
-"GDText\\": "src/"
+"GDText\\": "src/",
+"GDText\\Tests\\": "tests/"
 }
 },
 "notification-url": "https://packagist.org/downloads/;,
@@ -1186,7 +1190,7 @@
 "MIT"
 ],
 "description": "A class drawing multiline and aligned text on 
pictures. Uses GD extension.",
-"time": "2015-01-02 12:21:25"
+"time": "2016-07-22 22:31:04"
 },
 {
 "name": "symfony/process",
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 49a958f..c9f4c68 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -299,6 +299,13 @@
 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . 

[MediaWiki-commits] [Gerrit] mediawiki...ZeroBanner[master]: Move stil/gd-text to vendor repo properly

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Move stil/gd-text to vendor repo properly
..

Move stil/gd-text to vendor repo properly

Change-Id: Ic3682e05f65544194f33de0a81d5a76627fa7bb3
Depends-On: Idec56736150a72edc3892935d70c6847fdaf5d29
---
D composer.lock
D vendor/stil/gd-text/.gitignore
D vendor/stil/gd-text/README.md
D vendor/stil/gd-text/composer.json
D vendor/stil/gd-text/src/Box.php
D vendor/stil/gd-text/src/Color.php
6 files changed, 0 insertions(+), 544 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroBanner 
refs/changes/66/319766/1

diff --git a/composer.lock b/composer.lock
deleted file mode 100644
index da4e094..000
--- a/composer.lock
+++ /dev/null
@@ -1,50 +0,0 @@
-{
-"_readme": [
-"This file locks the dependencies of your project to a known state",
-"Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
-"This file is @generated automatically"
-],
-"hash": "f9c01036492a4f5ae465de4367f23383",
-"content-hash": "bb42dafdc6fa26adc8564659771d7e67",
-"packages": [
-{
-"name": "stil/gd-text",
-"version": "v1.0.0",
-"source": {
-"type": "git",
-"url": "https://github.com/stil/gd-text.git;,
-"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/stil/gd-text/zipball/a3e561afd5a53a6a4b0c1d64ebaf51e768348a66;,
-"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66",
-"shasum": ""
-},
-"require": {
-"ext-gd": "*",
-"php": ">=5.3"
-},
-"type": "library",
-"autoload": {
-"psr-4": {
-"GDText\\": "src/"
-}
-},
-"notification-url": "https://packagist.org/downloads/;,
-"license": [
-"MIT"
-],
-"description": "A class drawing multiline and aligned text on 
pictures. Uses GD extension.",
-"time": "2015-01-02 12:21:25"
-}
-],
-"packages-dev": [],
-"aliases": [],
-"minimum-stability": "stable",
-"stability-flags": [],
-"prefer-stable": false,
-"prefer-lowest": false,
-"platform": [],
-"platform-dev": []
-}
diff --git a/vendor/stil/gd-text/.gitignore b/vendor/stil/gd-text/.gitignore
deleted file mode 100644
index 654ae49..000
--- a/vendor/stil/gd-text/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-vendor/
-composer.lock
-Thumbs.db
-Desktop.ini
-.DS_Store
-.idea
diff --git a/vendor/stil/gd-text/README.md b/vendor/stil/gd-text/README.md
deleted file mode 100644
index 0171264..000
--- a/vendor/stil/gd-text/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
-gd-text
-===
-
-###Basic usage example
-```php
-setFontFace(__DIR__.'/Franchise-Bold-hinted.ttf'); // 
http://www.dafont.com/franchise.font
-$box->setFontColor(new Color(255, 75, 140));
-$box->setTextShadow(new Color(0, 0, 0, 50), 2, 2);
-$box->setFontSize(40);
-$box->setBox(20, 20, 460, 460);
-$box->setTextAlign('left', 'top');
-$box->draw("Franchise\nBold");
-
-$box = new Box($im);
-$box->setFontFace(__DIR__.'/Pacifico.ttf'); // 
http://www.dafont.com/pacifico.font
-$box->setFontSize(80);
-$box->setFontColor(new Color(255, 255, 255));
-$box->setTextShadow(new Color(0, 0, 0, 50), 0, -2);
-$box->setBox(20, 20, 460, 460);
-$box->setTextAlign('center', 'center');
-$box->draw("Pacifico");
-
-$box = new Box($im);
-$box->setFontFace(__DIR__.'/Prisma.otf'); // http://www.dafont.com/prisma.font
-$box->setFontSize(70);
-$box->setFontColor(new Color(148, 212, 1));
-$box->setTextShadow(new Color(0, 0, 0, 50), 0, -2);
-$box->setLeading(0.7);
-$box->setBox(20, 20, 460, 460);
-$box->setTextAlign('right', 'bottom');
-$box->draw("Prisma");
-
-header("Content-type: image/png");
-imagepng($im);
-```
-
-Example output:
-
-![fonts example](examples/fonts.png)
-
-###Multilined text
-
-```php
-setFontFace(__DIR__.'/Minecraftia.ttf'); // 
http://www.dafont.com/franchise.font
-$box->setFontColor(new Color(255, 75, 140));
-$box->setTextShadow(new Color(0, 0, 0, 50), 2, 2);
-$box->setFontSize(8);
-$box->setLineHeight(1.5);
-//$box->enableDebug();
-$box->setBox(20, 20, 460, 460);
-$box->setTextAlign('left', 'top');
-$box->draw(
-"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla 
eleifend congue auctor. Nullam eget blandit magna. Fusce posuere lacus at orci 
blandit auctor. Aliquam erat volutpat. Cras pharetra aliquet leo. Cras 
tristique tellus sit amet vestibulum ullamcorper. Aenean quam erat, ullamcorper 
quis blandit id, sollicitudin lobortis orci. In non varius metus. Aenean varius 
porttitor 

[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Properly add stil/gd-text for ZeroBanner

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Properly add stil/gd-text for ZeroBanner
..

Properly add stil/gd-text for ZeroBanner

Change-Id: Idec56736150a72edc3892935d70c6847fdaf5d29
---
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_psr4.php
M composer/installed.json
A stil/gd-text/.gitignore
A stil/gd-text/README.md
A stil/gd-text/composer.json
A stil/gd-text/examples/alignment.gif
A stil/gd-text/examples/debug.png
A stil/gd-text/examples/fonts.png
A stil/gd-text/examples/lineheight.gif
A stil/gd-text/src/Box.php
A stil/gd-text/src/Color.php
14 files changed, 564 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/65/319765/1

diff --git a/composer.json b/composer.json
index 7e8cc4f..e76e58c 100644
--- a/composer.json
+++ b/composer.json
@@ -32,6 +32,7 @@
"pimple/pimple": "2.1.1",
"psr/log": "1.0.0",
"ruflin/elastica": "3.1.1",
+   "stil/gd-text":  "1.0.0",
"symfony/process": "3.0.4",
"wikimedia/assert": "0.2.2",
"wikimedia/avro": "1.7.7",
diff --git a/composer.lock b/composer.lock
index f4e63e9..f1b4965 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "c74fe46f9fdcf3e76526c28d9cc33baf",
-"content-hash": "82c8d10ea460b81de3a0b28b36a2e957",
+"hash": "a9c582c2f13146cc5682614bde9bc333",
+"content-hash": "0171af9b056239fa57ab253b819a93a2",
 "packages": [
 {
 "name": "composer/semver",
@@ -1158,6 +1158,37 @@
 "time": "2016-03-18 07:56:36"
 },
 {
+"name": "stil/gd-text",
+"version": "v1.0.0",
+"source": {
+"type": "git",
+"url": "https://github.com/stil/gd-text.git;,
+"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/stil/gd-text/zipball/a3e561afd5a53a6a4b0c1d64ebaf51e768348a66;,
+"reference": "a3e561afd5a53a6a4b0c1d64ebaf51e768348a66",
+"shasum": ""
+},
+"require": {
+"ext-gd": "*",
+"php": ">=5.3"
+},
+"type": "library",
+"autoload": {
+"psr-4": {
+"GDText\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/;,
+"license": [
+"MIT"
+],
+"description": "A class drawing multiline and aligned text on 
pictures. Uses GD extension.",
+"time": "2015-01-02 12:21:25"
+},
+{
 "name": "symfony/process",
 "version": "v3.0.4",
 "source": {
diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 46826ac..49a958f 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -297,6 +297,8 @@
 'Firebase\\JWT\\ExpiredException' => $vendorDir . 
'/firebase/php-jwt/src/ExpiredException.php',
 'Firebase\\JWT\\JWT' => $vendorDir . '/firebase/php-jwt/src/JWT.php',
 'Firebase\\JWT\\SignatureInvalidException' => $vendorDir . 
'/firebase/php-jwt/src/SignatureInvalidException.php',
+'GDText\\Box' => $vendorDir . '/stil/gd-text/src/Box.php',
+'GDText\\Color' => $vendorDir . '/stil/gd-text/src/Color.php',
 'HtmlFormatter\\HtmlFormatter' => $vendorDir . 
'/wikimedia/html-formatter/src/HtmlFormatter.php',
 'IPSet\\IPSet' => $vendorDir . '/wikimedia/ip-set/src/IPSet.php',
 'JsonSchema\\Constraints\\CollectionConstraint' => $vendorDir . 
'/justinrainbow/json-schema/src/JsonSchema/Constraints/CollectionConstraint.php',
diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php
index 4888bee..4921f11 100644
--- a/composer/autoload_psr4.php
+++ b/composer/autoload_psr4.php
@@ -13,6 +13,7 @@
 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
 'JsonSchema\\' => array($vendorDir . 
'/justinrainbow/json-schema/src/JsonSchema'),
+'GDText\\' => array($vendorDir . '/stil/gd-text/src'),
 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
 'Elastica\\' => array($vendorDir . '/ruflin/elastica/lib/Elastica'),
 'Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
diff --git a/composer/installed.json b/composer/installed.json
index 884fd89..2c859ad 100644
--- a/composer/installed.json
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add shadow to the notifications top toolbar

2016-11-03 Thread Kmuthu (Code Review)
Kmuthu has uploaded a new change for review.

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

Change subject: Add shadow to the notifications top toolbar
..

Add shadow to the notifications top toolbar

Bug: T140964
Change-Id: I5d795bc9c6601d874dfd58010399832b2727b811
---
M modules/styles/mw.echo.ui.NotificationsInboxWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/styles/mw.echo.ui.NotificationsInboxWidget.less 
b/modules/styles/mw.echo.ui.NotificationsInboxWidget.less
index 5533717..a19d101 100644
--- a/modules/styles/mw.echo.ui.NotificationsInboxWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationsInboxWidget.less
@@ -50,6 +50,7 @@
background: #fff;
padding-top: 0.5em;
padding-bottom: 0.5em;
+   box-shadow: 0 2px 0 0 rgba(0,0,0,0.1);
}
 
&-settings {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make help link in sidebar same as main page default one

2016-11-03 Thread MtDu (Code Review)
MtDu has uploaded a new change for review.

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

Change subject: Make help link in sidebar same as main page default one
..

Make help link in sidebar same as main page default one

Bug: T148004
Change-Id: I1bc8a84773e69529aed719ce36f1196f12b56226
---
M includes/installer/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/319763/1

diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json
index 1f7333a..b25ff2c 100644
--- a/includes/installer/i18n/en.json
+++ b/includes/installer/i18n/en.json
@@ -308,5 +308,5 @@
"config-nofile": "File \"$1\" could not be found. Has it been deleted?",
"config-extension-link": "Did you know that your wiki supports 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions 
extensions]?\n\nYou can browse 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category
 extensions by category] or the 
[https://www.mediawiki.org/wiki/Extension_Matrix Extension Matrix] to see the 
full list of extensions.",
"mainpagetext": "MediaWiki has been installed.",
-   "mainpagedocfooter": "Consult the 
[https://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on 
using the wiki software.\n\n== Getting started ==\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings
 Configuration settings list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* 
[https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki 
release mailing list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources
 Localise MediaWiki for your language]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn 
how to combat spam on your wiki]"
+   "mainpagedocfooter": "Consult the 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents] for 
information on using the wiki software.\n\n== Getting started ==\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings
 Configuration settings list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]\n* 
[https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki 
release mailing list]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources
 Localise MediaWiki for your language]\n* 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Learn 
how to combat spam on your wiki]"
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make LBFactorySingle external LB methods throw exceptions

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

Change subject: Make LBFactorySingle external LB methods throw exceptions
..


Make LBFactorySingle external LB methods throw exceptions

There are no external clusters with this LB factory class,
so calling these methods makes no sense.

Change-Id: I63a9c6c76ba036980cfaab3ef03574295e46c6bf
---
M includes/libs/rdbms/lbfactory/LBFactorySingle.php
1 file changed, 2 insertions(+), 10 deletions(-)

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



diff --git a/includes/libs/rdbms/lbfactory/LBFactorySingle.php 
b/includes/libs/rdbms/lbfactory/LBFactorySingle.php
index e116888..9424614 100644
--- a/includes/libs/rdbms/lbfactory/LBFactorySingle.php
+++ b/includes/libs/rdbms/lbfactory/LBFactorySingle.php
@@ -70,20 +70,12 @@
return $this->lb;
}
 
-   /**
-* @param string $cluster External storage cluster name (unused)
-* @return LoadBalancerSingle
-*/
public function newExternalLB( $cluster ) {
-   return $this->lb;
+   throw new BadMethodCallException( "Method is not supported." );
}
 
-   /**
-* @param string $cluster External storage cluster name (unused)
-* @return LoadBalancerSingle
-*/
public function getExternalLB( $cluster ) {
-   return $this->lb;
+   throw new BadMethodCallException( "Method is not supported." );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Sentry[master]: "load_composer_autoloader": true

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: "load_composer_autoloader": true
..

"load_composer_autoloader": true

Change-Id: I08a2e4185d781f29655319659396744872c038cc
---
M SentryHooks.php
M extension.json
2 files changed, 1 insertion(+), 10 deletions(-)


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

diff --git a/SentryHooks.php b/SentryHooks.php
index 3481b9b..18f85f2 100644
--- a/SentryHooks.php
+++ b/SentryHooks.php
@@ -62,15 +62,6 @@
}
 
/**
-* Fake hook that is called at the end of Sentry.php.
-*/
-   public static function onRegistration() {
-   if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
-   require_once ( __DIR__ . '/vendor/autoload.php' );
-   }
-   }
-
-   /**
 * @param Exception $e
 * @param bool $suppressed True if the error is below the level set in 
error_reporting().
 * @return bool
diff --git a/extension.json b/extension.json
index 1588466..df1dbc3 100644
--- a/extension.json
+++ b/extension.json
@@ -6,7 +6,6 @@
"descriptionmsg": "sentry-desc",
"license-name": "MIT",
"type": "other",
-   "callback": "SentryHooks::registerExtension",
"MessagesDirs": {
"Sentry": [
"i18n"
@@ -51,5 +50,6 @@
"SentryLogOnError": true,
"SentryLogPhpErrors": true
},
+   "load_composer_autoloader": true,
"manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08a2e4185d781f29655319659396744872c038cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sentry
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Fix grrrit-wm crashing on specific git push commands

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

Change subject: Fix grrrit-wm crashing on specific git push commands
..


Fix grrrit-wm crashing on specific git push commands

When you did

git push origin "HEAD:refs/for/master/${VERSION}%l=Code-Review+2"

it caused grrrit-wm to crash.

Lets just put it in a try and catch to prevent the bot from crashing for now.

Change-Id: I24440affb4b7a4f2309d95d218efd8471248f276
---
M src/preprocess.js
1 file changed, 44 insertions(+), 35 deletions(-)

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



diff --git a/src/preprocess.js b/src/preprocess.js
index ee4e20e..fed8731 100644
--- a/src/preprocess.js
+++ b/src/preprocess.js
@@ -80,42 +80,51 @@
 bug: extractBugNumber(message.change.commitMessage),
 task: extractTaskNumber(message.change.commitMessage)
 };
-var inlineCount = message.comment.match(/(?:^|\s)\((\d+) 
comments?\)(?:$|\s)/),
-comment = message.comment
-// Strip out useless first line
-.replace(/^\s*Patch Set \d+:.*$/m, '')
-// Strip out count of inline comments
-.replace(/^\s*\(\d+ comments?\)$/m, '')
-.trim().split("\n")[0].trim();
-if(!comment) {
-comment = message.change.subject.substring(0, 140);
-} else {
-comment = '"' + comment.substring(0, 138) + '"';
-}
-if(inlineCount) {
-ret.inlineComments = inlineCount[1];
-}
-ret.message = comment;
-if(message.approvals) {
-ret.approvals = {};
-message.approvals.forEach(function(approval) {
-if(approval.type === 'Verified') {
-ret.approvals.V = approval.value;
-} else if (approval.type === 'Code-Review') {
-ret.approvals.C = approval.value;
-}
-});
-}
-if(ret.user === 'jenkins-bot') {
-ret.message = message.change.subject;
-if(!ret.approvals || ret.approvals.V > 0) {
-// Don't relay jenkins-bot comments that don't add negative 
approvals
-// Also don't add V+2 from jenkins bot, since it will merge right 
after
-// Customize to relay other messages that might be useful
-ret = undefined;
-} else if (ret.approvals && ret.approvals.V === -1) {
-ret.user = 'jerkins-bot';
+try {
+var comment = "", inlineCount;
+
+if (message.comment) {
+inlineCount = message.comment.match(/(?:^|\s)\((\d+) 
comments?\)(?:$|\s)/);
+comment = message.comment
+// Strip out useless first line
+.replace(/^\s*Patch Set \d+:.*$/m, '')
+// Strip out count of inline comments
+.replace(/^\s*\(\d+ comments?\)$/m, '')
+.trim().split("\n")[0].trim();
 }
+
+if(comment) {
+ret.message = '"' + comment.substring(0, 138) + '"';
+} else {
+ret.message = message.change.subject.substring(0, 140);
+}
+if(inlineCount) {
+ret.inlineComments = inlineCount[1];
+}
+ret.message = comment;
+if(message.approvals) {
+ret.approvals = {};
+message.approvals.forEach(function(approval) {
+if(approval.type === 'Verified') {
+ret.approvals.V = approval.value;
+} else if (approval.type === 'Code-Review') {
+ret.approvals.C = approval.value;
+}
+});
+}
+if(ret.user === 'jenkins-bot') {
+ret.message = message.change.subject;
+if(!ret.approvals || ret.approvals.V > 0) {
+// Don't relay jenkins-bot comments that don't add negative 
approvals
+// Also don't add V+2 from jenkins bot, since it will merge 
right after
+// Customize to relay other messages that might be useful
+ret = undefined;
+} else if (ret.approvals && ret.approvals.V === -1) {
+ret.user = 'jerkins-bot';
+}
+}
+} catch(err) {
+ret = undefined;
 }
 return ret;
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24440affb4b7a4f2309d95d218efd8471248f276
Gerrit-PatchSet: 7
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Disable Flow on enwiki

2016-11-03 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Disable Flow on enwiki
..

Disable Flow on enwiki

Bug: T148611
Change-Id: If645ee863bec35e8ff696493515ac61f7ebf199e
---
M dblists/flow.dblist
M dblists/nonflow.dblist
2 files changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/dblists/flow.dblist b/dblists/flow.dblist
index 8006761..64dbb4f 100644
--- a/dblists/flow.dblist
+++ b/dblists/flow.dblist
@@ -181,7 +181,6 @@
 elwikivoyage
 elwiktionary
 emlwiki
-enwiki
 enwikibooks
 enwikinews
 enwikiquote
diff --git a/dblists/nonflow.dblist b/dblists/nonflow.dblist
index 84ad529..9dafd13 100644
--- a/dblists/nonflow.dblist
+++ b/dblists/nonflow.dblist
@@ -1,5 +1,6 @@
 betawikiversity
 dewikivoyage
+enwiki
 enwikiversity
 jawikiversity
 loginwiki

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: statistics/wmde: capitalize resource reference

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

Change subject: statistics/wmde: capitalize resource reference
..


statistics/wmde: capitalize resource reference

18:12:05 Warning: Deprecation notice:
Resource references should now be capitalized
on line 122 in file
/srv/jenkins-workspace/workspace/operations-puppet-doc/src/modules/statistics/manifests/wmde.pp

Change-Id: Icd21c56d732bb7a4d8c3fe5c662b26943b544d11
---
M modules/statistics/manifests/wmde.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/statistics/manifests/wmde.pp 
b/modules/statistics/manifests/wmde.pp
index ca72855..ad42413 100644
--- a/modules/statistics/manifests/wmde.pp
+++ b/modules/statistics/manifests/wmde.pp
@@ -119,7 +119,7 @@
 require => [
 Git::Clone['wmde/scripts'],
 File["${dir}/src/config"],
-mysql::config::client['research-wmde'],
+Mysql::Config::Client['research-wmde'],
 ],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd21c56d732bb7a4d8c3fe5c662b26943b544d11
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...EventBus[wmf/1.29.0-wmf.1]: Add logging and check for empty JSON encoded body

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

Change subject: Add logging and check for empty JSON encoded body
..


Add logging and check for empty JSON encoded body

Also properly log eventbus request on error

Bug: T148251
Change-Id: If0feb3b752d603adb45e3f836d07237e33668c78
(cherry picked from commit 1512ea22e58af4853742b4d77c210678716a21cf)
---
M EventBus.php
1 file changed, 25 insertions(+), 10 deletions(-)

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



diff --git a/EventBus.php b/EventBus.php
index 9879e3e..31d8d8f 100644
--- a/EventBus.php
+++ b/EventBus.php
@@ -48,7 +48,7 @@
public function send( $events ) {
if ( empty( $events ) ) {
$context = [ 'backtrace' => debug_backtrace() ];
-   $this->logger->error( 'Must call send with at least 1 
event.', $context );
+   $this->logger->error( 'Must call send with at least 1 
event. Aborting send.', $context );
return;
}
 
@@ -56,15 +56,30 @@
$eventServiceUrl = $config->get( 'EventServiceUrl' );
$eventServiceTimeout = $config->get( 'EventServiceTimeout' );
 
-   $request = [
+   $body = FormatJson::encode( $events );
+
+   if ( empty ( $body ) ) {
+   $context = [
+   'backtrace' => debug_backtrace(),
+   'events' => $events,
+   'json_last_error' => json_last_error()
+   ];
+   $this->logger->error(
+   'FormatJson::encode($events) failed: ' . 
$context['json_last_error'] .
+   '. Aborting send.', $context
+   );
+   return;
+   }
+
+   $req = [
'url'   => $eventServiceUrl,
'method'=> 'POST',
-   'body'  => FormatJson::encode( $events ),
+   'body'  => $body,
'headers'   => [ 'content-type' => 
'application/json' ]
];
 
-   $ret = $this->http->run(
-   $request,
+   $res = $this->http->run(
+   $req,
[
'reqTimeout' => $eventServiceTimeout ?: 
self::REQ_TIMEOUT
]
@@ -73,14 +88,14 @@
// 201: all events are accepted
// 207: some but not all events are accepted
// 400: no events are accepted
-   if ( $ret['code'] != 201 ) {
-   $this->onError( $ret );
+   if ( $res['code'] != 201 ) {
+   $this->onError( $req, $res );
}
}
 
-   private function onError( $ret ) {
-   $message = empty( $ret['error'] ) ? $ret['code'] . ': ' . 
$ret['reason'] : $ret['error'];
-   $context = [ 'EventBus' => [ 'request' => $request, 'response' 
=> $ret ] ];
+   private function onError( $req, $res ) {
+   $message = empty( $res['error'] ) ? $res['code'] . ': ' . 
$res['reason'] : $res['error'];
+   $context = [ 'EventBus' => [ 'request' => $req, 'response' => 
$res ] ];
$this->logger->error( "Unable to deliver event: ${message}", 
$context );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0feb3b752d603adb45e3f836d07237e33668c78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: wmf/1.29.0-wmf.1
Gerrit-Owner: Ottomata 
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] apps...wikipedia[master]: Marshal DescriptionEditFragment Bundle not Intent

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

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

Change subject: Marshal DescriptionEditFragment Bundle not Intent
..

Marshal DescriptionEditFragment Bundle not Intent

• Unmarshal from the Fragment argument bundle not the Intent. In the
  present implementation, this has the same effect since the Activity
  uses the same key and passes the same data.

• For good symmetry, null out the EditView callback and PageTitle
  argument.

Bug: T148203
Change-Id: I192f9e292763480874e9de432744322f97221336
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
1 file changed, 13 insertions(+), 7 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
index edce316..81b3ac6 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
@@ -23,21 +23,25 @@
 import retrofit2.Call;
 
 public class DescriptionEditFragment extends Fragment {
-private static final String EXTRA_TITLE = "title";
+private static final String ARG_TITLE = "title";
 
 @BindView(R.id.description_edit_view) DescriptionEditView editView;
 private Unbinder unbinder;
 private PageTitle pageTitle;
-private EditViewCallback callback = new EditViewCallback();
-private Call call;
+@Nullable private Call call;
 
 @NonNull
 public static DescriptionEditFragment newInstance(@NonNull PageTitle 
title) {
 DescriptionEditFragment instance = new DescriptionEditFragment();
 Bundle args = new Bundle();
-args.putString(EXTRA_TITLE, GsonMarshaller.marshal(title));
+args.putString(ARG_TITLE, GsonMarshaller.marshal(title));
 instance.setArguments(args);
 return instance;
+}
+
+@Override public void onCreate(@Nullable Bundle savedInstanceState) {
+super.onCreate(savedInstanceState);
+pageTitle = GsonUnmarshaller.unmarshal(PageTitle.class, 
getArguments().getString(ARG_TITLE));
 }
 
 @Nullable
@@ -47,9 +51,8 @@
 View view = inflater.inflate(R.layout.fragment_description_edit, 
container, false);
 unbinder = ButterKnife.bind(this, view);
 
-pageTitle = GsonUnmarshaller.unmarshal(PageTitle.class, 
getActivity().getIntent().getStringExtra(EXTRA_TITLE));
 editView.setPageTitle(pageTitle);
-editView.setCallback(callback);
+editView.setCallback(new EditViewCallback());
 return view;
 }
 
@@ -60,6 +63,7 @@
 }
 
 @Override public void onDestroyView() {
+editView.setCallback(null);
 unbinder.unbind();
 unbinder = null;
 super.onDestroyView();
@@ -68,7 +72,9 @@
 @Override public void onDestroy() {
 if (call != null) {
 call.cancel();
+call = null;
 }
+pageTitle = null;
 super.onDestroy();
 }
 
@@ -114,4 +120,4 @@
 });
 }
 }
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I192f9e292763480874e9de432744322f97221336
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] operations/mediawiki-config[master]: Bumping portals to master

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

Change subject: Bumping portals to master
..


Bumping portals to master

Bug: T146807
Change-Id: I72a1b695e3a41bb271379d4cb752da519657612f
---
M portals
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/portals b/portals
index 5cf6fe5..950f38f 16
--- a/portals
+++ b/portals
@@ -1 +1 @@
-Subproject commit 5cf6fe595a32a29805e2d3639d6c7e738ea2304c
+Subproject commit 950f38f96d877b08221bcb9918337463b8a9fe7c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72a1b695e3a41bb271379d4cb752da519657612f
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdrewniak 
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] operations/puppet[production]: contint: drop contint::packages

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

Change subject: contint: drop contint::packages
..


contint: drop contint::packages

The class was meant to share packages definition between production
and labs slaves.  Nowadays almost everything runs on labs and
contint::packages has been slowly deprecated in favor of
contint::packages::labs.

The last remnant is contint::packages::base which just installs
curl/colordiff.

Directly include contint::packages::base instead of contint::packages
Remove the include from contint::browsertests, it is always included on
slaves that already include contint::packages::base.

Delete the now useless manifest.

Change-Id: I9b39096c565741b51059acc24a027457f0358d91
---
M modules/contint/manifests/browsertests.pp
D modules/contint/manifests/packages.pp
M modules/contint/manifests/packages/labs.pp
M modules/role/manifests/ci/slave.pp
4 files changed, 2 insertions(+), 15 deletions(-)

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



diff --git a/modules/contint/manifests/browsertests.pp 
b/modules/contint/manifests/browsertests.pp
index 79f30ea..51eae39 100644
--- a/modules/contint/manifests/browsertests.pp
+++ b/modules/contint/manifests/browsertests.pp
@@ -2,8 +2,6 @@
 #
 class contint::browsertests {
 
-# Ship several packages such as php5-sqlite or ruby1.9.3
-include contint::packages
 include contint::packages::ruby
 
 # Provides phantomjs, firefox and xvfb
diff --git a/modules/contint/manifests/packages.pp 
b/modules/contint/manifests/packages.pp
deleted file mode 100644
index f69c8fc..000
--- a/modules/contint/manifests/packages.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Holds all the packages needed for continuous integration.
-#
-# FIXME: split this!
-#
-class contint::packages {
-
-# Basic utilites needed for all Jenkins slaves
-include ::contint::packages::base
-
-}
diff --git a/modules/contint/manifests/packages/labs.pp 
b/modules/contint/manifests/packages/labs.pp
index 25bf5bb..6042422 100644
--- a/modules/contint/manifests/packages/labs.pp
+++ b/modules/contint/manifests/packages/labs.pp
@@ -7,7 +7,7 @@
 
 require contint::packages::apt
 
-include contint::packages
+include contint::packages::base
 
 include ::mediawiki::packages
 include ::mediawiki::packages::multimedia  # T76661
diff --git a/modules/role/manifests/ci/slave.pp 
b/modules/role/manifests/ci/slave.pp
index a04403c..9cd1134 100644
--- a/modules/role/manifests/ci/slave.pp
+++ b/modules/role/manifests/ci/slave.pp
@@ -10,7 +10,7 @@
 
 system::role { 'role::ci::slave': description => 'CI slave runner' }
 
-include contint::packages
+include contint::packages::base
 require contint::master_dir
 
 class { '::zuul': }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b39096c565741b51059acc24a027457f0358d91
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
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] operations/puppet[production]: zuul-gearman-status.py requires python-gear

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

Change subject: zuul-gearman-status.py requires python-gear
..


zuul-gearman-status.py requires python-gear

Change-Id: I7728329827bd18a04c699df2d0ff4fb661c9f3a6
---
M modules/zuul/manifests/server.pp
1 file changed, 10 insertions(+), 5 deletions(-)

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



diff --git a/modules/zuul/manifests/server.pp b/modules/zuul/manifests/server.pp
index aa91575..5ddf540 100644
--- a/modules/zuul/manifests/server.pp
+++ b/modules/zuul/manifests/server.pp
@@ -70,12 +70,17 @@
 notify=> Exec['craft public zuul conf'],
 }
 
-file { '/usr/local/bin/zuul-gearman.py':
+package { 'python-gear':
+# Solely for zuul-gearman.py , the server has gear embedded.
 ensure => present,
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-source => 'puppet:///modules/zuul/zuul-gearman.py',
+}
+file { '/usr/local/bin/zuul-gearman.py':
+ensure  => present,
+owner   => 'root',
+group   => 'root',
+mode=> '0555',
+source  => 'puppet:///modules/zuul/zuul-gearman.py',
+require => Package['python-gear'],
 }
 
 file { '/usr/local/bin/zuul-test-repo':

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Designate nova_fixed_multi plugin: avoid race conditions

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

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

Change subject: Designate nova_fixed_multi plugin:  avoid race conditions
..

Designate nova_fixed_multi plugin:  avoid race conditions

It seems that the calling code was using the same
'criterion' object for record selection for multiple
calls to our plugin, from different threads.  Our plugin
rudely modified the object during the run, which affected
other runs on different threads.

Now we only use copies of the passed-in object, which seems
to resolve a bunch of leaks.

Bug: T115194
Change-Id: I15aa2b5689c46b7e37467ef6d10f3956fa45ad0b
---
M modules/openstack/files/liberty/designate/nova_fixed_multi/base.py
M modules/openstack/files/mitaka/designate/nova_fixed_multi/base.py
2 files changed, 47 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/319759/1

diff --git a/modules/openstack/files/liberty/designate/nova_fixed_multi/base.py 
b/modules/openstack/files/liberty/designate/nova_fixed_multi/base.py
index 8b5a241..bde2d65 100644
--- a/modules/openstack/files/liberty/designate/nova_fixed_multi/base.py
+++ b/modules/openstack/files/liberty/designate/nova_fixed_multi/base.py
@@ -165,10 +165,11 @@
 context.all_tenants = True
 context.edit_managed_records = True
 
-criterion.update({'domain_id': cfg.CONF[self.name].domain_id})
+forward_crit = criterion.copy()
+forward_crit['domain_id'] = cfg.CONF[self.name].domain_id
 
 if managed:
-criterion.update({
+forward_crit.update({
 'managed': managed,
 'managed_plugin_name': self.get_plugin_name(),
 'managed_plugin_type': self.get_plugin_type(),
@@ -176,22 +177,34 @@
 'managed_resource_type': resource_type
 })
 
-records = central_api.find_records(context, criterion)
+records = central_api.find_records(context, forward_crit)
 
 for record in records:
-LOG.warn('Deleting record %s' % record['id'])
+LOG.warn('Deleting forward record %s in recordset %s' % 
(record['id'],
+ 
record['recordset_id']))
 
 central_api.delete_record(context, cfg.CONF[self.name].domain_id,
   record['recordset_id'], record['id'])
 
 reverse_domain_id = cfg.CONF[self.name].get('reverse_domain_id')
 if reverse_domain_id:
-criterion.update({'domain_id': reverse_domain_id})
+reverse_crit = criterion.copy()
+reverse_crit.update({'domain_id': reverse_domain_id})
 
-records = central_api.find_records(context, criterion)
+if managed:
+reverse_crit.update({
+'managed': managed,
+'managed_plugin_name': self.get_plugin_name(),
+'managed_plugin_type': self.get_plugin_type(),
+'managed_resource_id': resource_id,
+'managed_resource_type': resource_type
+})
+
+records = central_api.find_records(context, reverse_crit)
 
 for record in records:
-LOG.warn('Deleting record %s' % record['id'])
+LOG.warn('Deleting reverse record %s in recordset %s' % 
(record['id'],
+ 
record['recordset_id']))
 
 central_api.delete_record(context,
   reverse_domain_id,
diff --git a/modules/openstack/files/mitaka/designate/nova_fixed_multi/base.py 
b/modules/openstack/files/mitaka/designate/nova_fixed_multi/base.py
index e90f803..bde2d65 100644
--- a/modules/openstack/files/mitaka/designate/nova_fixed_multi/base.py
+++ b/modules/openstack/files/mitaka/designate/nova_fixed_multi/base.py
@@ -119,9 +119,9 @@
 'managed_resource_type': resource_type,
 'managed_resource_id': resource_id})
 
-LOG.debug('Creating record in %s / %s with values %r',
-  reverse_domain['id'],
-  recordset['id'], record_values)
+LOG.warn('Creating record in %s / %s with values %r',
+ reverse_domain['id'],
+ recordset['id'], record_values)
 central_api.create_record(context,
   reverse_domain['id'],
   recordset['id'],
@@ -147,8 +147,8 @@
 'managed_resource_type': resource_type,
 'managed_resource_id': resource_id})
 
-LOG.debug('Creating record in %s / %s with values %r',
-   

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add option to download file of skipped, ignored, and error f...

2016-11-03 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Add option to download file of skipped, ignored, and error from 
upload.
..

Add option to download file of skipped, ignored, and error from upload.

The url to download the csv files only has minimal protection - ie. it is 
restricted by permission
but within that permission some could theoretically fish for files they did not 
create. How much of
a concern is that?

Also, my feeling is that it would be worth when we abort copying the errors and 
all remaining
lines (and possibly skipped & ignored) into a 'not-imported' csv as I feel that 
would be easier
for the users. There is some extra processing and files created, but I think it 
is probably warranted.

Lastly, needs some unit tests

Bug: T88460
Change-Id: I01c694f9ef225376cac49c6cd85aa1569bbda10b
---
M sites/all/modules/offline2civicrm/ChecksFile.php
M sites/all/modules/offline2civicrm/offline2civicrm.module
2 files changed, 89 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/58/319758/1

diff --git a/sites/all/modules/offline2civicrm/ChecksFile.php 
b/sites/all/modules/offline2civicrm/ChecksFile.php
index f5c428b..f536960 100644
--- a/sites/all/modules/offline2civicrm/ChecksFile.php
+++ b/sites/all/modules/offline2civicrm/ChecksFile.php
@@ -7,12 +7,20 @@
  */
 abstract class ChecksFile {
 protected $numSkippedRows = 0;
+protected $messages = array();
+protected $file_uri = '';
+protected $error_file_uri = '';
+protected $skipped_file_uri = '';
+protected $ignored_file_uri = '';
 
 /**
  * @param string $file_uri path to the file
  */
 function __construct( $file_uri ) {
 $this->file_uri = $file_uri;
+$this->error_file_uri = str_replace('.csv', '_errors.csv', $file_uri);
+$this->skipped_file_uri = str_replace('.csv', '_skipped.csv', 
$file_uri);
+$this->ignored_file_uri = str_replace('.csv', '_ignored.csv', 
$file_uri);
 }
 
 /**
@@ -35,7 +43,7 @@
 
 $headers = _load_headers( fgetcsv( $file, 0, ',', '"', '\\') );
 
-   $this->validateColumns( $headers );
+$this->validateColumns( $headers );
 
 $num_errors = 0;
 $num_ignored = 0;
@@ -69,7 +77,12 @@
 if ( $existing = 
wmf_civicrm_get_contributions_from_gateway_id( $msg['gateway'], 
$msg['gateway_txn_id'] ) ){
 $skipped = $this->handleDuplicate( $existing );
 if ( $skipped ) {
+if ($num_duplicates === 0) {
+  $skipped_file = 
$this->createOutputFile($this->skipped_file_uri, 'Skipped', $headers);
+}
 $num_duplicates++;
+fputcsv($skipped_file, array_merge(array('Skipped' => 
'Duplicate'), $data));
+
 } else {
 $num_successful++;
 }
@@ -90,15 +103,24 @@
 } catch ( EmptyRowException $ex ) {
 continue;
 } catch ( IgnoredRowException $ex ) {
+if ($num_ignored === 0) {
+  $ignored_file = 
$this->createOutputFile($this->ignored_file_uri, 'Ignored', $headers);
+}
+fputcsv($ignored_file, array_merge(array('Ignored' => 
$ex->getUserErrorMessage()), $data));
 $num_ignored++;
 continue;
 } catch ( WmfException $ex ) {
+if ($num_errors === 0) {
+  $error_file = $this->createOutputFile($this->error_file_uri, 
'Error', $headers);
+}
+  $m = $ex->getUserErrorMessage();
 $num_errors++;
+fputcsv($error_file, array_merge(array('error' => 
$ex->getUserErrorMessage()), $data));
 
-ChecksImportLog::record( t( "Error in line @rownum: @row 
(@exception)", array(
+ChecksImportLog::record( t( "Error in line @rownum: 
(@exception) @row", array(
 '@rownum' => $rowNum,
 '@row' => implode( ', ', $row ),
-'@exception' => $ex->getMessage(),
+'@exception' => $ex->getUserErrorMessage(),
 ) ) );
 
 if ( $error_streak_start + $error_streak_count < $rowNum ) {
@@ -107,19 +129,37 @@
 $error_streak_count = 0;
 }
 $error_streak_count++;
+
 if ( $error_streak_count >= $error_streak_threshold ) {
-$errorMsg = "Import aborted due to {$error_streak_count} 
consecutive errors, last error was at row {$rowNum}: {$ex->getMessage()}, after 
{$num_successful} records were stored successfully, {$num_ignored} were 
ignored, {$num_duplicates} duplicates, and {$num_errors} errors encountered.";
+   

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Alter WMFException to permit us to present a simpler error f...

2016-11-03 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Alter WMFException to permit us to present a simpler error for 
users.
..

Alter WMFException to permit us to present a simpler error for users.

Currently the debug is being passed in, which is fine except when we want to 
present the message to users.

Bug: T88460
Change-Id: Icd69c23dd4387aff720cdc9d6b0e5950406e4067
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
M sites/all/modules/wmf_common/WmfException.php
2 files changed, 20 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/57/319757/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 06913be..636229b 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -450,7 +450,8 @@
 throw new WmfException(
 'INVALID_MESSAGE',
 'Cannot create contribution, civi error!',
-$e->getMessage() . print_r($e->getExtraParams(), TRUE)
+$e->getMessage(),
+$e->getExtraParams()
 );
 }
 
diff --git a/sites/all/modules/wmf_common/WmfException.php 
b/sites/all/modules/wmf_common/WmfException.php
index cd5d3b8..1fed299 100644
--- a/sites/all/modules/wmf_common/WmfException.php
+++ b/sites/all/modules/wmf_common/WmfException.php
@@ -107,36 +107,47 @@
 
 var $extra;
 var $type;
+var $userMessage;
 
-function __construct( $type, $message, $extra = null ) {
+function __construct( $type, $message, $apiMessage = '', $extra = array()) 
{
 if ( !array_key_exists( $type, self::$error_types ) ) {
 $message .= ' -- ' . t( 'Warning, throwing a misspelled exception: 
"%type"', array( '%type' => $type ) );
 $type = 'UNKNOWN';
 }
 $this->type = $type;
 $this->code = constant( 'WmfException::' . $type );
+if (empty($extra) && $apiMessage) {
+   $extra['error_message'] = var_export( $apiMessage, TRUE );
+}
 $this->extra = $extra;
 
 if ( is_array( $message ) ) {
 $message = implode( "\n", $message );
 }
 $this->message = "{$this->type} {$message}";
-
-if ( $extra ) {
-$this->message .= "\nSource: " . var_export( $extra, true );
-}
+$this->userMessage = $this->message;
+$this->message = $this->message . "\nSource: " . var_export( 
$this->extra, true );
 
 if ( function_exists( 'watchdog' ) ) {
 // It seems that dblog_watchdog will pass through XSS, so
 // rely on our own escaping above, rather than pass $vars.
-$escaped = htmlspecialchars( $this->message, ENT_COMPAT, 'UTF-8', 
false );
+$escaped = htmlspecialchars( $this->getMessage(), ENT_COMPAT, 
'UTF-8', false );
 watchdog( 'wmf_common', $escaped, NULL, WATCHDOG_ERROR );
 }
 if ( function_exists('drush_set_error') && $this->isFatal() ) {
-drush_set_error( $this->type, $this->message );
+drush_set_error( $this->type, $this->getMessage() );
 }
 }
 
+  /**
+   * Get error message intended for end users.
+   *
+   * @return string
+   */
+function getUserErrorMessage() {
+return !empty($this->extra['error_message']) ? 
$this->extra['error_message'] : $this->userMessage;
+}
+
 function getErrorName()
 {
 return $this->type;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: Revert "Revert BlockAndNuke to manifest_version_1"

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

Change subject: Revert "Revert BlockAndNuke to manifest_version_1"
..


Revert "Revert BlockAndNuke to manifest_version_1"

This reverts commit 88a7da38a81fce536ac5a21d16a2b910364c9a91.

Change-Id: I3ae1e28570b5c0dfafc8a6df45d9d02c73b80756
---
M BlockAndNuke.hooks.php
M extension.json
2 files changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/BlockAndNuke.hooks.php b/BlockAndNuke.hooks.php
index a71f8e4..8730b3b 100644
--- a/BlockAndNuke.hooks.php
+++ b/BlockAndNuke.hooks.php
@@ -8,11 +8,4 @@
public static function onLanguageGetSpecialPageAliases( 
&$specialPageAliases, $langCode ) {
$specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}
-
-   public static function onRegistration() {
-   global $wgBaNwhitelist;
-   if ( $wgBaNwhitelist === null ) {
-   $wgBaNwhitelist = __DIR__ . '/whitelist.txt';
-   }
-   }
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 91345d8..40ef5b6 100644
--- a/extension.json
+++ b/extension.json
@@ -8,7 +8,6 @@
"descriptionmsg": "blockandnuke-desc",
"license-name": "GPL-3.0+",
"type": "specialpage",
-   "callback": "BlockAndNukeHooks::onRegistration",
"GroupPermissions": {
"sysop": {
"blockandnuke": true
@@ -35,8 +34,13 @@
"LanguageGetSpecialPageAliases": 
"BlockAndNukeHooks::onLanguageGetSpecialPageAliases"
},
"config": {
-   "BaNwhitelist": null,
-   "BaNSpamUser": "Spammer"
+   "BaNwhitelist": {
+   "value": "whitelist.txt",
+   "path": true
+   },
+   "BaNSpamUser": {
+   "value": "Spammer"
+   }
},
-   "manifest_version": 1
+   "manifest_version": 2
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ae1e28570b5c0dfafc8a6df45d9d02c73b80756
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[REL1_28]: Revert BlockAndNuke to manifest_version_1

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

Change subject: Revert BlockAndNuke to manifest_version_1
..


Revert BlockAndNuke to manifest_version_1

Bug: T149759
Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
(cherry picked from commit 88a7da38a81fce536ac5a21d16a2b910364c9a91)
---
M BlockAndNuke.hooks.php
M extension.json
2 files changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/BlockAndNuke.hooks.php b/BlockAndNuke.hooks.php
index 8730b3b..a71f8e4 100644
--- a/BlockAndNuke.hooks.php
+++ b/BlockAndNuke.hooks.php
@@ -8,4 +8,11 @@
public static function onLanguageGetSpecialPageAliases( 
&$specialPageAliases, $langCode ) {
$specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}
+
+   public static function onRegistration() {
+   global $wgBaNwhitelist;
+   if ( $wgBaNwhitelist === null ) {
+   $wgBaNwhitelist = __DIR__ . '/whitelist.txt';
+   }
+   }
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 40ef5b6..91345d8 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"descriptionmsg": "blockandnuke-desc",
"license-name": "GPL-3.0+",
"type": "specialpage",
+   "callback": "BlockAndNukeHooks::onRegistration",
"GroupPermissions": {
"sysop": {
"blockandnuke": true
@@ -34,13 +35,8 @@
"LanguageGetSpecialPageAliases": 
"BlockAndNukeHooks::onLanguageGetSpecialPageAliases"
},
"config": {
-   "BaNwhitelist": {
-   "value": "whitelist.txt",
-   "path": true
-   },
-   "BaNSpamUser": {
-   "value": "Spammer"
-   }
+   "BaNwhitelist": null,
+   "BaNSpamUser": "Spammer"
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: Revert "Revert BlockAndNuke to manifest_version_1"

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert "Revert BlockAndNuke to manifest_version_1"
..

Revert "Revert BlockAndNuke to manifest_version_1"

This reverts commit 88a7da38a81fce536ac5a21d16a2b910364c9a91.

Change-Id: I3ae1e28570b5c0dfafc8a6df45d9d02c73b80756
---
M BlockAndNuke.hooks.php
M extension.json
2 files changed, 8 insertions(+), 11 deletions(-)


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

diff --git a/BlockAndNuke.hooks.php b/BlockAndNuke.hooks.php
index a71f8e4..8730b3b 100644
--- a/BlockAndNuke.hooks.php
+++ b/BlockAndNuke.hooks.php
@@ -8,11 +8,4 @@
public static function onLanguageGetSpecialPageAliases( 
&$specialPageAliases, $langCode ) {
$specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}
-
-   public static function onRegistration() {
-   global $wgBaNwhitelist;
-   if ( $wgBaNwhitelist === null ) {
-   $wgBaNwhitelist = __DIR__ . '/whitelist.txt';
-   }
-   }
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 91345d8..40ef5b6 100644
--- a/extension.json
+++ b/extension.json
@@ -8,7 +8,6 @@
"descriptionmsg": "blockandnuke-desc",
"license-name": "GPL-3.0+",
"type": "specialpage",
-   "callback": "BlockAndNukeHooks::onRegistration",
"GroupPermissions": {
"sysop": {
"blockandnuke": true
@@ -35,8 +34,13 @@
"LanguageGetSpecialPageAliases": 
"BlockAndNukeHooks::onLanguageGetSpecialPageAliases"
},
"config": {
-   "BaNwhitelist": null,
-   "BaNSpamUser": "Spammer"
+   "BaNwhitelist": {
+   "value": "whitelist.txt",
+   "path": true
+   },
+   "BaNSpamUser": {
+   "value": "Spammer"
+   }
},
-   "manifest_version": 1
+   "manifest_version": 2
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ae1e28570b5c0dfafc8a6df45d9d02c73b80756
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[REL1_28]: Revert BlockAndNuke to manifest_version_1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert BlockAndNuke to manifest_version_1
..

Revert BlockAndNuke to manifest_version_1

Bug: T149759
Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
(cherry picked from commit 88a7da38a81fce536ac5a21d16a2b910364c9a91)
---
M BlockAndNuke.hooks.php
M extension.json
2 files changed, 11 insertions(+), 8 deletions(-)


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

diff --git a/BlockAndNuke.hooks.php b/BlockAndNuke.hooks.php
index 8730b3b..a71f8e4 100644
--- a/BlockAndNuke.hooks.php
+++ b/BlockAndNuke.hooks.php
@@ -8,4 +8,11 @@
public static function onLanguageGetSpecialPageAliases( 
&$specialPageAliases, $langCode ) {
$specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}
+
+   public static function onRegistration() {
+   global $wgBaNwhitelist;
+   if ( $wgBaNwhitelist === null ) {
+   $wgBaNwhitelist = __DIR__ . '/whitelist.txt';
+   }
+   }
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 40ef5b6..91345d8 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"descriptionmsg": "blockandnuke-desc",
"license-name": "GPL-3.0+",
"type": "specialpage",
+   "callback": "BlockAndNukeHooks::onRegistration",
"GroupPermissions": {
"sysop": {
"blockandnuke": true
@@ -34,13 +35,8 @@
"LanguageGetSpecialPageAliases": 
"BlockAndNukeHooks::onLanguageGetSpecialPageAliases"
},
"config": {
-   "BaNwhitelist": {
-   "value": "whitelist.txt",
-   "path": true
-   },
-   "BaNSpamUser": {
-   "value": "Spammer"
-   }
+   "BaNwhitelist": null,
+   "BaNSpamUser": "Spammer"
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: MtDu 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Do not backup /srv/jenkins/builds on contint1001

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

Change subject: Do not backup /srv/jenkins/builds on contint1001
..


Do not backup /srv/jenkins/builds on contint1001

The large history of Jenkins build is in a different directory on
contint1001.

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

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



diff --git a/modules/role/manifests/backup/director.pp 
b/modules/role/manifests/backup/director.pp
index f61aca9..be73585 100644
--- a/modules/role/manifests/backup/director.pp
+++ b/modules/role/manifests/backup/director.pp
@@ -208,7 +208,7 @@
 }
 bacula::director::fileset { 'contint':
 includes => [ '/srv', '/var/lib/zuul', '/var/lib/jenkins' ],
-excludes => [ '/srv/ssd', '/var/lib/jenkins/builds', ],
+excludes => [ '/srv/ssd', '/srv/jenkins/builds', 
'/var/lib/jenkins/builds', ],
 }
 bacula::director::fileset { 'etcd':
 includes => [ '/srv/backups/etcd' ]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c3b2fd36859ab023817384a8061dd953c64f28b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Alexandros Kosiaris 
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] mediawiki...BlockAndNuke[master]: Revert BlockAndNuke to manifest_version_1

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

Change subject: Revert BlockAndNuke to manifest_version_1
..


Revert BlockAndNuke to manifest_version_1

Bug: T149759
Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
---
M BlockAndNuke.hooks.php
M extension.json
2 files changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/BlockAndNuke.hooks.php b/BlockAndNuke.hooks.php
index 8730b3b..a71f8e4 100644
--- a/BlockAndNuke.hooks.php
+++ b/BlockAndNuke.hooks.php
@@ -8,4 +8,11 @@
public static function onLanguageGetSpecialPageAliases( 
&$specialPageAliases, $langCode ) {
$specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}
+
+   public static function onRegistration() {
+   global $wgBaNwhitelist;
+   if ( $wgBaNwhitelist === null ) {
+   $wgBaNwhitelist = __DIR__ . '/whitelist.txt';
+   }
+   }
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 40ef5b6..91345d8 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"descriptionmsg": "blockandnuke-desc",
"license-name": "GPL-3.0+",
"type": "specialpage",
+   "callback": "BlockAndNukeHooks::onRegistration",
"GroupPermissions": {
"sysop": {
"blockandnuke": true
@@ -34,13 +35,8 @@
"LanguageGetSpecialPageAliases": 
"BlockAndNukeHooks::onLanguageGetSpecialPageAliases"
},
"config": {
-   "BaNwhitelist": {
-   "value": "whitelist.txt",
-   "path": true
-   },
-   "BaNSpamUser": {
-   "value": "Spammer"
-   }
+   "BaNwhitelist": null,
+   "BaNSpamUser": "Spammer"
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Do not backup /srv/jenkins/builds on contint1001

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

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

Change subject: Do not backup /srv/jenkins/builds on contint1001
..

Do not backup /srv/jenkins/builds on contint1001

The large history of Jenkins build is in a different directory on
contint1001.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/319710/1

diff --git a/modules/role/manifests/backup/director.pp 
b/modules/role/manifests/backup/director.pp
index f61aca9..be73585 100644
--- a/modules/role/manifests/backup/director.pp
+++ b/modules/role/manifests/backup/director.pp
@@ -208,7 +208,7 @@
 }
 bacula::director::fileset { 'contint':
 includes => [ '/srv', '/var/lib/zuul', '/var/lib/jenkins' ],
-excludes => [ '/srv/ssd', '/var/lib/jenkins/builds', ],
+excludes => [ '/srv/ssd', '/srv/jenkins/builds', 
'/var/lib/jenkins/builds', ],
 }
 bacula::director::fileset { 'etcd':
 includes => [ '/srv/backups/etcd' ]

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

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

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

7fff2a1 Allow banner history IDs less than 16 digits long

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

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




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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

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

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

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

7fff2a1 Allow banner history IDs less than 16 digits long

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/09/319709/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Fix typo in BS-flexiskin-api-id-desc message

2016-11-03 Thread MtDu (Code Review)
MtDu has uploaded a new change for review.

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

Change subject: Fix typo in BS-flexiskin-api-id-desc message
..

Fix typo in BS-flexiskin-api-id-desc message

Bug: T149055
Change-Id: If1b9d3ec5d89bd7f861595149b80ec82731ee7c5
---
M Flexiskin/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Flexiskin/i18n/en.json b/Flexiskin/i18n/en.json
index 3cb9f31..7b4955a 100644
--- a/Flexiskin/i18n/en.json
+++ b/Flexiskin/i18n/en.json
@@ -50,7 +50,7 @@
"bs-flexiskin-api-desc": "API interface for the Bluespice extension 
Flexiskin.",
"bs-flexiskin-api-type-desc": "The action to be executed, e.g. 
\"delete\". Default is \"get\"",
"bs-flexiskin-api-mode-desc": "The actions mode, e.g. \"config\". 
Default is \"flexiskin\".",
-   "bs-flexiskin-api-id-desc": "The ID if the Flexiskin (optional).",
+   "bs-flexiskin-api-id-desc": "The ID of the Flexiskin (optional).",
"bs-flexiskin-api-data-desc": "A data array (optional).",
"bs-flexiskin-api-preview-desc": "Choose to display the preview mode or 
not (optional).",
"bs-flexiskin-api-example-desc": "Returns the current configuration of 
a Flexiskin.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1b9d3ec5d89bd7f861595149b80ec82731ee7c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Cleanup http redirects

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

Change subject: Cleanup http redirects
..


Cleanup http redirects

 * And make the /page/ path work for HEAD reqs as well.

Change-Id: I79f6fac1cf348d7173ef3d90d45dcfbff0e943e3
---
M lib/api/apiUtils.js
M lib/api/routes.js
2 files changed, 12 insertions(+), 15 deletions(-)

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



diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index ee490ea..d300c87 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -24,24 +24,21 @@
 /**
  * Send a redirect response with optional code and a relative URL
  *
- * (Returns if a response has already been sent.)
- * This is not strictly HTTP spec conformant, but works in most clients. More
- * importantly, it works both behind proxies and on the internal network.
  * @method
- * @param {Object} args
+ * @param {Response} res The response object from our routing function.
+ * @param {MWParserEnvironment} env
+ * @param {String} path
+ * @param {Number} [httpStatus]
  */
-apiUtils.relativeRedirect = function(args) {
-   if (!args.httpStatus) {
-   args.httpStatus = 302; // moved temporarily
+apiUtils.relativeRedirect = function(res, env, path, httpStatus) {
+   var args = [path];
+   if (typeof httpStatus === 'number') {
+   args.unshift(httpStatus);
}
-
-   if (args.res && args.env && args.env.responseSent) {
+   if (env.responseSent) {
return;
} else {
-   args.res.writeHead(args.httpStatus, {
-   'Location': args.path,
-   });
-   args.res.end();
+   res.redirect.apply(res, args);
}
 };
 
@@ -431,7 +428,7 @@
}
// Don't cache requests with no oldid
apiUtils.setHeader(res, env, 'Cache-Control', 
'private,no-cache,s-maxage=0');
-   apiUtils.relativeRedirect({ 'path': path, 'res': res, 'env': env });
+   apiUtils.relativeRedirect(res, env, path);
 };
 
 /**
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 1837285..db4a28c 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -82,7 +82,7 @@
);
 
var opts = Object.assign({
-   from: (req.method === 'GET') ? 'wikitext' : 
req.params.from,
+   from: (req.method === 'POST') ? req.params.from : 
'wikitext',
format: req.params.format,
}, req.body);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79f6fac1cf348d7173ef3d90d45dcfbff0e943e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Allow banner history IDs less than 16 digits long

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

Change subject: Allow banner history IDs less than 16 digits long
..


Allow banner history IDs less than 16 digits long

Oops, we've been rejecting some valid banner history entries.

Change-Id: Ic4fc195e7bbe92130f143d537aaf5eb8a9e3b748
---
M sites/all/modules/queue2civicrm/banner_history/BannerHistoryQueueConsumer.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git 
a/sites/all/modules/queue2civicrm/banner_history/BannerHistoryQueueConsumer.php 
b/sites/all/modules/queue2civicrm/banner_history/BannerHistoryQueueConsumer.php
index f0957b9..657018a 100644
--- 
a/sites/all/modules/queue2civicrm/banner_history/BannerHistoryQueueConsumer.php
+++ 
b/sites/all/modules/queue2civicrm/banner_history/BannerHistoryQueueConsumer.php
@@ -34,7 +34,7 @@
 
if (
!is_numeric( $contributionTrackingId ) ||
-   !preg_match( '/^[0-9a-f]{16,20}$/', $bannerHistoryId )
+   !preg_match( '/^[0-9a-f]{10,20}$/', $bannerHistoryId )
) {
throw new WmfException(
'BANNER_HISTORY',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[REL1_28]: Revert JsonConfig to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert JsonConfig to manifest_version 1
..

Revert JsonConfig to manifest_version 1

Bug: T149759
Change-Id: I9535a96c0924eabf06f65c90aed7f45912836890
---
M extension.json
1 file changed, 8 insertions(+), 20 deletions(-)


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

diff --git a/extension.json b/extension.json
index cd7b05b..f10828b 100644
--- a/extension.json
+++ b/extension.json
@@ -120,28 +120,16 @@
},
"config": {
"JsonConfigs": {
-   "merge_strategy": "array_replace_recursive",
-   "value": {}
+   "_merge_strategy": "array_replace_recursive"
},
"JsonConfigModels": {
-   "merge_strategy": "array_replace_recursive",
-   "value": {}
+   "_merge_strategy": "array_replace_recursive"
},
-   "JsonConfigDisableCache": {
-   "value": false
-   },
-   "JsonConfigCacheKeyPrefix": {
-   "value": "1"
-   },
-   "JsonConfigEnableLuaSupport": {
-   "value": false
-   },
-   "JsonConfigAllowedLicenses": {
-   "value": [ "CC0-1.0" ]
-   },
-   "JsonConfigInterwikiPrefix": {
-   "value": "commons"
-   }
+   "JsonConfigDisableCache": false,
+   "JsonConfigCacheKeyPrefix": "1",
+   "JsonConfigEnableLuaSupport": false,
+   "JsonConfigAllowedLicenses": [ "CC0-1.0" ],
+   "JsonConfigInterwikiPrefix": "commons"
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9535a96c0924eabf06f65c90aed7f45912836890
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: Revert BlockAndNuke to manifest_version_1

2016-11-03 Thread MtDu (Code Review)
MtDu has uploaded a new change for review.

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

Change subject: Revert BlockAndNuke to manifest_version_1
..

Revert BlockAndNuke to manifest_version_1

Bug: T149759
Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
---
M BlockAndNuke.hooks.php
M extension.json
2 files changed, 10 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlockAndNuke 
refs/changes/06/319706/1

diff --git a/BlockAndNuke.hooks.php b/BlockAndNuke.hooks.php
index 8730b3b..9f58732 100644
--- a/BlockAndNuke.hooks.php
+++ b/BlockAndNuke.hooks.php
@@ -8,4 +8,11 @@
public static function onLanguageGetSpecialPageAliases( 
&$specialPageAliases, $langCode ) {
$specialPageAliases['blockandnuke'] = array( 'BlockandNuke' );
}
+
+   public static function onRegistration() {
+   global $wgBaNwhitelist;
+   if ( $wgBaNwhitelist === null ) {
+   $wgBaNwhitelist = dirname( __DIR__ ) . 'whitelist.txt';
+   }
+   }
 }
\ No newline at end of file
diff --git a/extension.json b/extension.json
index 40ef5b6..6c16b02 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"descriptionmsg": "blockandnuke-desc",
"license-name": "GPL-3.0+",
"type": "specialpage",
+   "callback": "BlockAndNukeHooks::onRegistration",
"GroupPermissions": {
"sysop": {
"blockandnuke": true
@@ -34,13 +35,7 @@
"LanguageGetSpecialPageAliases": 
"BlockAndNukeHooks::onLanguageGetSpecialPageAliases"
},
"config": {
-   "BaNwhitelist": {
-   "value": "whitelist.txt",
-   "path": true
-   },
-   "BaNSpamUser": {
-   "value": "Spammer"
-   }
+   "BaNSpamUser": "Spammer"
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e2d6506e0972eabd4b93733b8d65a8824584aa7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: master
Gerrit-Owner: MtDu 

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoData[REL1_28]: Revert GeoData to manifest_version 1

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

Change subject: Revert GeoData to manifest_version 1
..


Revert GeoData to manifest_version 1

Bug: T149759
Change-Id: I0d1efb9b6695bddfb68e997acc73d7404e95d1db
---
M extension.json
1 file changed, 37 insertions(+), 61 deletions(-)

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



diff --git a/extension.json b/extension.json
index f9f82a4..add7896 100644
--- a/extension.json
+++ b/extension.json
@@ -54,70 +54,46 @@
"geodata-unknown-type-category"
],
"config": {
-   "MaxGeoSearchRadius": {
-   "value": 1
-   },
-   "DefaultGlobe": {
-   "value": "earth"
-   },
-   "MaxCoordinatesPerPage": {
-   "value": 500
-   },
+   "MaxGeoSearchRadius": 1,
+   "DefaultGlobe": "earth",
+   "MaxCoordinatesPerPage": 500,
"TypeToDim": {
-   "value": {
-   "country": 100,
-   "satellite": 100,
-   "state": 30,
-   "adm1st": 10,
-   "adm2nd": 3,
-   "adm3rd": 1,
-   "city": 1,
-   "isle": 1,
-   "mountain": 1,
-   "river": 1,
-   "waterbody": 1,
-   "event": 5000,
-   "forest": 5000,
-   "glacier": 5000,
-   "airport": 3000,
-   "railwaystation": 1000,
-   "edu": 1000,
-   "pass": 1000,
-   "camera": 1000,
-   "landmark": 1000
-   }
+   "country": 100,
+   "satellite": 100,
+   "state": 30,
+   "adm1st": 10,
+   "adm2nd": 3,
+   "adm3rd": 1,
+   "city": 1,
+   "isle": 1,
+   "mountain": 1,
+   "river": 1,
+   "waterbody": 1,
+   "event": 5000,
+   "forest": 5000,
+   "glacier": 5000,
+   "airport": 3000,
+   "railwaystation": 1000,
+   "edu": 1000,
+   "pass": 1000,
+   "camera": 1000,
+   "landmark": 1000
},
-   "DefaultDim": {
-   "value": 1000
-   },
-   "Globes": {
-   "value": []
-   },
+   "DefaultDim": 1000,
+   "Globes": [],
"GeoDataWarningLevel": {
-   "value": {
-   "unknown type": "track",
-   "unknown globe": "none",
-   "invalid region": "track"
-   }
+   "unknown type": "track",
+   "unknown globe": "none",
+   "invalid region": "track"
},
-   "GeoDataIndexGranularity": {
-   "value": 10
-   },
-   "GeoDataBackend": {
-   "value": "db"
-   },
-   "GeoDataInJS": {
-   "value": [
-   "lat",
-   "lon"
-   ]
-   },
-   "GeoDataUseCirrusSearch": {
-   "value": false
-   },
-   "GeoDataDebug": {
-   "value": false
-   }
+   "GeoDataIndexGranularity": 10,
+   "GeoDataBackend": "db",
+   "GeoDataInJS": [
+   "lat",
+   "lon"
+   ],
+   "GeoDataUseCirrusSearch": false,
+   "GeoDataDebug": false
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d1efb9b6695bddfb68e997acc73d7404e95d1db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: MaxSem 

[MediaWiki-commits] [Gerrit] labs...grrrit[master]: Fix grrrit-wm crashing on specific git push commands

2016-11-03 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Fix grrrit-wm crashing on specific git push commands
..

Fix grrrit-wm crashing on specific git push commands

When you did

git push origin "HEAD:refs/for/master/${VERSION}%l=Code-Review+2"

it caused grrrit-wm to crash.

Lets just put it in a try and catch to prevent the bot from crashing for now.

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


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit 
refs/changes/05/319705/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24440affb4b7a4f2309d95d218efd8471248f276
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Add index on linter.linter_cat

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

Change subject: Add index on linter.linter_cat
..


Add index on linter.linter_cat

For queries that list all errors of a certain type.

This patch needs to be applied manually, update.php won't work.

Change-Id: I42abded9df3ef2ff242be2b16f4c57bafc03ae39
---
M linter.sql
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/linter.sql b/linter.sql
index 3205806..aa0f158 100644
--- a/linter.sql
+++ b/linter.sql
@@ -11,3 +11,5 @@
 
 -- Query by page
 CREATE INDEX /*i*/linter_page ON /*_*/linter (linter_page);
+-- Query by category
+CREATE INDEX /*i*/linter_cat ON /*_*/linter (linter_cat);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42abded9df3ef2ff242be2b16f4c57bafc03ae39
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TrustedXFF[master]: Revert TrustedXff to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert TrustedXff to manifest_version 1
..

Revert TrustedXff to manifest_version 1

Bug: T149759
Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
---
M TrustedXFF.body.php
M extension.json
2 files changed, 10 insertions(+), 5 deletions(-)


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

diff --git a/TrustedXFF.body.php b/TrustedXFF.body.php
index b84ba0c..d907ed5 100644
--- a/TrustedXFF.body.php
+++ b/TrustedXFF.body.php
@@ -18,6 +18,13 @@
'2001:4c28:3000::/36'
];
 
+   public static function onRegistration() {
+   global $wgTrustedXffFile, $IP;
+   if ( $wgTrustedXffFile === null ) {
+   $wgTrustedXffFile = $IP . '/cache/trusted-xff.cdb';
+   }
+   }
+
/**
 * @param string $ip
 * @param bool $trusted
diff --git a/extension.json b/extension.json
index 498509f..421c639 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,9 @@
"Tim Starling"
],
"type": "other",
+   "callback": "TrustedXFF::onRegistration",
"config": {
-   "TrustedXffFile": {
-   "value": "cache/trusted-xff.cdb",
-   "path": true
-   }
+   "TrustedXffFile": null
},
"AutoloadClasses": {
"TrustedXFF": "TrustedXFF.body.php"
@@ -27,5 +25,5 @@
"TrustedXFF::onIsTrustedProxy"
]
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TrustedXFF
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[REL1_28]: Fix extension.json and also re add support for extension.jso...

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

Change subject: Fix extension.json and also re add support for extension.json 
in MW 1.27
..


Fix extension.json and also re add support for extension.json in MW 1.27

Change-Id: Ia58769f92153cd08409bc5c850b7ac0623b98b02
(cherry picked from commit 5b76de2a68263b1e48f869f757ea7b168671ed91)
---
M PageForms.php
M extension.json
2 files changed, 39 insertions(+), 89 deletions(-)

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



diff --git a/PageForms.php b/PageForms.php
index 65372f4..8efef74 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -43,7 +43,7 @@
 // set in LocalSettings.php do not override the settings in
 // extension.json. For simplicity's sake, don't load extensions unless we're
 // at version 1.27 or higher.
-if ( version_compare( $GLOBALS['wgVersion'], '1.28c', '>' ) ) {
+if ( version_compare( $GLOBALS['wgVersion'], '1.27c', '>' ) ) {
if ( function_exists( 'wfLoadExtension' ) ) {
wfLoadExtension( 'PageForms' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
diff --git a/extension.json b/extension.json
index fcfaf66..65ede80 100644
--- a/extension.json
+++ b/extension.json
@@ -31,7 +31,7 @@
"PFHooks::initialize"
],
"require": {
-   "MediaWiki": ">= 1.28.0"
+   "MediaWiki": ">= 1.27.0"
},
"GroupPermissions": {
"*": {
@@ -400,95 +400,45 @@
]
},
"config": {
-   "PageFormsMaxAutocompleteValues": {
-   "value": 1000
-   },
-   "PageFormsMaxLocalAutocompleteValues": {
-   "value": 100
-   },
-   "PageFormsAutocompleteOnAllChars": {
-   "value": false
-   },
-   "PageFormsCacheAutocompleteValues": {
-   "value": false
-   },
-   "PageFormsAutocompleteCacheTimeout": {
-   "value": null
-   },
-   "PageFormsRenameEditTabs": {
-   "value": false
-   },
-   "PageFormsRenameMainEditTab": {
-   "value": false
-   },
-   "PageFormsListSeparator": {
-   "value": ","
-   },
-   "PageForms24HourTime": {
-   "value": false
-   },
-   "PageFormsCacheFormDefinitions": {
-   "value": false
-   },
-   "PageFormsFormCacheType": {
-   "value": null
-   },
-   "PageFormsLinkAllRedLinksToForms": {
-   "value": false
-   },
-   "PageFormsRedLinksCheckOnlyLocalProps": {
-   "value": false
-   },
-   "PageFormsShowTabsForAllHelperForms": {
-   "value": true
-   },
-   "PageFormsRunQueryFormAtTop": {
-   "value": false
-   },
-   "PageFormsGoogleMapsKey": {
-   "value": null
-   },
-   "PageFormsShowOnSelect": {
-   "value": []
-   },
-   "PageFormsAutocompleteValues": {
-   "value": []
-   },
-   "PageFormsGridValues": {
-   "value": []
-   },
-   "PageFormsGridParams": {
-   "value": []
-   },
-   "PageFormsFieldProperties": {
-   "value": []
-   },
-   "PageFormsCargoFields": {
-   "value": []
-   },
-   "PageFormsDependentFields": {
-   "value": []
-   },
-   "PageFormsCheckboxesSelectAllMinimum": {
-   "value": 10
-   },
+   "PageFormsMaxAutocompleteValues": 1000,
+   "PageFormsMaxLocalAutocompleteValues": 100,
+   "PageFormsAutocompleteOnAllChars": false,
+   "PageFormsCacheAutocompleteValues": false,
+   "PageFormsAutocompleteCacheTimeout": null,
+   "PageFormsRenameEditTabs": false,
+   "PageFormsRenameMainEditTab": false,
+   "PageFormsListSeparator":  ",",
+   "PageForms24HourTime": false,
+   "PageFormsCacheFormDefinitions": false,
+   "PageFormsFormCacheType": null,
+   "PageFormsLinkAllRedLinksToForms": false,
+   "PageFormsRedLinksCheckOnlyLocalProps": false,
+   "PageFormsShowTabsForAllHelperForms": true,
+   "PageFormsRunQueryFormAtTop": false,
+   

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Store linter_cat names in a separate table

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

Change subject: Store linter_cat names in a separate table
..


Store linter_cat names in a separate table

linter_cat is now an int ID that points to a row in the new
lint_categories table.

The mapping between category names and ids is all handled in PHP, and
cached in APC.

Note that you will need to drop the `linter` table manually and re-run
update.php for this to take effect.

Change-Id: I369d9b4d8d08289b4a20d1cd29a2e327bad28ef8
---
M extension.json
M includes/ApiQueryLintErrors.php
A includes/CategoryManager.php
M includes/Database.php
M includes/Hooks.php
M includes/LintErrorsPager.php
M includes/SpecialLintErrors.php
A lint_categories.sql
M linter.sql
9 files changed, 225 insertions(+), 52 deletions(-)

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



diff --git a/extension.json b/extension.json
index fbd0a03..ae8745d 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,7 @@
"descriptionmsg": "linter-desc",
"type": "specialpage",
"AutoloadClasses": {
+   "MediaWiki\\Linter\\CategoryManager": 
"includes/CategoryManager.php",
"MediaWiki\\Linter\\Hooks": "includes/Hooks.php",
"MediaWiki\\Linter\\Database": "includes/Database.php",
"MediaWiki\\Linter\\LintError": "includes/LintError.php",
diff --git a/includes/ApiQueryLintErrors.php b/includes/ApiQueryLintErrors.php
index b86cb99..d211dbf 100644
--- a/includes/ApiQueryLintErrors.php
+++ b/includes/ApiQueryLintErrors.php
@@ -33,13 +33,16 @@
 
public function execute() {
$params = $this->extractRequestParams();
+   $categoryMgr = CategoryManager::getInstance();
 
$this->addTables( 'linter' );
if ( $params['category'] !== null ) {
-   $this->addWhereFld( 'linter_cat', $params['category'] );
+   $this->addWhereFld( 'linter_cat', 
$categoryMgr->getCategoryId( $params['category'] ) );
} else {
// Limit only to enabled categories (there might be 
others in the DB)
-   $this->addWhereFld( 'linter_cat', 
$this->getCategories() );
+   $this->addWhereFld( 'linter_cat', array_values( 
$categoryMgr->getCategoryIds(
+   $categoryMgr->getCategories()
+   ) ) );
}
$db = $this->getDB();
if ( $params['from'] !== null ) {
@@ -90,15 +93,10 @@
}
}
 
-   private function getCategories() {
-   global $wgLinterCategories;
-   return array_keys( array_filter( $wgLinterCategories ) );
-   }
-
public function getAllowedParams() {
return [
'category' => [
-   ApiBase::PARAM_TYPE => $this->getCategories(),
+   ApiBase::PARAM_TYPE => 
CategoryManager::getInstance()->getCategories(),
ApiBase::PARAM_ISMULTI => true,
],
'limit' => [
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
new file mode 100644
index 000..6045e01
--- /dev/null
+++ b/includes/CategoryManager.php
@@ -0,0 +1,181 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Linter;
+
+use MediaWiki\MediaWikiServices;
+
+/**
+ * Functions for lint error categories
+ */
+class CategoryManager {
+
+   /**
+* @var array|bool
+*/
+   private $map;
+   /**
+* @var \BagOStuff
+*/
+   private $cache;
+   /**
+* @var string
+*/
+   private $cacheKey;
+
+   private function __construct() {
+   $this->cache = 
MediaWikiServices::getInstance()->getLocalServerObjectCache();
+   $this->cacheKey = $this->cache->makeKey( 'linter', 'categories' 
);
+   }
+
+   public static function getInstance() {
+   static $self;
+   if ( !$self ) {
+   $self = new self();
+   }
+
+   return $self;
+   }
+
+   public function getCategories() {
+   global $wgLinterCategories;
+   return array_keys( array_filter( $wgLinterCategories ) );
+   }
+
+   /**
+* @see getCategoryId
+* @param string $name
+* @return bool|int
+*/
+   public function getAndMaybeCreateCategoryId( $name ) {
+   return $this->getCategoryId( $name, true );
+   }
+
+   /**
+* @param string $id
+* @throws \RuntimeException
+* @return int
+*/
+   public function getCategoryName( $id ) {
+   if ( !$this->map ) {
+   $this->loadMapFromCache();
+  

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Close search interface when explicitly switching navigation ...

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

Change subject: Close search interface when explicitly switching navigation 
tabs.
..


Close search interface when explicitly switching navigation tabs.

Consider this current behavior:
- In MainActivity, search for something, long-press one of the results and
  add it to a reading list.
- In the snackbar that appears, tap the "view list" button, and observe
  that nothing really happens, because the search interface is still on
  top of the reading lists tab.

This patch makes it so that the search interface is explicitly dismissed
any time we programmatically jump to a different navigation tab.

Change-Id: If702b3ae7d9bc72b202437138fce70068406c955
---
M app/src/main/java/org/wikipedia/main/MainFragment.java
M app/src/main/java/org/wikipedia/search/SearchFragment.java
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/main/MainFragment.java 
b/app/src/main/java/org/wikipedia/main/MainFragment.java
index 74a5887..822b093 100644
--- a/app/src/main/java/org/wikipedia/main/MainFragment.java
+++ b/app/src/main/java/org/wikipedia/main/MainFragment.java
@@ -435,9 +435,17 @@
 return (SearchFragment) 
getChildFragmentManager().findFragmentById(R.id.fragment_main_container);
 }
 
+private void cancelSearch() {
+SearchFragment fragment = searchFragment();
+if (fragment != null) {
+fragment.closeSearch();
+}
+}
+
 private void goToTab(@NonNull NavTab tab) {
 viewPager.setCurrentItem(tab.code());
 ensureNavBarVisible();
+cancelSearch();
 }
 
 private void ensureNavBarVisible() {
diff --git a/app/src/main/java/org/wikipedia/search/SearchFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchFragment.java
index 3dda7e7..ffd9474 100644
--- a/app/src/main/java/org/wikipedia/search/SearchFragment.java
+++ b/app/src/main/java/org/wikipedia/search/SearchFragment.java
@@ -347,7 +347,7 @@
 }
 }
 
-private void closeSearch() {
+public void closeSearch() {
 isSearchActive = false;
 // hide ourselves
 ViewUtil.fadeOut(searchContainer);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Break long lines in OutputPage::sendCacheControl()

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

Change subject: Break long lines in OutputPage::sendCacheControl()
..


Break long lines in OutputPage::sendCacheControl()

Change-Id: I72d494f4c97aef9d500bb5d7b36dad30a44f501a
---
M includes/OutputPage.php
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 863a426..bf59c9a 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2198,22 +2198,26 @@
# We'll purge the proxy cache 
explicitly, but require end user agents
# to revalidate against the proxy on 
each visit.
# Surrogate-Control controls our CDN, 
Cache-Control downstream caches
-   wfDebug( __METHOD__ . ": proxy caching 
with ESI; {$this->mLastModified} **", 'private' );
+   wfDebug( __METHOD__ .
+   ": proxy caching with ESI; 
{$this->mLastModified} **", 'private' );
# start with a shorter timeout for 
initial testing
# header( 'Surrogate-Control: 
max-age=2678400+2678400, content="ESI/1.0"');
-   $response->header( 'Surrogate-Control: 
max-age=' . $config->get( 'SquidMaxage' )
-   . '+' . $this->mCdnMaxage . ', 
content="ESI/1.0"' );
+   $response->header(
+   "Surrogate-Control: 
max-age={$config->get( 'SquidMaxage' )}" .
+   "+{$this->mCdnMaxage}, 
content=\"ESI/1.0\""
+   );
$response->header( 'Cache-Control: 
s-maxage=0, must-revalidate, max-age=0' );
} else {
# We'll purge the proxy cache for anons 
explicitly, but require end user agents
# to revalidate against the proxy on 
each visit.
# IMPORTANT! The CDN needs to replace 
the Cache-Control header with
# Cache-Control: s-maxage=0, 
must-revalidate, max-age=0
-   wfDebug( __METHOD__ . ": local proxy 
caching; {$this->mLastModified} **", 'private' );
+   wfDebug( __METHOD__ .
+   ": local proxy caching; 
{$this->mLastModified} **", 'private' );
# start with a shorter timeout for 
initial testing
# header( "Cache-Control: 
s-maxage=2678400, must-revalidate, max-age=0" );
-   $response->header( 'Cache-Control: 
s-maxage=' . $this->mCdnMaxage
-   . ', must-revalidate, 
max-age=0' );
+   $response->header( "Cache-Control: " .
+   "s-maxage={$this->mCdnMaxage}, 
must-revalidate, max-age=0" );
}
} else {
# We do want clients to cache if they can, but 
they *must* check for updates

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...timeline[REL1_28]: Revert timeline to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert timeline to manifest_version 1
..

Revert timeline to manifest_version 1

Bug: T149759
Change-Id: I8e9635b578fad2bff201a2b283ad170ed1786cd2
---
M Timeline.body.php
M extension.json
2 files changed, 15 insertions(+), 20 deletions(-)


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

diff --git a/Timeline.body.php b/Timeline.body.php
index 29a7e33..c695495 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -3,6 +3,13 @@
 
 class Timeline {
 
+   public static function onRegistration() {
+   global $wgTimelineFile;
+   if ( $wgTimelineFile === null ) {
+   $wgTimelineFile = __DIR__ . '/EasyTimeline.pl';
+   }
+   }
+
/**
 * @param $parser Parser
 * @return bool
diff --git a/extension.json b/extension.json
index 2ac124a..8d89c3e 100644
--- a/extension.json
+++ b/extension.json
@@ -5,6 +5,7 @@
"descriptionmsg": "timeline-desc",
"license-name": "GPL-2.0",
"type": "parserhook",
+   "callback": "Timeline::onRegistration",
"MessagesDirs": {
"Timeline": [
"i18n"
@@ -33,25 +34,12 @@
"ParserFirstCallInit": "Timeline::onParserFirstCallInit"
},
"config": {
-   "TimelinePloticusCommand": {
-   "value": "/usr/bin/ploticus"
-   },
-   "TimelinePerlCommand": {
-   "value": "/usr/bin/perl"
-   },
-   "TimelineFile": {
-   "value": "EasyTimeline.pl",
-   "path": true
-   },
-   "TimelineEpochTimestamp": {
-   "value": "2012010100"
-   },
-   "TimelineFontFile": {
-   "value": "FreeSans"
-   },
-   "TimelineFileBackend": {
-   "value": ""
-   }
+   "TimelinePloticusCommand": "/usr/bin/ploticus",
+   "TimelinePerlCommand": "/usr/bin/perl",
+   "TimelineFile": null,
+   "TimelineEpochTimestamp": "2012010100",
+   "TimelineFontFile": "FreeSans",
+   "TimelineFileBackend": ""
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e9635b578fad2bff201a2b283ad170ed1786cd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Handle error responses in EditClient

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

Change subject: Handle error responses in EditClient
..


Handle error responses in EditClient

EditClient currently can't handle error responses (e.g., bad token).

This makes the Edit class subclass MwPostResponse so that Gson knows how
to handle error responses.

Bug: T149921
Change-Id: I7c848d09c18b44077c679b4bb9bfaee4f0077d1a
---
M app/src/androidTest/java/org/wikipedia/editing/EditTest.java
M app/src/main/java/org/wikipedia/editing/Edit.java
M app/src/main/java/org/wikipedia/editing/EditClient.java
A app/src/test/java/org/wikipedia/editing/EditUnitTest.java
A app/src/test/res/raw/edit_abuse_filter_result.json
A app/src/test/res/raw/edit_error_bad_token.json
6 files changed, 166 insertions(+), 29 deletions(-)

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



diff --git a/app/src/androidTest/java/org/wikipedia/editing/EditTest.java 
b/app/src/androidTest/java/org/wikipedia/editing/EditTest.java
index 7c98b21..56a4821 100644
--- a/app/src/androidTest/java/org/wikipedia/editing/EditTest.java
+++ b/app/src/androidTest/java/org/wikipedia/editing/EditTest.java
@@ -8,6 +8,7 @@
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.captcha.CaptchaResult;
 import org.wikipedia.dataclient.WikiSite;
+import org.wikipedia.page.Namespace;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.testlib.TestLatch;
 
@@ -186,6 +187,31 @@
 latch.await();
 }
 
+// Don't crash.
+@Test
+public void testErrorResponse() {
+WikiSite enwiki = WikiSite.forLanguageCode("en");
+PageTitle title = new PageTitle(Namespace.USER.toLegacyString(), 
"Mhollo/sandbox", enwiki);
+String badToken = "BAD_TOKEN";
+String wikitext = "foo";
+final TestLatch latch = new TestLatch();
+
+client.request(enwiki, title, DEFAULT_SECTION_ID, wikitext, badToken,
+DEFAULT_SUMMARY, false, null, null, new EditClient.Callback() {
+@Override
+public void success(@NonNull Call call, @NonNull 
EditResult result) {
+throw new RuntimeException("Token was bad, this should 
fail!");
+}
+
+@Override
+public void failure(@NonNull Call call, @NonNull 
Throwable caught) {
+assertThat(caught.getMessage(), is("Invalid token"));
+latch.countDown();
+}
+});
+latch.await();
+}
+
 private void validateCaptcha(EditResult result) {
 assertThat(result, instanceOf(CaptchaResult.class));
 CaptchaResult captchaResult = (CaptchaResult) result;
diff --git a/app/src/main/java/org/wikipedia/editing/Edit.java 
b/app/src/main/java/org/wikipedia/editing/Edit.java
index 1b18608..b6ce096 100644
--- a/app/src/main/java/org/wikipedia/editing/Edit.java
+++ b/app/src/main/java/org/wikipedia/editing/Edit.java
@@ -1,56 +1,60 @@
 package org.wikipedia.editing;
 
-import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 
-public class Edit {
-@SuppressWarnings("unused,NullableProblems") @NonNull private Result edit;
-@NonNull protected Result edit() {
+import org.wikipedia.dataclient.mwapi.MwPostResponse;
+
+class Edit extends MwPostResponse {
+@SuppressWarnings("unused,") @Nullable private Result edit;
+
+@Nullable Result edit() {
 return edit;
 }
 
-protected class Result {
-@Nullable private String result;
-@Nullable protected String status() {
+boolean hasEditResult() {
+return edit != null;
+}
+
+class Result {
+@SuppressWarnings("unused") @Nullable private String result;
+@SuppressWarnings("unused") private int newrevid;
+@SuppressWarnings("unused") @Nullable private Captcha captcha;
+@SuppressWarnings("unused") @Nullable private String code;
+@SuppressWarnings("unused") @Nullable private String spamblacklist;
+
+@Nullable String status() {
 return result;
 }
 
-private int newrevid;
-protected int newRevId() {
+int newRevId() {
 return newrevid;
 }
 
-@Nullable private Captcha captcha;
-@Nullable protected Captcha captcha() {
-return captcha;
+@Nullable String captchaId() {
+return captcha == null ? null : captcha.id();
 }
 
-@Nullable private String code;
-@Nullable protected String code() {
-return code;
-}
-
-protected boolean hasErrorCode() {
+boolean hasErrorCode() {
 return code != null;
 }
 
-protected boolean hasCaptchaResponse() {
+boolean hasCaptchaResponse() {
 return captcha 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Section blocks should have id attribute

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

Change subject: Section blocks should have id attribute
..


Section blocks should have id attribute

An id attribute allows JavaScript to access the DOMElement
representing the section body via getElementById. Given the wider
support for this method in comparison to getElementsByClassName
and the fact that classes are not meant to be unique per element
the existing usages of mf-section- classes are discouraged.

Change-Id: I53cfd1f593405d73ff1e0c0630f3a05803a9d1c2
---
M includes/MobileFormatter.php
M tests/phpunit/MobileFormatterTest.php
M tests/phpunit/api/ApiParseExtenderTest.php
3 files changed, 25 insertions(+), 10 deletions(-)

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



diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index 32e5d9d..75fe6bf 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -531,8 +531,7 @@
$firstHeading = reset( $headings );
 
$sectionNumber = 0;
-   $sectionBody = $doc->createElement( 'div' );
-   $sectionBody->setAttribute( 'class', 'mf-section-' . 
$sectionNumber );
+   $sectionBody = $this->createSectionBodyElement( $doc, 
$sectionNumber );
 
// Mark the top level headings which will become collapsible 
soon.
foreach ( $headings as $heading ) {
@@ -576,9 +575,7 @@
}
}
$sectionNumber += 1;
-   $sectionBody = $doc->createElement( 'div' );
-   $sectionBody->setAttribute( 'class', 
'mf-section-' . $sectionNumber );
-
+   $sectionBody = $this->createSectionBodyElement( 
$doc, $sectionNumber );
continue;
}
 
@@ -601,6 +598,23 @@
}
 
/**
+* Creates a Section body element
+*
+* @param DOMDocument $doc
+* @param int $sectionNumber
+*
+* @return DOMElement
+*/
+   private function createSectionBodyElement( DOMDocument $doc, 
$sectionNumber ) {
+   // FIXME: The class `/mf\-section\-[0-9]+/` is kept for caching 
reasons
+   // but given class is unique usage is discouraged. [T126825]
+   $sectionBody = $doc->createElement( 'div' );
+   $sectionBody->setAttribute( 'class', 'mf-section-' . 
$sectionNumber );
+   $sectionBody->setAttribute( 'id', 'mf-section-' . 
$sectionNumber );
+   return $sectionBody;
+   }
+
+   /**
 * Marks the headings as editable by adding the in-block
 * class to each of them, if it hasn't already been added.
 *
diff --git a/tests/phpunit/MobileFormatterTest.php 
b/tests/phpunit/MobileFormatterTest.php
index db443d7..2bd7aba 100644
--- a/tests/phpunit/MobileFormatterTest.php
+++ b/tests/phpunit/MobileFormatterTest.php
@@ -31,7 +31,8 @@
 */
private function makeSectionHtml( $sectionNumber, $contentHtml='', 
$isReferenceSection=false ) {
$attrs = $isReferenceSection ? ' data-is-reference-section="1"' 
: '';
-   return "$contentHtml";
+   return "$contentHtml";
}
 
/**
diff --git a/tests/phpunit/api/ApiParseExtenderTest.php 
b/tests/phpunit/api/ApiParseExtenderTest.php
index 041ff45..5bdb1cf 100644
--- a/tests/phpunit/api/ApiParseExtenderTest.php
+++ b/tests/phpunit/api/ApiParseExtenderTest.php
@@ -48,21 +48,21 @@
'mobileformat' => '',
'text' => "I exist\n\nI don't"
],
-   'I 
exist' ],
+   'I exist' ],
[
[
'mobileformat' => 'html',
'text' => 
"LedeSection1TextSection2Text"
],
-   'Lede' .
+   'Lede' .
'' .
self::SECTION_INDICATOR .
'Section1' .
-   'Text' .
+   'Text' .
'' .
self::SECTION_INDICATOR .
'Section2' .
-   'Text' ],
+   'Text' ],
];
}
 }

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

[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[REL1_28]: Revert ThrottleOverride to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert ThrottleOverride to manifest_version 1
..

Revert ThrottleOverride to manifest_version 1

Bug: T149759
Change-Id: Idfd6c80d6b4aae5ee4f2a5b78bcdae80524ab88a
---
M extension.json
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThrottleOverride 
refs/changes/02/319702/1

diff --git a/extension.json b/extension.json
index 2b0e2e2..a95dab6 100644
--- a/extension.json
+++ b/extension.json
@@ -40,11 +40,9 @@
},
"config": {
"ThrottleOverrideCIDRLimit": {
-   "value": {
-   "IPv4": 16,
-   "IPv6": 19
-   }
+   "IPv4": 16,
+   "IPv6": 19
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfd6c80d6b4aae5ee4f2a5b78bcdae80524ab88a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ThrottleOverride
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...TorBlock[REL1_28]: Revert TorBlock to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert TorBlock to manifest_version 1
..

Revert TorBlock to manifest_version 1

Bug: T149759
Change-Id: Icd5e4871fb23113fbd081ee6fcf6cc426382ff63
---
M extension.json
M includes/TorBlockHooks.php
2 files changed, 25 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TorBlock 
refs/changes/01/319701/1

diff --git a/extension.json b/extension.json
index 313fb22..f4253d3 100644
--- a/extension.json
+++ b/extension.json
@@ -68,42 +68,22 @@
]
},
"config": {
-   "TorBypassPermissions": {
-   "value": [
-   "torunblocked"
-   ]
-   },
-   "TorLoadNodes": {
-   "value": true
-   },
-   "TorAllowedActions": {
-   "value": [
-   "read"
-   ]
-   },
-   "TorAutoConfirmAge": {
-   "value": 0
-   },
-   "TorAutoConfirmCount":  {
-   "value": 0
-   },
-   "TorIPs": {
-   "value": [
-   "208.80.152.2"
-   ]
-   },
-   "TorOnionooServer": {
-   "value": "https://onionoo.torproject.org;
-   },
-   "TorDisableAdminBlocks": {
-   "value": true
-   },
-   "TorTagChanges": {
-   "value": true
-   },
-   "TorBlockProxy": {
-   "value": false
-   },
+   "TorBypassPermissions":  [
+   "torunblocked"
+   ],
+   "TorLoadNodes": true,
+   "TorAllowedActions":  [
+   "read"
+   ],
+   "TorAutoConfirmAge": 0,
+   "TorAutoConfirmCount": 0,
+   "TorIPs": [
+   "208.80.152.2"
+   ],
+   "TorOnionooServer": "https://onionoo.torproject.org;,
+   "TorDisableAdminBlocks": true,
+   "TorTagChanges": false,
+   "TorBlockProxy": false,
"TorOnionooCA": {
"value": "torproject.crt",
"path": true
@@ -113,5 +93,5 @@
"path": true
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }
diff --git a/includes/TorBlockHooks.php b/includes/TorBlockHooks.php
index ee1719e..6711254 100644
--- a/includes/TorBlockHooks.php
+++ b/includes/TorBlockHooks.php
@@ -31,6 +31,14 @@
public static function registerExtension() {
// Define new autopromote condition
define( 'APCOND_TOR', 'tor' ); // Numbers won't work, we'll get 
collisions
+
+   global $wgTorOnionooCA, $wgTorProjectCA;
+   if ( $wgTorOnionooCA === null ) {
+   $wgTorOnionooCA = dirname( __DIR__ ) . 
'/torproject.crt';
+   }
+   if ( $wgTorProjectCA === null ) {
+   $wgTorProjectCA = dirname( __DIR__ ) . 
'/torproject.crt';
+   }
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd5e4871fb23113fbd081ee6fcf6cc426382ff63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TorBlock
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix long-press menu actions in search results in MainActivity.

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

Change subject: Fix long-press menu actions in search results in MainActivity.
..


Fix long-press menu actions in search results in MainActivity.

I've found that when you invoke the Search interface from MainActivity
(i.e. the feed), some of the long-press actions don't seem to work,
including add-to-reading-list, share, and copy link.

This is because the function to obtain the callback() object for the
current fragment only looks at the "parent" fragment or "target" fragment,
whereas the Search fragment is actually a *grandparent* of MainFragment.

This patch refactors the Callback interfaces of the search sub-fragments
so that they're only directional with respect to the immediate parent of
the fragment.

Change-Id: If71346f4c77cca0e7793ad61fc05ceb15babe2bf
---
M app/src/main/java/org/wikipedia/main/MainFragment.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/search/SearchFragment.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
D app/src/main/java/org/wikipedia/search/SearchResultsLongPressHandler.java
5 files changed, 99 insertions(+), 105 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/main/MainFragment.java 
b/app/src/main/java/org/wikipedia/main/MainFragment.java
index 9215331..74a5887 100644
--- a/app/src/main/java/org/wikipedia/main/MainFragment.java
+++ b/app/src/main/java/org/wikipedia/main/MainFragment.java
@@ -50,7 +50,6 @@
 import org.wikipedia.readinglist.ReadingListsFragment;
 import org.wikipedia.search.SearchFragment;
 import org.wikipedia.search.SearchInvokeSource;
-import org.wikipedia.search.SearchResultsFragment;
 import org.wikipedia.settings.Prefs;
 import org.wikipedia.util.ClipboardUtil;
 import org.wikipedia.util.DateUtil;
@@ -69,8 +68,7 @@
 
 public class MainFragment extends Fragment implements BackPressedHandler, 
FeedFragment.Callback,
 NearbyFragment.Callback, HistoryFragment.Callback, 
ReadingListsFragment.Callback,
-SearchFragment.Callback, SearchResultsFragment.Callback, 
LinkPreviewDialog.Callback,
-AddToReadingListDialog.Callback {
+SearchFragment.Callback, LinkPreviewDialog.Callback, 
AddToReadingListDialog.Callback {
 @BindView(R.id.fragment_main_container) CoordinatorLayout 
coordinatorLayout;
 @BindView(R.id.fragment_main_padding_app_bar) AppBarLayout paddingAppBar;
 @BindView(R.id.fragment_main_view_pager) ViewPager viewPager;
@@ -297,7 +295,6 @@
 copyLink(title.getCanonicalUri());
 }
 
-
 @Override
 public void onSearchResultAddToList(@NonNull PageTitle title,
 @NonNull 
AddToReadingListDialog.InvokeSource source) {
@@ -308,11 +305,6 @@
 @Override
 public void onSearchResultShareLink(@NonNull PageTitle title) {
 ShareUtil.shareText(getContext(), title);
-}
-
-@Override
-public void onSearchProgressBar(boolean enabled) {
-// TODO: implement
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index d65092e..d6aebab 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -56,7 +56,6 @@
 import org.wikipedia.readinglist.AddToReadingListDialog;
 import org.wikipedia.search.SearchFragment;
 import org.wikipedia.search.SearchInvokeSource;
-import org.wikipedia.search.SearchResultsFragment;
 import org.wikipedia.settings.SettingsActivity;
 import org.wikipedia.staticdata.MainPageNameData;
 import org.wikipedia.theme.ThemeChooserDialog;
@@ -78,8 +77,8 @@
 import static org.wikipedia.util.UriUtil.visitInExternalBrowser;
 
 public class PageActivity extends ThemedActionBarActivity implements 
PageFragment.Callback,
-LinkPreviewDialog.Callback, SearchFragment.Callback, 
SearchResultsFragment.Callback,
-WiktionaryDialog.Callback, AddToReadingListDialog.Callback {
+LinkPreviewDialog.Callback, SearchFragment.Callback, 
WiktionaryDialog.Callback,
+AddToReadingListDialog.Callback {
 
 public static final String ACTION_PAGE_FOR_TITLE = 
"org.wikipedia.page_for_title";
 public static final String ACTION_SHOW_TAB_LIST = 
"org.wikipedia.show_tab_list";
@@ -592,11 +591,6 @@
 @Override
 public void onSearchResultShareLink(@NonNull PageTitle title) {
 ShareUtil.shareText(this, title);
-}
-
-@Override
-public void onSearchProgressBar(boolean enabled) {
-updateProgressBar(enabled, true, 0);
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/search/SearchFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchFragment.java
index 6eed611..3dda7e7 100644
--- 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: statistics: Bring in R debs from upstream

2016-11-03 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: statistics: Bring in R debs from upstream
..

statistics: Bring in R debs from upstream

Bug: T149949
Change-Id: Ief13e4d7e9652ee1e0da090559b32626e5e4c8fc
---
A modules/statistics/files/r-debs.gpg
M modules/statistics/manifests/packages.pp
A modules/statistics/manifests/r.pp
3 files changed, 32 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/319700/1

diff --git a/modules/statistics/files/r-debs.gpg 
b/modules/statistics/files/r-debs.gpg
new file mode 100644
index 000..4c7aa5f
--- /dev/null
+++ b/modules/statistics/files/r-debs.gpg
Binary files differ
diff --git a/modules/statistics/manifests/packages.pp 
b/modules/statistics/manifests/packages.pp
index 092ada3..f67d7ec 100644
--- a/modules/statistics/manifests/packages.pp
+++ b/modules/statistics/manifests/packages.pp
@@ -5,6 +5,7 @@
 include mysql
 include geoip
 include ::imagemagick::install
+include ::statistics::r
 
 ensure_packages([
 'emacs23',
@@ -83,14 +84,6 @@
 'libcairo2',
 'libcairo2-dev',
 'libxt-dev'
-])
-
-# R packages
-ensure_packages([
-'r-base',
-'r-base-dev',  # Needed for R packages that have to compile C++ 
code; see T147682
-'r-cran-rmysql',
-'r-recommended'# CRAN-recommended packages (e.g. MASS, Matrix, 
boot)
 ])
 
 # spell checker/dictionary packages for research (halfak)
diff --git a/modules/statistics/manifests/r.pp 
b/modules/statistics/manifests/r.pp
new file mode 100644
index 000..45719a7
--- /dev/null
+++ b/modules/statistics/manifests/r.pp
@@ -0,0 +1,31 @@
+# = Class: statistics::r
+#
+# Sets up R from upstream for statistics users
+class statistics::r {
+apt::repository { 'cran-rstudio':
+uri=> 'http://cran.rstudio.com/bin/linux/debian',
+dist   => 'jessie-cran3',
+source => false,
+keyfile=> 'puppet:///modules/statistics/r-debs.gpg',
+}
+
+$proxy_ensure = $proxy ? {
+undef   => 'absent',
+default => 'present'
+}
+
+apt::conf { 'cran-org-proxy':
+ensure   => $proxy_ensure,
+priority => '80',
+key  => 'Acquire::http::Proxy::cran.rstudio.com',
+value=> $proxy,
+}
+
+ensure_packages([
+'r-base',
+'r-base-dev',  # Needed for R packages that have to compile C++ 
code; see T147682
+'r-cran-rmysql',
+'r-recommended'# CRAN-recommended packages (e.g. MASS, Matrix, 
boot)
+])
+
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (e7c5b56)

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

Change subject: Update VE core submodule to master (e7c5b56)
..


Update VE core submodule to master (e7c5b56)

New changes:
b2970d6 Remove #rebuildTree calls and ensure #getDocumentNode is used
4d3231d Extract DM document from node instead of passing it as argument
5827a4c Update treeDiffer library & remove all but dist, licence & readme
4200362 Fix typo in getModifiedRanges
9a4edb7 Fix behaviour of attribute change in getModifiedRange
c5c7d83 Localisation updates from https://translatewiki.net.
993200a Add includeCollapsed & includeInternalList options to getModifiedRanges
566c7af Add ve.Range#overlapsRange method
4a3afce Remove unused eslint exceptions and old jshint comments
db44a3d Fix splice typo
7a4de14 Fix translateRange bug that expands selections
e7c5b56 Localisation updates from https://translatewiki.net.

Change-Id: I4af5647b9f49525c9c592ab42270f302144d76c9
---
M .jsduck/eg-iframe.html
M lib/ve
2 files changed, 2 insertions(+), 5 deletions(-)

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



diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 810a607..f854f04 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -465,10 +465,7 @@

 

-   
-   
-   
-   
+   
 


diff --git a/lib/ve b/lib/ve
index 977d3ad..e7c5b56 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 977d3ad7414f4dcd5dc25ec4883132da3c1dc333
+Subproject commit e7c5b56f465d62a97808a82cd488e10601daecbc

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TrustedXFF[REL1_28]: Revert TrustedXff to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert TrustedXff to manifest_version 1
..

Revert TrustedXff to manifest_version 1

Bug: T149759
Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
---
M TrustedXFF.body.php
M extension.json
2 files changed, 10 insertions(+), 5 deletions(-)


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

diff --git a/TrustedXFF.body.php b/TrustedXFF.body.php
index b84ba0c..d907ed5 100644
--- a/TrustedXFF.body.php
+++ b/TrustedXFF.body.php
@@ -18,6 +18,13 @@
'2001:4c28:3000::/36'
];
 
+   public static function onRegistration() {
+   global $wgTrustedXffFile, $IP;
+   if ( $wgTrustedXffFile === null ) {
+   $wgTrustedXffFile = $IP . '/cache/trusted-xff.cdb';
+   }
+   }
+
/**
 * @param string $ip
 * @param bool $trusted
diff --git a/extension.json b/extension.json
index 498509f..65e5cc4 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,9 @@
"Tim Starling"
],
"type": "other",
+   "callback": "TrustedXFF::onRegistration",
"config": {
-   "TrustedXffFile": {
-   "value": "cache/trusted-xff.cdb",
-   "path": true
-   }
+   "TrustedXffFile": null,
},
"AutoloadClasses": {
"TrustedXFF": "TrustedXFF.body.php"
@@ -27,5 +25,5 @@
"TrustedXFF::onIsTrustedProxy"
]
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0e4bff670f803d3cd5cf00eb416ca21ace86ef5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TrustedXFF
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Cleanup http redirects

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

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

Change subject: Cleanup http redirects
..

Cleanup http redirects

 * And make the /page/ path work for HEAD reqs as well.

Change-Id: I79f6fac1cf348d7173ef3d90d45dcfbff0e943e3
---
M lib/api/apiUtils.js
M lib/api/routes.js
2 files changed, 12 insertions(+), 15 deletions(-)


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

diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index ee490ea..d300c87 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -24,24 +24,21 @@
 /**
  * Send a redirect response with optional code and a relative URL
  *
- * (Returns if a response has already been sent.)
- * This is not strictly HTTP spec conformant, but works in most clients. More
- * importantly, it works both behind proxies and on the internal network.
  * @method
- * @param {Object} args
+ * @param {Response} res The response object from our routing function.
+ * @param {MWParserEnvironment} env
+ * @param {String} path
+ * @param {Number} [httpStatus]
  */
-apiUtils.relativeRedirect = function(args) {
-   if (!args.httpStatus) {
-   args.httpStatus = 302; // moved temporarily
+apiUtils.relativeRedirect = function(res, env, path, httpStatus) {
+   var args = [path];
+   if (typeof httpStatus === 'number') {
+   args.unshift(httpStatus);
}
-
-   if (args.res && args.env && args.env.responseSent) {
+   if (env.responseSent) {
return;
} else {
-   args.res.writeHead(args.httpStatus, {
-   'Location': args.path,
-   });
-   args.res.end();
+   res.redirect.apply(res, args);
}
 };
 
@@ -431,7 +428,7 @@
}
// Don't cache requests with no oldid
apiUtils.setHeader(res, env, 'Cache-Control', 
'private,no-cache,s-maxage=0');
-   apiUtils.relativeRedirect({ 'path': path, 'res': res, 'env': env });
+   apiUtils.relativeRedirect(res, env, path);
 };
 
 /**
diff --git a/lib/api/routes.js b/lib/api/routes.js
index 1837285..db4a28c 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -82,7 +82,7 @@
);
 
var opts = Object.assign({
-   from: (req.method === 'GET') ? 'wikitext' : 
req.params.from,
+   from: (req.method === 'POST') ? req.params.from : 
'wikitext',
format: req.params.format,
}, req.body);
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PagedTiffHandler[master]: Move FileExtensions out of Config section

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Move FileExtensions out of Config section
..

Move FileExtensions out of Config section

Change-Id: Id3ce3903e21e481c34f4150f68d118c1e1c774bf
---
M extension.json
1 file changed, 4 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PagedTiffHandler 
refs/changes/92/319692/1

diff --git a/extension.json b/extension.json
index 35d1cca..bafe998 100644
--- a/extension.json
+++ b/extension.json
@@ -33,6 +33,10 @@
"ExtractThumbParameters": 
"PagedTiffHandler::onExtractThumbParameters",
"UnitTestsList": "PagedTiffHandler::onUnitTestsList"
},
+   "FileExtensions": [
+   "tiff",
+   "tif"
+   ],
"config": {
"TiffIdentifyRejectMessages": {
"value": [
@@ -95,12 +99,6 @@
},
"TiffIntermediaryScaleStep": {
"value": 2048
-   },
-   "FileExtensions": {
-   "value": [
-   "tiff",
-   "tif"
-   ]
}
},
"manifest_version": 2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3ce3903e21e481c34f4150f68d118c1e1c774bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PagedTiffHandler
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...ThrottleOverride[master]: Revert ThrottleOverride to manifest_version 1

2016-11-03 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Revert ThrottleOverride to manifest_version 1
..

Revert ThrottleOverride to manifest_version 1

Bug: T149759
Change-Id: Idfd6c80d6b4aae5ee4f2a5b78bcdae80524ab88a
---
M extension.json
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ThrottleOverride 
refs/changes/91/319691/1

diff --git a/extension.json b/extension.json
index 2b0e2e2..a95dab6 100644
--- a/extension.json
+++ b/extension.json
@@ -40,11 +40,9 @@
},
"config": {
"ThrottleOverrideCIDRLimit": {
-   "value": {
-   "IPv4": 16,
-   "IPv6": 19
-   }
+   "IPv4": 16,
+   "IPv6": 19
}
},
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfd6c80d6b4aae5ee4f2a5b78bcdae80524ab88a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ThrottleOverride
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...PagedTiffHandler[REL1_28]: Revert PagedTiffHandler to manifest_version 1

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

Change subject: Revert PagedTiffHandler to manifest_version 1
..


Revert PagedTiffHandler to manifest_version 1

Bug: T149759
Change-Id: Ie335ee40502390865584dce5cee64dfc7e22278f
---
M extension.json
1 file changed, 39 insertions(+), 69 deletions(-)

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



diff --git a/extension.json b/extension.json
index 35d1cca..e6b7d68 100644
--- a/extension.json
+++ b/extension.json
@@ -34,74 +34,44 @@
"UnitTestsList": "PagedTiffHandler::onUnitTestsList"
},
"config": {
-   "TiffIdentifyRejectMessages": {
-   "value": [
-   "/TIFFErrors?/",
-   "/^identify: Compression algorithm does not 
support random access/",
-   "/^identify: Old-style LZW codes, convert 
file/",
-   "/^identify: Sorry, requested compression 
method is not configured/",
-   "/^identify: ThunderDecode: Not enough data at 
scanline/",
-   "/^identify: .+?: Read error on strip/",
-   "/^identify: .+?: Can not read TIFF directory/",
-   "/^identify: Not a TIFF/"
-   ]
-   },
-   "TiffIdentifyBypassMessages": {
-   "value": [
-   "/^identify: .*TIFFReadDirectory/",
-   "/^identify: .+?: unknown field with tag .+? 
encountered/"
-   ]
-   },
-   "TiffTiffinfoRejectMessages": {
-   "value": [
-   "/.*: Cannot read TIFF header\\.$/",
-   "/.*: Not a TIFF or MDI file, bad magic number 
.+\\.$/",
-   "/.*: Error fetching data for field .+\\.$/",
-   "/TIFFReadDirectory: .*: Can not read TIFF 
directory count\\.$/"
-   ]
-   },
-   "TiffTiffinfoBypassMessages": {
-   "value": [
-   "/^TIFFReadCustomDirectory: .+: unknown field 
with tag .+? encountered\\./",
-   "/^TIFFReadCustomDirectory: .+: wrong data type 
.*; tag ignored\\./"
-   ]
-   },
-   "TiffUseTiffReader": {
-   "value": false
-   },
-   "TiffReaderCheckEofForJS": {
-   "value": 4
-   },
-   "ImageMagickIdentifyCommand": {
-   "value": "/usr/bin/identify"
-   },
-   "TiffUseExiv": {
-   "value": false
-   },
-   "TiffTiffinfoCommand": {
-   "value": "/usr/bin/tiffinfo"
-   },
-   "TiffUseTiffinfo": {
-   "value": false
-   },
-   "TiffMaxEmbedFiles": {
-   "value": 1
-   },
-   "TiffMaxMetaSize": {
-   "value": 65536
-   },
-   "TiffErrorCacheTTL": {
-   "value": 86400
-   },
-   "TiffIntermediaryScaleStep": {
-   "value": 2048
-   },
-   "FileExtensions": {
-   "value": [
-   "tiff",
-   "tif"
-   ]
-   }
+   "TiffIdentifyRejectMessages": [
+   "/TIFFErrors?/",
+   "/^identify: Compression algorithm does not support 
random access/",
+   "/^identify: Old-style LZW codes, convert file/",
+   "/^identify: Sorry, requested compression method is not 
configured/",
+   "/^identify: ThunderDecode: Not enough data at 
scanline/",
+   "/^identify: .+?: Read error on strip/",
+   "/^identify: .+?: Can not read TIFF directory/",
+   "/^identify: Not a TIFF/"
+   ],
+   "TiffIdentifyBypassMessages":  [
+   "/^identify: .*TIFFReadDirectory/",
+   "/^identify: .+?: unknown field with tag .+? 
encountered/"
+   ],
+   "TiffTiffinfoRejectMessages": [
+   "/.*: Cannot read TIFF header\\.$/",
+   "/.*: Not a TIFF or MDI file, bad magic number .+\\.$/",
+   "/.*: Error fetching data for field .+\\.$/",
+   "/TIFFReadDirectory: .*: Can not read TIFF directory 
count\\.$/"
+   ],
+   

  1   2   3   4   5   >