[MediaWiki-commits] [Gerrit] Selections: Make translation editor preserve selection/cursor - change (mediawiki...ContentTranslation)

2014-09-22 Thread Jsahleen (Code Review)
Jsahleen has uploaded a new change for review.

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

Change subject: Selections: Make translation editor preserve selection/cursor
..

Selections: Make translation editor preserve selection/cursor

Adds class variable to store captured selection

Adds event handlers for keyup and mouseup to capture selection
(only captures selection inside translation container)

Adds event handler to focus to restore captured selection

Change-Id: Ifa1fb9ca41109c5a94d2d4dcc0a0fdc85b924c74
---
M modules/translation/ext.cx.translation.js
1 file changed, 33 insertions(+), 1 deletion(-)


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

diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index ff8059b..bbae601 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -21,6 +21,7 @@
this.options = $.extend( true, {}, $.fn.cxTranslation.defaults, 
options );
this.$title = null;
this.$content = null;
+   this.$selectionRange = null;
this.init();
}
 
@@ -124,6 +125,30 @@
segmentId = $segment.data( 'segmentid' );
$( '[data-segmentid=' + segmentId + ']' 
).toggleClass( 'cx-highlight' );
} );
+
+   // Capture translation selection on keyup and mouseup
+   this.$container.on( 'keyup mouseup', function () {
+   var $container, selection, anchorNode, focusNode;
+
+   $container = $( this );
+   selection = mw.cx.getSelection();
+   if ( selection ) {
+   anchorNode = selection.anchorNode;
+   focusNode = selection.focusNode;
+
+   if ( $.contains( $container[ 0 ], anchorNode ) 
||
+   $.contains( $container[ 0 ], focusNode 
) ) {
+   cxTranslation.selectionRange = 
mw.cx.getSelectionRange();
+   }
+   }
+   } );
+
+   // Restore translation selection on focus
+   this.$container.on( 'focus', function () {
+   if ( cxTranslation.selectionRange ) {
+   mw.cx.setSelectionRange( 
cxTranslation.selectionRange );
+   }
+   } );
};
 
/**
@@ -131,7 +156,7 @@
 * @param {jQuery} $section
 */
ContentTranslationEditor.prototype.postProcessMT = function ( $section 
) {
-   var $sourceSection = $( '#' + $section.data( 'source' ) );
+   var range, $sourceSection = $( '#' + $section.data( 'source' ) 
);
 
mw.hook( 'mw.cx.translation.change' ).fire( $section );
mw.hook( 'mw.cx.translation.focus' ).fire( $section );
@@ -150,6 +175,13 @@
$section.cxEditor();
}
 
+   // Set cursor to beginning of new section
+   range = document.createRange();
+   range.setStart( $section[ 0 ].firstChild, 0 );
+   range.collapse( true );
+   $section[ 0 ].focus(); // needed for FF
+   mw.cx.setSelectionRange( range );
+
// Search for text that was selected using the mouse.
// Delay it to run every 250 ms so it won't fire all the time 
while typing.
$section.on( 'click keyup', $.debounce( 250, function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa1fb9ca41109c5a94d2d4dcc0a0fdc85b924c74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen jsahl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Dictionary: Avoid random text selection going through api - change (mediawiki...ContentTranslation)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Dictionary: Avoid random text selection going through api
..


Dictionary: Avoid random text selection going through api

Do a simple check to see if the selection looks like a word for
dictionary api

Change-Id: Id248bd364ff57baf0b0eed850ce810fe6728f747
---
M modules/tools/ext.cx.tools.dictionary.js
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/modules/tools/ext.cx.tools.dictionary.js 
b/modules/tools/ext.cx.tools.dictionary.js
index c72daa2..0090fda 100644
--- a/modules/tools/ext.cx.tools.dictionary.js
+++ b/modules/tools/ext.cx.tools.dictionary.js
@@ -198,7 +198,11 @@
sourceLanguage = sourceLanguage || mw.cx.sourceLanguage;
targetLanguage = targetLanguage || mw.cx.targetLanguage;
// Don't appear if there's nothing to translate
-   if ( word === '' ) {
+   if ( word === '' ||
+   // Avoid text selections with whitespace characters
+   // treated as words and going to api.
+   word.match( /[\s.]+/ )
+   ) {
this.stop();
 
return;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id248bd364ff57baf0b0eed850ce810fe6728f747
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Jsahleen jsahl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Links: Various improvements - change (mediawiki...ContentTranslation)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Links: Various improvements
..


Links: Various improvements

* Avoid an API hit to show the target language card. Use the information
  from the link adaptation for the section (adapt API call when a link in
  source section clicked removed)
* Cache the API requests for getting the link information.
* Simplify the start method of the module. Removed lot of redundant
  and unwanted method calls from the time of single-card design.
* Associated minor code clean ups.

Change-Id: I1a020ec050f0cb30c01b9feaa81a6a65daab0ced
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 75 insertions(+), 56 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 5ec7f14..c12e677 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -11,6 +11,7 @@
 ( function ( $, mw ) {
'use strict';
 
+   var cache = {};
/**
 * Link Card
 * @class
@@ -126,9 +127,16 @@
 * @return {jQuery.Promise}
 */
function getLink( title, language ) {
-   var api = new mw.Api();
+   var request, api;
 
-   return api.get( {
+   // Normalize
+   title = mw.Title.newFromText( title ).toString();
+   if ( cache[ title ]  cache[ title ][ language ] ) {
+   return cache[ title ][ language ];
+   }
+
+   api = new mw.Api();
+   request = api.get( {
action: 'query',
titles: title,
prop: 'pageimages',
@@ -142,6 +150,10 @@
// This prevents warnings about the unrecognized 
parameter _
cache: true
} );
+
+   cache[ title ] = cache[ title ] || {};
+   cache[ title ][ language ] = request;
+   return request;
}
 
/**
@@ -159,10 +171,10 @@
/**
 * Adapt the given title to a target language
 * @param {string|string[]} titles A title as string or array of titles
-* @param {string} targetLanguage Language to which the links are to be 
adapted
+* @param {string} language Language to which the links are to be 
adapted
 * @return {jQuery.Promise}
 */
-   LinkCard.prototype.adapt = function ( titles, targetLanguage ) {
+   LinkCard.prototype.adapt = function ( titles, language ) {
var api, deferred;
 
api = new mw.Api();
@@ -174,7 +186,7 @@
action: 'query',
titles: titles.join( '|' ),
prop: 'langlinks',
-   lllang: targetLanguage,
+   lllang: language,
redirects: true,
format: 'json'
}, {
@@ -195,7 +207,6 @@
for ( i in redirects ) {
if ( redirects[ i ].to === 
page.title ) {
key = redirects[ i 
].from;
-
break;
}
}
@@ -246,7 +257,7 @@
 * @return {string} Cleaned up href
 */
function cleanupLinkHref( href ) {
-   return href.replace( /^\.*\//, '' );
+   return href  href.replace( /^\.*\//, '' );
}
 
/**
@@ -300,6 +311,9 @@
var $parent, $parentSection;
 
restoreSelection( selection );
+   if ( !selection || !selection.toString().length ) {
+   return false;
+   }
$parent = getSelectionParent();
 
if ( $parent.is( '[contenteditable=false]' ) ) {
@@ -411,6 +425,10 @@
LinkCard.prototype.prepareSourceLinkCard = function ( title, language ) 
{
var linkCard = this;
 
+   if ( !title ) {
+   return;
+   }
+
getLink( title, language ).done( function ( response ) {
var imgSrc, pageId, range, page;
 
@@ -447,8 +465,11 @@
LinkCard.prototype.prepareTargetLinkCard = function ( title, language ) 
{
var linkCard = this;
 
+   if ( !title ) {
+   return;
+   }
getLink( title, language ).done( function ( response ) {
-   var imgSrc, pageId, range, page;
+   var imgSrc, pageId, selection, page;
 
pageId = Object.keys( response.query.pages )[ 0 ];
 

[MediaWiki-commits] [Gerrit] Fix profiling error CommonSettings.php-skin-include1 - change (operations/mediawiki-config)

2014-09-22 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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

Change subject: Fix profiling error CommonSettings.php-skin-include1
..

Fix profiling error CommonSettings.php-skin-include1

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 44f485e..632db3f 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -535,7 +535,7 @@
 require_once $IP/skins/Modern/Modern.php;
 require_once $IP/skins/CologneBlue/CologneBlue.php;
 
-wfProfileIn( $fname-skin-include1 );
+wfProfileOut( $fname-skin-include1 );
 wfProfileIn( $fname-ext-include1 );
 
 if ( $wmgUseTimeline ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13428b6525c776ba58f5a30c917e1c266d334360
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update to CLDR 26 - change (mediawiki...cldr)

2014-09-22 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Update to CLDR 26
..

Update to CLDR 26

Change-Id: I2044086a1771e24d3ee51ebc733722a25b34e6ba
---
M CldrCurrency/Symbols.php
M CldrNames/CldrNamesAf.php
M CldrNames/CldrNamesAk.php
M CldrNames/CldrNamesAm.php
M CldrNames/CldrNamesAr.php
M CldrNames/CldrNamesAst.php
M CldrNames/CldrNamesAz.php
M CldrNames/CldrNamesBe.php
M CldrNames/CldrNamesBg.php
M CldrNames/CldrNamesBn.php
M CldrNames/CldrNamesBo.php
M CldrNames/CldrNamesBr.php
M CldrNames/CldrNamesBs.php
M CldrNames/CldrNamesCa.php
M CldrNames/CldrNamesCs.php
M CldrNames/CldrNamesCy.php
M CldrNames/CldrNamesDa.php
M CldrNames/CldrNamesDe.php
M CldrNames/CldrNamesDe_ch.php
A CldrNames/CldrNamesDsb.php
M CldrNames/CldrNamesDz.php
M CldrNames/CldrNamesEe.php
M CldrNames/CldrNamesEl.php
M CldrNames/CldrNamesEn.php
M CldrNames/CldrNamesEn_gb.php
M CldrNames/CldrNamesEo.php
M CldrNames/CldrNamesEs.php
M CldrNames/CldrNamesEt.php
M CldrNames/CldrNamesEu.php
M CldrNames/CldrNamesFa.php
M CldrNames/CldrNamesFf.php
M CldrNames/CldrNamesFi.php
M CldrNames/CldrNamesFo.php
M CldrNames/CldrNamesFr.php
M CldrNames/CldrNamesFur.php
M CldrNames/CldrNamesFy.php
M CldrNames/CldrNamesGa.php
M CldrNames/CldrNamesGd.php
M CldrNames/CldrNamesGl.php
M CldrNames/CldrNamesGsw.php
M CldrNames/CldrNamesGu.php
M CldrNames/CldrNamesHa.php
M CldrNames/CldrNamesHe.php
M CldrNames/CldrNamesHi.php
M CldrNames/CldrNamesHr.php
A CldrNames/CldrNamesHsb.php
M CldrNames/CldrNamesHu.php
M CldrNames/CldrNamesHy.php
M CldrNames/CldrNamesIa.php
M CldrNames/CldrNamesId.php
M CldrNames/CldrNamesIs.php
M CldrNames/CldrNamesIt.php
M CldrNames/CldrNamesJa.php
M CldrNames/CldrNamesKa.php
M CldrNames/CldrNamesKk_cyrl.php
M CldrNames/CldrNamesKl.php
M CldrNames/CldrNamesKm.php
M CldrNames/CldrNamesKn.php
M CldrNames/CldrNamesKo.php
M CldrNames/CldrNamesKs.php
M CldrNames/CldrNamesKsh.php
M CldrNames/CldrNamesKy.php
A CldrNames/CldrNamesLb.php
M CldrNames/CldrNamesLg.php
M CldrNames/CldrNamesLn.php
M CldrNames/CldrNamesLo.php
M CldrNames/CldrNamesLt.php
M CldrNames/CldrNamesLv.php
M CldrNames/CldrNamesMg.php
M CldrNames/CldrNamesMk.php
M CldrNames/CldrNamesMl.php
M CldrNames/CldrNamesMn.php
M CldrNames/CldrNamesMr.php
M CldrNames/CldrNamesMs.php
M CldrNames/CldrNamesMt.php
M CldrNames/CldrNamesMy.php
M CldrNames/CldrNamesNb.php
M CldrNames/CldrNamesNe.php
M CldrNames/CldrNamesNl.php
M CldrNames/CldrNamesNn.php
M CldrNames/CldrNamesOm.php
M CldrNames/CldrNamesOr.php
M CldrNames/CldrNamesOs.php
M CldrNames/CldrNamesPa.php
M CldrNames/CldrNamesPl.php
M CldrNames/CldrNamesPs.php
M CldrNames/CldrNamesPt.php
M CldrNames/CldrNamesPt_br.php
A CldrNames/CldrNamesQu.php
M CldrNames/CldrNamesRm.php
M CldrNames/CldrNamesRn.php
M CldrNames/CldrNamesRo.php
M CldrNames/CldrNamesRu.php
M CldrNames/CldrNamesRw.php
M CldrNames/CldrNamesSe.php
M CldrNames/CldrNamesSi.php
M CldrNames/CldrNamesSk.php
M CldrNames/CldrNamesSl.php
M CldrNames/CldrNamesSo.php
M CldrNames/CldrNamesSq.php
M CldrNames/CldrNamesSr_ec.php
M CldrNames/CldrNamesSv.php
M CldrNames/CldrNamesSw.php
M CldrNames/CldrNamesTa.php
M CldrNames/CldrNamesTe.php
M CldrNames/CldrNamesTh.php
M CldrNames/CldrNamesTi.php
M CldrNames/CldrNamesTn.php
M CldrNames/CldrNamesTo.php
M CldrNames/CldrNamesTr.php
A CldrNames/CldrNamesTzm.php
M CldrNames/CldrNamesUg.php
M CldrNames/CldrNamesUk.php
M CldrNames/CldrNamesUr.php
M CldrNames/CldrNamesUz.php
M CldrNames/CldrNamesVi.php
M CldrNames/CldrNamesVo.php
A CldrNames/CldrNamesYi.php
M CldrNames/CldrNamesYo.php
M CldrNames/CldrNamesZh_hans.php
M CldrNames/CldrNamesZh_hant.php
M CldrNames/CldrNamesZu.php
M CldrSupplemental/Supplemental.php
M README
124 files changed, 39,048 insertions(+), 10,050 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2044086a1771e24d3ee51ebc733722a25b34e6ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add public alias for config-master. - change (operations/dns)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Add public alias for config-master.
..

Add public alias for config-master.

As it is sometimes handy to be able to fetch pybal configs from outside
the internal network, and it's also needed by various scripts, we create
a public alias for config-master on misc-web-lb.

Change-Id: I8143aa88f3f91de37130a2f6587676175ba85a17
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M templates/wikimedia.org
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/13/161913/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 24225bc..9d5378c 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -405,6 +405,8 @@
 
 cache   600 IN DYNA geoip!text-addrs
 
+config-master   1H  IN CNAMEmisc-web-lb.eqiad
+
 dash.frdev  1H  IN CNAMElutetium
 
 doc 1H  IN CNAMEmisc-web-lb.eqiad

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8143aa88f3f91de37130a2f6587676175ba85a17
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Manage save button state when changing referenceview state - change (mediawiki...Wikibase)

2014-09-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Manage save button state when changing referenceview state
..

Manage save button state when changing referenceview state

Like for all other edittoolbars, the save button shall not be enabled when 
the input is invalid
or is the initial value. Consequently, when enabling the widget/toolbar, the 
save button needs
special handling.

Change-Id: Ie2f3347b395d2e93ace80e8a44f0c7a95f517dbe
---
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
1 file changed, 18 insertions(+), 0 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
index cacb036..23388ba 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
@@ -519,6 +519,24 @@
enableSave = referenceview.isValid()  
!referenceview.isInitialValue();
 
btnSave[enableSave ? 'enable' : 'disable']();
+   },
+   referenceviewdisable: function( event ) {
+   var $referenceview = $( event.target ),
+   referenceview = $referenceview.data( 
'referenceview' );
+
+   if( !referenceview ) {
+   return;
+   }
+
+   var disable = referenceview.option( 'disabled' ),
+   edittoolbar = $referenceview.data( 
'edittoolbar' ),
+   btnSave = edittoolbar.getButton( 'save' ),
+   enableSave = ( referenceview.isValid()  
!referenceview.isInitialValue() );
+
+   edittoolbar.option( 'disabled', disable );
+   if( !disable ) {
+   btnSave.option( 'disabled', !enableSave );
+   }
}
 
// Destroying the referenceview will destroy the toolbar. 
Trying to destroy the toolbar

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2f3347b395d2e93ace80e8a44f0c7a95f517dbe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Add soft dependency on httplib2 0.9.0 for cacerts - change (pywikibot/core)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add soft dependency on httplib2 0.9.0 for cacerts
..


Add soft dependency on httplib2 0.9.0 for cacerts

Added the new version dependency only to setup.py
which ensures anyone packaging pywikibot provides
a version of httplib2 that has no known problems
with pywikibot.

Updated README for conversion:
- Remove mention of simplejson, as it is included
  in all supported versions of python.
- Remove note about unsupported httplib2 0.4.0.

Bug: 65189
Change-Id: I1917c463256443262b723ca1dead50308c5b585e
---
M README-conversion.txt
M setup.py
2 files changed, 21 insertions(+), 11 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/README-conversion.txt b/README-conversion.txt
index b137a28..dd6c1c7 100644
--- a/README-conversion.txt
+++ b/README-conversion.txt
@@ -48,18 +48,28 @@
 so that these dependencies will be loaded automatically when the package is
 installed, and users won't need to worry about this...]
 
-To run pywikibot, you will need the httplib2 and simplejson:
-packages--
-* httplib2   : https://github.com/jcgregorio/httplib2
-* simplejson : 
http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.7.1/docs/index.html
+To run pywikibot, you will need the httplib2 package:
+* https://github.com/jcgregorio/httplib2
 
-or, if you already have setuptools installed, just execute
-'easy_install httplib2' and 'easy_install simplejson'
+It may be installed using pip or easy_install.
 
-If you run into errors involving httplib2.urlnorm, update httplib2 to 0.4.0
-(Ubuntu package python-httlib2, for example, is outdated).  Note that
-httplib2 will run under Python 2.6, but will emit DeprecationWarnings (which
-are annoying but don't affect the ability to use the package).
+The minimum requirement is httplib2 0.6.0.
+However setup.py requires httplib2 0.9.0, as that version includes current
+root certificates needed to access Wikimedia servers using HTTPS.
+
+If your operating systems provides a packaged httplib2, it may be
+altered to load the root certificates from the host operating system.
+To check, execute:
+$ python -c 'import httplib2; print httplib2.CA_CERTS'
+
+httplib2 0.8.0 added the ability to define CA_CERTS with a plugin module.
+If you need to use 0.8.0, install module httplib2.ca_certs_locater with pip,
+and contribute fixes as necessary.
+https://pypi.python.org/pypi/httplib2.ca_certs_locater
+https://github.com/dreamhost/httplib2-ca_certs_locater
+
+If you use the pwb.py script, it will attempt to load httplib2 from the
+externals directory, which is a git submodule containing httplib2 0.9.0.
 
 == Page objects ==
 
diff --git a/setup.py b/setup.py
index 86102fb..0947d97 100644
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
 
 test_deps = []
 
-dependencies = ['httplib2=0.6.0']
+dependencies = ['httplib2=0.9.0']
 
 extra_deps = {}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1917c463256443262b723ca1dead50308c5b585e
Gerrit-PatchSet: 8
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: XZise commodorefabia...@gmx.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] dashboard: Update link for texvc math status - change (integration/docroot)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: dashboard: Update link for texvc math status
..


dashboard: Update link for texvc math status

Change-Id: I22cf691fd5b14dc038ed176f6c098905d6ab21f8
---
M org/wikimedia/integration/dashboard/index.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/org/wikimedia/integration/dashboard/index.php 
b/org/wikimedia/integration/dashboard/index.php
index 4382806..1e238c8 100644
--- a/org/wikimedia/integration/dashboard/index.php
+++ b/org/wikimedia/integration/dashboard/index.php
@@ -16,7 +16,7 @@
'beta-update-databases-eqiad' = 'DB update',
'beta-cxserver-update-eqiad' = 'Cxserver update',
'beta-parsoid-update-eqiad' = 'Parsoid update',
-   'beta-recompile-math-texvc' = 'texvc math',
+   'beta-recompile-math-texvc-eqiad' = 'texvc math',
),
'MediaWiki' = array(
'mediawiki-core-regression-master' = 'master',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22cf691fd5b14dc038ed176f6c098905d6ab21f8
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt t...@tim-landscheidt.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] config-master: serve through misc-web-lb - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: config-master: serve through misc-web-lb
..

config-master: serve through misc-web-lb

Change-Id: I84a42ea0e1032b0be0c8c53748924bf412d34872
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/pybal_config.pp
M templates/varnish/misc.inc.vcl.erb
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/161915/1

diff --git a/manifests/role/pybal_config.pp b/manifests/role/pybal_config.pp
index 6ab2e98..f1a5247 100644
--- a/manifests/role/pybal_config.pp
+++ b/manifests/role/pybal_config.pp
@@ -7,6 +7,7 @@
'config-master.codfw.wmnet',
'config-master.esams.wmnet',
'config-master.ulsfo.wmnet',
+   'config-master.wikimedia.org',
]
 }
 }
diff --git a/templates/varnish/misc.inc.vcl.erb 
b/templates/varnish/misc.inc.vcl.erb
index 17798d5..bcd6784 100644
--- a/templates/varnish/misc.inc.vcl.erb
+++ b/templates/varnish/misc.inc.vcl.erb
@@ -40,6 +40,10 @@
set req.backend = magnesium;
} elsif (req.http.Host == metrics.wikimedia.org) {
set req.backend = stat1001;
+   } elsif (req.http.Host == config-master.wikimedia.org) {
+   set req.backend = palladium;
+   /* no caching of configs; scripts may want to know when things 
change */
+   return (pass);
} else {
error 404 Domain not served here;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84a42ea0e1032b0be0c8c53748924bf412d34872
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updated language name index based on CLDR 26 - change (mediawiki...UniversalLanguageSelector)

2014-09-22 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Updated language name index based on CLDR 26
..

Updated language name index based on CLDR 26

Change-Id: I23f7e9cbb7f3cfa41dd664447eaadf0fe3787143
---
M data/langnames.ser
1 file changed, 1 insertion(+), 1 deletion(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23f7e9cbb7f3cfa41dd664447eaadf0fe3787143
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add patrol to site.py - change (pywikibot/core)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add patrol to site.py
..


Add patrol to site.py

Add API: patrol to site.py

Change-Id: Id8262d765f7a7bbb398ce8c125d2358a8ca178fc
---
M pywikibot/site.py
M tests/site_tests.py
2 files changed, 125 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 82a7299..d4fe555 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -57,8 +57,11 @@
 from urllib.parse import urlencode
 basestring = (str,)
 unicode = str
+from itertools import zip_longest
 else:
 from urllib import urlencode
+from itertools import izip_longest as zip_longest
+
 
 _logger = wiki.site
 
@@ -4084,7 +4087,100 @@
 
 # TODO: implement undelete
 
-# TODO: implement patrol
+_patrol_errors = {
+nosuchrcid: There is no change with rcid %(rcid)s,
+nosuchrevid: There is no change with revid %(revid)s,
+patroldisabled: Patrolling is disabled on %(site)s wiki,
+noautopatrol: User %(user)s has no permission to patrol its own 
changes, 'autopatrol' is needed,
+notpatrollable: The revision %(revid)s can't be patrolled as it's 
too old.
+}
+
+# test it with:
+# python -m unittest tests.site_tests.SiteUserTestCase.testPatrol
+
+def patrol(self, rcid=None, revid=None, revision=None):
+Return a generator of patrolled pages.
+
+Pages to be patrolled are identified by rcid, revid or revision.
+At least one of the parameters is mandatory.
+See https://www.mediawiki.org/wiki/API:Patrol.
+
+@param rcid: an int/string/iterable/iterator providing rcid of pages
+to be patrolled.
+@type rcid: iterable/iterator which returns a number or string which
+ contains only digits; it also supports a string (as above) or int
+@param revid: an int/string/iterable/iterator providing revid of pages
+to be patrolled.
+@type revid: iterable/iterator which returns a number or string which
+ contains only digits; it also supports a string (as above) or int.
+@param revision: an Revision/iterable/iterator providing Revision 
object
+of pages to be patrolled.
+@type revision: iterable/iterator which returns a Revision object; it
+also supports a single Revision.
+@yield: dict with 'rcid', 'ns' and 'title' of the patrolled page.
+
+
+
+# If patrol is not enabled, attr will be set the first time a
+# request is done.
+if hasattr(self, u'_patroldisabled'):
+if self._patroldisabled:
+return
+
+if all(_ is None for _ in [rcid, revid, revision]):
+raise Error('No rcid, revid or revision provided.')
+
+if isinstance(rcid, int) or isinstance(rcid, basestring):
+rcid = set([rcid])
+if isinstance(revid, int) or isinstance(revid, basestring):
+revid = set([revid])
+if isinstance(revision, pywikibot.page.Revision):
+revision = set([revision])
+
+# Handle param=None.
+rcid = rcid or set()
+revid = revid or set()
+revision = revision or set()
+
+# TODO: remove exeception for mw  1.22
+if (revid or revision) and LV(self.version())  LV(1.22):
+raise NotImplementedError(
+u'Support of revid parameter\n'
+u'is not implemented in MediaWiki version  1.22')
+else:
+combined_revid = set(revid) | set(r.revid for r in revision)
+
+gen = itertools.chain(
+zip_longest(rcid, [], fillvalue='rcid'),
+zip_longest(combined_revid, [], fillvalue='revid'))
+
+token = self.tokens['patrol']
+
+for idvalue, idtype in gen:
+req = api.Request(site=self, action='patrol',
+  token=token, **{idtype: idvalue})
+
+try:
+result = req.submit()
+except api.APIError as err:
+# patrol is disabled, store in attr to avoid other requests
+if err.code == u'patroldisabled':
+self._patroldisabled = True
+return
+
+errdata = {
+'site': self,
+'user': self.user(),
+}
+errdata[idtype] = idvalue
+if err.code in self._patrol_errors:
+raise Error(self._patrol_errors[err.code] % errdata)
+pywikibot.debug(uprotect: Unexpected error code '%s' 
received.
+% err.code,
+_logger)
+raise
+
+yield result['patrol']
 
 @must_be(group='sysop')
 def blockuser(self, user, expiry, 

[MediaWiki-commits] [Gerrit] (bug 71109) Fix broken Special:EditWatchlist - change (mediawiki...Flow)

2014-09-22 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: (bug 71109) Fix broken Special:EditWatchlist
..

(bug 71109) Fix broken Special:EditWatchlist

On enwiki, there was some invalid value in watchlist table.
2 people are watching some title called 
The_Washington__Jefferson_College_Review
in namespace 2600 (topic namespace)

That namespace should only have topic ids. On that assumption, we didn't
properly check if that is in fact the case, and created a UUID object
from an incorrect value, causing an exception.

Bug: 71109
Change-Id: I211559979af9b900dbcecb82ac2f4c9bf691f6f8
---
M Hooks.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index e8ae18f..ddaaf46 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -922,10 +922,10 @@
return true;
}
 
-   // Find the title text of this specific topic
-   $uuid = UUID::create( $title-getDBKey() );
-   $collection = PostCollection::newFromId( $uuid );
try {
+   // Find the title text of this specific topic
+   $uuid = UUID::create( $title-getDBKey() );
+   $collection = PostCollection::newFromId( $uuid );
$revision = $collection-getLastRevision();
} catch ( \Exception $e ) {
wfWarn( __METHOD__ . ': Failed to locate revision for: 
' . $title-getDBKey() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I211559979af9b900dbcecb82ac2f4c9bf691f6f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Assertion macros for node js version - change (integration/jenkins-job-builder-config)

2014-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Assertion macros for node js version
..

Assertion macros for node js version

We now have slaves using Ubuntu Precise or Trusty, each providing a
different node minor version (respectively 0.8.x and 0.10.x).  We tie
jobs to them using the labels UbuntuPrecise and UbuntuTrusty which
should be fine until we make a configuration change.

To make sure we always run the job with the proper version, this patch
provide an assertion macro which would let one test the node minor
version being used and fails the build early if it does not meet
expectation.

The macro usage is straightforward:

builders:
 - assert-node-version:
   minor-version: 8

Provide wrappers to easily assert node v0.8.x and v0.10.x

Change-Id: I5099616189dd7a26fae556d982b9669ff835923d
---
M macro.yaml
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/18/161918/1

diff --git a/macro.yaml b/macro.yaml
index fabc68f..d437bbc 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -215,6 +215,29 @@
 npm test
 
 - builder:
+name: assert-node-version
+builders:
+ - shell: |
+ #!/bin/bash -e -u
+ echo Asserting we have node 0.{minorversion}.x
+ NODE_VERSION=`node --version`
+ echo $NODE_VERSION | grep ^v0\.{minorversion}\.  /dev/null \
+  (echo Available node version $NODE_VERSION matches 
^0.{minorversion}) \
+ || (echo Unexpected node version: $NODE_VERSION. Should match 
^0.{minorversion}; exit 1)
+
+- builder:
+name: assert-node-version-0.8
+builders:
+ - assert-node-version:
+ minorversion: 8
+
+- builder:
+name: assert-node-version-0.10
+builders:
+ - assert-node-version:
+ minorversion: 10
+
+- builder:
 name: jsduck-conf
 builders:
 # Zuul uses Python str.format(obj) for {config} substitutions

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5099616189dd7a26fae556d982b9669ff835923d
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Updated language name index based on CLDR 26 - change (mediawiki...UniversalLanguageSelector)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Updated language name index based on CLDR 26
..


Updated language name index based on CLDR 26

Change-Id: I23f7e9cbb7f3cfa41dd664447eaadf0fe3787143
---
M data/langnames.ser
1 file changed, 1 insertion(+), 1 deletion(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23f7e9cbb7f3cfa41dd664447eaadf0fe3787143
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix duplicate messages key in 'mediawiki.special.preferences... - change (mediawiki/core)

2014-09-22 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Fix duplicate messages key in 'mediawiki.special.preferences' 
definition
..

Fix duplicate messages key in 'mediawiki.special.preferences' definition

Follows up: Idb00f50a

Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
---
M resources/Resources.php
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/161919/1

diff --git a/resources/Resources.php b/resources/Resources.php
index ff59a44..70f64dd 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1292,13 +1292,11 @@
'position' = 'top',
'messages' = array(
'prefs-tabs-navigation-hint',
+   'prefswarning-warning',
+   'saveprefs',
),
'dependencies' = array(
'mediawiki.language',
-   ),
-   'messages' = array(
-   'prefswarning-warning',
-   'saveprefs',
),
),
'mediawiki.special.recentchanges' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_24
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix duplicate messages key in 'mediawiki.special.preferences... - change (mediawiki/core)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix duplicate messages key in 'mediawiki.special.preferences' 
definition
..


Fix duplicate messages key in 'mediawiki.special.preferences' definition

Follows up: Idb00f50a

Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
---
M resources/Resources.php
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index 70905fb..f72049d 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1297,13 +1297,11 @@
'position' = 'top',
'messages' = array(
'prefs-tabs-navigation-hint',
+   'prefswarning-warning',
+   'saveprefs',
),
'dependencies' = array(
'mediawiki.language',
-   ),
-   'messages' = array(
-   'prefswarning-warning',
-   'saveprefs',
),
),
'mediawiki.special.recentchanges' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix duplicate messages key in 'mediawiki.special.preferences... - change (mediawiki/core)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix duplicate messages key in 'mediawiki.special.preferences' 
definition
..


Fix duplicate messages key in 'mediawiki.special.preferences' definition

Follows up: Idb00f50a

Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
---
M resources/Resources.php
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index ff59a44..70f64dd 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1292,13 +1292,11 @@
'position' = 'top',
'messages' = array(
'prefs-tabs-navigation-hint',
+   'prefswarning-warning',
+   'saveprefs',
),
'dependencies' = array(
'mediawiki.language',
-   ),
-   'messages' = array(
-   'prefswarning-warning',
-   'saveprefs',
),
),
'mediawiki.special.recentchanges' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I852e5965de8e0bee7e976637df95daded691e11c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_24
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] WIP: Update plural data to CLDR 26 - change (mediawiki/core)

2014-09-22 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: WIP: Update plural data to CLDR 26
..

WIP: Update plural data to CLDR 26

Do not merge. This patch is just to identify what changed and its impact

* dsb and hsb is finally in CLDR, Mediawiki's definition no longer needed

Change-Id: I7cce477925330fe5bbf51a8470060dc1223981d0
---
M languages/data/plurals-mediawiki.xml
M languages/data/plurals.xml
2 files changed, 168 insertions(+), 145 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/161920/1

diff --git a/languages/data/plurals-mediawiki.xml 
b/languages/data/plurals-mediawiki.xml
index aafc393..1ed6a51 100644
--- a/languages/data/plurals-mediawiki.xml
+++ b/languages/data/plurals-mediawiki.xml
@@ -2,14 +2,6 @@
 !DOCTYPE supplementalData SYSTEM ../../common/dtd/ldmlSupplemental.dtd
 supplementalData
plurals
-   !-- Lower Sorbian (Dolnoserbski) and  Upper Sorbian 
(Hornjoserbsce). Not present in CLDR --
-   pluralRules locales=dsb hsb
-   pluralRule count=onen % 100 = 1 @integer 1, 101, 
201, 301, …/pluralRule
-   pluralRule count=twon % 100 = 2 @integer 2, 102, 
202, 302, …/pluralRule
-   pluralRule count=fewn % 100 = 3..4 @integer 3~4, 
103~104, …/pluralRule
-   pluralRule count=other @integer 5, 6, 7, 8, 9, 10, 
105, 206, 307, …/pluralRule
-   /pluralRules
-
!-- Belarusian in Taraškievica orthography (Беларуская 
тарашкевіца). Copied from be --
pluralRules locales=be-tarask
pluralRule count=onen % 10 = 1 and n % 100 != 11 
@integer 1, 21, 31, 41, 51, 61, 71, 81, 101, 1001, … @decimal 1.0, 21.0, 31.0, 
41.0, 51.0, 61.0, 71.0, 81.0, 101.0, 1001.0, …/pluralRule
diff --git a/languages/data/plurals.xml b/languages/data/plurals.xml
index fd4eaf6..e364f1b 100644
--- a/languages/data/plurals.xml
+++ b/languages/data/plurals.xml
@@ -6,71 +6,148 @@
 For terms of use, see http://www.unicode.org/copyright.html
 --
 supplementalData
-version number=$Revision: 9369 $/
-generation date=$Date: 2013-09-14 01:26:08 +0530 (ശ, 14 സെപ് 2013) $/
+version number=$Revision: 10807 $/
+generation date=$Date: 2014-08-14 14:43:27 -0500 (Thu, 14 Aug 2014) $/
 plurals type=cardinal
 !-- For a canonicalized list, use GeneratedPluralSamples --
-!-- if locale is known to have no plurals, there are no rules --
-pluralRules locales=ar
-pluralRule count=zeron = 0 @integer 0 @decimal 0.0, 0.00, 
0.000, 0./pluralRule
-pluralRule count=onen = 1 @integer 1 @decimal 1.0, 1.00, 
1.000, 1./pluralRule
-pluralRule count=twon = 2 @integer 2 @decimal 2.0, 2.00, 
2.000, 2./pluralRule
-pluralRule count=fewn % 100 = 3..10 @integer 3~10, 103~110, 
1003, … @decimal 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 103.0, 1003.0, 
…/pluralRule
-pluralRule count=manyn % 100 = 11..99 @integer 11~26, 111, 
1011, … @decimal 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 111.0, 1011.0, 
…/pluralRule
-pluralRule count=other @integer 100~102, 200~202, 300~302, 
400~402, 500~502, 600, 1000, 1, 10, 100, … @decimal 0.1~0.9, 
1.1~1.7, 10.1, 100.0, 1000.0, 1.0, 10.0, 100.0, …/pluralRule
+
+!-- 1: other --
+
+pluralRules locales=bm bo dz id ig ii in ja jbo jv jw kde kea km ko 
lkt lo ms my nqo root sah ses sg th to vi wo yo zh
+pluralRule count=other @integer 0~15, 100, 1000, 1, 
10, 100, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 1.0, 10.0, 
100.0, …/pluralRule
 /pluralRules
-pluralRules locales=he iw
-pluralRule count=onei = 1 and v = 0 @integer 1/pluralRule
-pluralRule count=twoi = 2 and v = 0 @integer 2/pluralRule
-pluralRule count=manyv = 0 and n != 0..10 and n % 10 = 0 
@integer 20, 30, 40, 50, 60, 70, 80, 90, 100, 1000, 1, 10, 100, 
…/pluralRule
-pluralRule count=other @integer 0, 3~17, 101, 1001, … @decimal 
0.0~1.5, 10.0, 100.0, 1000.0, 1.0, 10.0, 100.0, …/pluralRule
-/pluralRules
-pluralRules locales=af asa ast az bem bez bg brx cgg chr ckb dv ee 
el eo es eu fo fur fy gsw ha haw hu jgo jmc ka kaj kcg kk kkj kl ks ksb ku ky 
lb lg mas mgo ml mn nah nb nd ne nn nnh no nr ny nyn om or os pap ps rm rof rwk 
saq seh sn so sq ss ssy st syr ta te teo tig tk tn tr ts uz ve vo vun wae xh 
xog
-pluralRule count=onen = 1 @integer 1 @decimal 1.0, 1.00, 
1.000, 1./pluralRule
-pluralRule count=other @integer 0, 2~16, 100, 1000, 1, 
10, 100, … @decimal 0.0~0.9, 1.1~1.6, 10.0, 100.0, 1000.0, 1.0, 
10.0, 100.0, …/pluralRule
-/pluralRules
-pluralRules locales=ak bh guw ln mg 

[MediaWiki-commits] [Gerrit] [Planet Wikimedia] Add Maria Sefidari to English - change (operations/puppet)

2014-09-22 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: [Planet Wikimedia] Add Maria Sefidari to English
..

[Planet Wikimedia] Add Maria Sefidari to English

Change-Id: Id9c05e326a0139e614c1fdc6e68ed4e76f1deeb7
---
M modules/planet/templates/feeds/en_config.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/161921/1

diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index ef7b3f5..4a471f1 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -469,3 +469,6 @@
 
 [http://www.wikipediatrends.com/blog/feed/]
 name=Alex Druk
+
+[http://mariasefidari.org/category/wikipedia/feed/]
+name=Maria Sefidari

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9c05e326a0139e614c1fdc6e68ed4e76f1deeb7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] Add public alias for config-master. - change (operations/dns)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Add public alias for config-master.
..


Add public alias for config-master.

As it is sometimes handy to be able to fetch pybal configs from outside
the internal network, and it's also needed by various scripts, we create
a public alias for config-master on misc-web-lb.

Change-Id: I8143aa88f3f91de37130a2f6587676175ba85a17
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M templates/wikimedia.org
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 24225bc..9d5378c 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -405,6 +405,8 @@
 
 cache   600 IN DYNA geoip!text-addrs
 
+config-master   1H  IN CNAMEmisc-web-lb.eqiad
+
 dash.frdev  1H  IN CNAMElutetium
 
 doc 1H  IN CNAMEmisc-web-lb.eqiad

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8143aa88f3f91de37130a2f6587676175ba85a17
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] config-master: serve through misc-web-lb - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: config-master: serve through misc-web-lb
..


config-master: serve through misc-web-lb

Change-Id: I84a42ea0e1032b0be0c8c53748924bf412d34872
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/pybal_config.pp
M templates/varnish/misc.inc.vcl.erb
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/pybal_config.pp b/manifests/role/pybal_config.pp
index 6ab2e98..f1a5247 100644
--- a/manifests/role/pybal_config.pp
+++ b/manifests/role/pybal_config.pp
@@ -7,6 +7,7 @@
'config-master.codfw.wmnet',
'config-master.esams.wmnet',
'config-master.ulsfo.wmnet',
+   'config-master.wikimedia.org',
]
 }
 }
diff --git a/templates/varnish/misc.inc.vcl.erb 
b/templates/varnish/misc.inc.vcl.erb
index 17798d5..bcd6784 100644
--- a/templates/varnish/misc.inc.vcl.erb
+++ b/templates/varnish/misc.inc.vcl.erb
@@ -40,6 +40,10 @@
set req.backend = magnesium;
} elsif (req.http.Host == metrics.wikimedia.org) {
set req.backend = stat1001;
+   } elsif (req.http.Host == config-master.wikimedia.org) {
+   set req.backend = palladium;
+   /* no caching of configs; scripts may want to know when things 
change */
+   return (pass);
} else {
error 404 Domain not served here;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84a42ea0e1032b0be0c8c53748924bf412d34872
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] misc-varnish: add palladium - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: misc-varnish: add palladium
..

misc-varnish: add palladium

Change-Id: I5b11a2308db487851734be4a9f1e41f58a074de7
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/cache.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index edb6f7a..edb87ea 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -1500,6 +1500,7 @@
 'neon.wikimedia.org', # monitoring tools (icinga et al)
 'magnesium.wikimedia.org', # RT and racktables
 'stat1001.wikimedia.org', # metrics and metrics-api
+'palladium.eqiad.wmnet',
 ],
 backend_options = [
 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b11a2308db487851734be4a9f1e41f58a074de7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] misc-varnish: add palladium - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: misc-varnish: add palladium
..


misc-varnish: add palladium

Change-Id: I5b11a2308db487851734be4a9f1e41f58a074de7
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/cache.pp
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index edb6f7a..edb87ea 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -1500,6 +1500,7 @@
 'neon.wikimedia.org', # monitoring tools (icinga et al)
 'magnesium.wikimedia.org', # RT and racktables
 'stat1001.wikimedia.org', # metrics and metrics-api
+'palladium.eqiad.wmnet',
 ],
 backend_options = [
 {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b11a2308db487851734be4a9f1e41f58a074de7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update CLDRPluralRUleParser library - change (mediawiki/core)

2014-09-22 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Update CLDRPluralRUleParser library
..

Update CLDRPluralRUleParser library

Upstream release:
https://github.com/santhoshtr/CLDRPluralRuleParser/releases/tag/v1.1.3

Does not have any feature changes.
License changed to MIT

Change-Id: Icb4c00cca86083d77028a4774122acd8c595152e
---
M resources/src/mediawiki.libs/CLDRPluralRuleParser.js
1 file changed, 184 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/161923/1

diff --git a/resources/src/mediawiki.libs/CLDRPluralRuleParser.js 
b/resources/src/mediawiki.libs/CLDRPluralRuleParser.js
index 83c2524..31c8fef 100644
--- a/resources/src/mediawiki.libs/CLDRPluralRuleParser.js
+++ b/resources/src/mediawiki.libs/CLDRPluralRuleParser.js
@@ -1,12 +1,13 @@
-/* This is CLDRPluralRuleParser v1.1, ported to MediaWiki ResourceLoader */
+/* This is CLDRPluralRuleParser v1.1.3, ported to MediaWiki ResourceLoader */
 
 /**
 * CLDRPluralRuleParser.js
 * A parser engine for CLDR plural rules.
 *
-* Copyright 2012 GPLV3+, Santhosh Thottingal
+* Copyright 2012-2014 Santhosh Thottingal and other contributors
+* Released under the MIT license
+* http://opensource.org/licenses/MIT
 *
-* @version 0.1.0-alpha
 * @source https://github.com/santhoshtr/CLDRPluralRuleParser
 * @author Santhosh Thottingal santhosh.thottin...@gmail.com
 * @author Timo Tijhof
@@ -22,6 +23,8 @@
  */
 
 function pluralRuleParser(rule, number) {
+   'use strict';
+
/*
Syntax: see http://unicode.org/reports/tr35/#Language_Plural_Rules
-
@@ -44,14 +47,15 @@
decimalValue  = value ('.' value)?
*/
 
-   // we don't evaluate the samples section of the rule. Ignore it.
+   // We don't evaluate the samples section of the rule. Ignore it.
rule = rule.split('@')[0].replace(/^\s*/, '').replace(/\s*$/, '');
 
if (!rule.length) {
-   // empty rule or 'other' rule.
+   // Empty rule or 'other' rule.
return true;
}
-   // Indicates current position in the rule as we parse through it.
+
+   // Indicates the current position in the rule as we parse through it.
// Shared among all parsing functions below.
var pos = 0,
operand,
@@ -87,15 +91,18 @@
debug('pluralRuleParser', rule, number);
 
// Try parsers until one works, if none work return null
-
function choice(parserSyntax) {
return function() {
-   for (var i = 0; i  parserSyntax.length; i++) {
-   var result = parserSyntax[i]();
+   var i, result;
+
+   for (i = 0; i  parserSyntax.length; i++) {
+   result = parserSyntax[i]();
+
if (result !== null) {
return result;
}
}
+
return null;
};
}
@@ -103,46 +110,56 @@
// Try several parserSyntax-es in a row.
// All must succeed; otherwise, return null.
// This is the only eager one.
-
function sequence(parserSyntax) {
-   var originalPos = pos;
-   var result = [];
-   for (var i = 0; i  parserSyntax.length; i++) {
-   var res = parserSyntax[i]();
-   if (res === null) {
+   var i, parserRes,
+   originalPos = pos,
+   result = [];
+
+   for (i = 0; i  parserSyntax.length; i++) {
+   parserRes = parserSyntax[i]();
+
+   if (parserRes === null) {
pos = originalPos;
+
return null;
}
-   result.push(res);
+
+   result.push(parserRes);
}
+
return result;
}
 
// Run the same parser over and over until it fails.
// Must succeed a minimum of n times; otherwise, return null.
-
function nOrMore(n, p) {
return function() {
-   var originalPos = pos;
-   var result = [];
-   var parsed = p();
+   var originalPos = pos,
+   result = [],
+   parsed = p();
+
while (parsed !== null) {
result.push(parsed);
parsed = p();
}
+
if (result.length  n) {
pos = 

[MediaWiki-commits] [Gerrit] Remove the last references to pybal on fenari - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Remove the last references to pybal on fenari
..


Remove the last references to pybal on fenari

Change-Id: Iab42ffd9c135f6e6e60d98fa0f9815787f888950
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M files/misc/PacketLossLogtailer.py
M files/misc/rolematcher.py
M modules/apachesync/files/apache-fast-test
3 files changed, 5 insertions(+), 4 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/files/misc/PacketLossLogtailer.py 
b/files/misc/PacketLossLogtailer.py
index 00bc2a3..2cc8df8 100644
--- a/files/misc/PacketLossLogtailer.py
+++ b/files/misc/PacketLossLogtailer.py
@@ -33,7 +33,7 @@
 self.lock = threading.RLock()
 
 # a list of rolematchers which are simple object to determine the role 
of a particular server
-# this list is obtained from crawling noc.wikimedia.org/pybal and 
parse the available configurations
+# this list is obtained from crawling 
config-master.wikimedia.org/pybal and parse the available configurations
 self.matchers = rolematcher.init()
 # this is what will match the packet loss lines
 # packet loss format :
diff --git a/files/misc/rolematcher.py b/files/misc/rolematcher.py
index 91cf3d0..48a27f7 100644
--- a/files/misc/rolematcher.py
+++ b/files/misc/rolematcher.py
@@ -22,7 +22,7 @@
 
 
 numbers = re.compile('([0-9]+)')
-base_url = 'http://noc.wikimedia.org/pybal'
+base_url = 'http://config-master.wikimedia.org/pybal'
 dcs = {
 'eqiad': ['apaches', 'api', 'bits', 'https', 'mobile', 'rendering', 
'text', 'upload'],
 'pmtpa': ['apaches', 'api', 'bits', 'https', 'mobile', 'rendering', 
'text', 'upload'],
diff --git a/modules/apachesync/files/apache-fast-test 
b/modules/apachesync/files/apache-fast-test
index 0c83782..31f012e 100755
--- a/modules/apachesync/files/apache-fast-test
+++ b/modules/apachesync/files/apache-fast-test
@@ -43,8 +43,9 @@
if (/^pybal$/) {
# list of production servers from pybal config (URL or 
local file)
$servers = get_server_list_from_pybal_config(qw(
-   http://noc.wikimedia.org/pybal/eqiad/apaches
-   http://noc.wikimedia.org/pybal/eqiad/api
+   
http://config-master.eqiad.wmnet/pybal/eqiad/apaches
+   http://config-master.eqiad.wmnet/pybal/eqiad/api
+   
http://config-master.eqiad.wmnet/pybal/eqiad/hhvm_appservers
));
} elsif (/^([\w\.]+)$/) {
$servers-{$1} = 1;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab42ffd9c135f6e6e60d98fa0f9815787f888950
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Initialize toolbars on existing DOM - change (mediawiki...Wikibase)

2014-09-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Initialize toolbars on existing DOM
..

Initialize toolbars on existing DOM

Initializing the toolbars on the static DOM rendered by the back-end does not 
yet involve
the inner toolbar structure. (Still, the buttons will be removed and re-added 
to the DOM.)
Along with this change, the sitelinkgroup add buttons available in non-JS are 
removed in
order to receive a matching toolbar structure between JS and non-JS again.

Change-Id: I859dcc21cd17bffbb7fb265603d4d77b5fd74cf2
---
M lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
M repo/includes/View/FingerprintView.php
M repo/includes/View/SiteLinksView.php
M repo/resources/wikibase.ui.entityViewInit.js
11 files changed, 91 insertions(+), 50 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
index e90b26d..058cc26 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
@@ -447,10 +447,15 @@
events: {
aliasesviewcreate: function( event, toolbarcontroller ) {
var $aliasesview = $( event.target ),
-   aliasesview = $aliasesview.data( 'aliasesview' 
);
+   aliasesview = $aliasesview.data( 'aliasesview' 
),
+   $container = $aliasesview.find( 'ul' ).next( 
'span' );
+
+   if( !$container.length ) {
+   $container = $( 'span/' ).insertAfter( 
$aliasesview.find( 'ul' ) );
+   }
 
$aliasesview.edittoolbar( {
-   $container: $( 'div/' ).insertAfter( 
$aliasesview.find( 'ul' ) ),
+   $container: $container,
interactionWidget: aliasesview
} );
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index c9f53f1..d9f3d41 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -407,14 +407,19 @@
events: {
claimlistviewcreate: function( event, toolbarcontroller ) {
var $claimlistview = $( event.target ),
-   claimlistview = $claimlistview.data( 
'claimlistview' );
+   claimlistview = $claimlistview.data( 
'claimlistview' ),
+   $container = $claimlistview.children( 
'.wikibase-toolbar-wrapper' )
+   .children( 
'.wikibase-toolbar-container' );
+
+   if( !$container.length ) {
+   // TODO: Remove layout-specific toolbar wrapper
+   $container = $( 'div/' ).appendTo(
+   mw.template( 
'wikibase-toolbar-wrapper', '' ).appendTo( $claimlistview )
+   );
+   }
 
$claimlistview.addtoolbar( {
-   // TODO: Remove layout-specific toolbar wrapper
-   $container: $( 'div/' ).appendTo(
-   mw.template( 
'wikibase-toolbar-wrapper', '' )
-   .appendTo( $claimlistview )
-   )
+   $container: $container
} )
.on( 'addtoolbaradd.addtoolbar', function( e ) {
if( e.target !== $claimlistview.get( 0 ) ) {
@@ -463,9 +468,15 @@
$view = $( event.target ),
view = $view.data( viewType ),
options = {
-   interactionWidget: view,
-   $container: $( 'div/' ).appendTo( 
$view )
-   };
+   interactionWidget: view
+

[MediaWiki-commits] [Gerrit] Fix some wfMsg* - change (mediawiki...OnlineStatus)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix some wfMsg*
..


Fix some wfMsg*

Bug: 68750
Change-Id: Iffb83f754de7ecdf2067f72e6375d6b2d5b80c11
---
M OnlineStatus.body.php
1 file changed, 19 insertions(+), 11 deletions(-)

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



diff --git a/OnlineStatus.body.php b/OnlineStatus.body.php
index 651077c..c3f06fd 100644
--- a/OnlineStatus.body.php
+++ b/OnlineStatus.body.php
@@ -44,13 +44,13 @@
global $wgUser;
 
if ( $wgUser-isAnon() ) {
-   return wfMsgHtml( 'onlinestatus-js-anon' );
+   return wfMessage( 'onlinestatus-js-anon' )-escaped();
}
 
switch( $action ) {
case 'get':
$def = $wgUser-getOption( 'online' );
-   $msg = wfMsgForContentNoTrans( 'onlinestatus-levels' );
+   $msg = wfMessage( 'onlinestatus-levels' 
)-inContentLanguage()-plain();
$lines = explode( \n, $msg );
$radios = array();
 
@@ -64,7 +64,7 @@
$lev = trim( $line, '* ' );
$radios[] = array(
$lev,
-   wfMsg( 'onlinestatus-toggle-' . $lev ),
+   wfMessage( 'onlinestatus-toggle-' . 
$lev )-text(),
$lev == $def
);
}
@@ -87,9 +87,12 @@
 
// For grep. Message keys used here:
// onlinestatus-toggle-offline, 
onlinestatus-toggle-online
-   return wfMsgHtml( 'onlinestatus-js-changed', 
wfMsgHtml( 'onlinestatus-toggle-' . $stat ) );
+   return wfMessage(
+   'onlinestatus-js-changed',
+   wfMessage( 'onlinestatus-toggle-' . 
$stat )-escaped()
+   )-text();
} else {
-   return wfMsgHtml( 'onlinestatus-js-error', 
$stat );
+   return wfMessage( 'onlinestatus-js-error', 
$stat )-escaped();
}
}
}
@@ -118,7 +121,7 @@
if ( empty( $raw ) ) {
// For grep. Message keys used here:
// onlinestatus-toggle-offline, 
onlinestatus-toggle-online
-   return wfMsgNoTrans( 'onlinestatus-toggle-' . 
$status[0] );
+   return wfMessage( 'onlinestatus-toggle-' . $status[0] 
)-plain();
} else {
return $status[0];
}
@@ -147,7 +150,7 @@
 
// For grep. Message keys used here:
// onlinestatus-toggle-offline, 
onlinestatus-toggle-online
-   $ret = wfMsgNoTrans( 'onlinestatus-toggle-' . 
$status[0] );
+   $ret = wfMessage( 'onlinestatus-toggle-' . $status[0] 
)-plain();
$varCache['onlinestatus'] = $ret;
} elseif ( $index == 'onlinestatus_word_raw' ) {
$status = self::GetUserStatus( $parser-getTitle() );
@@ -167,7 +170,7 @@
 * Hook for user preferences
 */
public static function GetPreferences( $user, $preferences ) {
-   $msg = wfMsgForContentNoTrans( 'onlinestatus-levels' );
+   $msg = wfMessage( 'onlinestatus-levels' 
)-inContentLanguage()-plain();
$lines = explode( \n, $msg );
$radios = array();
 
@@ -179,7 +182,7 @@
// For grep. Message keys used here:
// onlinestatus-toggle-offline, 
onlinestatus-toggle-online
$lev = trim( $line, '* ' );
-   $radios[wfMsg( 'onlinestatus-toggle-' . $lev )] = $lev;
+   $radios[wfMessage( 'onlinestatus-toggle-' . $lev 
)-text()] = $lev;
}
 
$preferences['onlineonlogin'] =
@@ -273,7 +276,12 @@
 
// For grep. Message keys used here:
// onlinestatus-subtitle-offline, onlinestatus-subtitle-online
-   $out-setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . 
$status[0], array( 'parse' ), $status[1] ) );
+   $out-setSubtitle(
+   wfMessage(
+   'onlinestatus-subtitle-' . $status[0],
+   $status[1]
+   )-parseAsBlock()
+   );
 
return true;
}
@@ -293,7 +301,7 @@
foreach ( $urls as $key = $val ) {
if 

[MediaWiki-commits] [Gerrit] Replace $wgSpecialPageGroups with SpecialPage::getGroupName() - change (mediawiki...Translate)

2014-09-22 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Replace $wgSpecialPageGroups with SpecialPage::getGroupName()
..

Replace $wgSpecialPageGroups with SpecialPage::getGroupName()

The global was deprecated in 1.21 and kept for BC.
Translate is currently compatible with 1.22 and later.

Change-Id: I306e41c1a9e26dffdf1bcdb89ecbd036daf53ac9
---
M Translate.php
M specials/SpecialManageGroups.php
M specials/SpecialManageTranslatorSandbox.php
M specials/SpecialMessageGroupStats.php
M specials/SpecialTranslations.php
M specials/TranslateSpecialPage.php
6 files changed, 20 insertions(+), 13 deletions(-)


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

diff --git a/Translate.php b/Translate.php
index f848c10..44d6414 100644
--- a/Translate.php
+++ b/Translate.php
@@ -74,35 +74,22 @@
 
 // Register special pages into MediaWiki
 $GLOBALS['wgSpecialPages']['Translate'] = 'SpecialTranslate';
-$GLOBALS['wgSpecialPageGroups']['Translate'] = 'wiki';
 $GLOBALS['wgSpecialPages']['Translations'] = 'SpecialTranslations';
-$GLOBALS['wgSpecialPageGroups']['Translations'] = 'pages';
 // Disabled by default
 // $GLOBALS['wgSpecialPages']['Magic'] = 'SpecialMagic';
-$GLOBALS['wgSpecialPageGroups']['Magic'] = 'wiki';
 $GLOBALS['wgSpecialPages']['TranslationStats'] = 'SpecialTranslationStats';
-$GLOBALS['wgSpecialPageGroups']['TranslationStats'] = 'wiki';
 $GLOBALS['wgSpecialPages']['LanguageStats'] = 'SpecialLanguageStats';
-$GLOBALS['wgSpecialPageGroups']['LanguageStats'] = 'wiki';
 $GLOBALS['wgSpecialPages']['MessageGroupStats'] = 'SpecialMessageGroupStats';
-$GLOBALS['wgSpecialPageGroups']['MessageGroupStats'] = 'wiki';
 $GLOBALS['wgSpecialPages']['ImportTranslations'] = 'SpecialImportTranslations';
-$GLOBALS['wgSpecialPageGroups']['ImportTranslations'] = 'wiki';
 $GLOBALS['wgSpecialPages']['ManageMessageGroups'] = 'SpecialManageGroups';
-$GLOBALS['wgSpecialPageGroups']['ManageMessageGroups'] = 'wiki';
 $GLOBALS['wgSpecialPages']['SupportedLanguages'] = 'SpecialSupportedLanguages';
-$GLOBALS['wgSpecialPageGroups']['SupportedLanguages'] = 'wiki';
 
 // Unlisted special page; does not need $wgSpecialPageGroups.
 $GLOBALS['wgSpecialPages']['MyLanguage'] = 'SpecialMyLanguage';
 $GLOBALS['wgSpecialPages']['AggregateGroups'] = 'SpecialAggregateGroups';
-$GLOBALS['wgSpecialPageGroups']['AggregateGroups'] = 'wiki';
 $GLOBALS['wgSpecialPages']['SearchTranslations'] = 'SpecialSearchTranslations';
-$GLOBALS['wgSpecialPageGroups']['SearchTranslations'] = 'wiki';
 $GLOBALS['wgSpecialPages']['ManageTranslatorSandbox'] = 
'SpecialManageTranslatorSandbox';
-$GLOBALS['wgSpecialPageGroups']['ManageTranslatorSandbox'] = 'users';
 $GLOBALS['wgSpecialPages']['TranslationStash'] = 'SpecialTranslationStash';
-$GLOBALS['wgSpecialPageGroups']['TranslationStash'] = 'wiki';
 
 // API
 $GLOBALS['wgAPIGeneratorModules']['messagecollection'] = 
'ApiQueryMessageCollection';
diff --git a/specials/SpecialManageGroups.php b/specials/SpecialManageGroups.php
index 51bee89..0d80dfe 100644
--- a/specials/SpecialManageGroups.php
+++ b/specials/SpecialManageGroups.php
@@ -33,6 +33,10 @@
parent::__construct( 'ManageMessageGroups' );
}
 
+   protected function getGroupName() {
+   return 'wiki';
+   }
+
public function execute( $par ) {
$this-setHeaders();
$out = $this-getOutput();
diff --git a/specials/SpecialManageTranslatorSandbox.php 
b/specials/SpecialManageTranslatorSandbox.php
index bf28e4d..ee9b152 100644
--- a/specials/SpecialManageTranslatorSandbox.php
+++ b/specials/SpecialManageTranslatorSandbox.php
@@ -26,6 +26,10 @@
);
}
 
+   protected function getGroupName() {
+   return 'users';
+   }
+
public function execute( $params ) {
$this-setHeaders();
$this-checkPermissions();
diff --git a/specials/SpecialMessageGroupStats.php 
b/specials/SpecialMessageGroupStats.php
index e4d7f33..901b723 100644
--- a/specials/SpecialMessageGroupStats.php
+++ b/specials/SpecialMessageGroupStats.php
@@ -37,6 +37,10 @@
return $this-msg( 'translate-mgs-pagename' )-text();
}
 
+   protected function getGroupName() {
+   return 'wiki';
+   }
+
/// Overwritten from SpecialLanguageStats
protected function isValidValue( $value ) {
$group = MessageGroups::getGroup( $value );
diff --git a/specials/SpecialTranslations.php b/specials/SpecialTranslations.php
index e08c277..973ead9 100644
--- a/specials/SpecialTranslations.php
+++ b/specials/SpecialTranslations.php
@@ -20,6 +20,10 @@
parent::__construct( 'Translations' );
}
 
+   protected function getGroupName() {
+   return 'pages';
+   }
+
/**
 * Entry point : 

[MediaWiki-commits] [Gerrit] Priority languages for UnrecordedCharge mailing - change (wikimedia...crm)

2014-09-22 Thread Pcoombe (Code Review)
Pcoombe has submitted this change and it was merged.

Change subject: Priority languages for UnrecordedCharge mailing
..


Priority languages for UnrecordedCharge mailing

Change-Id: Idcd9e160f30ab0d2de1a59caa0b7f8971a4aebf9
---
M sites/all/modules/thank_you/templates/html/thank_you.da.html
M sites/all/modules/thank_you/templates/html/thank_you.de.html
M sites/all/modules/thank_you/templates/html/thank_you.es.html
M sites/all/modules/thank_you/templates/html/thank_you.fr.html
M sites/all/modules/thank_you/templates/html/thank_you.it.html
M sites/all/modules/thank_you/templates/html/thank_you.ja.html
M sites/all/modules/thank_you/templates/html/thank_you.nl.html
M sites/all/modules/thank_you/templates/html/thank_you.pl.html
M sites/all/modules/thank_you/templates/html/thank_you.ru.html
M sites/all/modules/thank_you/templates/html/thank_you.sv.html
M sites/all/modules/thank_you/templates/html/thank_you.zh.html
11 files changed, 147 insertions(+), 503 deletions(-)

Approvals:
  Pcoombe: Looks good to me, approved



diff --git a/sites/all/modules/thank_you/templates/html/thank_you.da.html 
b/sites/all/modules/thank_you/templates/html/thank_you.da.html
index b82a03c..402952c 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.da.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.da.html
@@ -3,35 +3,19 @@
 
 {% else %}
 pKære bidragsyder,/p
-{% endif %}
+{%endif%}
 
-pTak for dit uvurderlige bidrag til gøre viden tilgængelig for alle 
mennesker i verden./p
+pTak for Deres uvurderlige bidrag til gøre viden tilgængelig for alle 
mennesker i verden./p
 
-{% if RecurringRestarted in contribution_tags %}p Vi har for nylig løst et 
lille teknisk
-problem, der standsede nogle månedligt tilbagevendende donationer. Vi har 
genstartet din
-tilbagevendende donation, og den vil forløbe normalt herfra. Vi opkræver ikke 
for de måneder, der
-er blevet sprunget over. Tak for din tålmodighed og støtte. Skriv endelig til
-don...@wikimedia.org, hvis du har spørgsmål. /p{% endif %}
+p{% if RecurringRestarted in contribution_tags %} Vi har for nylig løst et 
lille teknisk problem, der standsede nogle månedligt tilbagevendende 
donationer. Vi har genstartet Deres tilbagevendende donation, og den vil 
forløbe normalt fremover. Vi opkræver ikke for de måneder, der er blevet 
sprunget over. Tak for Deres tålmodighed og støtte. Skriv endelig til 
don...@wikimedia.org, hvis De har spørgsmål. {%endif%}/p
 
-pMit navn er Lila Tretikov, og jeg er Wikimedia Foundations administrerende 
direktør. I løbet af
-det sidste års tid, har gaver som din drevet vores arbejde på encyklopædien, 
der findes på 287
-sprog, og gjort den tilgængelig over hele verden. Vi stræber især efter at 
berøre dem, der
-ellers ikke har adgang til uddannelse. Vi leverer viden til folk som Akshaya 
Iyengar fra Solapur i
-Indien. Hun voksede op i en lille tekstilproducerende by, og benyttede 
Wikipedia som sin primære
-kilde til læring. For studerende i sådanne områder, hvor bøger er en 
sjældenhed, men mobil
-internetadgang findes, er Wikipedia afgørende. Akshaya endte med at få en 
universitetsuddannelse i
-Indien og arbejder nu som softwareudvikler i USA. Hun nævner Wikipedia som 
kilde til halvdelen af
-den viden hun har tilegnet sig./p
+p{% if UnrecordedCharge in contribution_tags %} Vi har for nylig rettet en 
mindre teknisk fejl, der betød, at en mindre gruppe af donorer ikke modtog en 
kvittering for deres bidrag. Denne email er derfor en tak til Dem for Deres 
donation fra {{ receive_date }}. Vi takker for Deres tålmodighed og støtte, og 
husk at De altid er altid velkommen til at emaile don...@wikimedia.org, hvis De 
har nogen spørgsmål. {%endif%}/p
 
-pHistorien er ikke unik. Vores mission er ambitiøs og giver store 
udfordringer. De fleste af
-Wikipedias brugere bliver overraskede over at høre, at Wikipedia drives af en 
nonprofitorganisation
-og finansieres af donationer. Hvert år bidrager lige nøjagtigt nok personer 
til, at summen af al
-menneskelig viden forbliver tilgængelig for alle og enhver. Tak for at 
muliggøre vores
-mission./p
+pMit navn er Lila Tretikov, og jeg er Wikimedia Foundations administrerende 
direktør. I løbet af det sidste års tid, har gaver som din drevet vores arbejde 
på at udvide encyklopædien på 287 sprog, og på at gøre den tilgængelig over 
hele verden. Vi stræber især efter at berøre dem, der ellers ikke har adgang 
til uddannelse. Vi leverer viden til folk som Akshaya Iyengar fra Solapur i 
Indien. Hun voksede op i en lille tekstilproducerende by, og benyttede 
Wikipedia som sin primære kilde til læring. For studerende i sådanne områder, 
hvor bøger er en sjældenhed, men mobil internetadgang findes, er Wikipedia 
afgørende. Akshaya endte med at få en universitetsuddannelse i Indien og 
arbejder nu som softwareudvikler i USA. Hun nævner Wikipedia som kilde til 
halvdelen af den viden hun har tilegnet sig./p
 
-pPå vegne af en halv 

[MediaWiki-commits] [Gerrit] udp2log: qualify vars - change (operations/puppet)

2014-09-22 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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

Change subject: udp2log: qualify vars
..

udp2log: qualify vars

Change-Id: I4c21321dead3b40df9ed7ee5838c6bd67ad978f8
---
M templates/udp2log/logrotate_udp2log.erb
M templates/udp2log/udp2log.init.erb
2 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/26/161926/1

diff --git a/templates/udp2log/logrotate_udp2log.erb 
b/templates/udp2log/logrotate_udp2log.erb
index ff268fb..8308a3a 100644
--- a/templates/udp2log/logrotate_udp2log.erb
+++ b/templates/udp2log/logrotate_udp2log.erb
@@ -2,10 +2,10 @@
 # THIS FILE IS MANAGED BY PUPPET #
 ##
 
-# Rotate anything in %= log_directory %/*.log daily
-%= log_directory %/*.log {
+# Rotate anything in %= @log_directory %/*.log daily
+%= @log_directory %/*.log {
daily
-   olddir %= log_directory %/archive
+   olddir %= @log_directory %/archive
notifempty
nocreate
maxage 180
diff --git a/templates/udp2log/udp2log.init.erb 
b/templates/udp2log/udp2log.init.erb
index 9b17cf6..6030762 100644
--- a/templates/udp2log/udp2log.init.erb
+++ b/templates/udp2log/udp2log.init.erb
@@ -5,7 +5,7 @@
 ###
 
 ### BEGIN INIT INFO
-# Provides:  udp2log-%= name %
+# Provides:  udp2log-%= @name %
 # Required-Start:$remote_fs $syslog
 # Required-Stop: $remote_fs $syslog
 # Default-Start: 2 3 4 5
@@ -20,15 +20,15 @@
 # PATH should only include /usr/* if it runs after the mountnfs.sh script
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC=UDP log receiver (udp2log)
-NAME=udp2log-%= name %
+NAME=udp2log-%= @name %
 DAEMON=/usr/bin/udp2log
 PIDFILE=/var/run/$NAME.pid
-DAEMON_ARGS=--daemon --pid-file $PIDFILE -p %= port %% if multicast then 
-% --multicast %= (multicast.class == String) ? multicast : '233.58.59.1' 
%% end %
+DAEMON_ARGS=--daemon --pid-file $PIDFILE -p %= @port %% if multicast then 
-% --multicast %= (multicast.class == String) ? multicast : '233.58.59.1' 
%% end %
 SCRIPTNAME=/etc/init.d/$NAME
-CONFFILE=/etc/udp2log/%= name %
+CONFFILE=/etc/udp2log/%= @name %
 
 % if @recv_queue %
-queue=%= recv_queue %
+queue=%= @recv_queue %
 % end -%
 
 if [ -f /proc/sys/net/core/rmem_max -a -z ${queue} ] ; then

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c21321dead3b40df9ed7ee5838c6bd67ad978f8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya mata...@foss.co.il

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


[MediaWiki-commits] [Gerrit] Deferred edittoolbar tooltip init to when switching to edit ... - change (mediawiki...Wikibase)

2014-09-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Deferred edittoolbar tooltip init to when switching to edit mode
..

Deferred edittoolbar tooltip init to when switching to edit mode

Change-Id: I46772ea8cbb9457654070b2405c2b30428e37c53
---
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
1 file changed, 45 insertions(+), 31 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
index 930d7fc..13ef76b 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
@@ -74,8 +74,8 @@
_buttons: null,
 
/**
-* Node holding the tooltips image with the tooltip itself attached.
-* @type {jQuery}
+* Node holding the tooltip image with the tooltip itself attached.
+* @type {null|jQuery}
 */
_$tooltipAnchor: null,
 
@@ -151,8 +151,7 @@
},
 
_initToolbar: function() {
-   var self = this,
-   $container = this._getContainer(),
+   var $container = this._getContainer(),
$toolbar = $container.children( '.wikibase-toolbar' );
 
if( !$toolbar.length ) {
@@ -162,31 +161,6 @@
$toolbar.toolbar( {
renderItemSeparators: true
} );
-
-   this._$tooltipAnchor = $( 'span/', {
-   'class': 'mw-help-field-hint',
-   style: 
'display:inline-block;text-decoration:none;width:8px;', // TODO: Get rid of 
inline styles.
-   html: 'nbsp;' // TODO find nicer way to hack Webkit 
browsers to display tooltip image (see also css)
-   } ).toolbaritem();
-
-   // Support promises instead of strings, too, since 
$.wikibase.claimview does not know
-   // immediately after creation which help message to show.
-   // TODO: This should be replaced by a dynamic getter so that 
views can arbitrarily
-   // change their help messages anywhere in their lifecycle.
-   function addTooltip( helpMessage ) {
-   if( self._$tooltipAnchor ) {
-   self._$tooltipAnchor.wbtooltip( {
-   content: helpMessage
-   } );
-   }
-   }
-
-   var helpMessage = this.options.interactionWidget.option( 
'helpMessage' );
-   if( helpMessage.done  typeof helpMessage !== 'string' ) {
-   helpMessage.done( addTooltip );
-   } else {
-   addTooltip( helpMessage );
-   }
 
this._attachEventHandlers();
 
@@ -297,7 +271,7 @@
editGroup.option( '$content', $buttons );
 
this._getContainer()
-   .append( this._$tooltipAnchor )
+   .append( this._getTooltipAnchor() )
.addClass( this.widgetBaseClass + '-ineditmode' );
},
 
@@ -317,7 +291,9 @@
return;
}
 
-   this._$tooltipAnchor.detach();
+   if( this._$tooltipAnchor ) {
+   this._$tooltipAnchor.detach();
+   }
 
var $editGroup = this._getContainer().children( 
':wikibase-toolbar' ),
editGroup = $editGroup.data( 'toolbar' );
@@ -343,6 +319,44 @@
},
 
/**
+* @return {jQuery}
+*/
+   _getTooltipAnchor: function() {
+   var self = this;
+
+   if( this._$tooltipAnchor ) {
+   return this._$tooltipAnchor;
+   }
+
+   this._$tooltipAnchor = $( 'span/', {
+   'class': 'mw-help-field-hint',
+   style: 
'display:inline-block;text-decoration:none;width:8px;', // TODO: Get rid of 
inline styles.
+   html: 'nbsp;' // TODO find nicer way to hack Webkit 
browsers to display tooltip image (see also css)
+   } ).toolbaritem();
+
+   // Support promises instead of strings, too, since 
$.wikibase.claimview does not know
+   // immediately after creation which help message to show.
+   // TODO: This should be replaced by a dynamic getter so that 
views can arbitrarily
+   // change their help messages anywhere in their lifecycle.
+   function addTooltip( helpMessage ) {
+   if( self._$tooltipAnchor ) {
+   

[MediaWiki-commits] [Gerrit] Set wgUploadNavigationUrl for eowiki to localized version of... - change (operations/mediawiki-config)

2014-09-22 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Set wgUploadNavigationUrl for eowiki to localized version of 
UploadWizard
..

Set wgUploadNavigationUrl for eowiki to localized version of UploadWizard

Appended ?uselang=eo

Bug: 69055
Change-Id: I6f6e93e444226f53a720110edee8648a9c079a80
---
M wmf-config/InitialiseSettings.php
A wmf-config/InitialiseSettings.php.orig
2 files changed, 14,027 insertions(+), 1 deletion(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f6e93e444226f53a720110edee8648a9c079a80
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Glaisher glaisher.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] i18n: change Tool Labs link - change (mediawiki...Translate)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: i18n: change Tool Labs link
..


i18n: change Tool Labs link

- translate-group-desc-tsint

Spotted by Liuxinyu970226
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Translate-group-desc-tsint/en

Change-Id: If4b400bf919d8fa663bac4f4d5b52ef52dc39cd0
---
M i18n/groupdescriptions/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Siebrand: Looks good to me, approved
  Nemo bis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/i18n/groupdescriptions/en.json b/i18n/groupdescriptions/en.json
index fc3165f..3cbe893 100644
--- a/i18n/groupdescriptions/en.json
+++ b/i18n/groupdescriptions/en.json
@@ -39,7 +39,7 @@
translate-group-desc-sharelatex: A message group for 
[[Translating:ShareLaTeX|ShareLaTeX]], a web-based collaborative LaTeX editor,
translate-group-desc-translatablepages: All translatable pages,
translate-group-desc-translate: Meta message group containing all 
messages for the MediaWiki extension 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Translate 
Translate]; please familiarize yourself with its 
[https://www.mediawiki.org/wiki/Help:Extension:Translate/Glossary glossary],
-   translate-group-desc-tsint: A message group for 
[[Translating:Intuition|Intuition]], the i18n system for [//toolserver.org 
Toolserver] tools (span class=\plainlinks\[[Translating 
talk:Intuition|support]]/span),
+   translate-group-desc-tsint: A message group for 
[[Translating:Intuition|Intuition]], the i18n system for [//tools.wmflabs.org/ 
Wikimedia Tool Labs] tools (span class=\plainlinks\[[Translating 
talk:Intuition|support]]/span),
translate-group-desc-universallanguageselector: Meta message group 
containing all messages for the MediaWiki extension 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:UniversalLanguageSelector
 UniversalLanguageSelector] (ULS) and related software packages,
translate-group-desc-vicuna: 
[[Translating:VicuñaUploader|VicuñaUploader]] is a tool to upload files to 
Wikimedia Commons and other Wikimedia projects,
translate-group-desc-visualeditor: Meta message group containing all 
messages for the MediaWiki extension 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:VisualEditor 
VisualEditor] and related software packages,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4b400bf919d8fa663bac4f4d5b52ef52dc39cd0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Replace $wgSpecialPageGroups with SpecialPage::getGroupName() - change (mediawiki...TranslationNotifications)

2014-09-22 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Replace $wgSpecialPageGroups with SpecialPage::getGroupName()
..

Replace $wgSpecialPageGroups with SpecialPage::getGroupName()

Deprecated in 1.21 and the extension is marked as compatible with 1.21+.

Change-Id: I448c0630f39e84cc56ba6387eac99917c56de3ce
---
M SpecialNotifyTranslators.php
M SpecialTranslatorSignup.php
M TranslationNotifications.php
3 files changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/SpecialNotifyTranslators.php b/SpecialNotifyTranslators.php
index fe4c7ca..0e785dc 100644
--- a/SpecialNotifyTranslators.php
+++ b/SpecialNotifyTranslators.php
@@ -33,6 +33,10 @@
parent::__construct( 'NotifyTranslators', self::$right );
}
 
+   protected function getGroupName() {
+   return 'users';
+   }
+
public function execute( $parameters ) {
global $wgContLang;
$this-setHeaders();
diff --git a/SpecialTranslatorSignup.php b/SpecialTranslatorSignup.php
index 6f4e2b9..5fe8cf4 100644
--- a/SpecialTranslatorSignup.php
+++ b/SpecialTranslatorSignup.php
@@ -22,6 +22,10 @@
parent::__construct( 'TranslatorSignup' );
}
 
+   protected function getGroupName() {
+   return 'login';
+   }
+
public function execute( $parameters ) {
global $wgTranslationNotificationsSignupLegalMessage;
if ( !$this-getUser()-isLoggedIn() ) {
diff --git a/TranslationNotifications.php b/TranslationNotifications.php
index 604f04e..6048b11 100644
--- a/TranslationNotifications.php
+++ b/TranslationNotifications.php
@@ -34,8 +34,6 @@
 $dir = __DIR__;
 $wgSpecialPages['TranslatorSignup'] = 'SpecialTranslatorSignup';
 $wgSpecialPages['NotifyTranslators'] = 'SpecialNotifyTranslators';
-$wgSpecialPageGroups['TranslatorSignup'] = 'login';
-$wgSpecialPageGroups['NotifyTranslators'] = 'users';
 $wgMessagesDirs['TranslationNotifications'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['TranslationNotifications'] = 
$dir/TranslationNotifications.i18n.php;
 $wgExtensionMessagesFiles['TranslationNotificationsAlias'] =

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I448c0630f39e84cc56ba6387eac99917c56de3ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] Rename module: ext.translate.special.pagepreparation - change (mediawiki...Translate)

2014-09-22 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Rename module: ext.translate.special.pagepreparation
..

Rename module: ext.translate.special.pagepreparation

For consistency with the other special pages.

Change-Id: I91466018e5cfe87de733389f58e83d5ea2155d78
---
M Resources.php
R resources/js/ext.translate.special.pagepreparation.js
M specials/SpecialPagePreparation.php
3 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index a6abfd8..bf17fa2 100644
--- a/Resources.php
+++ b/Resources.php
@@ -234,8 +234,8 @@
),
 ) + $resourcePaths;
 
-$wgResourceModules['ext.translate.pagepreparation'] = array(
-   'scripts' = 'resources/js/ext.translate.pagepreparation.js',
+$wgResourceModules['ext.translate.special.pagepreparation'] = array(
+   'scripts' = 'resources/js/ext.translate.special.pagepreparation.js',
'messages' = array(
'pp-save-message',
'pp-save-button-label',
diff --git a/resources/js/ext.translate.pagepreparation.js 
b/resources/js/ext.translate.special.pagepreparation.js
similarity index 100%
rename from resources/js/ext.translate.pagepreparation.js
rename to resources/js/ext.translate.special.pagepreparation.js
diff --git a/specials/SpecialPagePreparation.php 
b/specials/SpecialPagePreparation.php
index ea841dc..278a5ce 100644
--- a/specials/SpecialPagePreparation.php
+++ b/specials/SpecialPagePreparation.php
@@ -22,7 +22,7 @@
$prepareButtonValue = $this-msg( 'pp-prepare-button-label' 
)-escaped();
$saveButtonValue = $this-msg( 'pp-save-button-label' 
)-escaped();
$summaryValue = $this-msg( 'pp-save-summary' 
)-inContentLanguage()-escaped();
-   $output-addModules( 'ext.translate.pagepreparation' );
+   $output-addModules( 'ext.translate.special.pagepreparation' );
$output-addModuleStyles( 'jquery.uls.grid' );
$param = $request-getText( 'param' );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91466018e5cfe87de733389f58e83d5ea2155d78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] Replace $wgSpecialPageGroups with SpecialPage::getGroupName() - change (mediawiki...TranslationNotifications)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace $wgSpecialPageGroups with SpecialPage::getGroupName()
..


Replace $wgSpecialPageGroups with SpecialPage::getGroupName()

Deprecated in 1.21 and the extension is marked as compatible with 1.21+.

Change-Id: I448c0630f39e84cc56ba6387eac99917c56de3ce
---
M SpecialNotifyTranslators.php
M SpecialTranslatorSignup.php
M TranslationNotifications.php
3 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/SpecialNotifyTranslators.php b/SpecialNotifyTranslators.php
index fe4c7ca..0e785dc 100644
--- a/SpecialNotifyTranslators.php
+++ b/SpecialNotifyTranslators.php
@@ -33,6 +33,10 @@
parent::__construct( 'NotifyTranslators', self::$right );
}
 
+   protected function getGroupName() {
+   return 'users';
+   }
+
public function execute( $parameters ) {
global $wgContLang;
$this-setHeaders();
diff --git a/SpecialTranslatorSignup.php b/SpecialTranslatorSignup.php
index 6f4e2b9..5fe8cf4 100644
--- a/SpecialTranslatorSignup.php
+++ b/SpecialTranslatorSignup.php
@@ -22,6 +22,10 @@
parent::__construct( 'TranslatorSignup' );
}
 
+   protected function getGroupName() {
+   return 'login';
+   }
+
public function execute( $parameters ) {
global $wgTranslationNotificationsSignupLegalMessage;
if ( !$this-getUser()-isLoggedIn() ) {
diff --git a/TranslationNotifications.php b/TranslationNotifications.php
index 604f04e..6048b11 100644
--- a/TranslationNotifications.php
+++ b/TranslationNotifications.php
@@ -34,8 +34,6 @@
 $dir = __DIR__;
 $wgSpecialPages['TranslatorSignup'] = 'SpecialTranslatorSignup';
 $wgSpecialPages['NotifyTranslators'] = 'SpecialNotifyTranslators';
-$wgSpecialPageGroups['TranslatorSignup'] = 'login';
-$wgSpecialPageGroups['NotifyTranslators'] = 'users';
 $wgMessagesDirs['TranslationNotifications'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['TranslationNotifications'] = 
$dir/TranslationNotifications.i18n.php;
 $wgExtensionMessagesFiles['TranslationNotificationsAlias'] =

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I448c0630f39e84cc56ba6387eac99917c56de3ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TranslationNotifications
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Replace $wgSpecialPageGroups with SpecialPage::getGroupName() - change (mediawiki...Translate)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace $wgSpecialPageGroups with SpecialPage::getGroupName()
..


Replace $wgSpecialPageGroups with SpecialPage::getGroupName()

The global was deprecated in 1.21 and kept for BC.
Translate is currently compatible with 1.22 and later.

Change-Id: I306e41c1a9e26dffdf1bcdb89ecbd036daf53ac9
---
M Translate.php
M specials/SpecialManageGroups.php
M specials/SpecialManageTranslatorSandbox.php
M specials/SpecialMessageGroupStats.php
M specials/SpecialTranslations.php
M specials/TranslateSpecialPage.php
6 files changed, 20 insertions(+), 13 deletions(-)

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



diff --git a/Translate.php b/Translate.php
index f848c10..44d6414 100644
--- a/Translate.php
+++ b/Translate.php
@@ -74,35 +74,22 @@
 
 // Register special pages into MediaWiki
 $GLOBALS['wgSpecialPages']['Translate'] = 'SpecialTranslate';
-$GLOBALS['wgSpecialPageGroups']['Translate'] = 'wiki';
 $GLOBALS['wgSpecialPages']['Translations'] = 'SpecialTranslations';
-$GLOBALS['wgSpecialPageGroups']['Translations'] = 'pages';
 // Disabled by default
 // $GLOBALS['wgSpecialPages']['Magic'] = 'SpecialMagic';
-$GLOBALS['wgSpecialPageGroups']['Magic'] = 'wiki';
 $GLOBALS['wgSpecialPages']['TranslationStats'] = 'SpecialTranslationStats';
-$GLOBALS['wgSpecialPageGroups']['TranslationStats'] = 'wiki';
 $GLOBALS['wgSpecialPages']['LanguageStats'] = 'SpecialLanguageStats';
-$GLOBALS['wgSpecialPageGroups']['LanguageStats'] = 'wiki';
 $GLOBALS['wgSpecialPages']['MessageGroupStats'] = 'SpecialMessageGroupStats';
-$GLOBALS['wgSpecialPageGroups']['MessageGroupStats'] = 'wiki';
 $GLOBALS['wgSpecialPages']['ImportTranslations'] = 'SpecialImportTranslations';
-$GLOBALS['wgSpecialPageGroups']['ImportTranslations'] = 'wiki';
 $GLOBALS['wgSpecialPages']['ManageMessageGroups'] = 'SpecialManageGroups';
-$GLOBALS['wgSpecialPageGroups']['ManageMessageGroups'] = 'wiki';
 $GLOBALS['wgSpecialPages']['SupportedLanguages'] = 'SpecialSupportedLanguages';
-$GLOBALS['wgSpecialPageGroups']['SupportedLanguages'] = 'wiki';
 
 // Unlisted special page; does not need $wgSpecialPageGroups.
 $GLOBALS['wgSpecialPages']['MyLanguage'] = 'SpecialMyLanguage';
 $GLOBALS['wgSpecialPages']['AggregateGroups'] = 'SpecialAggregateGroups';
-$GLOBALS['wgSpecialPageGroups']['AggregateGroups'] = 'wiki';
 $GLOBALS['wgSpecialPages']['SearchTranslations'] = 'SpecialSearchTranslations';
-$GLOBALS['wgSpecialPageGroups']['SearchTranslations'] = 'wiki';
 $GLOBALS['wgSpecialPages']['ManageTranslatorSandbox'] = 
'SpecialManageTranslatorSandbox';
-$GLOBALS['wgSpecialPageGroups']['ManageTranslatorSandbox'] = 'users';
 $GLOBALS['wgSpecialPages']['TranslationStash'] = 'SpecialTranslationStash';
-$GLOBALS['wgSpecialPageGroups']['TranslationStash'] = 'wiki';
 
 // API
 $GLOBALS['wgAPIGeneratorModules']['messagecollection'] = 
'ApiQueryMessageCollection';
diff --git a/specials/SpecialManageGroups.php b/specials/SpecialManageGroups.php
index 51bee89..0d80dfe 100644
--- a/specials/SpecialManageGroups.php
+++ b/specials/SpecialManageGroups.php
@@ -33,6 +33,10 @@
parent::__construct( 'ManageMessageGroups' );
}
 
+   protected function getGroupName() {
+   return 'wiki';
+   }
+
public function execute( $par ) {
$this-setHeaders();
$out = $this-getOutput();
diff --git a/specials/SpecialManageTranslatorSandbox.php 
b/specials/SpecialManageTranslatorSandbox.php
index bf28e4d..ee9b152 100644
--- a/specials/SpecialManageTranslatorSandbox.php
+++ b/specials/SpecialManageTranslatorSandbox.php
@@ -26,6 +26,10 @@
);
}
 
+   protected function getGroupName() {
+   return 'users';
+   }
+
public function execute( $params ) {
$this-setHeaders();
$this-checkPermissions();
diff --git a/specials/SpecialMessageGroupStats.php 
b/specials/SpecialMessageGroupStats.php
index e4d7f33..901b723 100644
--- a/specials/SpecialMessageGroupStats.php
+++ b/specials/SpecialMessageGroupStats.php
@@ -37,6 +37,10 @@
return $this-msg( 'translate-mgs-pagename' )-text();
}
 
+   protected function getGroupName() {
+   return 'wiki';
+   }
+
/// Overwritten from SpecialLanguageStats
protected function isValidValue( $value ) {
$group = MessageGroups::getGroup( $value );
diff --git a/specials/SpecialTranslations.php b/specials/SpecialTranslations.php
index e08c277..973ead9 100644
--- a/specials/SpecialTranslations.php
+++ b/specials/SpecialTranslations.php
@@ -20,6 +20,10 @@
parent::__construct( 'Translations' );
}
 
+   protected function getGroupName() {
+   return 'pages';
+   }
+
/**
 * Entry point : initialise variables and call subfunctions.
 * @param 

[MediaWiki-commits] [Gerrit] Log errors - change (mediawiki...UploadWizard)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Log errors
..


Log errors

Log the following error types:
* filename errors
* upload errors
* API error for parsing custom license text (also fix a bug in the error 
handling code)
* API errors when saving the final text

Form validation errors are not logged.

Uses schema https://meta.wikimedia.org/wiki/Schema:UploadWizardErrorFlowEvent

Change-Id: I8bff7cc26210100ecf5930c4e9e063b441b14ed8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/903
---
M UploadWizard.php
M UploadWizardHooks.php
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardDeed.js
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardLicenseInput.js
M resources/mw.UploadWizardUploadInterface.js
M resources/uw.EventFlowLogger.js
8 files changed, 46 insertions(+), 23 deletions(-)

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



diff --git a/UploadWizard.php b/UploadWizard.php
index 1c4c254..881e9b3 100644
--- a/UploadWizard.php
+++ b/UploadWizard.php
@@ -138,6 +138,7 @@
 $wgEventLoggingSchemas[ 'UploadWizardUploadActions' ] = 5811620;
 $wgEventLoggingSchemas[ 'UploadWizardStep' ] = 8851805;
 $wgEventLoggingSchemas[ 'UploadWizardFlowEvent' ] = 8851807;
+$wgEventLoggingSchemas[ 'UploadWizardErrorFlowEvent' ] = 9924376;
 $wgEventLoggingSchemas[ 'UploadWizardUploadFlowEvent' ] = 9609883;
 
 // Campaign hook handlers
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 0546e14..cc5d004 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -647,15 +647,16 @@
if ( class_exists( 'ResourceLoaderSchemaModule' ) ) {

self::$modules['ext.uploadWizard.events']['dependencies'] = array(
'ext.eventLogging',
-   'schema.UploadWizardTutorialActions',
-   'schema.UploadWizardUploadActions',
+   'schema.UploadWizardTutorialActions',
+   'schema.UploadWizardUploadActions',
);
 
self::$modules['uw.EventFlowLogger']['dependencies'] += 
array(
'ext.eventLogging',
-   'schema.UploadWizardStep',
-   'schema.UploadWizardFlowEvent',
-   'schema.UploadWizardUploadFlowEvent',
+   'schema.UploadWizardStep',
+   'schema.UploadWizardFlowEvent',
+   'schema.UploadWizardErrorFlowEvent',
+   'schema.UploadWizardUploadFlowEvent',
);
}
 
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 14fd00e..2784030 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -28,8 +28,6 @@
this.makePreviewsFlag = true;
this.showDeed = false;
 
-   this.eventFlowLogger = new uw.EventFlowLogger( mw.eventLog );
-
this.steps = {
tutorial: new uw.controller.Tutorial(),
file: new uw.controller.Upload(),
@@ -122,11 +120,11 @@
 
.on( 'flickr-ui-init', function () {
wizard.flickrInterfaceInit();
-   wizard.eventFlowLogger.logEvent( 
'flickr-upload-button-clicked' );
+   uw.eventFlowLogger.logEvent( 
'flickr-upload-button-clicked' );
} )
 
.on( 'retry-uploads', function () {
-   wizard.eventFlowLogger.logEvent( 
'retry-uploads-button-clicked' );
+   uw.eventFlowLogger.logEvent( 
'retry-uploads-button-clicked' );
wizard.ui.hideFileEndButtons();
wizard.startUploads();
} )
@@ -385,10 +383,10 @@
$( 'html, body' ).animate( { scrollTop: headScroll.top, 
scrollLeft: headScroll.left }, 'slow' );
 
if ( selectedStepName === 'file'  
!this.currentStepName ) { // tutorial was skipped
-   this.eventFlowLogger.logSkippedStep( 'tutorial' 
);
+   uw.eventFlowLogger.logSkippedStep( 'tutorial' );
}
 
-   this.eventFlowLogger.logStep( selectedStepName );
+   uw.eventFlowLogger.logStep( selectedStepName );
 
this.currentStepName = selectedStepName;
 
@@ -443,11 +441,15 @@
 
upload = new mw.UploadWizardUpload( this, 
'#mwe-upwiz-filelist', providedFile, 

[MediaWiki-commits] [Gerrit] Rename module: ext.translate.special.pagepreparation - change (mediawiki...Translate)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rename module: ext.translate.special.pagepreparation
..


Rename module: ext.translate.special.pagepreparation

For consistency with the other special pages.

Change-Id: I91466018e5cfe87de733389f58e83d5ea2155d78
---
M Resources.php
R resources/js/ext.translate.special.pagepreparation.js
M specials/SpecialPagePreparation.php
3 files changed, 20 insertions(+), 20 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index a6abfd8..9ea1cb1 100644
--- a/Resources.php
+++ b/Resources.php
@@ -234,25 +234,6 @@
),
 ) + $resourcePaths;
 
-$wgResourceModules['ext.translate.pagepreparation'] = array(
-   'scripts' = 'resources/js/ext.translate.pagepreparation.js',
-   'messages' = array(
-   'pp-save-message',
-   'pp-save-button-label',
-   'pp-prepare-message',
-   'pp-already-prepared-message',
-   'pp-pagename-missing'
-   ),
-   'dependencies' = array(
-   'mediawiki.ui',
-   'mediawiki.api',
-   'mediawiki.api.edit',
-   'jquery.mwExtension',
-   'mediawiki.action.history.diff',
-   'mediawiki.jqueryMsg',
-   ),
-) + $resourcePaths;
-
 $wgResourceModules['ext.translate.pagetranslation.uls'] = array(
'scripts' = 'resources/js/ext.translate.pagetranslation.uls.js',
'dependencies' = array(
@@ -385,6 +366,25 @@
),
 ) + $resourcePaths;
 
+$wgResourceModules['ext.translate.special.pagepreparation'] = array(
+   'scripts' = 'resources/js/ext.translate.special.pagepreparation.js',
+   'messages' = array(
+   'pp-save-message',
+   'pp-save-button-label',
+   'pp-prepare-message',
+   'pp-already-prepared-message',
+   'pp-pagename-missing'
+   ),
+   'dependencies' = array(
+   'mediawiki.ui',
+   'mediawiki.api',
+   'mediawiki.api.edit',
+   'jquery.mwExtension',
+   'mediawiki.action.history.diff',
+   'mediawiki.jqueryMsg',
+   ),
+) + $resourcePaths;
+
 $wgResourceModules['ext.translate.special.pagetranslation'] = array(
'scripts' = 'resources/js/ext.translate.special.pagetranslation.js',
'styles' = 'resources/css/ext.translate.special.pagetranslation.css',
diff --git a/resources/js/ext.translate.pagepreparation.js 
b/resources/js/ext.translate.special.pagepreparation.js
similarity index 100%
rename from resources/js/ext.translate.pagepreparation.js
rename to resources/js/ext.translate.special.pagepreparation.js
diff --git a/specials/SpecialPagePreparation.php 
b/specials/SpecialPagePreparation.php
index ea841dc..278a5ce 100644
--- a/specials/SpecialPagePreparation.php
+++ b/specials/SpecialPagePreparation.php
@@ -22,7 +22,7 @@
$prepareButtonValue = $this-msg( 'pp-prepare-button-label' 
)-escaped();
$saveButtonValue = $this-msg( 'pp-save-button-label' 
)-escaped();
$summaryValue = $this-msg( 'pp-save-summary' 
)-inContentLanguage()-escaped();
-   $output-addModules( 'ext.translate.pagepreparation' );
+   $output-addModules( 'ext.translate.special.pagepreparation' );
$output-addModuleStyles( 'jquery.uls.grid' );
$param = $request-getText( 'param' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91466018e5cfe87de733389f58e83d5ea2155d78
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Pass CampaignContent as a constructor param - change (mediawiki...UploadWizard)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Pass CampaignContent as a constructor param
..


Pass CampaignContent as a constructor param

Change-Id: Ibabe3a10369863a0cb53115d97f31ea53583c160
---
M includes/CampaignContentHandler.php
1 file changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/includes/CampaignContentHandler.php 
b/includes/CampaignContentHandler.php
index 2097e55..6e1de6e 100644
--- a/includes/CampaignContentHandler.php
+++ b/includes/CampaignContentHandler.php
@@ -13,10 +13,6 @@
 class CampaignContentHandler extends JsonContentHandler {
 
public function __construct( $modelId = 'Campaign' ) {
-   parent::__construct( $modelId );
-   }
-
-   protected function getContentClass() {
-   return 'CampaignContent';
+   parent::__construct( $modelId, 'CampaignContent' );
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibabe3a10369863a0cb53115d97f31ea53583c160
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Allow unmarking pages from translation - change (mediawiki...Translate)

2014-09-22 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Allow unmarking pages from translation
..

Allow unmarking pages from translation

Previously this was only possible for broken pages. Now also for
active and the system automatically removes any translate tags,
section markers and languages tag.

Added some styling to the success/error/warning messages so that
they are more visible and added page listings on some errors pages
for usability.

While at it, move some colon prefixes to messages for consistency.

Fixed completely wrong documentation for getSourcePageText and
used correct title for makeContent.

Change-Id: Id1a7bb136bef24b9a8a5041422c47fca5bb9cd43
---
M Resources.php
M i18n/pagetranslation/en.json
M i18n/pagetranslation/qqq.json
M tag/SpecialPageTranslation.php
M tag/TPParse.php
5 files changed, 139 insertions(+), 34 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index a6abfd8..b01dabe 100644
--- a/Resources.php
+++ b/Resources.php
@@ -390,6 +390,7 @@
'styles' = 'resources/css/ext.translate.special.pagetranslation.css',
'dependencies' = array(
'ext.translate.multiselectautocomplete',
+   'mediawiki.ui.button',
),
'position' = 'top',
 ) + $resourcePaths;
diff --git a/i18n/pagetranslation/en.json b/i18n/pagetranslation/en.json
index 59b555e..7341798 100644
--- a/i18n/pagetranslation/en.json
+++ b/i18n/pagetranslation/en.json
@@ -23,9 +23,9 @@
 tpt-action-nofuzzy: Do not invalidate translations,
 tpt-badtitle: Page name given ($1) is not a valid title,
 tpt-nosuchpage: Page $1 does not exist,
-tpt-oldrevision: $2 is not the latest version of the page [[$1]].\nOnly 
latest versions can be marked for translation.,
+tpt-oldrevision: $2 is not the latest version of the page 
[[:$1]].\nOnly latest versions can be marked for translation.,
 tpt-notsuitable: Page $1 is not suitable for translation.\nMake sure it 
has nowikitranslate/nowiki tags and has a valid syntax.,
-tpt-saveok: The page [[$1]] has been marked up for translation with $2 
{{PLURAL:$2|translation unit|translation units}}.\nThe page can now be span 
class=\plainlinks\[$3 translated]/span.,
+tpt-saveok: The page [[:$1]] has been marked up for translation with $2 
{{PLURAL:$2|translation unit|translation units}}.\nThe page can now be span 
class=\plainlinks\[$3 translated]/span.,
 tpt-offer-notify: You can span class=\plainlinks\[$1 notify 
translators]/span about this page.,
 tpt-badsect: \$1\ is not a valid name for translation unit $2.,
 tpt-showpage-intro: Below new, existing and deleted translation units 
are listed.\nBefore marking this version for translation, check that the 
changes to translation units are minimized to avoid unnecessary work for 
translators.,
@@ -33,7 +33,7 @@
 tpt-edit-failed: Could not update the page: $1,
 tpt-duplicate: Translation unit name $1 is used more than once.,
 tpt-already-marked: The latest version of this page has already been 
marked for translation.,
-tpt-unmarked: Page $1 is no longer marked for translation.,
+tpt-unmarked: Page [[:$1]] is no longer marked for translation.,
 tpt-list-nopages: No pages are marked for translation or ready to be 
marked for translation.,
 tpt-new-pages-title: Pages proposed for translation,
 tpt-old-pages-title: Pages in translation,
@@ -191,5 +191,8 @@
 pp-already-prepared-message: It seems the page has already been 
prepared for translation. There are no changes compared to the previous 
version.,
 pp-pagename-missing: Please enter the page name.,
 pp-diff-old-header: Source text,
-pp-diff-new-header: Prepared text
+pp-diff-new-header: Prepared text,
+tpt-unlink-confirm: Please confirm that you really want to remove this 
page from the translation system.\nLanguage selector and translated page names 
will stop working.\nThe translation pages will become editable.,
+tpt-unlink-button: Remove from translation,
+tpt-unlink-summary: Removed page from translation
 }
diff --git a/i18n/pagetranslation/qqq.json b/i18n/pagetranslation/qqq.json
index 127682b..0cebaa7 100644
--- a/i18n/pagetranslation/qqq.json
+++ b/i18n/pagetranslation/qqq.json
@@ -191,5 +191,8 @@
pp-already-prepared-message: Info message shown if the page is 
already prepared for translation,
pp-pagename-missing: Error message given when page title field is 
blank,
pp-diff-old-header: Header text for old revision for the diff shown 
at Special:PagePreparation,
-   pp-diff-new-header: Header text for new revision for the diff shown 
at Special:PagePreparation
+   pp-diff-new-header: Header text for new revision for the diff shown 
at Special:PagePreparation,
+   

[MediaWiki-commits] [Gerrit] Fix special case at Special:MediaStatistics - change (mediawiki/core)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix special case at Special:MediaStatistics
..


Fix special case at Special:MediaStatistics

When a percentage was equal to 100 %, makePercentPretty
determined it should have zero decimal places, and the
resulting string 100 had trailing 0's removed, resulting
in a completely wrong 1.

We might either check if the number contains the decimal dot
prior to trimming, or spare the hassle for the special case
completely.

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

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



diff --git a/includes/specials/SpecialMediaStatistics.php 
b/includes/specials/SpecialMediaStatistics.php
index 681c332..3fd84138e 100644
--- a/includes/specials/SpecialMediaStatistics.php
+++ b/includes/specials/SpecialMediaStatistics.php
@@ -185,6 +185,9 @@
if ( $decimal == 0 ) {
return '0';
}
+   if ( $decimal = 100 ) {
+   return '100';
+   }
$percent = sprintf( %. . max( 0, 2 - floor( log10( $decimal ) 
) ) . f, $decimal );
// Then remove any trailing 0's
return preg_replace( '/\.?0*$/', '', $percent );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15ac5caa275d72909adba27b6b88824a830bd574
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mormegil morme...@centrum.cz
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] CSSMin: Don't generate double rules for IE 8 when embeddin... - change (mediawiki/core)

2014-09-22 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: CSSMin: Don't generate double rules for IE  8 when embedding 
SVG files
..

CSSMin: Don't generate double rules for IE  8 when embedding SVG files

Bug: 71003
Change-Id: Ic232e8d62b164940003afdfe7cce9f964d7e9cbc
---
M includes/libs/CSSMin.php
A tests/phpunit/data/cssmin/circle.svg
M tests/phpunit/includes/libs/CSSMinTest.php
3 files changed, 73 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/161932/1

diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php
index dcaa685..9949726 100644
--- a/includes/libs/CSSMin.php
+++ b/includes/libs/CSSMin.php
@@ -248,9 +248,12 @@
);
 
if ( $embedData ) {
+   // Remember the occurring MIME types to 
avoid fallbacks when embedding some files.
+   $mimeTypes = array();
+
$ruleWithEmbedded = 
preg_replace_callback(
$pattern,
-   function ( $match ) use ( 
$embedAll, $local, $remote ) {
+   function ( $match ) use ( 
$embedAll, $local, $remote, $mimeTypes ) {
$embed = $embedAll || 
$match['embed'];
$embedded = 
CSSMin::remapOne(
$match['file'],
@@ -260,21 +263,35 @@
$embed
);
 
+   $url = $match['file'] . 
$match['query'];
+   $file = $local . 
$match['file'];
+   if (
+   
!CSSMin::isRemoteUrl( $url )  !CSSMin::isLocalUrl( $url )
+file_exists( 
$file )
+   ) {
+   $mimeTypes[ 
CSSMin::getMimeType( $file ) ] = true;
+   }
+
return 
CSSMin::buildUrlValue( $embedded );
},
$rule
);
+
+   // Are all referenced images SVGs?
+   $needsEmbedFallback = $mimeTypes !== 
array( 'image/svg+xml' = true );
}
 
-   if ( $embedData  $ruleWithEmbedded !== 
$ruleWithRemapped ) {
-   // Build 2 CSS properties; one which 
uses a base64 encoded data URI in place
-   // of the @embed comment to try and 
retain line-number integrity, and the
-   // other with a remapped an versioned 
URL and an Internet Explorer hack
+   if ( !$embedData || $ruleWithEmbedded === 
$ruleWithRemapped ) {
+   // We're not embedding anything, or we 
tried to but the file is not embeddable
+   return $ruleWithRemapped;
+   } elseif ( $embedData  $needsEmbedFallback ) {
+   // Build 2 CSS properties; one which 
uses a data URI in place of the @embed comment, and
+   // the other with a remapped and 
versioned URL with an Internet Explorer 6 and 7 hack
// making it ignored in all browsers 
that support data URIs
return 
$ruleWithEmbedded;$ruleWithRemapped!ie;
} else {
-   // No reason to repeat twice
-   return $ruleWithRemapped;
+   // Look ma, no fallbacks! This is for 
files which IE 6 and 7 don't support anyway: SVG.
+   return $ruleWithEmbedded;
}
}, $source );
 
@@ -286,6 +303,34 @@
 
return $source;
 
+   }
+
+   /**
+* Is this CSS rule referencing a remote URL?
+*
+* @private Until we require PHP 5.5 and we can access self:: from 
closures.
+* @param 

[MediaWiki-commits] [Gerrit] Fix typo in mathoid LVS group description - change (operations/puppet)

2014-09-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Fix typo in mathoid LVS group description
..


Fix typo in mathoid LVS group description

Also add .scv. to typos so this doesn't happen again.

Change-Id: I370e9b7e921479f9ab2f2a7e78b4b849fe92f888
---
M modules/lvs/manifests/configuration.pp
M typos
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index 3757228..277114d 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -862,7 +862,7 @@
 },
 },
 'mathoid' = {
-'description' = 'Mathematical rendering service, 
mathoid.scv.eqiad.wmnet',
+'description' = 'Mathematical rendering service, 
mathoid.svc.eqiad.wmnet',
 'class' = 'high-traffic2',
 'sites' = [ 'eqiad' ],
 'ip' = $service_ips['mathoid'][$::site],
diff --git a/typos b/typos
index 9d52499..e541ae1 100644
--- a/typos
+++ b/typos
@@ -3,3 +3,4 @@
 wikmedia
 commmon
 kafak
+.scv.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I370e9b7e921479f9ab2f2a7e78b4b849fe92f888
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Move colons to messages for consistancy - change (mediawiki...Translate)

2014-09-22 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Move colons to messages for consistancy
..

Move colons to messages for consistancy

Change-Id: I4f82a7597f67dc56039badb38aa5977e456d8c1c
---
M i18n/pagetranslation/en.json
M tag/SpecialPageTranslation.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/i18n/pagetranslation/en.json b/i18n/pagetranslation/en.json
index 17f0a75..7341798 100644
--- a/i18n/pagetranslation/en.json
+++ b/i18n/pagetranslation/en.json
@@ -23,9 +23,9 @@
 tpt-action-nofuzzy: Do not invalidate translations,
 tpt-badtitle: Page name given ($1) is not a valid title,
 tpt-nosuchpage: Page $1 does not exist,
-tpt-oldrevision: $2 is not the latest version of the page [[$1]].\nOnly 
latest versions can be marked for translation.,
+tpt-oldrevision: $2 is not the latest version of the page 
[[:$1]].\nOnly latest versions can be marked for translation.,
 tpt-notsuitable: Page $1 is not suitable for translation.\nMake sure it 
has nowikitranslate/nowiki tags and has a valid syntax.,
-tpt-saveok: The page [[$1]] has been marked up for translation with $2 
{{PLURAL:$2|translation unit|translation units}}.\nThe page can now be span 
class=\plainlinks\[$3 translated]/span.,
+tpt-saveok: The page [[:$1]] has been marked up for translation with $2 
{{PLURAL:$2|translation unit|translation units}}.\nThe page can now be span 
class=\plainlinks\[$3 translated]/span.,
 tpt-offer-notify: You can span class=\plainlinks\[$1 notify 
translators]/span about this page.,
 tpt-badsect: \$1\ is not a valid name for translation unit $2.,
 tpt-showpage-intro: Below new, existing and deleted translation units 
are listed.\nBefore marking this version for translation, check that the 
changes to translation units are minimized to avoid unnecessary work for 
translators.,
diff --git a/tag/SpecialPageTranslation.php b/tag/SpecialPageTranslation.php
index 9f59285..f998274 100644
--- a/tag/SpecialPageTranslation.php
+++ b/tag/SpecialPageTranslation.php
@@ -168,7 +168,7 @@
$link = span class='plainlinks'[$target 
$revision]/span;
$out-wrapWikiMsg(
'div class=warningbox$1/div',
-   array( 'tpt-oldrevision', ':' . 
$title-getPrefixedText(), $link  )
+   array( 'tpt-oldrevision', 
$title-getPrefixedText(), $link  )
);
$this-listPages();
 
@@ -229,7 +229,7 @@
 
$this-getOutput()-wrapWikiMsg(
'div class=successbox$1/div',
-   array( 'tpt-saveok',  ':' . $titleText, $num, $link   )
+   array( 'tpt-saveok', $titleText, $num, $link   )
);
 
// If TranslationNotifications is installed, and the user can 
notify

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f82a7597f67dc56039badb38aa5977e456d8c1c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_dsh_groups into module - change (operations/puppet)

2014-09-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: nagios_common: Move check_dsh_groups into module
..

nagios_common: Move check_dsh_groups into module

Change-Id: I7ab9d5aee917b2ce8b2713cc41c93941728d3853
---
R modules/nagios_common/files/check_commands/check_dsh_groups
A modules/nagios_common/files/check_commands/check_dsh_groups.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
4 files changed, 9 insertions(+), 7 deletions(-)


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

diff --git a/files/icinga/check_dsh_groups 
b/modules/nagios_common/files/check_commands/check_dsh_groups
similarity index 100%
rename from files/icinga/check_dsh_groups
rename to modules/nagios_common/files/check_commands/check_dsh_groups
diff --git a/modules/nagios_common/files/check_commands/check_dsh_groups.cfg 
b/modules/nagios_common/files/check_commands/check_dsh_groups.cfg
new file mode 100644
index 000..2e35754
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_dsh_groups.cfg
@@ -0,0 +1,5 @@
+# Checks whether a host belongs to given dsh group(s)
+define command{
+command_namecheck_dsh_groups
+command_line$USER1$/check_dsh_groups $HOSTNAME$ $ARG1$
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index f8071d4..ee69f66 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -26,7 +26,10 @@
 mode   = '0755',
 }
 
-nagios_common::check_command { 'check_graphite':
+nagios_common::check_command { [
+'check_graphite',
+'check_dsh_groups'
+] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
 owner  = $owner,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 5f708b0..c69e3a3 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -521,12 +521,6 @@
 }
 
 
-# Checks whether a host belongs to given dsh group(s)
-define command{
-command_namecheck_dsh_groups
-command_line$USER1$/check_dsh_groups $HOSTNAME$ $ARG1$
-}
-
 # check Online Content Generator health from server health page
 define command{
 command_namenrpe_check_ocg_health

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ab9d5aee917b2ce8b2713cc41c93941728d3853
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] [WIP] Turn other Activities into Fragments - change (apps...wikipedia)

2014-09-22 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: [WIP] Turn other Activities into Fragments
..

[WIP] Turn other Activities into Fragments

- Things launched from the Nav menu are now Fragments that replace each
  other in the PageActivity container, and create a backstack in the
  FragmentManager.
- Made full-text search into a Fragment
- Made the PageActivity have a real ActionBar (to be built out in the next
  patch), into which the actions of the fragments are added.
- Made sure that savedInstanceState preserves the order of the fragment
  backstack.

Change-Id: If9c2c11014745e75f3dbde86a724d555470c8f61
---
M wikipedia/AndroidManifest.xml
D wikipedia/res/layout/activity_history.xml
D wikipedia/res/layout/activity_nearby.xml
D wikipedia/res/layout/activity_saved_pages.xml
D wikipedia/res/layout/dialog_search_results.xml
M wikipedia/src/main/java/org/wikipedia/NavDrawerFragment.java
D wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java
D wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
D wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java
D wikipedia/src/main/java/org/wikipedia/search/FullSearchDialog.java
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
13 files changed, 46 insertions(+), 1,690 deletions(-)


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

diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml
index 5007f13..8cbbdf5 100644
--- a/wikipedia/AndroidManifest.xml
+++ b/wikipedia/AndroidManifest.xml
@@ -49,7 +49,6 @@
 !-- Don't delete the meta-data field above --
 
 activity android:name=.page.PageActivity
-  android:theme=@style/NoTitle
   android:windowSoftInputMode=stateHidden
   
android:configChanges=orientation|keyboardHidden|keyboard|screenSize
 
diff --git a/wikipedia/res/layout/activity_history.xml 
b/wikipedia/res/layout/activity_history.xml
deleted file mode 100644
index 4c73f41..000
--- a/wikipedia/res/layout/activity_history.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-?xml version=1.0 encoding=utf-8?
-
-FrameLayout xmlns:android=http://schemas.android.com/apk/res/android;
-  android:layout_width=match_parent
-  android:layout_height=match_parent
-  android:background=?attr/window_background_color
-LinearLayout
-android:id=@+id/history_empty_container
-android:orientation=vertical
-android:layout_gravity=center_vertical|center_horizontal
-android:layout_width=wrap_content
-android:layout_height=wrap_content
-ImageView
-android:id=@+id/history_empty_image
-android:layout_width=wrap_content
-android:layout_height=wrap_content
-android:layout_gravity=center_horizontal
-android:src=@drawable/recent/
-TextView
-android:id=@+id/history_empty_title
-android:layout_width=wrap_content
-android:layout_height=wrap_content
-android:layout_gravity=center_horizontal
-android:gravity=center
-android:textAppearance=?android:attr/textAppearanceLarge
-android:layout_marginTop=-32dp
-android:layout_marginBottom=16dp
-android:layout_marginLeft=16dp
-android:layout_marginRight=16dp
-android:text=@string/history_empty_title
-/
-TextView
-android:id=@+id/history_empty_message
-android:layout_width=256dp
-android:layout_height=wrap_content
-android:layout_gravity=center_horizontal
-android:gravity=center
-android:text=@string/history_empty_message
-/
-/LinearLayout
-LinearLayout
-android:orientation=vertical
-android:layout_width=match_parent
-android:layout_height=wrap_content
-
-org.wikipedia.views.PlainPasteEditText
-android:layout_width=match_parent
-android:layout_height=48dp
-android:id=@+id/history_search_list
-android:hint=@string/history_search_list_hint
-android:imeOptions=actionDone
-android:singleLine=true
-android:layout_marginLeft=8dp
-android:layout_marginRight=8dp
-/
-ListView
-android:id=@+id/history_entry_list
-android:layout_width=match_parent
-android:layout_height=match_parent
- 

[MediaWiki-commits] [Gerrit] backport of https://github.com/facebook/hhvm/pull/3811/ - change (operations...hhvm)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: backport of https://github.com/facebook/hhvm/pull/3811/
..

backport of https://github.com/facebook/hhvm/pull/3811/

Change-Id: I0bf927e188644f6cf0fe0d0900c2e6ed014c1f30
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
A debian/patches/ezc-fix-count-and-conversion-to-boolean.patch
M debian/patches/series
2 files changed, 134 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm 
refs/changes/36/161936/1

diff --git a/debian/patches/ezc-fix-count-and-conversion-to-boolean.patch 
b/debian/patches/ezc-fix-count-and-conversion-to-boolean.patch
new file mode 100644
index 000..3462154
--- /dev/null
+++ b/debian/patches/ezc-fix-count-and-conversion-to-boolean.patch
@@ -0,0 +1,133 @@
+From 90c41505bc8efe5f95d0c20ed6dd7c9420ee1f2e Mon Sep 17 00:00:00 2001
+From: Tim Starling tstarl...@wikimedia.org
+Date: Mon, 22 Sep 2014 14:51:38 +1000
+Subject: [PATCH] EZC: Fix count() and conversion to boolean of ProxyArray
+
+Fix JIT versions of count() and conversion of array to boolean, so
+that they work with ProxyArray. In both cases, duplicate the logic in
+ArrayData::size() -- if the sign bit of the size field is unset, use
+that field, otherwise call vsize().
+
+The resulting generated machine code for conversion to boolean is along
+the lines of:
+
+  mov0x4(%rdi),%eax
+  test   %eax,%eax
+  js 0xf80049b
+  setne  %al
+
+where 0xf80049b is the slow path. This is similar to the machine code I
+previously reported for ArrayData::size() in code review of 1717e028f18
+(see #3065).
+
+Added test case which previously failed.
+---
+ hphp/runtime/vm/jit/code-gen-x64.cpp   | 45 +++---
+ hphp/runtime/vm/jit/ir.h   |  2 +-
+ hphp/test/slow/ext_ezc_test/count-proxyarray.php   | 12 ++
+ .../slow/ext_ezc_test/count-proxyarray.php.expectf |  2 +
+ 4 files changed, 46 insertions(+), 15 deletions(-)
+ create mode 100644 hphp/test/slow/ext_ezc_test/count-proxyarray.php
+ create mode 100644 hphp/test/slow/ext_ezc_test/count-proxyarray.php.expectf
+diff --git a/hphp/runtime/vm/jit/code-gen-x64.cpp 
b/hphp/runtime/vm/jit/code-gen-x64.cpp
+index 5bbe48e..81ef1f3 100644
+--- a/hphp/runtime/vm/jit/code-gen-x64.cpp
 b/hphp/runtime/vm/jit/code-gen-x64.cpp
+@@ -2317,11 +2317,27 @@ void CodeGenerator::cgConvArrToBool(IRInstruction* 
inst) {
+   auto srcReg = srcLoc(0).reg();
+   auto v = vmain();
+ 
+-  // This will incorrectly result in true for a NameValueTableWrapper that 
is
+-  // empty. You can only get such a thing through very contrived PHP, so the
+-  // savings of a branch and a block of cold code outweights the edge-case 
bug.
+-  v  cmplim{0, srcReg[ArrayData::offsetofSize()]};
+-  v  setcc{CC_NZ, dstReg};
++  auto size = v.makeReg();
++  v  loadl{srcReg[ArrayData::offsetofSize()], size};
++  v  testl{size, size};
++
++  unlikelyIfThenElse(v, vcold(), CC_S, dstReg,
++[](Vout v) {
++  auto vsize = v.makeReg();
++  auto dst1 = v.makeReg();
++  cgCallHelper(v, CppCall::method(ArrayData::vsize),
++   callDest(vsize), SyncOptions::kNoSyncPoint,
++   argGroup().ssa(0));
++  v  testl{vsize, vsize};
++  v  setcc{CC_NZ, dst1};
++  return dst1;
++},
++[](Vout v) {
++  auto dst2 = v.makeReg();
++  v  setcc{CC_NZ, dst2};
++  return dst2;
++}
++  );
+ }
+ 
+ /*
+@@ -6203,14 +6219,21 @@ void CodeGenerator::cgCountArray(IRInstruction* inst) {
+   auto const baseReg = srcLoc(0).reg();
+   auto const dstReg  = dstLoc(0).reg();
+   auto v = vmain();
++  auto dst1 = v.makeReg();
++
++  v  loadl{baseReg[ArrayData::offsetofSize()], dst1};
++  v  testl{dst1, dst1};
+ 
+-  v  cmpbim{ArrayData::kNvtwKind, baseReg[ArrayData::offsetofKind()]};
+   unlikelyIfThenElse(v, vcold(), CC_Z,
+ [](Vout v) {
+-  cgCallNative(v, inst);
++  auto dst2 = v.makeReg();
++  cgCallHelper(v, CppCall::method(ArrayData::vsize),
++   callDest(dst2), SyncOptions::kNoSyncPoint,
++   argGroup().ssa(0/*base*/));
++  return dst2;
+ },
+ [](Vout v) {
+-  v  loadl{baseReg[ArrayData::offsetofSize()], dstReg};
++   return dst1;
+ }
+   );
+ }
+
+diff --git a/hphp/runtime/vm/jit/ir.h b/hphp/runtime/vm/jit/ir.h
+index 568b228..a838e84 100644
+--- a/hphp/runtime/vm/jit/ir.h
 b/hphp/runtime/vm/jit/ir.h
+@@ -265,7 +265,7 @@ O(ConvObjToArr, D(Arr), S(Obj),
   Er|N|PRc|CRc|K) \
+ O(ConvStrToArr, D(Arr), S(Str),  NNT|PRc|CRc) 
\
+ O(ConvCellToArr,D(Arr), S(Cell),  Er|N|PRc|CRc|K) 
\
+   
\
+-O(ConvArrToBool,   D(Bool), S(Arr),   NF) 
\

[MediaWiki-commits] [Gerrit] Don't escape the delete character - change (mediawiki...Scribunto)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't escape the delete character
..


Don't escape the delete character

Escaping the delete character breaks strip markers, so don't do it.

Bug: 68011
Change-Id: Ica97c898209c59c0084bf700d891b28603f79dd1
---
M engines/LuaCommon/lualib/mw.html.lua
M tests/engines/LuaCommon/luaParserTests.txt
2 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/engines/LuaCommon/lualib/mw.html.lua 
b/engines/LuaCommon/lualib/mw.html.lua
index 5f0f246..0d8bf26 100644
--- a/engines/LuaCommon/lualib/mw.html.lua
+++ b/engines/LuaCommon/lualib/mw.html.lua
@@ -88,7 +88,8 @@
 
  local function cssEncode( s )
-- XXX: I'm not sure this character set is complete.
-   return mw.ustring.gsub( s, '[^\32-\57\60-\126]', function ( m )
+   -- bug #68011: allow delete character (\127)
+   return mw.ustring.gsub( s, '[^\32-\57\60-\127]', function ( m )
return string.format( '\\%X ', mw.ustring.codepoint( m ) )
end )
 end
diff --git a/tests/engines/LuaCommon/luaParserTests.txt 
b/tests/engines/LuaCommon/luaParserTests.txt
index 7a83cef..ba9741d 100644
--- a/tests/engines/LuaCommon/luaParserTests.txt
+++ b/tests/engines/LuaCommon/luaParserTests.txt
@@ -151,6 +151,10 @@
return frame.args[1]
 end
 
+function p.testStrippedCss( frame )
+   return mw.html.create( 'div' ):css( 'color', frame.args[1] )
+end
+
 return p
 !! endarticle
 
@@ -474,3 +478,12 @@
 pgood
 /p
 !! end
+
+!! test
+Scribunto: Strip markers in CSS
+!! input
+{{#invoke:test|testStrippedCss|nowiki#ff/nowiki}}
+!! result
+div style=color:#ff/div
+
+!! end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica97c898209c59c0084bf700d891b28603f79dd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Implemented singlebuttontoolbar - change (mediawiki...Wikibase)

2014-09-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Implemented singlebuttontoolbar
..

Implemented singlebuttontoolbar

Change-Id: I491e216a459276837f6ce095bec17e051a17326b
---
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
A lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js
M lib/resources/jquery.wikibase/toolbar/resources.php
A 
lib/tests/qunit/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.tests.js
M lib/tests/qunit/jquery.wikibase/toolbar/resources.php
6 files changed, 163 insertions(+), 98 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
index 888f70b..9689846 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.addtoolbar.js
@@ -2,66 +2,29 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-// TODO: Merge with removetoolbar.
 ( function( mw, $ ) {
'use strict';
 
-var PARENT = $.wikibase.toolbar;
+var PARENT = $.wikibase.singlebuttontoolbar;
 
 /**
- * Add toolbar widget.
+ * Add toolbar widget by default offering an add button.
  * @since 0.4
- * @extends jQuery.wikibase.toolbar
+ * @extends jQuery.wikibase.singlebuttontoolbar
  *
- * This widget, by default, offers an add button.
+ * @option {string} [label]
+ * Default: mw.msg( 'wikibase-add' )
  *
- * @option {boolean} [renderItemSeparators]
- * Default: true
- *
- * @event add
- *Triggered when the default add button is hit.
- *- {jQuery.Event}
+ * @option {string} [eventName]
+ * Default: 'add'
  */
 $.widget( 'wikibase.addtoolbar', PARENT, {
/**
-* @see jQuery.wikibase.toolbar.options
+* @see jQuery.wikibase.singlebuttontoolbar.options
 */
options: {
-   renderItemSeparators: true,
-   label: mw.msg( 'wikibase-add' )
-   },
-
-   /**
-* @see jQuery.wikibase.toolbar._create
-*/
-   _create: function() {
-   PARENT.prototype._create.call( this );
-
-   if( !this.options.$content.length ) {
-   this.options.$content = 
this._createDefaultButton().appendTo( this._getContainer() );
-   this.draw();
-   }
-   },
-
-   /**
-* @return {jQuery}
-*/
-   _createDefaultButton: function() {
-   var self = this;
-
-   return $( 'span/' ).toolbarbutton( {
-   $label: this.options.label
-   } )
-   .on( 'toolbarbuttonaction.' + this.widgetName, function( event 
) {
-   self._trigger( 'add' );
-   } );
-   },
-
-   focus: function() {
-   var button = this.options.$content.first().data( 
'toolbarbutton' );
-   if( button ) {
-   button.focus();
-   }
+   label: mw.msg( 'wikibase-add' ),
+   eventName: 'add'
}
 } );
 
diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
index 881d59b..d2960e8 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.removetoolbar.js
@@ -2,66 +2,29 @@
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
  */
-// TODO: Merge with addtoolbar.
 ( function( mw, $ ) {
'use strict';
 
-var PARENT = $.wikibase.toolbar;
+var PARENT = $.wikibase.singlebuttontoolbar;
 
 /**
- * Remove toolbar widget.
+ * Remove toolbar widget by default offering a remove button.
  * @since 0.4
- * @extends jQuery.wikibase.toolbar
+ * @extends jQuery.wikibase.singlebuttontoolbar
  *
- * This widget, by default, offers an remove button.
+ * @option {string} [label]
+ * Default: mw.msg( 'wikibase-remove' )
  *
- * @option {boolean} [renderItemSeparators]
- * Default: true
- *
- * @event remove
- *Triggered when the default remove button is hit.
- *- {jQuery.Event}
+ * @option {string} [eventName]
+ * Default: 'remove'
  */
 $.widget( 'wikibase.removetoolbar', PARENT, {
/**
-* @see jQuery.wikibase.toolbar.options
+* @see jQuery.wikibase.singlebuttontoolbar.options
 */
options: {
-   renderItemSeparators: true,
-   label: mw.msg( 'wikibase-remove' )
-   },
-
-   /**
-* @see jQuery.wikibase.toolbar._create
-

[MediaWiki-commits] [Gerrit] Some nearby page entries don't have coordinates - change (apps...wikipedia)

2014-09-22 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Some nearby page entries don't have coordinates
..


Some nearby page entries don't have coordinates

or at least not complete ones.
Also added unit test for this and updated JSON docs.

bug: 71025
Change-Id: I26fa97a3bc848cea7fcd429040cc6b598788bea6
---
A wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java
M wikipedia/src/main/java/org/wikipedia/nearby/NearbyActivity.java
M wikipedia/src/main/java/org/wikipedia/nearby/NearbyCompassView.java
M wikipedia/src/main/java/org/wikipedia/nearby/NearbyFetchTask.java
4 files changed, 220 insertions(+), 58 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java
new file mode 100644
index 000..45f6d57
--- /dev/null
+++ b/wikipedia-it/src/main/java/org/wikipedia/nearby/NearbyUnitTests.java
@@ -0,0 +1,128 @@
+package org.wikipedia.nearby;
+
+import org.wikipedia.R;
+import org.wikipedia.WikipediaApp;
+import junit.framework.TestCase;
+import org.json.JSONObject;
+import android.location.Location;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * Unit tests for Nearby related classes. Probably should refactor this into a 
model class.
+ */
+public class NearbyUnitTests extends TestCase {
+// can't seem to suppress the checkstyle warnings for MagicNumbers. Oh 
well.
+private static final int THREE = 3;
+private static final int FOUR = 4;
+private static final double SHORT_DISTANCE = 0.001d;
+private static final double LONGER_DISTANCE = 0.01d;
+private static final int A_B_DISTANCE = 111320;
+
+private Location nextLocation;
+private ListNearbyPage nearbyPages;
+
+@Override
+public void setUp() throws Exception {
+super.setUp();
+nextLocation = new Location(current);
+nextLocation.setLatitude(0.0d);
+nextLocation.setLongitude(0.0d);
+nearbyPages = new LinkedListNearbyPage();
+nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \c\, 
\coordinates\: [{\lat\: 0.0, \lon\: 3.0}] })));
+nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \b\, 
\coordinates\: [{\lat\: 0.0, \lon\: 2.0}] })));
+nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \a\, 
\coordinates\: [{\lat\: 0.0, \lon\: 1.0}] })));
+}
+
+public void testSort() throws Exception {
+Collections.sort(nearbyPages, new NearbyDistanceComparator());
+assertEquals(a, nearbyPages.get(0).getTitle());
+assertEquals(b, nearbyPages.get(1).getTitle());
+assertEquals(c, nearbyPages.get(2).getTitle());
+}
+
+public void testSortWithNullLocations() throws Exception {
+nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \d\ 
})));
+nearbyPages.add(new NearbyPage(new JSONObject({ \title\: \e\ 
})));
+Collections.sort(nearbyPages, new NearbyDistanceComparator());
+assertEquals(a, nearbyPages.get(0).getTitle());
+assertEquals(b, nearbyPages.get(1).getTitle());
+assertEquals(c, nearbyPages.get(2).getTitle());
+// the two null location values come last but in the same order as 
from the original list:
+assertEquals(d, nearbyPages.get(THREE).getTitle());
+assertEquals(e, nearbyPages.get(FOUR).getTitle());
+}
+
+public void testCompare() throws Exception {
+NearbyPage nullLocPage = new NearbyPage(new JSONObject({ \title\: 
\nowhere\ }));
+NearbyDistanceComparator comp = new NearbyDistanceComparator();
+assertEquals(A_B_DISTANCE, comp.compare(nearbyPages.get(0), 
nearbyPages.get(1)));
+assertEquals(-1, comp.compare(nearbyPages.get(0), nullLocPage));
+assertEquals(1, comp.compare(nullLocPage, nearbyPages.get(0)));
+assertEquals(0, comp.compare(nullLocPage, nullLocPage));
+}
+
+public void testGetDistanceLabelSameLocation() throws Exception {
+Location locationA = new Location(current);
+locationA.setLatitude(0.0d);
+locationA.setLongitude(0.0d);
+assertEquals(0 m, getDistanceLabel(locationA));
+}
+
+public void testGetDistanceLabelMeters() throws Exception {
+Location locationB = new Location(b);
+locationB.setLatitude(0.0d);
+locationB.setLongitude(SHORT_DISTANCE);
+assertEquals(111 m, getDistanceLabel(locationB));
+}
+
+public void testGetDistanceLabelKilometers() throws Exception {
+Location locationB = new Location(b);
+locationB.setLatitude(0.0d);
+locationB.setLongitude(LONGER_DISTANCE);
+assertEquals(1.11 km, getDistanceLabel(locationB));
+}
+
+public void testGetDistanceLabelNull() throws Exception {
+

[MediaWiki-commits] [Gerrit] Normalized mediawiki/core phplint job - change (integration/jenkins-job-builder-config)

2014-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Normalized mediawiki/core phplint job
..

Normalized mediawiki/core phplint job

When linting mediawiki/core, we want to avoid submodules present in wmf
branches.  To do we went with a specific template '{name}-lint' which
overriden the default git scm to prevent submodule processing.

Nowadays, '{name}-phplint' does not process submodules either so switch
to it and get rid of the '{name}-lint' job template.

Summary of the change:

* job is renamed from mediawiki-core-lint to mediawiki-core-phplint
  (requires a chnage in Zuul config)
* build history is bumped from 15 days to 90 days
* Git remote URL and reference repo now uses $ZUUL_PROJECT instead of
  hardcoded mediawiki/core

Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
---
M mediawiki.yaml
1 file changed, 1 insertion(+), 15 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/38/161938/1

diff --git a/mediawiki.yaml b/mediawiki.yaml
index c350707..6dcd1d5 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -6,20 +6,6 @@
 # submodules we do not care about. See bug 42455.
 
 - job-template:
-name: '{name}-lint'
-node: hasSlaveScripts  UbuntuPrecise
-defaults: use-zuul
-concurrent: true
-logrotate:
-daysToKeep: 15
-scm:
- - git-mwcore
-triggers:
- - zuul
-builders:
- - phplint
-
-- job-template:
 name: 'mediawiki-core-jslint'
 node: hasSlaveScripts  UbuntuPrecise
 defaults: use-zuul
@@ -266,7 +252,6 @@
 - job-group:
 name: mediawiki-jobs
 jobs:
-  - '{name}-lint'
   - 'mediawiki-core-jslint'
   - '{name}-qunit'
   - 'mediawiki-core-jsduck'
@@ -291,6 +276,7 @@
 databasetype:
   - sqlite
 jobs:
+  - '{name}-phplint'
   - mediawiki-gate
   - mediawiki-jobs
   - '{name}-phpcs-HEAD'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] nagios_common: Move wikidata check to a check_command define - change (operations/puppet)

2014-09-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: nagios_common: Move wikidata check to a check_command define
..

nagios_common: Move wikidata check to a check_command define

Only used in prod, so not including in shinken

Change-Id: I77981e33b09489cc9b19f583c8d38c3548f5069f
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_wikidata
A modules/nagios_common/files/check_commands/check_wikidata.cfg
3 files changed, 7 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/161939/1

diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 2dbf3fc..14db359 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -795,10 +795,8 @@
 ip_address = '91.198.174.192',
 }
 
-file { '/usr/local/lib/nagios/plugins/check_wikidata':
-ensure = present,
-mode   = '0555',
-source = 'puppet:///files/icinga/check_wikidata',
+nagios_common::check_command { 'check_wikidata':
+notify = Service['icinga']
 }
 
 monitor_service { 'wikidata.org dispatch lag':
diff --git a/files/icinga/check_wikidata 
b/modules/nagios_common/files/check_commands/check_wikidata
similarity index 100%
rename from files/icinga/check_wikidata
rename to modules/nagios_common/files/check_commands/check_wikidata
diff --git a/modules/nagios_common/files/check_commands/check_wikidata.cfg 
b/modules/nagios_common/files/check_commands/check_wikidata.cfg
new file mode 100644
index 000..d592643
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_wikidata.cfg
@@ -0,0 +1,5 @@
+# monitor wikidata
+define command{
+command_namecheck_wikidata
+command_line/usr/local/lib/nagios/plugins/check_wikidata
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77981e33b09489cc9b19f583c8d38c3548f5069f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Normalize mediawiki/core phplint job - change (integration/zuul-config)

2014-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: Normalize mediawiki/core phplint job
..

Normalize mediawiki/core phplint job

mediawiki/core has been switched to use the same PHP Lint job template
as the other repositories https://gerrit.wikimedia.org/r/161938

Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
---
M layout.yaml
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/40/161940/1

diff --git a/layout.yaml b/layout.yaml
index a25abfd..d224e37 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1816,7 +1816,7 @@
   - mediawiki-core-phpcs-lenient-HEAD
   - mediawiki-core-phpcs-strict-HEAD
   - mediawiki-core-jslint
-  - mediawiki-core-lint
+  - mediawiki-core-phplint
   - mediawiki-core-ruby1.9.3lint
   - php-composer-validate
 test:
@@ -1824,7 +1824,7 @@
   - mediawiki-core-phpcs-strict-HEAD
   - mediawiki-core-jsduck
   - mediawiki-core-npm
-  - mediawiki-core-lint:
+  - mediawiki-core-phplint:
 - mediawiki-vendor-integration
 - mediawiki-core-phpunit-databaseless
 - mediawiki-core-qunit
@@ -1841,7 +1841,7 @@
   - mediawiki-gate
   - mediawiki-core-jsduck
   - mediawiki-core-npm
-  - mediawiki-core-lint:
+  - mediawiki-core-phplint:
 - mediawiki-vendor-integration
 - mediawiki-core-phpunit-databaseless
 - mediawiki-core-qunit

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Normalize mediawiki/core phplint job - change (integration/zuul-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Normalize mediawiki/core phplint job
..


Normalize mediawiki/core phplint job

mediawiki/core has been switched to use the same PHP Lint job template
as the other repositories https://gerrit.wikimedia.org/r/161938

Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
---
M layout.yaml
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index a25abfd..d224e37 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1816,7 +1816,7 @@
   - mediawiki-core-phpcs-lenient-HEAD
   - mediawiki-core-phpcs-strict-HEAD
   - mediawiki-core-jslint
-  - mediawiki-core-lint
+  - mediawiki-core-phplint
   - mediawiki-core-ruby1.9.3lint
   - php-composer-validate
 test:
@@ -1824,7 +1824,7 @@
   - mediawiki-core-phpcs-strict-HEAD
   - mediawiki-core-jsduck
   - mediawiki-core-npm
-  - mediawiki-core-lint:
+  - mediawiki-core-phplint:
 - mediawiki-vendor-integration
 - mediawiki-core-phpunit-databaseless
 - mediawiki-core-qunit
@@ -1841,7 +1841,7 @@
   - mediawiki-gate
   - mediawiki-core-jsduck
   - mediawiki-core-npm
-  - mediawiki-core-lint:
+  - mediawiki-core-phplint:
 - mediawiki-vendor-integration
 - mediawiki-core-phpunit-databaseless
 - mediawiki-core-qunit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Simplify loading CSS - change (mediawiki...GettingStarted)

2014-09-22 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review.

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

Change subject: Simplify loading CSS
..

Simplify loading CSS

Change-Id: Ia30e7ed55b41abcedb6a1e82a3eaa08bb952414a
---
M resources/lightbulb/lightbulb.flyout.js
M resources/lightbulb/lightbulb.flyout.less
2 files changed, 5 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/41/161941/1

diff --git a/resources/lightbulb/lightbulb.flyout.js 
b/resources/lightbulb/lightbulb.flyout.js
index 413e539..989acb8 100644
--- a/resources/lightbulb/lightbulb.flyout.js
+++ b/resources/lightbulb/lightbulb.flyout.js
@@ -27,7 +27,6 @@
/a\
/div\
div 
class=mw-gettingstarted-lightbulb-flyout-loader\
-   div 
class=mw-gettingstarted-lightbulb-flyout-loader-spinner/div\
/div\
div class=guider_arrow guider_arrow_up 
guider_arrow_center\
div 
class=guider_arrow_inner_container\
diff --git a/resources/lightbulb/lightbulb.flyout.less 
b/resources/lightbulb/lightbulb.flyout.less
index 700b5d6..42f483f 100644
--- a/resources/lightbulb/lightbulb.flyout.less
+++ b/resources/lightbulb/lightbulb.flyout.less
@@ -204,18 +204,12 @@
 
 .mw-gettingstarted-lightbulb-flyout-loader {
margin: auto;
-   padding: 45px 71px;
display: none;
-
-   .mw-gettingstarted-lightbulb-flyout-loader-spinner {
-   margin: auto;
-   width: 32px;
-   height: 32px;
-   background-position: center;
-   background-size: 32px;
-   // Graceful degradation for browsers that don't support 
background-size
-   .background-image-svg('images/ajax-loader-2x.gif', 
'images/ajax-loader.gif');
-   }
+   height: 122px;
+   background-position: center;
+   background-size: 32px;
+   background-repeat: no-repeat;
+   .background-image-svg('images/ajax-loader-2x.gif', 
'images/ajax-loader.gif');
 }
 
 // TODO (phuedx, 2014/07/30): Classes like this would simplify the

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia30e7ed55b41abcedb6a1e82a3eaa08bb952414a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Phuedx g...@samsmith.io

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_cert into module - change (operations/puppet)

2014-09-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: nagios_common: Move check_cert into module
..

nagios_common: Move check_cert into module

Change-Id: I211555408a6da02653be0ceb14aee2a4a2563280
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_cert
A modules/nagios_common/files/check_commands/check_cert.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
5 files changed, 5 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/161942/1

diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 5187b7b..a0f5b12 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -565,12 +565,6 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_cert':
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-source = 'puppet:///files/icinga/check_cert',
-}
 file { '/usr/lib/nagios/plugins/check_all_memcached.php':
 source = 'puppet:///files/icinga/check_all_memcached.php',
 owner  = 'root',
diff --git a/files/icinga/check_cert 
b/modules/nagios_common/files/check_commands/check_cert
similarity index 100%
rename from files/icinga/check_cert
rename to modules/nagios_common/files/check_commands/check_cert
diff --git a/modules/nagios_common/files/check_commands/check_cert.cfg 
b/modules/nagios_common/files/check_commands/check_cert.cfg
new file mode 100644
index 000..0a0b54e
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_cert.cfg
@@ -0,0 +1,4 @@
+define command{
+command_namecheck_cert
+command_line$USER1$/check_cert $ARG1$ $ARG2$ $ARG3$
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index 412f5a5..e775081 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -30,6 +30,7 @@
 'check_graphite',
 'check_dsh_groups',
 'check_wikidata',
+'check_cert',
 ] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 95803af..bc7531b 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -406,11 +406,6 @@
 }
 
 define command{
-command_namecheck_cert
-command_line$USER1$/check_cert $ARG1$ $ARG2$ $ARG3$
-}
-
-define command{
 command_namepuppet-FAIL
 command_linedate --date @$LASTSERVICEOK$ +Last successful Puppet run 
was %a %d %b %Y %T %Z  exit 2
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I211555408a6da02653be0ceb14aee2a4a2563280
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Normalize mediawiki/core phplint job - change (integration/jenkins-job-builder-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Normalize mediawiki/core phplint job
..


Normalize mediawiki/core phplint job

When linting mediawiki/core, we want to avoid submodules present in wmf
branches.  To do we went with a specific template '{name}-lint' which
overriden the default git scm to prevent submodule processing.

Nowadays, '{name}-phplint' does not process submodules either so switch
to it and get rid of the '{name}-lint' job template.

Summary of the change:

* job is renamed from mediawiki-core-lint to mediawiki-core-phplint
  (requires a chnage in Zuul config)
* build history is bumped from 15 days to 90 days
* Git remote URL and reference repo now uses $ZUUL_PROJECT instead of
  hardcoded mediawiki/core

Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
---
M mediawiki.yaml
1 file changed, 1 insertion(+), 15 deletions(-)

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



diff --git a/mediawiki.yaml b/mediawiki.yaml
index c350707..6dcd1d5 100644
--- a/mediawiki.yaml
+++ b/mediawiki.yaml
@@ -6,20 +6,6 @@
 # submodules we do not care about. See bug 42455.
 
 - job-template:
-name: '{name}-lint'
-node: hasSlaveScripts  UbuntuPrecise
-defaults: use-zuul
-concurrent: true
-logrotate:
-daysToKeep: 15
-scm:
- - git-mwcore
-triggers:
- - zuul
-builders:
- - phplint
-
-- job-template:
 name: 'mediawiki-core-jslint'
 node: hasSlaveScripts  UbuntuPrecise
 defaults: use-zuul
@@ -266,7 +252,6 @@
 - job-group:
 name: mediawiki-jobs
 jobs:
-  - '{name}-lint'
   - 'mediawiki-core-jslint'
   - '{name}-qunit'
   - 'mediawiki-core-jsduck'
@@ -291,6 +276,7 @@
 databasetype:
   - sqlite
 jobs:
+  - '{name}-phplint'
   - mediawiki-gate
   - mediawiki-jobs
   - '{name}-phpcs-HEAD'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I735b7ac59dd89315d61f1ea207ad0dca7c09a092
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_solr into module - change (operations/puppet)

2014-09-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: nagios_common: Move check_solr into module
..

nagios_common: Move check_solr into module

Change-Id: Idcf524663602925afd12a7d0760b240fa93461e3
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_solr
A modules/nagios_common/files/check_commands/check_solr.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
5 files changed, 12 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/161943/1

diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index a0f5b12..0fea238 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -583,12 +583,6 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_solr':
-source = 'puppet:///files/icinga/check_solr',
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-}
 file { '/usr/lib/nagios/plugins/check_ssl_cert':
 source = 'puppet:///files/icinga/check_ssl_cert/check_ssl_cert',
 owner  = 'root',
diff --git a/files/icinga/check_solr 
b/modules/nagios_common/files/check_commands/check_solr
similarity index 100%
rename from files/icinga/check_solr
rename to modules/nagios_common/files/check_commands/check_solr
diff --git a/modules/nagios_common/files/check_commands/check_solr.cfg 
b/modules/nagios_common/files/check_commands/check_solr.cfg
new file mode 100644
index 000..33d5f9b
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_solr.cfg
@@ -0,0 +1,11 @@
+# Example usage:  check_solr!500:1000|5
+define command{
+command_namecheck_solr
+command_line$USER1$/check_solr -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
+}
+
+# Example usage:  check_replicated_solr!500:1000|5
+define command{
+command_namecheck_replicated_solr
+command_line$USER1$/check_solr -r -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index e775081..aa716b2 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -31,6 +31,7 @@
 'check_dsh_groups',
 'check_wikidata',
 'check_cert',
+'check_solr',
 ] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index bc7531b..0926fa1 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -85,18 +85,6 @@
 command_line$USER1$/check_http -S -H $HOSTADDRESS$ -p $ARG1$ -e 
$ARG2$
 }
 
-# Example usage:  check_solr!500:1000|5
-define command{
-command_namecheck_solr
-command_line$USER1$/check_solr -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
-}
-
-# Example usage:  check_replicated_solr!500:1000|5
-define command{
-command_namecheck_replicated_solr
-command_line$USER1$/check_solr -r -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
-}
-
 # 'check_ssl_cert'
 # Verify a SSL certificate is not going to expire in the next 14 days
 # Example usage:  check_ssl_cert!secure.wikimedia.org

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcf524663602925afd12a7d0760b240fa93461e3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] pywikibot/core now uses tox - change (integration/jenkins-job-builder-config)

2014-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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

Change subject: pywikibot/core now uses tox
..

pywikibot/core now uses tox

Drop the obsolete pywikibot/core jobs since we migrated to tox during
the summer.

Change-Id: I7cded49789973354caf56e3c9eea1898c75480e6
---
M pywikibot.yaml
1 file changed, 0 insertions(+), 19 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/44/161944/1

diff --git a/pywikibot.yaml b/pywikibot.yaml
index f3a57f5..b323562 100644
--- a/pywikibot.yaml
+++ b/pywikibot.yaml
@@ -33,22 +33,6 @@
 # hack to make sure we do not download dependencies from pip
 http_proxy=nowhere https_proxy=nowhere python setup.py test
 
-- job-template:
-name: 'pywikibot-core-pyflakes'
-node: hasContintPackages  UbuntuPrecise
-defaults: use-remote-zuul
-
-triggers:
- - zuul
-
-scm:
- - git-remote-zuul-no-submodules
-
-builders:
-# Zuul uses Python str.format(obj) for {config} substitutions
-# Escape as {foo} as {{key}} to avoid triggering a KeyError in Zuul parser
- - shell: pyflakes pywikibot scripts tests
-
 - project:
 name: 'pywikibot-bots-CommonsDelinker'
 toxenv:
@@ -71,10 +55,7 @@
  - nose
 
 jobs:
- - python-jobs
  - pywikibot-core-tests
- # Override pyflakes jobs that comes from `python-jobs`
- - pywikibot-core-pyflakes
  - '{name}-tox-{toxenv}'
 
 - project:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cded49789973354caf56e3c9eea1898c75480e6
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Fix PreviewTaskTests. - change (apps...wikipedia)

2014-09-22 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fix PreviewTaskTests.
..

Fix PreviewTaskTests.

MediaWiki seems to be returning a slightly different edit link anchor now.

Change-Id: I3b9e17798b2dd7d531388a411ef2c89307705836
---
M wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
index 4699fee..bb6c6c1 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/PreviewTaskTests.java
@@ -22,7 +22,7 @@
 final PageTitle title = new PageTitle(null, 
Test_page_for_app_testing/Section1, new Site(test.wikipedia.org));
 long randomTime = System.currentTimeMillis();
 final String wikitext = == Section 2 ==\n\nEditing section INSERT 
RANDOM  HERE test at  + randomTime;
-final String expected = div/divh2span class=\mw-headline\ 
id=\Section_2\Section 2/spana href=\#editor/1\ data-section=\1\ 
class=\edit-page icon icon-32px icon-edit 
enabled\Edit/a/h2div\npEditing section INSERT RANDOM amp; HERE test 
at  + randomTime + /p\n\n\n\n/div;
+final String expected = div/divh2span class=\mw-headline\ 
id=\Section_2\Section 2/spana href=\#/editor/1\ data-section=\1\ 
class=\edit-page icon icon-32px icon-edit 
enabled\Edit/a/h2div\npEditing section INSERT RANDOM amp; HERE test 
at  + randomTime + /p\n\n\n\n/div;
 final CountDownLatch completionLatch = new CountDownLatch(1);
 runTestOnUiThread(new Runnable() {
 @Override

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b9e17798b2dd7d531388a411ef2c89307705836
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant dbr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add stats group for link_count queries - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Add stats group for link_count queries
..

Add stats group for link_count queries

Change-Id: If4f0faf51c145d067996da70afb8842ad38ab106
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index cc16794..f2e31d3 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -129,6 +129,7 @@
\Elastica\Search::OPTION_SEARCH_TYPE_COUNT );
$matchAll = new \Elastica\Query\MatchAll();
$search-setQuery( new \Elastica\Query\Filtered( $matchAll, 
$filter ) );
+   $search-getQuery()-addParam( 'stats', 'link_count' );
return $search;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4f0faf51c145d067996da70afb8842ad38ab106
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow logged-in users to view and use the login form again - change (mediawiki/core)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow logged-in users to view and use the login form again
..


Allow logged-in users to view and use the login form again

The fix for bug 15484 (d0439af8) has introduced the behavior of
automatically redirecting users who view the login form when already
logged in to the requested 'returnto' location. If it was not given,
users were redirected to main page instead.

However, that has annoyed people who often switch between several
accounts and have grown accustomed to the old behavior of being able
to log in while logged in. Given that there are no conflicts between
these two features, let's just restore the old behavior when
Special:UserLogin is visited directly (no 'returnto' location given).

This reverts 5dfc57eb which removed then-dead code for showing login
form to logged-in users and tweaks an if() condition.

Bug: 70855
Change-Id: I7e40c13a6ca566b4d66d943c006af9edb6941ee9
---
M includes/specials/SpecialUserlogin.php
M includes/templates/Userlogin.php
M languages/i18n/en.json
M resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
4 files changed, 34 insertions(+), 8 deletions(-)

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



diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index 845413e..6de7c90 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -238,11 +238,19 @@
}
$this-setHeaders();
 
-   // In the case where the user is already logged in, do not show 
the login page.
-   // The use case scenario for this is when a user opens a large 
number of tabs, is
-   // redirected to the login page on all of them, and then logs 
in on one, expecting
-   // all the others to work properly.
-   if ( $this-mType !== 'signup'  !$this-mPosted  
$this-getUser()-isLoggedIn() ) {
+   // In the case where the user is already logged in, and was 
redirected to the login form from a
+   // page that requires login, do not show the login page. The 
use case scenario for this is when
+   // a user opens a large number of tabs, is redirected to the 
login page on all of them, and then
+   // logs in on one, expecting all the others to work properly.
+   //
+   // However, do show the form if it was visited intentionally 
(no 'returnto' is present). People
+   // who often switch between several accounts have grown 
accustomed to this behavior.
+   if (
+   $this-mType !== 'signup' 
+   !$this-mPosted 
+   $this-getUser()-isLoggedIn() 
+   ( $this-mReturnTo !== '' || $this-mReturnToQuery !== 
'' )
+   ) {
$this-successfulLogin();
}
 
@@ -1392,6 +1400,7 @@
$template-set( 'cansecurelogin', ( $wgSecureLogin === true ) );
$template-set( 'stickhttps', (int)$this-mStickHTTPS );
$template-set( 'loggedin', $user-isLoggedIn() );
+   $template-set( 'loggedinuser', $user-getName() );
 
if ( $this-mType == 'signup' ) {
if ( !self::getCreateaccountToken() ) {
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index ad01905..8bba426 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -37,6 +37,11 @@
?php } ?
div id=userloginForm
form name=userlogin class=mw-ui-vform method=post 
action=?php $this-text( 'action' ); ?
+   ?php if ( $this-data['loggedin'] ) { ?
+   div class=warningbox
+   ?php echo $this-getMsg( 
'userlogin-loggedin' )-params( $this-data['loggedinuser'] )-parse(); ?
+   /div
+   ?php } ?
section class=mw-form-header
?php $this-html( 'header' ); /* extensions 
such as ConfirmEdit add form HTML here */ ?
/section
@@ -166,9 +171,15 @@
/div
 
?php if ( $this-haveData( 'createOrLoginHref' ) ) { ?
-   div id=mw-createaccount-cta
-   ?php $this-msg( 'userlogin-noaccount' 
); ?a href=?php $this-text( 'createOrLoginHref' ); ? 
id=mw-createaccount-join tabindex=7  class=mw-ui-button 
mw-ui-progressive?php $this-msg( 'userlogin-joinproject' ); ?/a
-   /div
+   ?php if ( $this-data['loggedin'] ) { ?
+  

[MediaWiki-commits] [Gerrit] nagios_common: Extract user_definitions from icinga - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: nagios_common: Extract user_definitions from icinga
..


nagios_common: Extract user_definitions from icinga

- Use same config in shinken as well
- Add $PLUGINSDIR$ to refer to plugins folder.
  This is what shinken uses by default, and is
  way more descriptive anyway

Change-Id: I00691021a634a8568cc0485e48dbbdb8c59f78fe
---
M manifests/misc/icinga.pp
A modules/nagios_common/README
R modules/nagios_common/files/resource.cfg
A modules/nagios_common/manifests/user_macros.pp
M modules/shinken/manifests/server.pp
5 files changed, 46 insertions(+), 6 deletions(-)

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



diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 5fff988..1414921 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -214,11 +214,8 @@
 mode   = '0644',
 }
 
-file { '/etc/icinga/resource.cfg':
-source = 'puppet:///files/icinga/resource.cfg',
-owner  = 'root',
-group  = 'root',
-mode   = '0644',
+class { 'nagios_common::user_macros':
+notify = Service['icinga'],
 }
 
 file { '/etc/icinga/timeperiods.cfg':
diff --git a/modules/nagios_common/README b/modules/nagios_common/README
new file mode 100644
index 000..6c2b5cd
--- /dev/null
+++ b/modules/nagios_common/README
@@ -0,0 +1,3 @@
+This module contains config and code that can be shared across
+nagios compatible monitoring systems. Currently those
+are icinga and shinken. Code here should work in both of them.
diff --git a/files/icinga/resource.cfg 
b/modules/nagios_common/files/resource.cfg
similarity index 96%
rename from files/icinga/resource.cfg
rename to modules/nagios_common/files/resource.cfg
index 71c1bcf..f0f697f 100644
--- a/files/icinga/resource.cfg
+++ b/modules/nagios_common/files/resource.cfg
@@ -24,7 +24,7 @@
 
 # Sets $USER1$ to be the path to the plugins
 $USER1$=/usr/lib/nagios/plugins
-
+$PLUGINSDIR$=/usr/lib/nagios/plugins
 # Sets $USER2$ to be the path to percona-packaged checks
 $USER2$=/usr/lib/nagios/plugins/percona
 
diff --git a/modules/nagios_common/manifests/user_macros.pp 
b/modules/nagios_common/manifests/user_macros.pp
new file mode 100644
index 000..e05f788
--- /dev/null
+++ b/modules/nagios_common/manifests/user_macros.pp
@@ -0,0 +1,33 @@
+# = Class: nagios_common::user_macros
+# Defines $USERn$ macros for nagios compatible implementations
+# === Parameters
+# [*ensure*]
+#   present or absent, to make the definition
+#   present or absent. Defaults to present
+#
+# [*config_dir*]
+#   The base directory to put configuration in.
+#   Defaults to '/etc/icinga/'
+#
+# [*owner*]
+#   The user which should own the config file.
+#   Defaults to 'root'
+#
+# [*group*]
+#   The group which should own the config file.
+#   Defaults to 'root'
+#
+class nagios_common::user_macros(
+$ensure = present,
+$config_dir = '/etc/icinga/',
+$owner = 'root',
+$group = 'root',
+){
+file { $config_dir/resource.cfg:
+ensure = $ensure,
+source = 'puppet:///modules/nagios_common/resource.cfg',
+owner  = $owner,
+group  = $group,
+mode   = '0644',
+}
+}
diff --git a/modules/shinken/manifests/server.pp 
b/modules/shinken/manifests/server.pp
index 1695743..aa93224 100644
--- a/modules/shinken/manifests/server.pp
+++ b/modules/shinken/manifests/server.pp
@@ -54,6 +54,13 @@
 require = Package['shinken'],
 notify  = Service['shinken'],
 }
+class { 'nagios_common::user_macros':
+config_dir = '/etc/shinken',
+owner  = 'shinken',
+group  = 'shinken',
+notify = Service['shinken'],
+require= Package['shinken'],
+}
 
 # Default localhost config, we do not need this
 file { '/etc/shinken/hosts/localhost.cfg':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00691021a634a8568cc0485e48dbbdb8c59f78fe
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] pywikibot/core now uses tox - change (integration/jenkins-job-builder-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: pywikibot/core now uses tox
..


pywikibot/core now uses tox

Drop the obsolete pywikibot/core jobs since we migrated to tox during
the summer.

Change-Id: I7cded49789973354caf56e3c9eea1898c75480e6
---
M pywikibot.yaml
1 file changed, 0 insertions(+), 19 deletions(-)

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



diff --git a/pywikibot.yaml b/pywikibot.yaml
index f3a57f5..b323562 100644
--- a/pywikibot.yaml
+++ b/pywikibot.yaml
@@ -33,22 +33,6 @@
 # hack to make sure we do not download dependencies from pip
 http_proxy=nowhere https_proxy=nowhere python setup.py test
 
-- job-template:
-name: 'pywikibot-core-pyflakes'
-node: hasContintPackages  UbuntuPrecise
-defaults: use-remote-zuul
-
-triggers:
- - zuul
-
-scm:
- - git-remote-zuul-no-submodules
-
-builders:
-# Zuul uses Python str.format(obj) for {config} substitutions
-# Escape as {foo} as {{key}} to avoid triggering a KeyError in Zuul parser
- - shell: pyflakes pywikibot scripts tests
-
 - project:
 name: 'pywikibot-bots-CommonsDelinker'
 toxenv:
@@ -71,10 +55,7 @@
  - nose
 
 jobs:
- - python-jobs
  - pywikibot-core-tests
- # Override pyflakes jobs that comes from `python-jobs`
- - pywikibot-core-pyflakes
  - '{name}-tox-{toxenv}'
 
 - project:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7cded49789973354caf56e3c9eea1898c75480e6
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] nagios_common: Refactor custom command definitions - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: nagios_common: Refactor custom command definitions
..


nagios_common: Refactor custom command definitions

- Setup a check_command define
- Separate commands config into one file per set of commands
- Move command config into a folder /etc/icinga/commands
- Move check_graphite to use the new system
- Setup a class that'll house all check_commands
- Setup custom checks in shinken as well

TODO:

- Need to find a way to specify a template as well. See
  PS6 of this change for issues with that

Change-Id: I3c3bc48bf8730cd262ec32785ee6a7360f7e24aa
---
M files/icinga/icinga.cfg
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_graphite
A modules/nagios_common/files/check_commands/check_graphite.cfg
A modules/nagios_common/manifests/check_command.pp
A modules/nagios_common/manifests/commands.pp
M modules/shinken/files/shinken.cfg
M modules/shinken/manifests/server.pp
M templates/icinga/checkcommands.cfg.erb
9 files changed, 118 insertions(+), 21 deletions(-)

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



diff --git a/files/icinga/icinga.cfg b/files/icinga/icinga.cfg
index f2fba6a..9991ee2 100644
--- a/files/icinga/icinga.cfg
+++ b/files/icinga/icinga.cfg
@@ -16,6 +16,7 @@
 
 # Commands definitions
 cfg_file=/etc/icinga/checkcommands.cfg
+cfg_dir=/etc/icinga/commands
 # Misc commands (notification and event handler commands, etc)
 cfg_file=/etc/icinga/misccommands.cfg
 
diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 1414921..fdc6340 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -619,12 +619,11 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_graphite':
-source = 'puppet:///files/icinga/check_graphite',
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
+
+class { 'nagios_common::commands':
+notify = Service['icinga'],
 }
+
 # Include check_elasticsearch from elasticsearch module
 include elasticsearch::nagios::plugin
 
diff --git a/files/icinga/check_graphite 
b/modules/nagios_common/files/check_commands/check_graphite
similarity index 100%
rename from files/icinga/check_graphite
rename to modules/nagios_common/files/check_commands/check_graphite
diff --git a/modules/nagios_common/files/check_commands/check_graphite.cfg 
b/modules/nagios_common/files/check_commands/check_graphite.cfg
new file mode 100644
index 000..b8baf3a
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_graphite.cfg
@@ -0,0 +1,16 @@
+# This file is managed by puppet
+# Generic checks for graphite
+define command{
+command_namecheck_graphite_threshold
+command_line$USER1$/check_graphite -U $ARG1$ -T $ARG2$ check_threshold 
'$ARG3$' -W $ARG4$ -C $ARG5$ --from $ARG6$ --perc $ARG7$ $ARG8$
+}
+
+define command{
+command_namecheck_graphite_series_threshold
+command_line$USER1$/check_graphite -U $ARG1$ -T $ARG2$ 
check_series_threshold '$ARG3$' -W $ARG4$ -C $ARG5$ --from $ARG6$ --perc $ARG7$ 
$ARG8$
+}
+
+define command{
+command_namecheck_graphite_anomaly
+command_line$USER1$/check_graphite -U $ARG1$ -T $ARG2$ check_anomaly 
'$ARG3$' -W $ARG4$ -C $ARG5$ --check_window $ARG6$ $ARG7$
+}
diff --git a/modules/nagios_common/manifests/check_command.pp 
b/modules/nagios_common/manifests/check_command.pp
new file mode 100644
index 000..f414019
--- /dev/null
+++ b/modules/nagios_common/manifests/check_command.pp
@@ -0,0 +1,52 @@
+# = Define: nagios_common::check_command
+# Defines a custom check command and configuration for that
+# command
+
+# [*ensure*]
+#   present or absent, to make the definition
+#   present or absent. Defaults to present
+#
+# [*config_dir*]
+#   The base directory to put configuration in.
+#   Defaults to '/etc/icinga/'
+#
+# [*plugin_source*]
+#   Path to source for the executable plugin file.
+#   Defaults to puppet:///modules/nagios_common/check_commands/$title
+#
+# [*plugin_source*]
+#   Path to source for the plugin configuration.
+#   Defaults to puppet:///modules/nagios_common/check_commands/$title.cfg
+#
+# [*owner*]
+#   The user which should own the config file.
+#   Defaults to 'root'
+#
+# [*group*]
+#   The group which should own the config file.
+#   Defaults to 'root'
+#
+define nagios_common::check_command(
+$ensure = present,
+$config_dir = '/etc/icinga',
+$plugin_source = puppet:///modules/nagios_common/check_commands/$title,
+$config_source = 
puppet:///modules/nagios_common/check_commands/$title.cfg,
+$owner = 'root',
+$group = 'root',
+) {
+
+file { /usr/lib/nagios/plugins/$title:
+ensure = $ensure,
+source = $plugin_source,
+owner  = 'root',
+group  = 'root',
+mode   = '0755',
+}
+
+

[MediaWiki-commits] [Gerrit] [WIP] Display search results - change (mediawiki...Flow)

2014-09-22 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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

Change subject: [WIP] Display search results
..

[WIP] Display search results

Change-Id: Id8ee99f0bb3f35df55092cffa6f3a02ce4a69bfe
---
M Flow.alias.php
M Flow.php
M autoload.php
M handlebars/Makefile
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
A handlebars/compiled/flow_search.handlebars.php
A handlebars/flow_search.handlebars
M i18n/en.json
M i18n/qqq.json
A includes/SpecialFlowSearch.php
10 files changed, 366 insertions(+), 2 deletions(-)


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

diff --git a/Flow.alias.php b/Flow.alias.php
index 3ab8cc0..e23fe68 100644
--- a/Flow.alias.php
+++ b/Flow.alias.php
@@ -11,6 +11,7 @@
 /** English (English) */
 $specialPageAliases['en'] = array(
'Flow' = array( 'Flow' ),
+   'FlowSearch' = array( 'FlowSearch' ),
 );
 
 /** Arabic (العربية) */
diff --git a/Flow.php b/Flow.php
index 9497ae1..ab8f1e9 100755
--- a/Flow.php
+++ b/Flow.php
@@ -62,11 +62,16 @@
 $wgAPIModules['flow'] = 'ApiFlow';
 $wgAPIPropModules['flowinfo'] = 'ApiQueryPropFlowInfo';
 
-// Special:Flow
 $wgExtensionMessagesFiles['FlowAlias'] = $dir . 'Flow.alias.php';
+
+// Special:Flow
 $wgSpecialPages['Flow'] = 'Flow\SpecialFlow';
 $wgSpecialPageGroups['Flow'] = 'redirects';
 
+// Special:FlowSearch
+$wgSpecialPages['FlowSearch'] = 'Flow\SpecialFlowSearch';
+$wgSpecialPageGroups['FlowSearch'] = 'other';
+
 // Housekeeping hooks
 $wgHooks['LoadExtensionSchemaUpdates'][] = 'FlowHooks::getSchemaUpdates';
 $wgHooks['GetPreferences'][] = 'FlowHooks::onGetPreferences';
diff --git a/autoload.php b/autoload.php
index f4a32f7..ed6f057 100644
--- a/autoload.php
+++ b/autoload.php
@@ -220,6 +220,7 @@
 $wgAutoloadClasses['Flow\\SpamFilter\\SpamFilter'] = __DIR__ . 
'/includes/SpamFilter/SpamFilter.php';
 $wgAutoloadClasses['Flow\\SpamFilter\\SpamRegex'] = __DIR__ . 
'/includes/SpamFilter/SpamRegex.php';
 $wgAutoloadClasses['Flow\\SpecialFlow'] = __DIR__ . 
'/includes/SpecialFlow.php';
+$wgAutoloadClasses['Flow\\SpecialFlowSearch'] = __DIR__ . 
'/includes/SpecialFlowSearch.php';
 $wgAutoloadClasses['Flow\\SubmissionHandler'] = __DIR__ . 
'/includes/SubmissionHandler.php';
 $wgAutoloadClasses['Flow\\TalkpageManager'] = __DIR__ . 
'/includes/TalkpageManager.php';
 $wgAutoloadClasses['Flow\\TemplateHelper'] = __DIR__ . 
'/includes/TemplateHelper.php';
diff --git a/handlebars/Makefile b/handlebars/Makefile
index 8f81db9..b98c996 100644
--- a/handlebars/Makefile
+++ b/handlebars/Makefile
@@ -49,6 +49,7 @@
compiled/flow_board.handlebars.php \
compiled/flow_form_buttons.handlebars.php \
compiled/flow_post.handlebars.php \
+   compiled/flow_search.handlebars.php \
compiled/flow_tooltip.handlebars.php \
compiled/timestamp.handlebars.php
 
@@ -177,6 +178,10 @@
$(POST_SUBTEMPLATES)
$(COMPILE) flow_post
 
+compiled/flow_search.handlebars.php: \
+   flow_search.handlebars
+   $(COMPILE) flow_search
+
 compiled/flow_tooltip.handlebars.php: \
flow_tooltip.handlebars
$(COMPILE) flow_tooltip
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 23cd539..a1a1de6 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -50,11 +50,16 @@
 
input type=hidden name=wpEditToken 
value='.htmlentities(((is_array($cx['scopes'][0])  
isset($cx['scopes'][0]['editToken'])) ? $cx['scopes'][0]['editToken'] : null), 
ENT_QUOTES, 'UTF-8').' /
textarea name=topic_reason
+ required
+ data-flow-expandable=true
+ class=mw-ui-input
+ data-role=content
  placeholder='.LCRun3::ch($cx, 'l10n', 
Array(Array(LCRun3::ch($cx, 'concat', 
Array(Array('flow-moderation-placeholder-',((is_array($cx['scopes'][0]['submitted'])
  isset($cx['scopes'][0]['submitted']['moderationState'])) ? 
$cx['scopes'][0]['submitted']['moderationState'] : null),'-post'),Array()), 
'raw')),Array()), 'encq').''.((LCRun3::ifvar($cx, 
((is_array($cx['scopes'][0]['submitted'])  
isset($cx['scopes'][0]['submitted']['reason'])) ? 
$cx['scopes'][0]['submitted']['reason'] : null))) ? 
''.htmlentities(((is_array($cx['scopes'][0]['submitted'])  
isset($cx['scopes'][0]['submitted']['reason'])) ? 
$cx['scopes'][0]['submitted']['reason'] : null), ENT_QUOTES, 'UTF-8').'' : 
'').'/textarea
div class=flow-form-actions flow-form-collapsible
button data-flow-interactive-handler=apiRequest
data-flow-api-handler=moderatePost
-   class=mw-ui-button 

[MediaWiki-commits] [Gerrit] Remove tridge - change (operations/puppet)

2014-09-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Remove tridge
..

Remove tridge

Remove tridge from site.pp as it is ready for decomissioning

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/161948/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 76a1fc4..abb86d2 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2957,12 +2957,6 @@
 include role::archiva
 }
 
-
-node 'tridge.wikimedia.org' {
-include standard
-include admin
-}
-
 # tmh1001/tmh1002 video encoding server (precise only)
 node /^tmh100[1-2]\.eqiad\.wmnet/ {
 include admin

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fb534def3356019a4a05512edf1161e9614e9f3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_dsh_groups into module - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: nagios_common: Move check_dsh_groups into module
..


nagios_common: Move check_dsh_groups into module

Change-Id: I7ab9d5aee917b2ce8b2713cc41c93941728d3853
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_dsh_groups
A modules/nagios_common/files/check_commands/check_dsh_groups.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
5 files changed, 9 insertions(+), 13 deletions(-)

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



diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index fdc6340..2dbf3fc 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -577,12 +577,6 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_dsh_groups':
-source = 'puppet:///files/icinga/check_dsh_groups',
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-}
 file { '/usr/lib/nagios/plugins/check_longqueries':
 source = 'puppet:///files/icinga/check_longqueries',
 owner  = 'root',
diff --git a/files/icinga/check_dsh_groups 
b/modules/nagios_common/files/check_commands/check_dsh_groups
similarity index 100%
rename from files/icinga/check_dsh_groups
rename to modules/nagios_common/files/check_commands/check_dsh_groups
diff --git a/modules/nagios_common/files/check_commands/check_dsh_groups.cfg 
b/modules/nagios_common/files/check_commands/check_dsh_groups.cfg
new file mode 100644
index 000..2e35754
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_dsh_groups.cfg
@@ -0,0 +1,5 @@
+# Checks whether a host belongs to given dsh group(s)
+define command{
+command_namecheck_dsh_groups
+command_line$USER1$/check_dsh_groups $HOSTNAME$ $ARG1$
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index f8071d4..ee69f66 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -26,7 +26,10 @@
 mode   = '0755',
 }
 
-nagios_common::check_command { 'check_graphite':
+nagios_common::check_command { [
+'check_graphite',
+'check_dsh_groups'
+] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
 owner  = $owner,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 5f708b0..c69e3a3 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -521,12 +521,6 @@
 }
 
 
-# Checks whether a host belongs to given dsh group(s)
-define command{
-command_namecheck_dsh_groups
-command_line$USER1$/check_dsh_groups $HOSTNAME$ $ARG1$
-}
-
 # check Online Content Generator health from server health page
 define command{
 command_namenrpe_check_ocg_health

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ab9d5aee917b2ce8b2713cc41c93941728d3853
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] nagios_common: Move wikidata check into module - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: nagios_common: Move wikidata check into module
..


nagios_common: Move wikidata check into module

Change-Id: I77981e33b09489cc9b19f583c8d38c3548f5069f
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_wikidata
A modules/nagios_common/files/check_commands/check_wikidata.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
5 files changed, 7 insertions(+), 13 deletions(-)

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



diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 2dbf3fc..5187b7b 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -795,12 +795,6 @@
 ip_address = '91.198.174.192',
 }
 
-file { '/usr/local/lib/nagios/plugins/check_wikidata':
-ensure = present,
-mode   = '0555',
-source = 'puppet:///files/icinga/check_wikidata',
-}
-
 monitor_service { 'wikidata.org dispatch lag':
 description   = 'check if wikidata.org dispatch lag is higher than 2 
minutes',
 check_command = 'check_wikidata',
diff --git a/files/icinga/check_wikidata 
b/modules/nagios_common/files/check_commands/check_wikidata
similarity index 100%
rename from files/icinga/check_wikidata
rename to modules/nagios_common/files/check_commands/check_wikidata
diff --git a/modules/nagios_common/files/check_commands/check_wikidata.cfg 
b/modules/nagios_common/files/check_commands/check_wikidata.cfg
new file mode 100644
index 000..d592643
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_wikidata.cfg
@@ -0,0 +1,5 @@
+# monitor wikidata
+define command{
+command_namecheck_wikidata
+command_line/usr/local/lib/nagios/plugins/check_wikidata
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index ee69f66..412f5a5 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -28,7 +28,8 @@
 
 nagios_common::check_command { [
 'check_graphite',
-'check_dsh_groups'
+'check_dsh_groups',
+'check_wikidata',
 ] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index c69e3a3..95803af 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -526,9 +526,3 @@
 command_namenrpe_check_ocg_health
 command_line/usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c 
check_ocg_health
 }
-
-# monitor wikidata
-define command{
-command_namecheck_wikidata
-command_line/usr/local/lib/nagios/plugins/check_wikidata
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77981e33b09489cc9b19f583c8d38c3548f5069f
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_solr into module - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: nagios_common: Move check_solr into module
..


nagios_common: Move check_solr into module

Change-Id: Idcf524663602925afd12a7d0760b240fa93461e3
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_solr
A modules/nagios_common/files/check_commands/check_solr.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
5 files changed, 12 insertions(+), 18 deletions(-)

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



diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index a0f5b12..0fea238 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -583,12 +583,6 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_solr':
-source = 'puppet:///files/icinga/check_solr',
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-}
 file { '/usr/lib/nagios/plugins/check_ssl_cert':
 source = 'puppet:///files/icinga/check_ssl_cert/check_ssl_cert',
 owner  = 'root',
diff --git a/files/icinga/check_solr 
b/modules/nagios_common/files/check_commands/check_solr
similarity index 100%
rename from files/icinga/check_solr
rename to modules/nagios_common/files/check_commands/check_solr
diff --git a/modules/nagios_common/files/check_commands/check_solr.cfg 
b/modules/nagios_common/files/check_commands/check_solr.cfg
new file mode 100644
index 000..33d5f9b
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_solr.cfg
@@ -0,0 +1,11 @@
+# Example usage:  check_solr!500:1000|5
+define command{
+command_namecheck_solr
+command_line$USER1$/check_solr -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
+}
+
+# Example usage:  check_replicated_solr!500:1000|5
+define command{
+command_namecheck_replicated_solr
+command_line$USER1$/check_solr -r -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index e775081..aa716b2 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -31,6 +31,7 @@
 'check_dsh_groups',
 'check_wikidata',
 'check_cert',
+'check_solr',
 ] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index bc7531b..0926fa1 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -85,18 +85,6 @@
 command_line$USER1$/check_http -S -H $HOSTADDRESS$ -p $ARG1$ -e 
$ARG2$
 }
 
-# Example usage:  check_solr!500:1000|5
-define command{
-command_namecheck_solr
-command_line$USER1$/check_solr -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
-}
-
-# Example usage:  check_replicated_solr!500:1000|5
-define command{
-command_namecheck_replicated_solr
-command_line$USER1$/check_solr -r -a $ARG1$ -t $ARG2$ $HOSTADDRESS$
-}
-
 # 'check_ssl_cert'
 # Verify a SSL certificate is not going to expire in the next 14 days
 # Example usage:  check_ssl_cert!secure.wikimedia.org

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcf524663602925afd12a7d0760b240fa93461e3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_cert into module - change (operations/puppet)

2014-09-22 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: nagios_common: Move check_cert into module
..


nagios_common: Move check_cert into module

Change-Id: I211555408a6da02653be0ceb14aee2a4a2563280
---
M manifests/misc/icinga.pp
R modules/nagios_common/files/check_commands/check_cert
A modules/nagios_common/files/check_commands/check_cert.cfg
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
5 files changed, 5 insertions(+), 11 deletions(-)

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



diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 5187b7b..a0f5b12 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -565,12 +565,6 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_cert':
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-source = 'puppet:///files/icinga/check_cert',
-}
 file { '/usr/lib/nagios/plugins/check_all_memcached.php':
 source = 'puppet:///files/icinga/check_all_memcached.php',
 owner  = 'root',
diff --git a/files/icinga/check_cert 
b/modules/nagios_common/files/check_commands/check_cert
similarity index 100%
rename from files/icinga/check_cert
rename to modules/nagios_common/files/check_commands/check_cert
diff --git a/modules/nagios_common/files/check_commands/check_cert.cfg 
b/modules/nagios_common/files/check_commands/check_cert.cfg
new file mode 100644
index 000..0a0b54e
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_cert.cfg
@@ -0,0 +1,4 @@
+define command{
+command_namecheck_cert
+command_line$USER1$/check_cert $ARG1$ $ARG2$ $ARG3$
+}
diff --git a/modules/nagios_common/manifests/commands.pp 
b/modules/nagios_common/manifests/commands.pp
index 412f5a5..e775081 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -30,6 +30,7 @@
 'check_graphite',
 'check_dsh_groups',
 'check_wikidata',
+'check_cert',
 ] :
 require= File[$config_dir/commands],
 config_dir = $config_dir,
diff --git a/templates/icinga/checkcommands.cfg.erb 
b/templates/icinga/checkcommands.cfg.erb
index 95803af..bc7531b 100644
--- a/templates/icinga/checkcommands.cfg.erb
+++ b/templates/icinga/checkcommands.cfg.erb
@@ -406,11 +406,6 @@
 }
 
 define command{
-command_namecheck_cert
-command_line$USER1$/check_cert $ARG1$ $ARG2$ $ARG3$
-}
-
-define command{
 command_namepuppet-FAIL
 command_linedate --date @$LASTSERVICEOK$ +Last successful Puppet run 
was %a %d %b %Y %T %Z  exit 2
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I211555408a6da02653be0ceb14aee2a4a2563280
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Reuse static toolbar button DOM nodes - change (mediawiki...Wikibase)

2014-09-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Reuse static toolbar button DOM nodes
..

Reuse static toolbar button DOM nodes

Instead of generating new HTML nodes, existing button nodes are detected and 
the button widgets
are initialized on top of these nodes.

Change-Id: Iecafe159f4f9dbd60f658222745e10ffaa231f36
---
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.toolbarbutton.js
M repo/includes/View/ClaimsView.php
M repo/includes/View/SectionEditLinkGenerator.php
5 files changed, 98 insertions(+), 26 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
index 8982d01..327c94f 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
@@ -100,7 +100,9 @@
 
this._buttons = {};
 
-   this._initToolbar();
+   this._initSubToolbar();
+   this._attachEventHandlers();
+   this._toNonEditMode();
},
 
/**
@@ -152,21 +154,42 @@
return missingMethods;
},
 
-   _initToolbar: function() {
+   /**
+* Initializes the sub toolbar encapsulating the toolbar buttons 
excluding the tooltip anchor.
+*/
+   _initSubToolbar: function() {
var $container = this._getContainer(),
-   $toolbar = $container.children( '.wikibase-toolbar' );
+   $subToolbar = $container.children( '.wikibase-toolbar' 
);
 
-   if( !$toolbar.length ) {
-   $toolbar = $( 'span/' ).appendTo( $container );
+   if( !$subToolbar.length ) {
+   $subToolbar = $( 'span/' ).appendTo( $container );
+   } else {
+   this._scrapeButtons( $subToolbar );
}
 
-   $toolbar.toolbar( {
+   $subToolbar.toolbar( {
renderItemSeparators: true
} );
+   },
 
-   this._attachEventHandlers();
+   /**
+* Analyzes a DOM structure in order to detect and reuse button nodes.
+*
+* @param {jQuery} $subToolbar
+*/
+   _scrapeButtons: function( $subToolbar ) {
+   var self = this;
 
-   this._toNonEditMode();
+   $subToolbar.children( '.wikibase-toolbar-button' ).each( 
function() {
+   var $button = $( this );
+   $.each( self.options.buttonLabels, function( 
buttonName, label ) {
+   if( $button.text() === label ) {
+   self._buttons[buttonName] = 
$button.toolbarbutton( {
+   $label: 
self.options.buttonLabels[buttonName]
+   } );
+   }
+   } );
+   } );
},
 
_attachEventHandlers: function() {
@@ -262,15 +285,15 @@
return;
}
 
-   var $editGroup = this._getContainer().children( 
':wikibase-toolbar' ),
-   editGroup = $editGroup.data( 'toolbar' );
+   var $subToolbar = this._getContainer().children( 
':wikibase-toolbar' ),
+   subToolbar = $subToolbar.data( 'toolbar' );
 
var $buttons = this.getButton( 'save' ).element;
if( $.isFunction( this.options.onRemove ) ) {
$buttons = $buttons.add( this.getButton( 'remove' 
).element );
}
$buttons = $buttons.add( this.getButton( 'cancel' ).element );
-   editGroup.option( '$content', $buttons );
+   subToolbar.option( '$content', $buttons );
 
this._getContainer()
.append( this._getTooltipAnchor() )
@@ -297,10 +320,10 @@
this._$tooltipAnchor.detach();
}
 
-   var $editGroup = this._getContainer().children( 
':wikibase-toolbar' ),
-   editGroup = $editGroup.data( 'toolbar' );
+   var $subToolbar = this._getContainer().children( 
':wikibase-toolbar' ),
+   subToolbar = $subToolbar.data( 'toolbar' );
 
-   editGroup.option( '$content', this.getButton( 'edit' ).element 
);
+   subToolbar.option( '$content', this.getButton( 'edit' ).element 
);
 

[MediaWiki-commits] [Gerrit] Stop tying Oozie's “data_directory” to webrequests table - change (analytics/refinery)

2014-09-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Stop tying Oozie's “data_directory” to webrequests table
..


Stop tying Oozie's “data_directory” to webrequests table

Oozie's “data_directory” setting was pointing to the directory of a
webrequest_source partition. Both this naming and the tying in the
webrequest_source partition would have caused problems for the
upcoming addition of webstastcollector.

The naming was in the way, because when including the webrequest's
dataset definitions in webstatscollector, they would have required the
global “data_directory” variable to point to the /webrequests/ data
directory.

Including the webrequest_source partition in the “data_directory”
setting was nice when only dealing with a single source per
coordinator. But for webstatscollector, we need to pull in data from
both text and mobile sources in one go. This would not easily be
possible when having the webrequest_source into “data_directory”.

Hence, we construct the dataset's locations from a more general
data_directory, materialize the data set definitions for the
webrequest sources, and use parametrized names to refer to them.

Change-Id: I4f3b00089728627a8c36de4a9b184ef0bc0691c6
---
M oozie/webrequest/datasets.xml
M oozie/webrequest/partition/add/bundle.properties
M oozie/webrequest/partition/add/bundle.xml
M oozie/webrequest/partition/add/coordinator.xml
M oozie/webrequest/partition/monitor_done_flag/bundle.properties
M oozie/webrequest/partition/monitor_done_flag/bundle.xml
M oozie/webrequest/partition/monitor_done_flag/coordinator.xml
7 files changed, 61 insertions(+), 20 deletions(-)

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



diff --git a/oozie/webrequest/datasets.xml b/oozie/webrequest/datasets.xml
index efa26d9..d6e6507 100644
--- a/oozie/webrequest/datasets.xml
+++ b/oozie/webrequest/datasets.xml
@@ -5,38 +5,79 @@
 
 ${start_time} - the initial instance of your data.
 Example: 2014-04-01T00:00Z
-${data_directory} - Path to directory where data is time bucketed.
-Example: 
/wmf/data/raw/webrequest/webrequest_mobile/hourly
+${webrequest_data_directory} - Path to directory where data is time 
bucketed.
+Example: /wmf/data/raw/webrequest
 --
 
 datasets
 !--
-The webrequest_unchecked dataset should be used for cases
-where you do not care if the sequence stats have been
-checked.  This will simply include any imported hourly
-data directories that exist.
+The webrequest_*_unchecked datasets should be used for cases where you do
+not care if the sequence stats have been checked.  This will simply include
+any imported hourly data directories that exist.
 --
-dataset name=webrequest_unchecked
+dataset name=webrequest_bits_unchecked
  frequency=${coord:hours(1)}
  initial-instance=${start_time}
  timezone=Universal
-
uri-template${data_directory}/${YEAR}/${MONTH}/${DAY}/${HOUR}/uri-template
+
uri-template${webrequest_data_directory}/webrequest_bits/hourly/${YEAR}/${MONTH}/${DAY}/${HOUR}/uri-template
+done-flag/done-flag
+/dataset
+dataset name=webrequest_mobile_unchecked
+ frequency=${coord:hours(1)}
+ initial-instance=${start_time}
+ timezone=Universal
+
uri-template${webrequest_data_directory}/webrequest_mobile/hourly/${YEAR}/${MONTH}/${DAY}/${HOUR}/uri-template
+done-flag/done-flag
+/dataset
+dataset name=webrequest_text_unchecked
+ frequency=${coord:hours(1)}
+ initial-instance=${start_time}
+ timezone=Universal
+
uri-template${webrequest_data_directory}/webrequest_text/hourly/${YEAR}/${MONTH}/${DAY}/${HOUR}/uri-template
+done-flag/done-flag
+/dataset
+dataset name=webrequest_upload_unchecked
+ frequency=${coord:hours(1)}
+ initial-instance=${start_time}
+ timezone=Universal
+
uri-template${webrequest_data_directory}/webrequest_upload/hourly/${YEAR}/${MONTH}/${DAY}/${HOUR}/uri-template
 done-flag/done-flag
 /dataset
 
 !--
-The webrequest dataset should be used if you want to be
+The webrequest_* datasets should be used if you want to be
 sure that you are only working with hourly imports for which
 sequence stats have been checked.  These directories have an
 empty _SUCCESS flag created in them once they have been checked
 and it has been determined that the expected number of requests
 equals the actual number of entires for this hour.
 --
-dataset name=webrequest
+dataset name=webrequest_bits
  frequency=${coord:hours(1)}
  initial-instance=${start_time}
  timezone=Universal
-

[MediaWiki-commits] [Gerrit] Add REL1_24 as branch in ExtensionDistributor - change (operations/mediawiki-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add REL1_24 as branch in ExtensionDistributor
..


Add REL1_24 as branch in ExtensionDistributor

Message already exist: I4ea87b710d7a3e30a938817179483248db316a22

Change-Id: I8652f954ab377c4faa29b82e4f34228e66d8a835
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 44f485e..e6b2eae 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -806,6 +806,7 @@
// extension distributor messages for mediawiki.org in 
WikimediaMessages/i18n/wikimedia/*.json too
$wgExtDistSnapshotRefs = array(
'master',
+   'REL1_24',
'REL1_23',
'REL1_22',
'REL1_21',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8652f954ab377c4faa29b82e4f34228e66d8a835
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 'securepoll-create-poll' for sysop on testwiki - change (operations/mediawiki-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: 'securepoll-create-poll' for sysop on testwiki
..


'securepoll-create-poll' for sysop on testwiki

For SecurePoll testing.

Change-Id: I7d655f9adf65626cff60169c1a48a109497d0466
---
M wmf-config/InitialiseSettings.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4450a63..198b3b9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7647,7 +7647,11 @@
'upload' = true, // Exception to bug 12556, used for 
testing of upload tools
),
'templateeditor' = array( 'templateeditor' = true, 
'tboverride' = true, ), //bug 59084
-   'sysop' = array( 'deleterevision' = true, 'templateeditor' = 
true ),
+   'sysop' = array(
+   'deleterevision' = true,
+   'templateeditor' = true,
+   'securepoll-create-poll' = true,
+   ),
'reviewer' = array(
'stablesettings' = true,
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d655f9adf65626cff60169c1a48a109497d0466
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Deskana dga...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Move Oozie's “marking directory done” into separate workflow - change (analytics/refinery)

2014-09-22 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Move Oozie's “marking directory done” into separate workflow
..


Move Oozie's “marking directory done” into separate workflow

With this refactor, the upcoming addition of webstatscollector can
reuse the code to mark its directory done upon success.

Change-Id: Ie557acff61b907e0a43c45f0ca82b5bf43a800d6
---
A oozie/util/mark_directory_done/workflow.xml
M oozie/webrequest/partition/add/bundle.properties
M oozie/webrequest/partition/add/coordinator.xml
M oozie/webrequest/partition/add/workflow.xml
4 files changed, 56 insertions(+), 3 deletions(-)

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



diff --git a/oozie/util/mark_directory_done/workflow.xml 
b/oozie/util/mark_directory_done/workflow.xml
new file mode 100644
index 000..e47050d
--- /dev/null
+++ b/oozie/util/mark_directory_done/workflow.xml
@@ -0,0 +1,39 @@
+?xml version=1.0 encoding=UTF-8?
+workflow-app xmlns=uri:oozie:workflow:0.4
+name=mark-directory-done-wf-${directory}
+
+parameters
+property
+namedone_file/name
+value_SUCCESS/value
+description
+The name of the file to flag a directory as “done”.
+/description
+/property
+
+!-- Required properties --
+property
+namedirectory/name
+description
+The directory to mark “done”.
+
+The done file will get generated in this directory.
+/description
+/property
+/parameters
+
+start to=mark_directory_done/
+
+action name=mark_directory_done
+fs
+touchz path=${directory}/${done_file} /
+/fs
+ok to=end/
+error to=kill/
+/action
+
+kill name=kill
+messageAction failed, error 
message[${wf:errorMessage(wf:lastErrorNode())}]/message
+/kill
+end name=end/
+/workflow-app
diff --git a/oozie/webrequest/partition/add/bundle.properties 
b/oozie/webrequest/partition/add/bundle.properties
index 7a83eca..d7a8177 100644
--- a/oozie/webrequest/partition/add/bundle.properties
+++ b/oozie/webrequest/partition/add/bundle.properties
@@ -33,6 +33,9 @@
 # Workflow to add a partition
 add_partition_workflow_file   = 
${oozie_directory}/util/hive/partition/add/workflow.xml
 
+# Workflow to mark a directory as done
+mark_directory_done_workflow_file = 
${oozie_directory}/util/mark_directory_done/workflow.xml
+
 # HDFS path to hive-site.xml file.  This is needed to run hive actions.
 hive_site_xml = ${oozie_directory}/util/hive/hive-site.xml
 
diff --git a/oozie/webrequest/partition/add/coordinator.xml 
b/oozie/webrequest/partition/add/coordinator.xml
index 14c9055..2f80ed0 100644
--- a/oozie/webrequest/partition/add/coordinator.xml
+++ b/oozie/webrequest/partition/add/coordinator.xml
@@ -26,6 +26,7 @@
 propertynamestatistics_table/name/property
 propertynamewebrequest_source/name/property
 propertynamefaulty_hosts_directory/name/property
+propertynamemark_directory_done_workflow_file/name/property
 /parameters
 
 controls
diff --git a/oozie/webrequest/partition/add/workflow.xml 
b/oozie/webrequest/partition/add/workflow.xml
index b3287c2..10779c8 100644
--- a/oozie/webrequest/partition/add/workflow.xml
+++ b/oozie/webrequest/partition/add/workflow.xml
@@ -61,6 +61,10 @@
 obviously faulty hosts will get collected.
 /description
 /property
+property
+namemark_directory_done_workflow_file/name
+descriptionWorkflow for marking a directory done/description
+/property
 /parameters
 
 start to=add_partition/
@@ -128,9 +132,15 @@
 /action
 
 action name=mark_dataset_done
-fs
-touchz path=${location}/_SUCCESS /
-/fs
+sub-workflow
+app-path${mark_directory_done_workflow_file}/app-path
+configuration
+property
+namedirectory/name
+value${location}/value
+/property
+/configuration
+/sub-workflow
 ok to=end/
 error to=kill/
 /action

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie557acff61b907e0a43c45f0ca82b5bf43a800d6
Gerrit-PatchSet: 2
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: QChris christ...@quelltextlich.at

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


[MediaWiki-commits] [Gerrit] Enable Graph ext on mediawiki.org - change (operations/mediawiki-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable Graph ext on mediawiki.org
..


Enable Graph ext on mediawiki.org

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 198b3b9..5297af3 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11919,6 +11919,7 @@
'default' = false,
'collabwiki' = true,
'labswiki' = true,
+   'mediawikiwiki' = true,
'metawiki' = true,
'zerowiki' = true,
 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69b41d304b591757c05a9ae4e4db395cef016e35
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] url_downloader: assign to chromium - change (operations/puppet)

2014-09-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: url_downloader: assign to chromium
..

url_downloader: assign to chromium

Assign chromium the url_dowloader role which is help in pmtpa by linne.
In order for this to work, assign the unused 208.80.154.156 IPv4 address
service IP to chromium

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


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 76a1fc4..e376d07 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -482,6 +482,15 @@
 include standard
 include role::dns::recursor
 
+if $::hostname == 'chromium' {
+interface::ip { 'url-downloader':
+interface = 'eth0',
+address   = '208.80.154.156',
+}
+$url_downloader_ip = '208.80.154.156'
+include role::url_downloader
+}
+
 interface::add_ip6_mapped { 'main':
 interface = 'eth0',
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I184eeb71970cc5d78dff37d4ceb02a34b421bfbc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] nagios_common: Move check_ssl_cert into module - change (operations/puppet)

2014-09-22 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: nagios_common: Move check_ssl_cert into module
..

nagios_common: Move check_ssl_cert into module

Change-Id: Ibde08f2ae90c9b72f7db92aaeab7f806fc728f37
---
M manifests/misc/icinga.pp
A modules/nagios_common/files/check_commands/check_ssl_cert.cfg
R modules/nagios_common/files/check_commands/check_ssl_cert/AUTHORS
R modules/nagios_common/files/check_commands/check_ssl_cert/COPYING
R modules/nagios_common/files/check_commands/check_ssl_cert/COPYRIGHT
R modules/nagios_common/files/check_commands/check_ssl_cert/ChangeLog
R modules/nagios_common/files/check_commands/check_ssl_cert/INSTALL
R modules/nagios_common/files/check_commands/check_ssl_cert/NEWS
R modules/nagios_common/files/check_commands/check_ssl_cert/README
R modules/nagios_common/files/check_commands/check_ssl_cert/TODO
R modules/nagios_common/files/check_commands/check_ssl_cert/VERSION
R modules/nagios_common/files/check_commands/check_ssl_cert/check_ssl_cert
R modules/nagios_common/files/check_commands/check_ssl_cert/check_ssl_cert.1
R modules/nagios_common/files/check_commands/check_ssl_cert/check_ssl_cert.spec
M modules/nagios_common/manifests/commands.pp
M templates/icinga/checkcommands.cfg.erb
16 files changed, 21 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/161952/1

diff --git a/manifests/misc/icinga.pp b/manifests/misc/icinga.pp
index 0fea238..f1620c6 100644
--- a/manifests/misc/icinga.pp
+++ b/manifests/misc/icinga.pp
@@ -583,12 +583,6 @@
 group  = 'root',
 mode   = '0755',
 }
-file { '/usr/lib/nagios/plugins/check_ssl_cert':
-source = 'puppet:///files/icinga/check_ssl_cert/check_ssl_cert',
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-}
 file { '/usr/lib/nagios/plugins/check_nrpe':
 source = 'puppet:///files/icinga/check_nrpe',
 owner  = 'root',
diff --git a/modules/nagios_common/files/check_commands/check_ssl_cert.cfg 
b/modules/nagios_common/files/check_commands/check_ssl_cert.cfg
new file mode 100644
index 000..d2a2f90
--- /dev/null
+++ b/modules/nagios_common/files/check_commands/check_ssl_cert.cfg
@@ -0,0 +1,12 @@
+# Verify a SSL certificate is not going to expire in the next 14 days
+# Example usage:  check_ssl_cert!secure.wikimedia.org
+define command{
+command_namecheck_ssl_cert
+command_line$USER1$/check_ssl_cert --rootcert /etc/ssl/certs/ 
--critical 90 -H $HOSTADDRESS$ --cn $ARG1$
+}
+
+# check SSL certs on LDAP servers
+define command{
+command_namecheck_ssl_ldap
+command_line$USER1$/check_ssl_cert --critical 90 -H $HOSTADDRESS$ -p 
636 -n $ARG1$ -r /etc/ssl/certs/$ARG2$
+}
diff --git a/files/icinga/check_ssl_cert/AUTHORS 
b/modules/nagios_common/files/check_commands/check_ssl_cert/AUTHORS
similarity index 100%
rename from files/icinga/check_ssl_cert/AUTHORS
rename to modules/nagios_common/files/check_commands/check_ssl_cert/AUTHORS
diff --git a/files/icinga/check_ssl_cert/COPYING 
b/modules/nagios_common/files/check_commands/check_ssl_cert/COPYING
similarity index 100%
rename from files/icinga/check_ssl_cert/COPYING
rename to modules/nagios_common/files/check_commands/check_ssl_cert/COPYING
diff --git a/files/icinga/check_ssl_cert/COPYRIGHT 
b/modules/nagios_common/files/check_commands/check_ssl_cert/COPYRIGHT
similarity index 100%
rename from files/icinga/check_ssl_cert/COPYRIGHT
rename to modules/nagios_common/files/check_commands/check_ssl_cert/COPYRIGHT
diff --git a/files/icinga/check_ssl_cert/ChangeLog 
b/modules/nagios_common/files/check_commands/check_ssl_cert/ChangeLog
similarity index 100%
rename from files/icinga/check_ssl_cert/ChangeLog
rename to modules/nagios_common/files/check_commands/check_ssl_cert/ChangeLog
diff --git a/files/icinga/check_ssl_cert/INSTALL 
b/modules/nagios_common/files/check_commands/check_ssl_cert/INSTALL
similarity index 100%
rename from files/icinga/check_ssl_cert/INSTALL
rename to modules/nagios_common/files/check_commands/check_ssl_cert/INSTALL
diff --git a/files/icinga/check_ssl_cert/NEWS 
b/modules/nagios_common/files/check_commands/check_ssl_cert/NEWS
similarity index 100%
rename from files/icinga/check_ssl_cert/NEWS
rename to modules/nagios_common/files/check_commands/check_ssl_cert/NEWS
diff --git a/files/icinga/check_ssl_cert/README 
b/modules/nagios_common/files/check_commands/check_ssl_cert/README
similarity index 100%
rename from files/icinga/check_ssl_cert/README
rename to modules/nagios_common/files/check_commands/check_ssl_cert/README
diff --git a/files/icinga/check_ssl_cert/TODO 
b/modules/nagios_common/files/check_commands/check_ssl_cert/TODO
similarity index 100%
rename from files/icinga/check_ssl_cert/TODO
rename to modules/nagios_common/files/check_commands/check_ssl_cert/TODO
diff --git 

[MediaWiki-commits] [Gerrit] QA: straightforward id for new beta label element - change (mediawiki...MobileFrontend)

2014-09-22 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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

Change subject: QA: straightforward id for new beta label element
..

QA: straightforward id for new beta label element

Also, no test uses the I am in alpha mode step any more

Change-Id: Ic07988655eabf76ce59ef43b4b0ac382bfa8e11e
---
M tests/browser/features/step_definitions/common_steps.rb
M tests/browser/features/support/pages/mobile_options_page.rb
2 files changed, 1 insertion(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/53/161953/1

diff --git a/tests/browser/features/step_definitions/common_steps.rb 
b/tests/browser/features/step_definitions/common_steps.rb
index 4236d8e..7111bd0 100644
--- a/tests/browser/features/step_definitions/common_steps.rb
+++ b/tests/browser/features/step_definitions/common_steps.rb
@@ -54,17 +54,6 @@
   end
 end
 
-Given /^I am in alpha mode$/ do
-  visit(MobileOptions) do |page|
-page.beta_element.when_present.click
-page.save_settings_element.when_present.click
-visit(MobileOptions) do |page|
-  page.alpha_element.when_present.click
-  page.save_settings_element.when_present.click
-end
-  end
-end
-
 Given(/^I am on the (.+) page$/) do |article|
   # Ensure we do not cause a redirect
   article = article.sub(/ /, '_')
diff --git a/tests/browser/features/support/pages/mobile_options_page.rb 
b/tests/browser/features/support/pages/mobile_options_page.rb
index 0cca8dd..3696e5d 100644
--- a/tests/browser/features/support/pages/mobile_options_page.rb
+++ b/tests/browser/features/support/pages/mobile_options_page.rb
@@ -4,14 +4,6 @@
   include URL
   page_url URL.url(Special:MobileOptions)
 
-  div(:beta_parent, id: enable-beta-toggle)
-  div(:alpha_parent, id: enable-alpha-toggle)
-
-  span(:beta) do |page|
-page.beta_parent_element.span_element(class: mw-mf-settings-off)
-  end
-  span(:alpha) do |page|
-page.alpha_parent_element.span_element(class: mw-mf-settings-off)
-  end
+  label(:beta, css: div.mobileoption:nth-child(3)  div:nth-child(1)  
label:nth-child(2))
   button(:save_settings, id:mw-mf-settings-save)
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic07988655eabf76ce59ef43b4b0ac382bfa8e11e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove a bunch of iptables classes that haven't been used fo... - change (operations/puppet)

2014-09-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Remove a bunch of iptables classes that haven't been used for 
ages.
..

Remove a bunch of iptables classes that haven't been used for ages.

Change-Id: I4291038b63734afacc877a373caf2535263244f7
---
M modules/ldap/manifests/server.pp
1 file changed, 0 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/161954/1

diff --git a/modules/ldap/manifests/server.pp b/modules/ldap/manifests/server.pp
index efb38c3..62bc413 100644
--- a/modules/ldap/manifests/server.pp
+++ b/modules/ldap/manifests/server.pp
@@ -1,52 +1,6 @@
 # ldap
 #
 
-class ldap::server::iptables-purges {
-
-require 'iptables::tables'
-
-# The deny_all rule must always be purged, otherwise ACCEPTs can be placed 
below it
-iptables_purge_service{ 'ldap_deny_all': service  = 'ldap' }
-iptables_purge_service{ 'ldaps_deny_all': service = 'ldaps' }
-
-# When removing or modifying a rule, place the old rule here, otherwise it 
won't
-# be purged, and will stay in the iptables forever
-
-}
-
-class ldap::server::iptables-accepts {
-
-require 'ldap::server::iptables-purges'
-
-# Remember to place modified or removed rules into purges!
-iptables_add_service{ 'ldap_server_corp': service  = 'ldap', source  = 
'216.38.130.188', jump = 'ACCEPT' }
-iptables_add_service{ 'ldaps_server_corp': service = 'ldaps', source = 
'216.38.130.188', jump = 'ACCEPT' }
-iptables_add_service{ 'ldaps_server_neon': service = 'ldaps', source = 
'208.80.154.14', jump  = 'ACCEPT' }
-
-}
-
-class ldap::server::iptables-drops {
-
-require 'ldap::server::iptables-accepts'
-
-iptables_add_service{ 'ldap_server_deny_all': service  = 'ldap', jump  = 
'DROP' }
-iptables_add_service{ 'ldaps_server_deny_all': service = 'ldaps', jump = 
'DROP' }
-
-}
-
-class ldap::server::iptables  {
-
-# We use the following requirement chain:
-# iptables - iptables::drops - iptables::accepts - iptables::purges
-#
-# This ensures proper ordering of the rules
-require 'ldap::server::iptables-drops'
-
-# This exec should always occur last in the requirement chain.
-iptables_add_exec{ 'ldap_server': service = 'ldap_server' }
-
-}
-
 class ldap::server( $certificate_location, $certificate, $ca_name, $cert_pass, 
$base_dn, $proxyagent, $proxyagent_pass, $server_bind_ips, $initial_password, 
$first_master=false ) {
 package { 'openjdk-6-jre':
 ensure = latest,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4291038b63734afacc877a373caf2535263244f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Set up firewall rules for ldap servers. - change (operations/puppet)

2014-09-22 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Set up firewall rules for ldap servers.
..

Set up firewall rules for ldap servers.

Allow admin and replication communication.  These rules are already
set on virt1000 and virt0, presumably by hand.

Change-Id: I479bede5b7b0d1b7bb3c943207e863b2a2b5dc84
---
M modules/ldap/manifests/role/server.pp
M modules/ldap/manifests/server.pp
2 files changed, 21 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/161955/1

diff --git a/modules/ldap/manifests/role/server.pp 
b/modules/ldap/manifests/role/server.pp
index 7d23a8b..73da5e9 100644
--- a/modules/ldap/manifests/role/server.pp
+++ b/modules/ldap/manifests/role/server.pp
@@ -127,6 +127,12 @@
 initial_password = $initial_password,
 first_master = false,
 }
+
+class { 'ldap::firewall':
+server_list = ['ldap-eqiad.wikimedia.org',
+'ldap-codfw.wikimedia.org',
+'virt0.wikimedia.org'],
+}
 }
 
 class ldap::role::server::corp {
diff --git a/modules/ldap/manifests/server.pp b/modules/ldap/manifests/server.pp
index 62bc413..5a3c7d0 100644
--- a/modules/ldap/manifests/server.pp
+++ b/modules/ldap/manifests/server.pp
@@ -1,6 +1,21 @@
 # ldap
 #
 
+class ldap::firewall( $server_list) {
+
+#  Allow admin communication between ldap servers
+ferm::rule { 'bastion-ssh':
+ensure = present,
+rule   = 'proto tcp dport  saddr $server_list ACCEPT;',
+}
+
+#  Allow replication between ldap servers
+ferm::rule { 'bastion-ssh':
+ensure = present,
+rule   = 'proto tcp dport 8989 saddr $server_list ACCEPT;',
+}
+}
+
 class ldap::server( $certificate_location, $certificate, $ca_name, $cert_pass, 
$base_dn, $proxyagent, $proxyagent_pass, $server_bind_ips, $initial_password, 
$first_master=false ) {
 package { 'openjdk-6-jre':
 ensure = latest,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I479bede5b7b0d1b7bb3c943207e863b2a2b5dc84
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Support strings in namespace weights - change (mediawiki...CirrusSearch)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Support strings in namespace weights
..


Support strings in namespace weights

This is much more convenient when specifying configuration across many wikis
that do not share consistent namespace numbering but do consistently alias
namespaces.  For example: most wikisources alias the 'Author' namespace
to the word 'Author' in their language but that namespace is sometimes 100,
sometimes 102, somtimes 104, and sometimes 106.

Bug: 69771
Change-Id: Ice3febecd8cd39c551d2809f1a88a6c8c91fae26
---
M CirrusSearch.php
M includes/Searcher.php
2 files changed, 36 insertions(+), 5 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 08a63fb..00e9beb 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -260,6 +260,8 @@
 // NS_MAIN can be overriden with this then 1 just represents what NS_MAIN 
would have been
 // If you override NS_MAIN here then NS_TALK will still default to:
 //   $wgCirrusSearchNamespaceWeights[ NS_MAIN ] * 
wgCirrusSearchTalkNamespaceWeight
+// You can specify namespace by number or string.  Strings are converted to 
numbers using the
+// content language including aliases.
 $wgCirrusSearchNamespaceWeights = array(
NS_USER = 0.05,
NS_PROJECT = 0.1,
diff --git a/includes/Searcher.php b/includes/Searcher.php
index bd78012..c0f57a0 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -8,6 +8,7 @@
 use \CirrusSearch\Search\FullTextResultsType;
 use \CirrusSearch\Search\IdResultsType;
 use \CirrusSearch\Search\ResultsType;
+use \Language;
 use \MWNamespace;
 use \PoolCounterWorkViaCallback;
 use \ProfileSection;
@@ -71,6 +72,11 @@
 * @var array(integer) namespaces in which to search
 */
protected $namespaces;
+
+   /**
+* @var Language language of the wiki
+*/
+   private $language;
 
/**
 * @var ResultsType|null type of results.  null defaults to 
FullTextResultsType
@@ -169,6 +175,12 @@
private $returnQuery = false;
 
/**
+* @var null|array lazily initialized version of 
$wgCirrusSearchNamespaceWeights with all string keys
+* translated into integer namespace codes using $this-language.
+*/
+   private $normalizedNamespaceWeights = null;
+
+   /**
 * Constructor
 * @param int $offset Offset the results by this much
 * @param int $limit Limit the results to this many
@@ -178,13 +190,15 @@
 */
public function __construct( $offset, $limit, $namespaces, $user, 
$index = false ) {
global $wgCirrusSearchSlowSearch,
-   $wgLanguageCode;
+   $wgLanguageCode,
+   $wgContLang;
 
parent::__construct( $user, $wgCirrusSearchSlowSearch );
$this-offset = min( $offset, self::MAX_OFFSET );
$this-limit = $limit;
$this-namespaces = $namespaces;
$this-indexBaseName = $index ?: wfWikiId();
+   $this-language = $wgContLang;
$this-escaper = new Escaper( $wgLanguageCode );
}
 
@@ -1379,8 +1393,23 @@
$wgCirrusSearchDefaultNamespaceWeight,
$wgCirrusSearchTalkNamespaceWeight;
 
-   if ( isset( $wgCirrusSearchNamespaceWeights[ $namespace ] ) ) {
-   return $wgCirrusSearchNamespaceWeights[ $namespace ];
+   if ( $this-normalizedNamespaceWeights === null ) {
+   $this-normalizedNamespaceWeights = array();
+   foreach ( $wgCirrusSearchNamespaceWeights as $ns = 
$weight ) {
+   if ( is_string( $ns ) ) {
+   $ns = $this-language-getNsIndex( $ns 
);
+   // Ignore namespaces that don't exist.
+   if ( $ns === false ) {
+   continue;
+   }
+   }
+   // Now $ns should always be an integer.
+   $this-normalizedNamespaceWeights[ $ns ] = 
$weight;
+   }
+   }
+
+   if ( isset( $this-normalizedNamespaceWeights[ $namespace ] ) ) 
{
+   return $this-normalizedNamespaceWeights[ $namespace ];
}
if ( MWNamespace::isSubject( $namespace ) ) {
if ( $namespace === NS_MAIN ) {
@@ -1389,8 +1418,8 @@
return $wgCirrusSearchDefaultNamespaceWeight;
}
$subjectNs = MWNamespace::getSubject( $namespace );
-   if ( isset( 

[MediaWiki-commits] [Gerrit] Change url-downloader to point to new IP - change (operations/dns)

2014-09-22 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Change url-downloader to point to new IP
..

Change url-downloader to point to new IP

linne that has had the url-downloader role up to now is being
decomissioned. Move the DNS A/PTR records to point to a new unused IP
that is to be assigned to chromium

Change-Id: I9e21409ebb775c4204c86244fb6e80d2c55ee6de
---
M templates/152.80.208.in-addr.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/56/161956/1

diff --git a/templates/152.80.208.in-addr.arpa 
b/templates/152.80.208.in-addr.arpa
index 076cb92..4c2645b 100644
--- a/templates/152.80.208.in-addr.arpa
+++ b/templates/152.80.208.in-addr.arpa
@@ -32,7 +32,6 @@
 
 136 1H IN PTR   mexia.wikimedia.org.
 141 1H IN PTR   wireless.tech.wikimedia.org.
-143 1H IN PTR   url-downloader.wikimedia.org.
 145 1H IN PTR   ae0-101.cr2-pmtpa.wikimedia.org.
 
 154 1H IN PTR   pdf2.wikimedia.org.
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index 5de3815..c29f0f3 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -104,6 +104,7 @@
 153 1H  IN PTR  silver.wikimedia.org.
 154 1H  IN PTR  titanium.wikimedia.org.
 155 1H  IN PTR  stat1001.wikimedia.org.
+156 1H  IN PTR  url-downloader.wikimedia.org. ; chromium
 157 1H  IN PTR  chromium.wikimedia.org.
 158 1H  IN PTR  calcium.wikimedia.org.
 159 1H  IN PTR  netmon1001.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 9d5378c..c2381cc 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -469,7 +469,7 @@
 wiki-mail-eqiad 1H  IN A208.80.154.91
 1H  IN  2620:0:861:3:208:80:154:91
 
-url-downloader  1H  IN A208.80.152.143  ; linne
+url-downloader  1H  IN A208.80.154.156  ; chromium
 
 ; Wikis (alphabetic order)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e21409ebb775c4204c86244fb6e80d2c55ee6de
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Test regexes with spaces - change (mediawiki...CirrusSearch)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Test regexes with spaces
..


Test regexes with spaces

Turns out they always worked but we didn't have a test for them and they
sometimes look like they don't work if there are too many regex queries
queued and the pool counter stops you from running them.

Bug: 71053

Change-Id: I46314996cb31e58cb0085450416d4e05a4b4f7bb
---
M tests/browser/features/insource.feature
M tests/browser/features/support/hooks.rb
2 files changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/tests/browser/features/insource.feature 
b/tests/browser/features/insource.feature
index 2091039..acdff2d 100644
--- a/tests/browser/features/insource.feature
+++ b/tests/browser/features/insource.feature
@@ -59,9 +59,9 @@
 Then RegexEscapedDot is the first search result
 
   @regex
-  Scenario: insource:// can find escaped dots
-When I search for insource:/a\.b/
-Then RegexEscapedDot is the first search result
+  Scenario: insource:// can contain spaces
+When I search for RegexSpaces insource:/a b c/
+Then RegexSpaces is the first search result
 
   @regex
   Scenario: insource:// can a url
diff --git a/tests/browser/features/support/hooks.rb 
b/tests/browser/features/support/hooks.rb
index e8ca05f..c5d6f60 100644
--- a/tests/browser/features/support/hooks.rb
+++ b/tests/browser/features/support/hooks.rb
@@ -516,6 +516,7 @@
   Given a page named RegexEscapedForwardSlash exists with contents a/b
   And a page named RegexEscapedBackslash exists with contents a\\b
   And a page named RegexEscapedDot exists with contents a.b
+  And a page named RegexSpaces exists with contents a b c
 )
   end
   regex = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46314996cb31e58cb0085450416d4e05a4b4f7bb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prevent page elements from displaying on top of highlights - change (VisualEditor/VisualEditor)

2014-09-22 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Prevent page elements from displaying on top of highlights
..

Prevent page elements from displaying on top of highlights

Use position: relative; z-index: 0; on .ve-ce-surface to create a new
stacking context [1], which prevents elements with z-index from being
positioned higher than .ve-ce-surface itself.

As .ve-ui-overlay has a z-index of at least 1 (possibly more,
depending on the skin), elements that are part of .ve-ce-surface will
no longer be displayed atop overlay highlights, regardless of how high
their z-index is.

[1] 
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Understanding_z_index/The_stacking_context

Bug: 70074
Change-Id: I6c312269998ef775bc852d391cd1d644a0566531
---
M src/ce/styles/ve.ce.Surface.css
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/57/161957/1

diff --git a/src/ce/styles/ve.ce.Surface.css b/src/ce/styles/ve.ce.Surface.css
index 40f794f..26cccb0 100644
--- a/src/ce/styles/ve.ce.Surface.css
+++ b/src/ce/styles/ve.ce.Surface.css
@@ -6,6 +6,8 @@
 
 .ve-ce-surface {
overflow: hidden;
+   position: relative;
+   z-index: 0;
/*
Remember, don't set font-size here.
Should be inherited from the VE target container.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c312269998ef775bc852d391cd1d644a0566531
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com

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


[MediaWiki-commits] [Gerrit] Reduce queries to count links - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Reduce queries to count links
..

Reduce queries to count links

We used to store the redirect links and the direct links separately so we
had to count them separately.  We stopped that months ago and just added
the counts together.  This has us actually executing the counts together.
It should cut down on any query load from counting links.

Change-Id: I2bd1ccf9116d8702ec2c9978fbc9a4388522a7ee
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 31 insertions(+), 26 deletions(-)


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

diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index f2e31d3..ea49804 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -3,6 +3,10 @@
 namespace CirrusSearch\BuildDocument;
 use CirrusSearch\Connection;
 use CirrusSearch\ElasticsearchIntermediary;
+use Elastica\Filter\Terms;
+use Elastica\Search;
+use Elastica\Query\Filtered;
+use Elastica\Query\MatchAll;
 
 /**
  * Adds redirects and incoming links to the documents.  These are done together
@@ -59,12 +63,12 @@
private function realBuildDocument( $doc, $title ) {
global $wgCirrusSearchIndexedRedirects;
 
-   // Handle redirects to this page
+   $outgoingLinksToCount = array( $title-getPrefixedDBKey() );
+
+   // Gather redirects to this page
$redirectTitles = $title-getBacklinkCache()
-getLinks( 'redirect', false, false, 
$wgCirrusSearchIndexedRedirects );
$redirects = array();
-   $redirectPrefixedDBKeys = array();
-   // $redirectLinks = 0;
foreach ( $redirectTitles as $redirect ) {
// If the redirect is in main OR the same namespace as 
the article the index it
if ( $redirect-getNamespace() === NS_MAIN || 
$redirect-getNamespace() === $title-getNamespace()) {
@@ -72,29 +76,26 @@
'namespace' = 
$redirect-getNamespace(),
'title' = $redirect-getText()
);
-   $redirectPrefixedDBKeys[] = 
$redirect-getPrefixedDBKey();
+   $outgoingLinksToCount[] = 
$redirect-getPrefixedDBKey();
}
}
$doc-add( 'redirect', $redirects );
 
// Count links
-   // Incoming links is the sum of the number of linked pages 
which we count in Elasticsearch
-   // and the number of incoming redirects of which we have a 
handy list so we count that here.
-   $this-linkCountMultiSearch-addSearch( $this-buildCount(
-   new \Elastica\Filter\Term( array( 'outgoing_link' = 
$title-getPrefixedDBKey() ) ) ) );
+   // Incoming links is the sum of:
+   //  #1 Number of redirects to the page
+   //  #2 Number of links to the title
+   //  #3 Number of links to all the redirects
+
+   // #1 we have a list of the first 
$wgCirrusSearchIndexedRedirects redirect so we just count it:
$redirectCount = count( $redirects );
+
+   // #2 and #3 we count the number of links to the page with 
Elasticsearch.
+   // Since we only have $wgCirrusSearchIndexedRedirects we only 
count that many terms.
+   $this-linkCountMultiSearch-addSearch( $this-buildCount( 
$outgoingLinksToCount ) );
$this-linkCountClosures[] = function ( $count ) use( $doc, 
$redirectCount ) {
$doc-add( 'incoming_links', $count + $redirectCount );
};
-   // If a page doesn't have any redirects then count the links to 
them.
-   if ( count( $redirectPrefixedDBKeys ) ) {
-   $this-linkCountMultiSearch-addSearch( 
$this-buildCount(
-   new \Elastica\Filter\Terms( 'outgoing_link', 
$redirectPrefixedDBKeys ) ) );
-   $this-linkCountClosures[] = function ( $count ) use( 
$doc ) {
-   $incomingLinks = $doc-has( 'incoming_links' ) 
? $doc-get( 'incoming_links' ) : 0;
-   $doc-add( 'incoming_links', $count + 
$incomingLinks );
-   };
-   }
}
 
private function realFinishBatch( $pages ) {
@@ -114,23 +115,27 @@
$pageIds = array_map( function( $page ) {
return $page-getId();
}, 

[MediaWiki-commits] [Gerrit] Suppress redrawing when initializing toolbar on existing nodes - change (mediawiki...Wikibase)

2014-09-22 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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

Change subject: Suppress redrawing when initializing toolbar on existing nodes
..

Suppress redrawing when initializing toolbar on existing nodes

Change-Id: Id3e6273c233030afb35731da3b95c34768bf3257
---
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
M lib/resources/jquery.wikibase/toolbar/jquery.wikibase.singlebuttontoolbar.js
M 
lib/resources/jquery.wikibase/toolbar/themes/default/jquery.wikibase.toolbarbutton.css
M repo/includes/View/SectionEditLinkGenerator.php
4 files changed, 65 insertions(+), 50 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
index 327c94f..0d12ae0 100644
--- a/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/jquery.wikibase.edittoolbar.js
@@ -100,9 +100,16 @@
 
this._buttons = {};
 
-   this._initSubToolbar();
+   var $scrapedSubToolbar = this._getContainer().children( 
'.wikibase-toolbar' );
+
+   this._initSubToolbar( $scrapedSubToolbar );
this._attachEventHandlers();
-   this._toNonEditMode();
+
+   if( $scrapedSubToolbar.length ) {
+   this.toNonEditMode();
+   } else {
+   this._toNonEditMode();
+   }
},
 
/**
@@ -156,18 +163,21 @@
 
/**
 * Initializes the sub toolbar encapsulating the toolbar buttons 
excluding the tooltip anchor.
+*
+* @param {jQuery} $subToolbar
 */
-   _initSubToolbar: function() {
-   var $container = this._getContainer(),
-   $subToolbar = $container.children( '.wikibase-toolbar' 
);
+   _initSubToolbar: function( $subToolbar ) {
+   var $content = $();
 
if( !$subToolbar.length ) {
-   $subToolbar = $( 'span/' ).appendTo( $container );
+   $subToolbar = $( 'span/' ).appendTo( 
this._getContainer() );
} else {
this._scrapeButtons( $subToolbar );
+   $content = $subToolbar.children();
}
 
$subToolbar.toolbar( {
+   $content: $content,
renderItemSeparators: true
} );
},
@@ -251,27 +261,22 @@
 
this._getContainer()
.on( 'toolbarbuttonaction.' + this.widgetName, function( event 
) {
-   switch( event.target ) {
-   case self._buttons.edit.get( 0 ):
-   
self.options.interactionWidget.element.one(
-   prefix + 'afterstartediting.' + 
self.widgetName,
-   function() {
-   self._trigger( 'edit' );
-   }
-   );
-   
self.options.interactionWidget.startEditing();
-   break;
-   case self._buttons.save.get( 0 ):
-   
self.options.interactionWidget.stopEditing();
-   break;
-   case self.options.onRemove  
self._buttons.remove.get( 0 ):
-   self.disable();
-   self.toggleActionMessage( mw.msg( 
'wikibase-remove-inprogress' ) );
-   self.options.onRemove();
-   break;
-   case self._buttons.cancel.get( 0 ):
-   
self.options.interactionWidget.cancelEditing();
-   break;
+   if( self._buttons.edit  event.target === 
self._buttons.edit.get( 0 ) ) {
+   self.options.interactionWidget.element.one(
+   prefix + 'afterstartediting.' + 
self.widgetName,
+   function() {
+   self._trigger( 'edit' );
+   }
+   );
+   self.options.interactionWidget.startEditing();
+   } else if( self._buttons.save  event.target === 
self._buttons.save.get( 0 ) ) {
+   

[MediaWiki-commits] [Gerrit] Lower throttle on two cirrus jobs - change (operations/mediawiki-config)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Lower throttle on two cirrus jobs
..

Lower throttle on two cirrus jobs

This lowers the throttle on the job reacting to template changes again
because the current value still wasn't enought to cause a small backlog
to appear.

This introduces a throttle for the job the counts links.  The throttle is
set the same as the template change jobs because we have fewer count links
jobs to deal with then the template change jobs so it should be enough.
The goal of introducing this throttle isn't to create a backlog for
deduplication its to make sure we don't overwhelm elasticsearch with too
many of these at once.

Change-Id: I9ddbdf559371bc882ca2fd851ed79f3f7d3cb817
---
M wmf-config/CirrusSearch-common.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index e8581f3..25baedc 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -40,7 +40,11 @@
 
 # Set the backoff for Cirrus' job that reacts to template changes - slow and 
steady
 # will help prevent spikes in Elasticsearch load.
-$wgJobBackoffThrottling['cirrusSearchLinksUpdate'] = 1.25;
+$wgJobBackoffThrottling['cirrusSearchLinksUpdate'] = 0.75;
+# Also engage a delay for the Cirrus job that counts incoming links to pages 
when
+# pages are newly linked or unlinked.  Too many link count queries at once 
could flood
+# Elasticsearch.
+$wgJobBackoffThrottling['cirrusSearchLinksUpdateSecondary'] = 0.75;
 
 # Ban the hebrew plugin, it is unstable
 $wgCirrusSearchBannedPlugins[] = 'elasticsearch-analysis-hebrew';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ddbdf559371bc882ca2fd851ed79f3f7d3cb817
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add stats group for link_count queries - change (mediawiki...CirrusSearch)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add stats group for link_count queries
..


Add stats group for link_count queries

Change-Id: If4f0faf51c145d067996da70afb8842ad38ab106
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index cc16794..f2e31d3 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -129,6 +129,7 @@
\Elastica\Search::OPTION_SEARCH_TYPE_COUNT );
$matchAll = new \Elastica\Query\MatchAll();
$search-setQuery( new \Elastica\Query\Filtered( $matchAll, 
$filter ) );
+   $search-getQuery()-addParam( 'stats', 'link_count' );
return $search;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4f0faf51c145d067996da70afb8842ad38ab106
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update CX config for changes in master - change (operations/mediawiki-config)

2014-09-22 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Update CX config for changes in master
..

Update CX config for changes in master

Change-Id: I1d6037a7b792fc31a1303678d2e74e59f4e0b0fb
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index b47ae0b..dfc9243 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -95,6 +95,7 @@
 if ( $wmgUseContentTranslation ) {
require_once( 
$IP/extensions/ContentTranslation/ContentTranslation.php );
$wgContentTranslationServerURL = 'https://cxserver-beta.wmflabs.org';
+   $wgContentTranslationDomainTemplate['cx'] = 
'https://cxserver-beta.wmflabs.org/page/$1/$2';
// Used for html2wikitext when publishing
$wgContentTranslationParsoid = array(
'url' = $wmgParsoidURL,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d6037a7b792fc31a1303678d2e74e59f4e0b0fb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update CX config for changes in master - change (operations/mediawiki-config)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update CX config for changes in master
..


Update CX config for changes in master

Change-Id: I1d6037a7b792fc31a1303678d2e74e59f4e0b0fb
---
M wmf-config/CommonSettings-labs.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  KartikMistry: Looks good to me, but someone else must approve
  Nikerabbit: Looks good to me, approved
  Jsahleen: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index b47ae0b..dfc9243 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -95,6 +95,7 @@
 if ( $wmgUseContentTranslation ) {
require_once( 
$IP/extensions/ContentTranslation/ContentTranslation.php );
$wgContentTranslationServerURL = 'https://cxserver-beta.wmflabs.org';
+   $wgContentTranslationDomainTemplate['cx'] = 
'https://cxserver-beta.wmflabs.org/page/$1/$2';
// Used for html2wikitext when publishing
$wgContentTranslationParsoid = array(
'url' = $wmgParsoidURL,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d6037a7b792fc31a1303678d2e74e59f4e0b0fb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Jsahleen jsahl...@wikimedia.org
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix multiple phrase queries in same search - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Fix multiple phrase queries in same search
..

Fix multiple phrase queries in same search

We were merging all the phrase queries into a single one - this is obviously
wrong.

Change-Id: I9599bd20a9f48aabe60e9634ac4d13d8db02ddd2
(cherry picked from commit 5e81a9dfd2b981a2fcfd1dce31715758fcec3b4d)
---
M includes/Searcher.php
M tests/browser/features/exact_quotes.feature
2 files changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/includes/Searcher.php b/includes/Searcher.php
index bd78012..6af09c2 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -546,7 +546,7 @@
// Those phrases can optionally be followed by ~ then a number 
(this is the phrase slop)
// That can optionally be followed by a ~ (this matches stemmed 
words in phrases)
// The following all match: a, a boat, a\boat, a 
boat~, a boat~9, a boat~9~, -a boat, -a boat~9~
-   $query = self::replacePartsOfQuery( $this-term, 
'/(?![\]])(?negate-|!)?(?main((?:[^]|(?:\))+)(?slop~[0-9]+)?)(?fuzzy~)?/',
+   $query = self::replacePartsOfQuery( $this-term, 
'/(?![\]])(?negate-|!)?(?main((?:[^]|(?:\\\))+)(?slop~[0-9]+)?)(?fuzzy~)?/',
function ( $matches ) use ( $searcher, $escaper, 
$phrases ) {
global $wgCirrusSearchPhraseSlop;
$negate = $matches[ 'negate' ][ 0 ] ? 'NOT ' : 
'';
diff --git a/tests/browser/features/exact_quotes.feature 
b/tests/browser/features/exact_quotes.feature
index 682fcb9..414cca9 100644
--- a/tests/browser/features/exact_quotes.feature
+++ b/tests/browser/features/exact_quotes.feature
@@ -86,3 +86,13 @@
 | -  | ~7~|
 | !  | ~7~|
 | %{exact:NOT }  | ~7~|
+
+  Scenario: Can combine positive and negative phrase search
+When I search for catapult catapult -two words -some stuff
+Then Catapult is in the search results
+  And Two Words is not in the search results
+
+  Scenario: Can combine positive and negative phrase search (backwards)
+When I search for catapult -asdf two words
+Then Two Words is in the search results
+  And Catapult is not in the search results

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9599bd20a9f48aabe60e9634ac4d13d8db02ddd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add stats group for link_count queries - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Add stats group for link_count queries
..

Add stats group for link_count queries

Change-Id: If4f0faf51c145d067996da70afb8842ad38ab106
(cherry picked from commit 6168cd44f1e901af886ef485a861c326a6e6a39c)
---
M includes/BuildDocument/RedirectsAndIncomingLinks.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/BuildDocument/RedirectsAndIncomingLinks.php 
b/includes/BuildDocument/RedirectsAndIncomingLinks.php
index cc16794..f2e31d3 100644
--- a/includes/BuildDocument/RedirectsAndIncomingLinks.php
+++ b/includes/BuildDocument/RedirectsAndIncomingLinks.php
@@ -129,6 +129,7 @@
\Elastica\Search::OPTION_SEARCH_TYPE_COUNT );
$matchAll = new \Elastica\Query\MatchAll();
$search-setQuery( new \Elastica\Query\Filtered( $matchAll, 
$filter ) );
+   $search-getQuery()-addParam( 'stats', 'link_count' );
return $search;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4f0faf51c145d067996da70afb8842ad38ab106
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add stats to get searches - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Add stats to get searches
..

Add stats to get searches

Change-Id: Ib2d61e5153c5415d4f00ed4dfc26e524f3c14ab0
(cherry picked from commit 25cd7d65505c2264b4eb45e60cf86eee11d54c64)
---
M includes/Searcher.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/Searcher.php b/includes/Searcher.php
index bd78012..8e45232 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -787,6 +787,7 @@
$pageType = Connection::getPageType( 
$indexBaseName, $indexType );
$query = new \Elastica\Query( new 
\Elastica\Query\Ids( null, $pageIds ) );
$query-setParam( '_source', 
$sourceFiltering );
+   $query-addParam( 'stats', 'get' );
$resultSet = $pageType-search( $query, 
array( 'search_type' = 'query_and_fetch' ) );
return $searcher-success( 
$resultSet-getResults() );
} catch ( \Elastica\Exception\NotFoundException 
$e ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2d61e5153c5415d4f00ed4dfc26e524f3c14ab0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.24wmf22
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Better error messaging in maintenance scripts - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Better error messaging in maintenance scripts
..

Better error messaging in maintenance scripts

Hopefully no more the operation failed with error: 1.  1 isn't a
useful error message.  Nope.

Change-Id: I3c7d0eb67e5f08472d8d8c0518ad9b9a009a
(cherry picked from commit 15b0043485d7ea217004ac0cc0d36abe30751fb4)
---
M includes/ElasticsearchIntermediary.php
M maintenance/updateOneSearchIndexConfig.php
2 files changed, 23 insertions(+), 8 deletions(-)


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

diff --git a/includes/ElasticsearchIntermediary.php 
b/includes/ElasticsearchIntermediary.php
index 2d12671..c9f1b3d 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -107,6 +107,17 @@
}
 
/**
+* Extract an error message from an exception thrown by Elastica.
+* @param RuntimeException $exception exception from which to extract a 
message
+* @return message from the exception
+*/
+   public static function extractMessage( $exception ) {
+   return $exception instanceof ResponseException ?
+   $exception-getElasticsearchException()-getMessage() :
+   $exception-getMessage();
+   }
+
+   /**
 * Does this status represent an Elasticsearch parse error?
 * @param $status Status to check
 * @return boolean is this a parse error?
@@ -168,9 +179,7 @@
// Lots of times these are the same as getMessage(), but 
sometimes
// they're not. So get the nested exception so we're sure we get
// what we want. I'm looking at you 
PartialShardFailureException.
-   $message = $exception instanceof ResponseException ?
-   $exception-getElasticsearchException()-getMessage() :
-   $exception-getMessage();
+   $message = self::extractMessage( $exception );
 
$marker = 'ParseException[Cannot parse ';
$markerLocation = strpos( $message, $marker );
diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index b81a02e..95f4419 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -218,7 +218,7 @@
$this-error( Http error communicating with 
Elasticsearch:  $message.\n, 1 );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
$type = get_class( $e );
-   $message = $e-getMessage();
+   $message = ElasticsearchIntermediary::extractMessage( 
$e );
$trace = $e-getTraceAsString();
$this-output( \nUnexpected Elasticsearch failure.\n 
);
$this-error( Elasticsearch failed in an unexpected 
way.  This is always a bug in CirrusSearch.\n .
@@ -397,7 +397,7 @@
$this-output( corrected\n );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
$this-output( failed!\n );
-   $message = $e-getMessage();
+   $message = 
ElasticsearchIntermediary::extractMessage( $e );
$this-error( Couldn't update mappings.  Here 
is elasticsearch's error message: $message\n, 1 );
}
}
@@ -811,7 +811,9 @@
}
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
// Note that we can't fail the master here, we have to 
check how many documents are in the new index in the master.
-   wfLogWarning( Search backend error during reindex.  
Error message is:   . $e-getMessage() );
+   $type = get_class( $e );
+   $message = ElasticsearchIntermediary::extractMessage( 
$e );
+   wfLogWarning( Search backend error during reindex.  
Error type is '$type' and message is:  $message );
die( 1 );
}
}
@@ -830,8 +832,10 @@
// Random backoff with lowest possible 
upper bound as 16 seconds.
// With the default mximum number of 
errors (5) this maxes out at 256 seconds.
$seconds = rand( 1, pow( 2, 3 + $errors 
) );
+   $type = get_class( $e );
+   $message = 
ElasticsearchIntermediary::extractMessage( $e );
$this-output( $this-indent . 

[MediaWiki-commits] [Gerrit] Better error messaging in maintenance scripts - change (mediawiki...CirrusSearch)

2014-09-22 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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

Change subject: Better error messaging in maintenance scripts
..

Better error messaging in maintenance scripts

Hopefully no more the operation failed with error: 1.  1 isn't a
useful error message.  Nope.

Change-Id: I3c7d0eb67e5f08472d8d8c0518ad9b9a009a
(cherry picked from commit 15b0043485d7ea217004ac0cc0d36abe30751fb4)
---
M includes/ElasticsearchIntermediary.php
M maintenance/updateOneSearchIndexConfig.php
2 files changed, 23 insertions(+), 8 deletions(-)


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

diff --git a/includes/ElasticsearchIntermediary.php 
b/includes/ElasticsearchIntermediary.php
index 2d12671..c9f1b3d 100644
--- a/includes/ElasticsearchIntermediary.php
+++ b/includes/ElasticsearchIntermediary.php
@@ -107,6 +107,17 @@
}
 
/**
+* Extract an error message from an exception thrown by Elastica.
+* @param RuntimeException $exception exception from which to extract a 
message
+* @return message from the exception
+*/
+   public static function extractMessage( $exception ) {
+   return $exception instanceof ResponseException ?
+   $exception-getElasticsearchException()-getMessage() :
+   $exception-getMessage();
+   }
+
+   /**
 * Does this status represent an Elasticsearch parse error?
 * @param $status Status to check
 * @return boolean is this a parse error?
@@ -168,9 +179,7 @@
// Lots of times these are the same as getMessage(), but 
sometimes
// they're not. So get the nested exception so we're sure we get
// what we want. I'm looking at you 
PartialShardFailureException.
-   $message = $exception instanceof ResponseException ?
-   $exception-getElasticsearchException()-getMessage() :
-   $exception-getMessage();
+   $message = self::extractMessage( $exception );
 
$marker = 'ParseException[Cannot parse ';
$markerLocation = strpos( $message, $marker );
diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 6ac2862..884977a 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -218,7 +218,7 @@
$this-error( Http error communicating with 
Elasticsearch:  $message.\n, 1 );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
$type = get_class( $e );
-   $message = $e-getMessage();
+   $message = ElasticsearchIntermediary::extractMessage( 
$e );
$trace = $e-getTraceAsString();
$this-output( \nUnexpected Elasticsearch failure.\n 
);
$this-error( Elasticsearch failed in an unexpected 
way.  This is always a bug in CirrusSearch.\n .
@@ -397,7 +397,7 @@
$this-output( corrected\n );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
$this-output( failed!\n );
-   $message = $e-getMessage();
+   $message = 
ElasticsearchIntermediary::extractMessage( $e );
$this-error( Couldn't update mappings.  Here 
is elasticsearch's error message: $message\n, 1 );
}
}
@@ -815,7 +815,9 @@
}
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
// Note that we can't fail the master here, we have to 
check how many documents are in the new index in the master.
-   wfLogWarning( Search backend error during reindex.  
Error message is:   . $e-getMessage() );
+   $type = get_class( $e );
+   $message = ElasticsearchIntermediary::extractMessage( 
$e );
+   wfLogWarning( Search backend error during reindex.  
Error type is '$type' and message is:  $message );
die( 1 );
}
}
@@ -834,8 +836,10 @@
// Random backoff with lowest possible 
upper bound as 16 seconds.
// With the default mximum number of 
errors (5) this maxes out at 256 seconds.
$seconds = rand( 1, pow( 2, 3 + $errors 
) );
+   $type = get_class( $e );
+   $message = 
ElasticsearchIntermediary::extractMessage( $e );
$this-output( $this-indent . 

[MediaWiki-commits] [Gerrit] article: Fix settings' icon alignment - change (mediawiki...Popups)

2014-09-22 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: article: Fix settings' icon alignment
..


article: Fix settings' icon alignment

Bug: 70147
Change-Id: I26c41395557420aea6c995a59aada0079f1a896c
---
M resources/ext.popups.core.less
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 6a08e9b..b4f5471 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -95,6 +95,7 @@
 
.mwe-popups-settings-icon {
display: inline-block;
+   vertical-align: text-top;
cursor: pointer;
margin-left: 5px;
height: 16px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26c41395557420aea6c995a59aada0079f1a896c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna psax...@wikimedia.org
Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


  1   2   3   4   >