[MediaWiki-commits] [Gerrit] ores: move config file to /etc/ores - change (operations/puppet)

2016-06-10 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: ores: move config file to /etc/ores
..


ores: move config file to /etc/ores

Change-Id: I8f67e8370e0ee2b8173f991d774b43f7d4c694e4
---
M modules/ores/manifests/config.pp
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/ores/manifests/config.pp b/modules/ores/manifests/config.pp
index 893f7e3..7df81b7 100644
--- a/modules/ores/manifests/config.pp
+++ b/modules/ores/manifests/config.pp
@@ -5,9 +5,7 @@
 $group='www-data',
 $mode='0660',
 ) {
-require ::ores::base
-
-file { "${::ores::base::config_path}/config/${priority}-${title}.yaml":
+file { "/etc/ores/${priority}-${title}.yaml":
 content => ordered_yaml($config),
 owner   => $owner,
 group   => $group,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f67e8370e0ee2b8173f991d774b43f7d4c694e4
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Ladsgroup 
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] Add new appservers mw126[57] to the Mediawiki DSH scap list. - change (operations/puppet)

2016-06-10 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged.

Change subject: Add new appservers mw126[57] to the Mediawiki DSH scap list.
..


Add new appservers mw126[57] to the Mediawiki DSH scap list.

Change-Id: I05248e93bd16de2a706921e42375ab6f46234727
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 67d9682..b7dea83 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -210,7 +210,9 @@
 mw1262.eqiad.wmnet
 mw1263.eqiad.wmnet
 mw1264.eqiad.wmnet
+mw1265.eqiad.wmnet
 mw1266.eqiad.wmnet
+mw1267.eqiad.wmnet
 
 # codfw
 mw2017.codfw.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Add new appservers mw126[57] to the Mediawiki DSH scap list. - change (operations/puppet)

2016-06-10 Thread Elukey (Code Review)
Elukey has uploaded a new change for review.

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

Change subject: Add new appservers mw126[57] to the Mediawiki DSH scap list.
..

Add new appservers mw126[57] to the Mediawiki DSH scap list.

Change-Id: I05248e93bd16de2a706921e42375ab6f46234727
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/293692/1

diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 67d9682..b7dea83 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -210,7 +210,9 @@
 mw1262.eqiad.wmnet
 mw1263.eqiad.wmnet
 mw1264.eqiad.wmnet
+mw1265.eqiad.wmnet
 mw1266.eqiad.wmnet
+mw1267.eqiad.wmnet
 
 # codfw
 mw2017.codfw.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Use npm for jQCloud - change (wikidata...gui)

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

Change subject: Use npm for jQCloud
..


Use npm for jQCloud


Also adapt use to api of different fork of jQCloud.

Change-Id: Ic7d2e04481583eefe36ccc77240dc0e3aaee00a0
---
M index.html
M package.json
D vendor/jqcloud/jqcloud-1.0.4.min.js
D vendor/jqcloud/jqcloud.css
M wikibase/queryService/ui/QueryExampleDialog.js
5 files changed, 19 insertions(+), 74 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/index.html b/index.html
index 162a47f..4474e19 100644
--- a/index.html
+++ b/index.html
@@ -18,13 +18,13 @@



+   
 





-   


 
@@ -224,13 +224,13 @@



+   






-   



diff --git a/package.json b/package.json
index a825fdf..70f84a0 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,8 @@
"js-cookie": "^2.1.2",
"vis": "^4.16.1",
"moment": "^2.13.0",
-   "es6-shim": "^0.35.1"
+   "es6-shim": "^0.35.1",
+   "jqcloud-npm": "^3.0.3"
},
"devDependencies": {
"grunt": "0.4.5",
diff --git a/vendor/jqcloud/jqcloud-1.0.4.min.js 
b/vendor/jqcloud/jqcloud-1.0.4.min.js
deleted file mode 100644
index 960a429..000
--- a/vendor/jqcloud/jqcloud-1.0.4.min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*!
- * jQCloud Plugin for jQuery
- *
- * Version 1.0.4
- *
- * Copyright 2011, Luca Ongaro
- * Licensed under the MIT license.
- *
- * Date: 2013-05-09 18:54:22 +0200
-*/
-(function(e){"use strict";e.fn.jQCloud=function(t,n){var 
r=this,i=r.attr("id")||Math.floor(Math.random()*1e6).toString(36),s={width:r.width(),height:r.height(),center:{x:(n&?n.width:r.width())/2,y:(n&?n.height:r.height())/2},delayedMode:t.length>50,shape:!1,encodeURI:!0,removeOverflowing:!0};n=e.extend(s,n||{}),r.addClass("jqcloud").width(n.width).height(n.height),r.css("position")==="static"&("position","relative");var
 o=function(){var s=function(e,t){var n=function(e,t){return 
Math.abs(2*e.offsetLeft+e.offsetWidth-2*t.offsetLeft-t.offsetWidth)t.weight?-1:0});var 
u=n.shape==="rectangular"?18:2,a=[],f=n.width/n.height,l=function(o,l){var 
c=i+"_word_"+o,h="#"+c,p=6.28*Math.random(),d=0,v=0,m=0,g=5,y="",b="",w;l.html=e.extend(l.html,{id:c}),l.html&["class"]&&(y=l.html["class"],delete
 
l.html["class"]),t[0].weight>t[t.length-1].weight&&(g=Math.round((l.weight-t[t.length-1].weight)/(t[0].weight-t[t.length-1].weight)*9)+1),w=e("").attr(l.html).addClass("w"+g+"
 "+y),l.link?(typeof 
l.link=="string"&&(l.link={href:l.link}),n.encodeURI&&(l.link=e.extend(l.link,{href:encodeURI(l.link.href).replace(/'/g,"%27")})),b=e("").attr(l.link).text(l.text)):b=l.text,w.append(b);if(!!l.handlers)for(var
 E in l.handlers)l.handlers.hasOwnProperty(E)& 
l.handlers[E]=="function"&(w).bind(E,l.handlers[E]);r.append(w);var 
S=w.width(),x=w.height(),T=n.center.x-S/2,N=n.center.y-x/2,C=w[0].style;C.position="absolute",C.left=T+"px",C.top=N+"px";while(s(w[0],a)){if(n.shape==="rectangular"){v++,v*u>(1+Math.floor(m/2))*u*(m%4%2===0?1:f)&&(v=0,m++);switch(m%4){case
 1:T+=u*f+Math.random()*2;break;case 2:N-=u+Math.random()*2;break;case 
3:T-=u*f+Math.random()*2;break;case 0:N+=u+Math.random()*2}}else 
d+=u,p+=(o%2===0?1:-1)*u,T=n.center.x-S/2+d*Math.cos(p)*f,N=n.center.y+d*Math.sin(p)-x/2;C.left=T+"px",C.top=N+"px"}if(n.removeOverflowing&&(T<0||N<0||T+S>n.width||N+x>n.height)){w.remove();return}a.push(w[0]),e.isFunction(l.afterWordRender)&(w)},c=function(i){i=i||0;if(!r.is(":visible")){setTimeout(function(){c(i)},10);return}i

[MediaWiki-commits] [Gerrit] varnishlog4.py: log errors in execute() - change (operations/puppet)

2016-06-10 Thread Ema (Code Review)
Ema has submitted this change and it was merged.

Change subject: varnishlog4.py: log errors in execute()
..


varnishlog4.py: log errors in execute()

We should log errors set by python-varnishapi instead of ignoring them.

Bug: T137114
Change-Id: I8e4186089fffcb3ea9351bec7a24e03eb141edba
---
M modules/varnish/files/varnishlog4.py
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/varnish/files/varnishlog4.py 
b/modules/varnish/files/varnishlog4.py
index f3fed5d..433e4d3 100755
--- a/modules/varnish/files/varnishlog4.py
+++ b/modules/varnish/files/varnishlog4.py
@@ -55,6 +55,7 @@
   limitations under the License.
 """
 
+import sys
 import time
 import signal
 import inspect
@@ -93,6 +94,10 @@
 """Loop and execute callback"""
 while self.keep_running:
 ret = self.vap.Dispatch(self.vap_callback)
+if self.vap.error:
+sys.stderr.write("Error in execute(): %s\n" % self.vap.error)
+self.vap.error = ''
+
 if ret == 0:
 time.sleep(0.01)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e4186089fffcb3ea9351bec7a24e03eb141edba
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] varnishlog4: default to request grouping - change (operations/puppet)

2016-06-10 Thread Ema (Code Review)
Ema has submitted this change and it was merged.

Change subject: varnishlog4: default to request grouping
..


varnishlog4: default to request grouping

We observed high CPU usage under load when using varnishlog4 without
explicitly specifying a transaction grouping mode.

This patch makes varnishlog4 default to request grouping if no specific
transaction grouping mode has been chosen.

Bug: T137114
Ref: https://www.varnish-cache.org/docs/trunk/reference/vsl-query.html#grouping
Change-Id: Ib1540ff811f4159844cdc1288364ab889b9bff78
---
M modules/varnish/files/varnishlog4.py
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Ema: Verified; Looks good to me, approved
  BBlack: Looks good to me, but someone else must approve



diff --git a/modules/varnish/files/varnishlog4.py 
b/modules/varnish/files/varnishlog4.py
index 3392ab8..f3fed5d 100755
--- a/modules/varnish/files/varnishlog4.py
+++ b/modules/varnish/files/varnishlog4.py
@@ -21,6 +21,20 @@
 ],
 my_callback)
 
+  By default, varnishlog will group transactions by request. A specific
+  transaction grouping mode can be used to override the default.
+  For example:
+
+varnishlog(
+[
+('g', 'session'),
+# ...
+],
+my_callback)
+
+  See https://www.varnish-cache.org/docs/trunk/reference/vsl-query.html for
+  more details.
+
   This module depends on python-varnishapi:
   https://github.com/xcir/python-varnishapi
 
@@ -132,16 +146,24 @@
 [ '-i', 'ReqURL', 'c', '-i', 'ReqMethod' ]"""
 vapi = varnishapi.VarnishAPI()
 
+grouping = False
 parsed_args = []
 for switch, value in args:
 # eg: switch = "i", value = "ReqUrl"
 if switch == "i" and value not in vapi.VSL_tags_rev:
 raise Exception("Unknown Tag: %s" % value)
 
+if switch == "g":
+grouping = True
+
 parsed_args.append("-%s" % switch)
 if value:
 parsed_args.append(value)
 
+if not grouping:
+# Use request grouping by default. T137114
+parsed_args += ["-g", "request"]
+
 return parsed_args
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1540ff811f4159844cdc1288364ab889b9bff78
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Granting l10n-bot the necessary rights to migrate to using l... - change (labs...heritage)

2016-06-10 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review.

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

Change subject: Granting l10n-bot the necessary rights to migrate to using 
local i18n files.
..

Granting l10n-bot the necessary rights to migrate to using local i18n files.

Bug: T137015
---
M groups
M project.config
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/91/293691/1

diff --git a/groups b/groups
index 09d321d..545d0e5 100644
--- a/groups
+++ b/groups
@@ -2,4 +2,5 @@
 #
 2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2   JenkinsBot
 9a2c1c88d0809fef03d620cabb49663064a697dd   labs-tools-heritage
+cc37d98e3a4301744a0c0a9249173ae170696072   l10n-bot
 global:Registered-UsersRegistered Users
diff --git a/project.config b/project.config
index 1c10909..6ab1b9b 100644
--- a/project.config
+++ b/project.config
@@ -6,10 +6,13 @@
mergeContent = true
 [access "refs/*"]
owner = group labs-tools-heritage
+   label-Code-Review = -2..+2 group l10n-bot
 [project]
description = Heritage (former name: erfgoed) code to keep the 
monuments database running, see 
https://commons.wikimedia.org/wiki/Commons:Monuments_database
 [access "refs/heads/*"]
exclusiveGroupPermissions = label-Verified submit
label-Verified = -1..+2 group JenkinsBot
+   label-Verified = -1..+2 group l10n-bot
label-Verified = -1..+0 group Registered Users
submit = group JenkinsBot
+   submit = group l10n-bot

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cf96c3c43a97bcf87825789a5a7af90b407aaac
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: refs/meta/config
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] Enable backup for gallium - change (operations/puppet)

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

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

Change subject: Enable backup for gallium
..

Enable backup for gallium

Hardware is potentially still flaky and but migrating it to labs will take
more time.

Bug: T80385
Change-Id: I64d47247bf49fd7f6ede42a2c8b0c81031b1a000
---
M manifests/site.pp
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/293690/1

diff --git a/manifests/site.pp b/manifests/site.pp
index adbc943..e3f2f41 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1144,7 +1144,8 @@
 role ci::master,
 ci::slave,
 ci::website,
-zuul::server
+zuul::server,
+backup::host
 
 # T51846, let us sync VisualEditor in mediawiki/extensions.git
 sudo::user { 'jenkins-slave':

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

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

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


[MediaWiki-commits] [Gerrit] ExtendedSearch: Show facet view when search yields no result - change (mediawiki...BlueSpiceExtensions)

2016-06-10 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: ExtendedSearch: Show facet view when search yields no result
..

ExtendedSearch: Show facet view when search yields no result

When search yields no result due to a selection of facets, it must
be possible to undo the last selection. This was not possible, because
the facet view was hidden when there was no result. This changed now,
so you can uncheck the facet settings that lead to a no results view.

Change-Id: Id5bc2029048d000a9854300cde1d7ea4032b219c
---
M ExtendedSearch/i18n/en.json
M ExtendedSearch/i18n/qqq.json
M ExtendedSearch/includes/SearchIndex/SearchResult.class.php
M ExtendedSearch/views/view.SearchResult.php
4 files changed, 79 insertions(+), 77 deletions(-)


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

diff --git a/ExtendedSearch/i18n/en.json b/ExtendedSearch/i18n/en.json
index 7f105c9..9b2d380 100644
--- a/ExtendedSearch/i18n/en.json
+++ b/ExtendedSearch/i18n/en.json
@@ -28,6 +28,7 @@
"bs-extendedsearch-indexing-specialpages": "Indexing special pages",
"bs-extendedsearch-invalid-query": "The query could not be processed.",
"bs-extendedsearch-nosearchterm": "Please enter a search term.",
+   "bs-extendedsearch-noresult": "No entries found.",
"bs-extendedsearch-result": "Search for \"$1\" found $2 
{{PLURAL:$2|result|results}}.",
"bs-extendedsearch-result-caption": "$1 - $2 out of $3 
{{PLURAL:$3|result|results}}",
"bs-extendedsearch-search-category": "Search in the categories:",
diff --git a/ExtendedSearch/i18n/qqq.json b/ExtendedSearch/i18n/qqq.json
index 7c7964c..26fb0b2 100644
--- a/ExtendedSearch/i18n/qqq.json
+++ b/ExtendedSearch/i18n/qqq.json
@@ -35,6 +35,7 @@
"bs-extendedsearch-indexing-specialpages": "Text for indexing special 
pages\nIt is shown in the log file while index is being created\nNo punctuation 
needed",
"bs-extendedsearch-invalid-query": "Text for the query could not be 
processed.",
"bs-extendedsearch-nosearchterm": "Text for please enter a search 
term.",
+   "bs-extendedsearch-noresult": "Text that is displayed in results view 
when no entries are found.",
"bs-extendedsearch-result": "Search for \"$1\" found $2 
{{PLURAL:$2|result|results}}.\n\n$1 is the search term in bold, $2 is the 
number of results found",
"bs-extendedsearch-result-caption": "Text for $1 - $2 out of $3 
results. The \"out of\" here means \"Expressing a fraction or a ratio\". 
Parameters: \n* $1 - the start of shown result range\n* $2 - the end of shown 
result range\n* $3 - the total number of results found - use for PLURAL 
distinction",
"bs-extendedsearch-search-category": "Text for search in the 
categories:",
diff --git a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php
index 9f05a6f..1ff91d6 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php
@@ -109,8 +109,6 @@
$aMonitor['SearchTerm'] = $this->oSearchOptions->getOption( 
'searchStringRaw' );
$aMonitor['EscalatedToFuzzy'] = $bFuzzy;
 
-   if ( $iResults == 0 ) return $this->vSearchResult;
-
$this->createNavigation( $iResults );
 
if ( $bFacet ) {
diff --git a/ExtendedSearch/views/view.SearchResult.php 
b/ExtendedSearch/views/view.SearchResult.php
index 61c00ef..a61d492 100644
--- a/ExtendedSearch/views/view.SearchResult.php
+++ b/ExtendedSearch/views/view.SearchResult.php
@@ -86,82 +86,84 @@
$aOut[] = parent::execute();
 
$aOut[] = $this->sOut;
-   if ( !empty( $this->aResultEntryView ) ) {
-   $sResults = implode( "\n", $this->aResultEntryView );
-   $aOut[] = '';
-   $aOut[] = '';
-   if ( $this->getOption( 'siteUri' ) ) {
-   $aOut[] = Xml::element(
-   'div',
-   array(
-   'id' => 
'bs-extendedsearch-siteuri',
-   'siteuri' => $this->getOption( 
'siteUri' )
-   ),
-   '',
-   false
-   );
-   }
-   $aOut[] = '';
-   if ( $this->getOption( 'showfacets' ) ) {
-
-   $sFilterBoxes = '';
-   foreach ( $this->aFacetBoxes as $box ) {
-   $sFilterBoxes .= $box->execute();
-

[MediaWiki-commits] [Gerrit] Avoid DBPerformance warnings in writeToDatabase() - change (mediawiki...Math)

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

Change subject: Avoid DBPerformance warnings in writeToDatabase()
..


Avoid DBPerformance warnings in writeToDatabase()

Switch to using DeferredUpdates.

Bug: T92357
Change-Id: I64179317ab8ed21c864a4cb237cd4ed8705393e1
---
M MathRenderer.php
1 file changed, 10 insertions(+), 8 deletions(-)

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



diff --git a/MathRenderer.php b/MathRenderer.php
index e5ed804..66dd920 100644
--- a/MathRenderer.php
+++ b/MathRenderer.php
@@ -330,28 +330,30 @@
public function writeToDatabase( $dbw = null ) {
# Now save it back to the DB:
if ( !wfReadOnly() ) {
-   $dbw = $dbw ?: wfGetDB( DB_MASTER );
LoggerFactory::getInstance( 'Math' )->debug( 'Store 
entry for $' . $this->tex .
'$ in database (hash:' . $this->getMd5() . ')' 
);
$outArray = $this->dbOutArray();
-   $method = __METHOD__;
$mathTableName = $this->getMathTableName();
if ( $this->isInDatabase() ) {
$inputHash = $this->getInputHash();
-   $dbw->onTransactionIdle( function () use (
-   $dbw, $outArray, $inputHash, $method, 
$mathTableName
+   DeferredUpdates::addCallableUpdate( function () 
use (
+   $dbw, $outArray, $inputHash, 
$mathTableName
) {
+   $dbw = $dbw ?: wfGetDB( DB_MASTER );
+
$dbw->update( $mathTableName, $outArray,
-   [ 'math_inputhash' => 
$inputHash ], $method );
+   [ 'math_inputhash' => 
$inputHash ], __METHOD__ );
LoggerFactory::getInstance( 'Math' 
)->debug(
'Row updated after db 
transaction was idle: ' .
var_export( $outArray, true ) . 
" to database" );
} );
} else {
-   $dbw->onTransactionIdle( function () use (
-   $dbw, $outArray, $method, $mathTableName
+   DeferredUpdates::addCallableUpdate( function () 
use (
+   $dbw, $outArray, $mathTableName
) {
-   $dbw->insert( $mathTableName, 
$outArray, $method, [ 'IGNORE' ] );
+   $dbw = $dbw ?: wfGetDB( DB_MASTER );
+
+   $dbw->insert( $mathTableName, 
$outArray, __METHOD__, [ 'IGNORE' ] );
LoggerFactory::getInstance( 'Math' 
)->debug(
'Row inserted after db 
transaction was idle ' .
var_export( $outArray, true ) . 
" to database" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64179317ab8ed21c864a4cb237cd4ed8705393e1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Clean up annoying punctuation and unnecessary strict equality - change (mediawiki...CentralNotice)

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

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

Change subject: Clean up annoying punctuation and unnecessary strict equality
..

Clean up annoying punctuation and unnecessary strict equality

Change-Id: I61b4df1d785e5b104f9cab8b7417aaaecaa9fda3
---
M CentralNotice.hooks.php
1 file changed, 10 insertions(+), 10 deletions(-)


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

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 4d7785e..d009ca2 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -36,7 +36,7 @@
$wgAvailableRights, $wgGroupPermissions, 
$wgCentralDBname, $wgDBname;
 
// Default for a standalone wiki is that the CN tables are in 
the main database.
-   if ( $wgCentralDBname === false ) {
+   if ( !$wgCentralDBname ) {
$wgCentralDBname = $wgDBname;
}
 
@@ -57,20 +57,20 @@
// If this is the wiki that hosts the management interface, 
load further components
if ( $wgNoticeInfrastructure ) {
if ( $wgNoticeUseTranslateExtension ) {
-   $wgHooks[ 'TranslatePostInitGroups' ][ ] = 
'BannerMessageGroup::registerGroupHook';
-   $wgHooks[ 
'TranslateEventMessageGroupStateChange' ][] = 
'BannerMessageGroup::updateBannerGroupStateHook';
+   $wgHooks['TranslatePostInitGroups'][] = 
'BannerMessageGroup::registerGroupHook';
+   
$wgHooks['TranslateEventMessageGroupStateChange'][] = 
'BannerMessageGroup::updateBannerGroupStateHook';
}
 
-   $wgSpecialPages[ 'CentralNotice' ] = 'CentralNotice';
-   $wgSpecialPages[ 'NoticeTemplate' ] = 
'SpecialNoticeTemplate';
-   $wgSpecialPages[ 'GlobalAllocation' ] = 
'SpecialGlobalAllocation';
-   $wgSpecialPages[ 'BannerAllocation' ] = 
'SpecialBannerAllocation';
-   $wgSpecialPages[ 'CentralNoticeLogs' ] = 
'SpecialCentralNoticeLogs';
-   $wgSpecialPages[ 'CentralNoticeBanners'] = 
'SpecialCentralNoticeBanners';
+   $wgSpecialPages['CentralNotice'] = 'CentralNotice';
+   $wgSpecialPages['NoticeTemplate'] = 
'SpecialNoticeTemplate';
+   $wgSpecialPages['GlobalAllocation'] = 
'SpecialGlobalAllocation';
+   $wgSpecialPages['BannerAllocation'] = 
'SpecialBannerAllocation';
+   $wgSpecialPages['CentralNoticeLogs'] = 
'SpecialCentralNoticeLogs';
+   $wgSpecialPages['CentralNoticeBanners'] = 
'SpecialCentralNoticeBanners';
 
// Register user rights for editing
$wgAvailableRights[] = 'centralnotice-admin';
-   $wgGroupPermissions[ 'sysop' ][ 'centralnotice-admin' ] 
= true; // Only sysops can make change
+   $wgGroupPermissions['sysop']['centralnotice-admin'] = 
true; // Only sysops can make change
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] [WIP] Clean up from extension registration migration - change (mediawiki...CentralNotice)

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

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

Change subject: [WIP] Clean up from extension registration migration
..

[WIP] Clean up from extension registration migration

Stop using legacy $wgExtensionFunctions hook.  Move some straggling config
into the declarative file.

Namespace registration is twitchy, so keep an eye on side-effects of moving
the NS_* constant definitions.

Change-Id: I179e9ddab25092ea7119137a9954c641af62e2c9
---
M CentralNotice.hooks.php
M extension.json
2 files changed, 142 insertions(+), 157 deletions(-)


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

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 3fb0ac9..70b9448 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -27,156 +27,18 @@
 
 class CentralNoticeHooks {
 
-   public static function onExtensionRegestration() {
-   global $wgNoticeTabifyPages, $wgCentralNoticeCampaignMixins;
-
-   /** @var $wgNoticeTabifyPages array Declare all pages that 
should be tabified as CN pages */
-   $wgNoticeTabifyPages = array(
-   /* Left side 'namespace' tabs */
-   'CentralNotice' => array(
-   'type' => 'namespaces',
-   'message' => 'centralnotice-notices',
-   ),
-   'CentralNoticeBanners' => array(
-   'type' => 'namespaces',
-   'message' => 'centralnotice-templates',
-   ),
-
-   /* Right side 'view' tabs */
-   'BannerAllocation' => array(
-   'type' => 'views',
-   'message' => 'centralnotice-allocation',
-   ),
-   'GlobalAllocation' => array(
-   'type' => 'views',
-   'message' => 'centralnotice-global-allocation',
-   ),
-   'CentralNoticeLogs' => array(
-   'type' => 'views',
-   'message' => 'centralnotice-logs',
-   ),
-   );
-
-   // Available campaign mixins. Mixins must declare at least a 
module and an i18n
-   // key for their name. Allowed parameter types are 'string', 
'integer',
-   // 'float' and 'boolean'.
-
-   // Note: i18n messages for parameter labels (labelMsg) should 
be added to the
-   // ext.centralNotice.adminUi.campaignManager module in 
CentralNotice.modules.php
-
-   $wgCentralNoticeCampaignMixins = array(
-   'bannerHistoryLogger' => array(
-   'module' => 
'ext.centralNotice.bannerHistoryLogger',
-   'nameMsg' => 
'centralnotice-banner-history-logger',
-   'helpMsg' => 
'centralnotice-banner-history-logger-help',
-   'parameters' => array(
-   'rate' => array(
-   'type' => 'float',
-   'labelMsg' => 
'centralnotice-banner-history-logger-rate',
-   'helpMsg' => 
'centralnotice-banner-history-logger-rate-help',
-   ),
-   'maxEntryAge' => array(
-   'type' => 'integer',
-   'labelMsg' => 
'centralnotice-banner-history-logger-max-entry-age',
-   'helpMsg' => 
'centralnotice-banner-history-logger-max-entry-age-help'
-   ),
-   'maxEntries' => array(
-   'type' => 'integer',
-   'labelMsg' => 
'centralnotice-banner-history-logger-max-entries',
-   'helpMsg' => 
'centralnotice-banner-history-logger-max-entries-help'
-   ),
-   'waitLogNoSendBeacon' => array(
-   'type' => 'integer',
-   'labelMsg' => 
'centralnotice-banner-history-logger-wait-log-no-send-beacon',
-   'helpMsg' => 
'centralnotice-banner-history-logger-wait-log-no-send-beacon-help'
-   )
-   )
-   ),
-   

[MediaWiki-commits] [Gerrit] Do not output accept language list if it might get cached - change (mediawiki...UniversalLanguageSelector)

2016-06-10 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Do not output accept language list if it might get cached
..

Do not output accept language list if it might get cached

Bug: T137522
Change-Id: Ib603f836f59f7078ac5dbb73b84ca358cb43
---
M UniversalLanguageSelector.hooks.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index ea648df..6326246 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -344,8 +344,14 @@
 * @return bool
 */
public static function addVariables( &$vars, OutputPage $out ) {
+   global $wgULSAnonCanChangeLanguage;
+
// Place request context dependent stuff here
-   $vars['wgULSAcceptLanguageList'] = array_keys( 
$out->getRequest()->getAcceptLang() );
+
+   // Do not output accept languages if there is risk it will get 
cached accross requests
+   if ( $wgULSAnonCanChangeLanguage || 
$out->getUser()->isLoggedIn() ) {
+   $vars['wgULSAcceptLanguageList'] = array_keys( 
$out->getRequest()->getAcceptLang() );
+   }
 
// An optimization to avoid loading all of uls.data just to get 
the autonym
$langCode = $out->getLanguage()->getCode();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib603f836f59f7078ac5dbb73b84ca358cb43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] use /etc/ores as config dir - change (mediawiki...deploy)

2016-06-10 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged.

Change subject: use /etc/ores as config dir
..


use /etc/ores as config dir

Change-Id: I1a5ce9fc2b7af6bdbeaead90e1605ad15c2b28cc
---
M ores_celery.py
M ores_wsgi.py
2 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/ores_celery.py b/ores_celery.py
index 5e505bc..2347a11 100644
--- a/ores_celery.py
+++ b/ores_celery.py
@@ -7,7 +7,10 @@
 
 from ores.score_processors import Celery
 
-config = yamlconf.load(*(open(p) for p in sorted(glob.glob("config/*.yaml"
+config_paths = sorted(glob.glob("config/*.yaml") +
+  glob.glob("/etc/ores/*.yaml"))
+
+config = yamlconf.load(*(open(p) for p in config_paths))
 
 with open("logging_config.yaml") as f:
 logging_config = yamlconf.load(f)
diff --git a/ores_wsgi.py b/ores_wsgi.py
index 4799f14..ff3f712 100644
--- a/ores_wsgi.py
+++ b/ores_wsgi.py
@@ -7,7 +7,10 @@
 
 from ores.wsgi import server
 
-config = yamlconf.load(*(open(p) for p in sorted(glob.glob("config/*.yaml"
+config_paths = sorted(glob.glob("config/*.yaml") +
+  glob.glob("/etc/ores/*.yaml"))
+
+config = yamlconf.load(*(open(p) for p in config_paths))
 
 with open("logging_config.yaml") as f:
 logging_config = yamlconf.load(f)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a5ce9fc2b7af6bdbeaead90e1605ad15c2b28cc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/ores/deploy
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] user /etc/ores as config dir - change (mediawiki...deploy)

2016-06-10 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: user /etc/ores as config dir
..

user /etc/ores as config dir

Change-Id: I1a5ce9fc2b7af6bdbeaead90e1605ad15c2b28cc
---
M ores_celery.py
M ores_wsgi.py
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy 
refs/changes/85/293685/1

diff --git a/ores_celery.py b/ores_celery.py
index 5e505bc..2347a11 100644
--- a/ores_celery.py
+++ b/ores_celery.py
@@ -7,7 +7,10 @@
 
 from ores.score_processors import Celery
 
-config = yamlconf.load(*(open(p) for p in sorted(glob.glob("config/*.yaml"
+config_paths = sorted(glob.glob("config/*.yaml") +
+  glob.glob("/etc/ores/*.yaml"))
+
+config = yamlconf.load(*(open(p) for p in config_paths))
 
 with open("logging_config.yaml") as f:
 logging_config = yamlconf.load(f)
diff --git a/ores_wsgi.py b/ores_wsgi.py
index 4799f14..ff3f712 100644
--- a/ores_wsgi.py
+++ b/ores_wsgi.py
@@ -7,7 +7,10 @@
 
 from ores.wsgi import server
 
-config = yamlconf.load(*(open(p) for p in sorted(glob.glob("config/*.yaml"
+config_paths = sorted(glob.glob("config/*.yaml") +
+  glob.glob("/etc/ores/*.yaml"))
+
+config = yamlconf.load(*(open(p) for p in config_paths))
 
 with open("logging_config.yaml") as f:
 logging_config = yamlconf.load(f)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a5ce9fc2b7af6bdbeaead90e1605ad15c2b28cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ores/deploy
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] MT engine failure cause fallback translation not getting saved - change (mediawiki...ContentTranslation)

2016-06-10 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: MT engine failure cause fallback translation not getting saved
..

MT engine failure cause fallback translation not getting saved

When an MT request to cxserver fails, we fallback to source translation.
The reason for failure can be anything - very large paragraph, network
timeout, failures from the MT engines. But when the fallback to
copy-source happens, what get saved to database is the placeholder div.

This was because the section reference is not updated in the failure
handler of MT request and holding old section value. Fixed this by
moving the section reference update code to the .always() handler.

Testplan:
(if you have local cxserver, this is more easy since you can simulate
MT engine failure)
Translate Hideo Hosono from en to fr. The 'Selected publications' section
is too long for Yandex to translate and will fallback to source. You
will also see translation saved status. Reload the page by pressing F5
or CTRL+R. This secion will not get restored and you will see a placeholder
with in progress indicator. Additionally you may inspect the translation
storage for the section too. With this patch, instead of placeholder,
the actual translation will get saved.

Bug: T137519
Change-Id: I72f6711a07389aa3c6b7852acd308f265aafd8a2
---
M modules/tools/ext.cx.tools.mt.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/84/293684/1

diff --git a/modules/tools/ext.cx.tools.mt.js b/modules/tools/ext.cx.tools.mt.js
index 675c80e..d5117d4 100644
--- a/modules/tools/ext.cx.tools.mt.js
+++ b/modules/tools/ext.cx.tools.mt.js
@@ -279,14 +279,14 @@
'data-cx-mt-provider': 
MTControlCard.provider
} )
);
-   // $section was replaced. Get the 
updated instance.
-   $section = mw.cx.getTranslationSection( 
sourceId );
}
} )
.fail( function ( reason ) {
mw.hook( 'mw.cx.translation.add' ).fire( 
sourceId, reason );
} )
.always( function () {
+   // $section was replaced. Get the updated 
instance.
+   $section = mw.cx.getTranslationSection( 
sourceId );
mw.hook( 'mw.cx.translation.postMT' ).fire( 
$section );
} );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72f6711a07389aa3c6b7852acd308f265aafd8a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Improvements to {{REVISIONUSER}} handling - change (mediawiki/core)

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

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

Change subject: Improvements to {{REVISIONUSER}} handling
..

Improvements to {{REVISIONUSER}} handling

* Do not change the result to a null editing user anymore.
* Use a new vary-user flag instead of vary-revision. This
  will only cause a reparse on null edits. Normal edits
  can still use the prepared output now.
* Edit stashing now applies for pages with this magic word.
* Fixed bug where the second prepareContentForEdit() call
  (due to vary-X flags) would still check the edit stash.

Bug: T135261
Bug: T136678
Change-Id: Id1733443ac3bf053ca61e5ae25db3fbf4499e9f9
---
M includes/Revision.php
M includes/page/WikiPage.php
M includes/parser/Parser.php
3 files changed, 43 insertions(+), 13 deletions(-)


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

diff --git a/includes/Revision.php b/includes/Revision.php
index 0e45b25..eda8989 100644
--- a/includes/Revision.php
+++ b/includes/Revision.php
@@ -720,11 +720,28 @@
/**
 * Set the revision ID
 *
+* This should only be used for proposed revisions that turn out to be 
null edits
+*
 * @since 1.19
 * @param int $id
 */
public function setId( $id ) {
-   $this->mId = $id;
+   $this->mId = (int)$id;
+   }
+
+   /**
+* Set the user ID/name
+*
+* This should only be used for proposed revisions that turn out to be 
null edits
+*
+* @since 1.28
+* @param integer $id User ID
+* @param string $name User name
+*/
+   public function setUserIdAndName( $id, $name ) {
+   $this->mUser = (int)$id;
+   $this->mUserText = $name;
+   $this->mOrigUserText = $name;
}
 
/**
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index a3c3ece..8d9d5a8 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -1794,8 +1794,12 @@
$this->mTimestamp = $now;
} else {
// Bug 32948: revision ID must be set to page 
{{REVISIONID}} and
-   // related variables correctly
+   // related variables correctly. Likewise for 
{{REVISIONUSER}} (T135261).
$revision->setId( $this->getLatest() );
+   $revision->setUserIdAndName(
+   $this->getUser( Revision::RAW ),
+   $this->getUserText( Revision::RAW )
+   );
}
 
if ( $changed ) {
@@ -2071,7 +2075,7 @@
} else {
$edit->timestamp = wfTimestampNow();
}
-   // @note: $cachedEdit is not used if the rev ID was referenced 
in the text
+   // @note: $cachedEdit is safely not used if the rev ID was 
referenced in the text
$edit->revid = $revid;
 
if ( $cachedEdit ) {
@@ -2164,17 +2168,26 @@
];
$content = $revision->getContent();
 
-   // Parse the text
-   // Be careful not to do pre-save transform twice: $text is 
usually
-   // already pre-save transformed once.
-   if ( !$this->mPreparedEdit || 
$this->mPreparedEdit->output->getFlag( 'vary-revision' ) ) {
-   wfDebug( __METHOD__ . ": No prepared edit or 
vary-revision is set...\n" );
-   $editInfo = $this->prepareContentForEdit( $content, 
$revision, $user );
+   // See if the parser output before $revision was inserted is 
still valid
+   $editInfo = false;
+   if ( !$this->mPreparedEdit ) {
+   wfDebug( __METHOD__ . ": No prepared edit...\n" );
+   } elseif ( $this->mPreparedEdit->output->getFlag( 
'vary-revision' ) ) {
+   wfDebug( __METHOD__ . ": Prepared edit has 
vary-revision...\n" );
+   } elseif ( $this->mPreparedEdit->output->getFlag( 'vary-user' ) 
&& !$options['changed'] ) {
+   wfDebug( __METHOD__ . ": Prepared edit has vary-user 
and is null...\n" );
} else {
-   wfDebug( __METHOD__ . ": No vary-revision, using 
prepared edit...\n" );
+   wfDebug( __METHOD__ . ": Using prepared edit...\n" );
$editInfo = $this->mPreparedEdit;
}
 
+   if ( !$editInfo ) {
+   // Parse the text again if needed. Be careful not to do 
pre-save transform twice:
+   // $text is usually already pre-save transformed once. 
Avoid using the edit stash
+   // as any prepared content from there or in 

[MediaWiki-commits] [Gerrit] Update ElasticSearch to 2.3.3 - change (translatewiki)

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

Change subject: Update ElasticSearch to 2.3.3
..


Update ElasticSearch to 2.3.3

Change-Id: I9565067aae0f1e2fdb3796216ff359dcccb3102d
---
M puppet/modules/profile/manifests/mwelasticsearch.pp
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/puppet/modules/profile/manifests/mwelasticsearch.pp 
b/puppet/modules/profile/manifests/mwelasticsearch.pp
index 9b8d32c..dde7e21 100644
--- a/puppet/modules/profile/manifests/mwelasticsearch.pp
+++ b/puppet/modules/profile/manifests/mwelasticsearch.pp
@@ -13,21 +13,24 @@
 
   class { 'elasticsearch':
 manage_repo  => true,
-repo_version => '1.7',
+repo_version => '2.x',
 java_install => true,
   }
 
   elasticsearch::instance { 'es-01':
 config=> {
-  'network.host'   => '::1',
-  'script.disable_dynamic' => false,
+  'network.host' => '::1',
 },
 init_defaults => {
   'ES_HEAP_SIZE' => '12g',
 },
   }
 
-  elasticsearch::plugin { 'mobz/elasticsearch-head':
+  elasticsearch::plugin { 'mobz/elasticsearch-head/latest':
+instances => 'es-01',
+  }
+
+  elasticsearch::plugin { 'org.wikimedia.search/extra/2.3.3':
 instances => 'es-01',
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9565067aae0f1e2fdb3796216ff359dcccb3102d
Gerrit-PatchSet: 3
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add support for Balinese - change (mediawiki/core)

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

Change subject: Add support for Balinese
..


Add support for Balinese

Language code: ban

Bug: T137411
Change-Id: Ief8ef036cc0abae2c1c060784784e3b5453edce6
Signed-off-by: Raimond Spekking 
---
M RELEASE-NOTES-1.28
M languages/data/Names.php
A languages/messages/MessagesBan.php
3 files changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 0e423d2..7885f04 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -39,6 +39,9 @@
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Phabricator reports.
 
+* (T137411) ban (Balinese), thanks to translators Adi Mayndra, Andru,
+  BASAbali, M. Adiputra, Naval Scene, Nemo bis, NoiX180, and 아라.
+
 === Other changes in 1.28 ===
 * (T128697) Improved handling of large diffs.
 
diff --git a/languages/data/Names.php b/languages/data/Names.php
index a7de1f9..73f57e4 100644
--- a/languages/data/Names.php
+++ b/languages/data/Names.php
@@ -78,6 +78,7 @@
'az' => 'azərbaycanca', # Azerbaijani
'azb' => 'تۆرکجه', # South Azerbaijani
'ba' => 'башҡортса', # Bashkir
+   'ban' => 'Basa Bali', # Balinese
'bar' => 'Boarisch', # Bavarian (Austro-Bavarian and South 
Tyrolean)
'bat-smg' => 'žemaitėška', # Samogitian (deprecated code, 'sgs' 
in ISO 693-3 since 2010-06-30 )
'bbc' => 'Batak Toba', # Batak Toba (falls back to bbc-latn)
diff --git a/languages/messages/MessagesBan.php 
b/languages/messages/MessagesBan.php
new file mode 100644
index 000..79d9d1c
--- /dev/null
+++ b/languages/messages/MessagesBan.php
@@ -0,0 +1,12 @@
+https://translatewiki.net
+ *
+ * @ingroup Language
+ * @file
+ *
+ */
+
+$fallback = 'id';
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief8ef036cc0abae2c1c060784784e3b5453edce6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
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] Special:Search: show advanced form when the search term is e... - change (mediawiki/core)

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

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

Change subject: Special:Search: show advanced form when the search term is empty
..

Special:Search: show advanced form when the search term is empty

If a user clicks on the magnifying glass without inputting a search query, it
makes more sense to show them the advanced search form, as opposed to a blank
search result page that provides almost no functionality that wasn't already
present on the page they navigated from.

Change-Id: I2f621fac944fb9203caf4223811b9b32de6d6536
---
M includes/specials/SpecialSearch.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 36ea983..ab14099 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -1216,7 +1216,7 @@
$opts = [];
$opts['profile'] = $this->profile;
 
-   if ( $this->isPowerSearch() ) {
+   if ( $term === '' || $this->isPowerSearch() ) {
$out .= $this->powerSearchBox( $term, $opts );
} else {
$form = '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f621fac944fb9203caf4223811b9b32de6d6536
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


<    1   2   3