[MediaWiki-commits] [Gerrit] Add a script for fast integration testing during scap - change (mediawiki...WikimediaMaintenance)

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

Change subject: Add a script for fast integration testing during scap
..


Add a script for fast integration testing during scap

Change-Id: I9c4099cf4d3d38feecdbb6ac4fd4f154cb962868
---
A sanityCheck.php
1 file changed, 47 insertions(+), 0 deletions(-)

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



diff --git a/sanityCheck.php b/sanityCheck.php
new file mode 100644
index 000..e6bd436
--- /dev/null
+++ b/sanityCheck.php
@@ -0,0 +1,47 @@
+?php
+/**
+ * Pre-deployment sanity check. 
+ *
+ * A quick integration test to be done during scap: execute a parser cache hit.
+ */
+
+// Use WikimediaCommandLine.inc instead of WikimediaMaintenance so that the 
code
+// can be parsed after the autoloader is started, so that we can have 
+// SanityCheckRequest in the same file as the execution code.
+require_once( __DIR__ . '/WikimediaCommandLine.inc' );
+
+class SanityCheckRequest extends FauxRequest {
+   var $title;
+
+   function __construct() {
+   $this-title = Title::newMainPage();
+
+   parent::__construct( array(
+   'title' = $this-title-getPrefixedDBkey()
+   ) );
+   }
+
+   function getRequestURL() {
+   return $this-title-getFullURL( '', false, PROTO_CANONICAL );
+   }
+}
+
+function doSanityCheck() {
+   $req = new SanityCheckRequest;
+   $context = new RequestContext;
+   $context-setRequest( $req );
+   $main = new MediaWiki( $context );
+   ob_start();
+   $main-run();
+   $result = ob_get_contents();
+   ob_end_clean();
+
+   if ( strpos( $result, '!-- Served by' ) !== false ) {
+   exit( 0 );
+   } else {
+   echo sanityCheck.php failed string match test\n;
+   exit( 1 );
+   }
+}
+
+doSanityCheck();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c4099cf4d3d38feecdbb6ac4fd4f154cb962868
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
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] Log font-change event - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Log font-change event
..


Log font-change event

Change-Id: I093e27d74d047a639082a5da6442944f590c67dc
---
M resources/js/ext.uls.displaysettings.js
M resources/js/ext.uls.eventlogger.js
2 files changed, 42 insertions(+), 0 deletions(-)

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



diff --git a/resources/js/ext.uls.displaysettings.js 
b/resources/js/ext.uls.displaysettings.js
index 8cffd85..51940ba 100644
--- a/resources/js/ext.uls.displaysettings.js
+++ b/resources/js/ext.uls.displaysettings.js
@@ -582,6 +582,21 @@
 
// Save the preferences
mw.webfonts.preferences.save( function ( result ) {
+   var newFonts = 
mw.webfonts.preferences.registry.fonts || {},
+   oldFonts = 
displaySettings.savedRegistry.registry.fonts || {};
+
+   if ( newFonts[displaySettings.uiLanguage] !== 
oldFonts[displaySettings.uiLanguage] ) {
+   mw.hook( 'mw.uls.font.change' ).fire(
+   'interface', 
displaySettings.uiLanguage, newFonts[displaySettings.uiLanguage]
+   );
+   }
+
+   if ( newFonts[displaySettings.contentLanguage] 
!== oldFonts[displaySettings.contentLanguage] ) {
+   mw.hook( 'mw.uls.font.change' ).fire(
+   'content', 
displaySettings.contentLanguage, newFonts[displaySettings.contentLanguage]
+   );
+   }
+
// closure for not losing the scope
displaySettings.onSave( result );
displaySettings.dirty = false;
diff --git a/resources/js/ext.uls.eventlogger.js 
b/resources/js/ext.uls.eventlogger.js
index 72adc49..8a65935 100644
--- a/resources/js/ext.uls.eventlogger.js
+++ b/resources/js/ext.uls.eventlogger.js
@@ -91,6 +91,7 @@
mw.hook( 'mw.uls.ime.morelanguages' ).add( $.proxy( 
this.imeMoreLanguages, this ) );
mw.hook( 'mw.uls.interface.morelanguages' ).add( 
$.proxy( this.interfaceMoreLanguages, this ) );
mw.hook( 'mw.uls.interface.language.change' ).add( 
$.proxy( this.interfaceLanguageChange, this ) );
+   mw.hook( 'mw.uls.font.change' ).add( $.proxy( 
this.fontChange, this ) );
},
 
/**
@@ -173,6 +174,32 @@
action: 'more-languages-access',
context: 'interface'
} );
+   },
+
+   /**
+* Log font preference changes
+*
+* @param {Object} context Either 'interface' or 'content'
+* @param {string} language
+* @param {string} font
+*/
+   fontChange: function ( context, language, font ) {
+   var logParams = {
+   action: 'font-change',
+   context: context
+   };
+
+   if ( context === 'interface' ) {
+   $.extend( logParams, {
+   interfaceFont: font,
+   // Override in case the user changed 
the ui language but hasn't applied it yet
+   interfaceLanguage: language
+   } );
+   } else {
+   logParams.contentFont = font;
+   }
+
+   this.log( logParams );
}
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I093e27d74d047a639082a5da6442944f590c67dc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
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] Check in both userspace and usertalkspace if the user exists - change (mediawiki...MassMessage)

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

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


Change subject: Check in both userspace and usertalkspace if the user exists
..

Check in both userspace and usertalkspace if the user exists

Change-Id: Iefe6e0447ae1c13c3ad89f4c8b20f135d5f615bd
---
M MassMessageJob.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/56/79756/1

diff --git a/MassMessageJob.php b/MassMessageJob.php
index 8ca9140..676903d 100644
--- a/MassMessageJob.php
+++ b/MassMessageJob.php
@@ -104,9 +104,9 @@
return true; // Oh well.
}
 
-   // If we're sending to a User talk: page, make sure the user 
exists.
+   // If we're sending to a User:/User talk: page, make sure the 
user exists.
// Redirects are automatically followed in getLocalTargets
-   if ( $title-getNamespace() == NS_USER_TALK ) {
+   if ( $title-getNamespace() == NS_USER || 
$title-getNamespace() == NS_USER_TALK ) {
$user = User::newFromName( $title-getBaseText() );
if ( !$user-getId() ) { // Does not exist
return true; // Should we log anything here?

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefe6e0447ae1c13c3ad89f4c8b20f135d5f615bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: 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] Check in both userspace and usertalkspace if the user exists - change (mediawiki...MassMessage)

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

Change subject: Check in both userspace and usertalkspace if the user exists
..


Check in both userspace and usertalkspace if the user exists

Change-Id: Iefe6e0447ae1c13c3ad89f4c8b20f135d5f615bd
---
M MassMessageJob.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/MassMessageJob.php b/MassMessageJob.php
index 8ca9140..676903d 100644
--- a/MassMessageJob.php
+++ b/MassMessageJob.php
@@ -104,9 +104,9 @@
return true; // Oh well.
}
 
-   // If we're sending to a User talk: page, make sure the user 
exists.
+   // If we're sending to a User:/User talk: page, make sure the 
user exists.
// Redirects are automatically followed in getLocalTargets
-   if ( $title-getNamespace() == NS_USER_TALK ) {
+   if ( $title-getNamespace() == NS_USER || 
$title-getNamespace() == NS_USER_TALK ) {
$user = User::newFromName( $title-getBaseText() );
if ( !$user-getId() ) { // Does not exist
return true; // Should we log anything here?

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefe6e0447ae1c13c3ad89f4c8b20f135d5f615bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
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] Do not use deprecated method - change (mediawiki...Wikibase)

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

Change subject: Do not use deprecated method
..


Do not use deprecated method

Change-Id: I64e102731211d6837401b76745417b27a52a17e5
---
M client/includes/ChangeHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 66f1adf..b2bbd30 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -343,7 +343,7 @@
$action = $change-getAction();
$meta = $change-getMetadata();
$user = $meta['user_text'];
-   $entityId = 
$change-getEntityId()-getPrefixedId();
+   $entityId = 
$change-getEntityId()-__toString();
 
$break = $breakNext
|| $currentAction !== $action

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64e102731211d6837401b76745417b27a52a17e5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Add basic tests for EntitiesWithout* special pages - change (mediawiki...Wikibase)

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

Change subject: Add basic tests for EntitiesWithout* special pages
..


Add basic tests for EntitiesWithout* special pages

Change-Id: I813f41093f676521972e3d6e6e64ab8e3fb35f04
---
M repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
M repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php
2 files changed, 38 insertions(+), 12 deletions(-)

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



diff --git 
a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
 
b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
index 0d84539..9b6b5e4 100644
--- 
a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
+++ 
b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutDescriptionTest.php
@@ -32,6 +32,7 @@
  *
  * @licence GNU GPL v2+
  * @author Bene*  benestar.wikime...@googlemail.com 
+ * @author Adam Shorland
  */
 class SpecialEntitiesWithoutDescriptionTest extends SpecialPageTestBase {
 
@@ -40,14 +41,27 @@
}
 
public function testExecute() {
-   //TODO: Actually verify that the output is correct.
-   //  Currently this just tests that there is no fatal error,
-   //  and that the restriction handling is working and doesn't
-   //  block. That is, the default should let the user execute
-   //  the page.
+
+   $matchers['language'] = array(
+   'tag' = 'input',
+   'attributes' = array(
+   'id' = 'wb-entitieswithoutpage-language',
+   'name' = 'language',
+   ) );
+   $matchers['submit'] = array(
+   'tag' = 'input',
+   'attributes' = array(
+   'id' = 'wikibase-entitieswithoutpage-submit',
+   'class' = 'wb-input-button',
+   'type' = 'submit',
+   'name' = 'submit',
+   ) );
+
 
list( $output, ) = $this-executeSpecialPage( '' );
-   $this-assertTrue( true, 'Calling execute without any subpage 
value' );
+   foreach( $matchers as $key = $matcher ){
+   $this-assertTag( $matcher, $output, Failed to match 
html output with tag '{$key}'' );
+   }
 
list( $output, ) = $this-executeSpecialPage( 'en' );
$this-assertTrue( true, 'Calling execute with a subpage value' 
); //TODO: assert output
diff --git 
a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php 
b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php
index f570b99..27a5712 100644
--- a/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialEntitiesWithoutLabelTest.php
@@ -41,14 +41,26 @@
}
 
public function testExecute() {
-   //TODO: Actually verify that the output is correct.
-   //  Currently this just tests that there is no fatal error,
-   //  and that the restriction handling is working and doesn't
-   //  block. That is, the default should let the user execute
-   //  the page.
+
+   $matchers['language'] = array(
+   'tag' = 'input',
+   'attributes' = array(
+   'id' = 'wb-entitieswithoutpage-language',
+   'name' = 'language',
+   ) );
+   $matchers['submit'] = array(
+   'tag' = 'input',
+   'attributes' = array(
+   'id' = 'wikibase-entitieswithoutpage-submit',
+   'class' = 'wb-input-button',
+   'type' = 'submit',
+   'name' = 'submit',
+   ) );
 
list( $output, ) = $this-executeSpecialPage( '' );
-   $this-assertTrue( true, 'Calling execute without any subpage 
value' );
+   foreach( $matchers as $key = $matcher ){
+   $this-assertTag( $matcher, $output, Failed to match 
html output with tag '{$key}'' );
+   }
}
 
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I813f41093f676521972e3d6e6e64ab8e3fb35f04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore 

[MediaWiki-commits] [Gerrit] Prevent destroying edittoolbar error tooltip if destroyed al... - change (mediawiki...Wikibase)

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

Change subject: Prevent destroying edittoolbar error tooltip if destroyed 
already
..


Prevent destroying edittoolbar error tooltip if destroyed already

Change-Id: I3bffdba6d180ccb6aa5639a8fa94b0dd1d4ed003
---
M lib/resources/jquery.wikibase/toolbar/edittoolbar.js
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
index 4b25dfe..7bec417 100644
--- a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
@@ -336,10 +336,12 @@
} );
$anchor.data( 'wbtooltip' ).show();
 
-   $anchor.on( 'wbtooltipafterhide', function( e ) {
+   $anchor.one( 'wbtooltipafterhide', function( e ) {
self.element.removeClass( 'wb-error' 
).addClass( 'wb-edit' );
self._interactionWidget.setError();
-   $anchor.data( 'wbtooltip' ).destroy();
+   if( $anchor.data( 'wbtooltip' ) ) {
+   $anchor.data( 'wbtooltip' ).destroy();
+   }
} );
},
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bffdba6d180ccb6aa5639a8fa94b0dd1d4ed003
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Cleaned up QUnit test files - change (mediawiki...Wikibase)

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

Change subject: Cleaned up QUnit test files
..


Cleaned up QUnit test files

siteselector, entityselector and SiteLinksEditTool test files conform to jshint 
now.

Change-Id: Ice89b00f976469c594c2df0470ef79790cf06539
---
M .jshintignore
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
M lib/tests/qunit/wikibase.ui.SiteLinksEditTool.tests.js
4 files changed, 17 insertions(+), 29 deletions(-)

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



diff --git a/.jshintignore b/.jshintignore
index fa3e01d..fe966a7 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -15,10 +15,7 @@
 
./lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.SitePageInterface.tests.js
 ./lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.tests.js
 ./lib/tests/qunit/wikibase.ui.PropertyEditTool.tests.js
-./lib/tests/qunit/wikibase.ui.SiteLinksEditTool.tests.js
 ./lib/tests/qunit/data/testrunner.js
-./lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
-./lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
 ./lib/tests/qunit/parsers/EntityIdParser.tests.js
 ./lib/tests/qunit/wikibase.datamodel/datamodel.Entity.tests.js
 ./lib/tests/qunit/wikibase.datamodel/datamodel.Item.tests.js
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
index 2064ac0..3c8ea4c 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
@@ -1,6 +1,4 @@
 /**
- * QUnit tests for entity selector jQuery widget
- *
  * @since 0.1
  * @file
  * @ingroup WikibaseLib
@@ -9,13 +7,13 @@
  * @author H. Snater  mediaw...@snater.com 
  */
 
-( function( $, QUnit, undefined ) {
+( function( $, QUnit ) {
'use strict';
 
/**
 * Factory for creating a jquery.wikibase.entityselector widget 
suitable for testing.
 *
-* @param {Object} customOptions
+* @param {Object} [customOptions]
 */
var newTestEntitySelector = function( customOptions ) {
var options = {
@@ -25,7 +23,8 @@
$.extend( options, customOptions );
}
// element needs to be in the DOM for setting text selection 
range
-   return $( 'input/' ).addClass( 
'test_entityselector').appendTo( 'body' ).entityselector( options );
+   return $( 'input/' )
+   .addClass( 'test_entityselector').appendTo( 'body' 
).entityselector( options );
};
 
QUnit.module( 'jquery.wikibase.entityselector', QUnit.newMwEnvironment( 
{
@@ -79,7 +78,8 @@
assert.equal(
input.val(),
'abc',
-   'Replaced input element\'s value with first result 
(remaining part of the string is highlighted).'
+   'Replaced input element\'s value with first result 
(remaining part of the string is '
+   + 'highlighted).'
);
 
assert.equal(
@@ -97,7 +97,8 @@
assert.equal(
$( entityselector.menu.element.children()[2] ).find( 
'span' ).length,
2,
-   'Created suggestion list section\'s DOM structure - 
skipping description and aliases when empty.'
+   'Created suggestion list section\'s DOM structure - 
skipping description and aliases '
+   + 'when empty.'
);
 
entityselector.close();
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
index 3924fe8..8e23181 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
@@ -1,20 +1,17 @@
 /**
- * QUnit tests jquery.wikibase.siteselector widget
- * @see https://www.mediawiki.org/wiki/Extension:Wikibase
- *
  * @since 0.1
  * @file
  * @ingroup WikibaseLib
  *
  * @licence GNU GPL v2+
- * @author H. Snater  mediawiki at snater.com 
+ * @author H. Snater  mediaw...@snater.com 
  */
 
 ( function( mw, wb, $, QUnit ) {
'use strict';
 
/**
-* Factory for creating a new sitesuggester enhanced input element.
+* Factory for creating a new site selector enhanced input element.
 *
 * @param {Object} [options]
 * @return  {jQuery} input element
@@ -30,7 +27,7 @@
options = $.merge( { resultSet: siteList }, options );
var 

[MediaWiki-commits] [Gerrit] Adjusted site selector widget to site groups - change (mediawiki...Wikibase)

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

Change subject: Adjusted site selector widget to site groups
..


Adjusted site selector widget to site groups

(bug 51560) In the site selector's input box and the corresponding suggestion 
list,
the site id is shown instead of the language code now. (The matching mechanism 
is
using the site id already.) Matching the language code is reimplemented with 
this
change set.

Change-Id: I911b4a8e9871f426580be1100b004740ec9b9916
---
M lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.siteselector.tests.js
M lib/tests/qunit/wikibase.ui.SiteLinksEditTool.tests.js
M repo/tests/selenium/sitelinks/sitelinks_spec.rb
4 files changed, 60 insertions(+), 26 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
index 33341b8..14dccb5 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.siteselector.js
@@ -14,7 +14,7 @@
 
/**
 * Site selector
-* Ehances an input box with auto-complete and auto-suggestion 
functionality for site ids.
+* Enhances an input box with auto-complete and auto-suggestion 
functionality for site ids.
 *
 * @example $( 'input' ).siteselector( { resultSet:  list of wikibase 
Site objects  } );
 * @desc Creates a simple site selector.
@@ -104,25 +104,37 @@
var results = $.grep( this.options.resultSet, function( 
result, i ) {
return (
result.label.toLowerCase().indexOf( 
request.term.toLowerCase() ) === 0
-   || result.site.getId().indexOf( 
request.term.toLowerCase() ) === 0
-   );
+   || result.site.getId().indexOf( 
request.term.toLowerCase() ) === 0
+   );
} );
-   // if some site id is specified exactly, move that site 
to the top for it will
-   // be the one picked when leaving the input field
-   var additionallyFiltered = $.grep( results, function( 
result, i ) {
+
+   // If some site id or language code is specified 
exactly, move that site / those sites
+   // to the top. The uppermost one be the one picked when 
leaving the input field.
+   var filteredById = $.grep( results, function( result, i 
) {
return ( request.term === result.site.getId() );
} );
-   if ( additionallyFiltered.length  0 ) { // remove site 
from original result set
-   for ( var i in results ) {
-   if ( results[i].site.getId() === 
additionallyFiltered[0].site.getId() ) {
-   results.splice( i, 1 );
-   break;
+
+   var filteredByLanguageCode = $.grep( results, function( 
result, i ) {
+   return ( request.term === 
result.site.getLanguageCode() );
+   } );
+
+   // Placing sites hit by id before sites hits by 
language code:
+   var directlyHitSites = $.merge( filteredById, 
filteredByLanguageCode );
+
+   // Remove directly hit sites from original result set:
+   if( directlyHitSites.length ) {
+   for( var i in results ) {
+   for( var j in directlyHitSites ) {
+   if ( results[i].site.getId() 
=== directlyHitSites[j].site.getId() ) {
+   results.splice( i, 1 );
+   break;
+   }
}
}
}
-   // put site with exactly hit site id to beginning of 
complete result set
-   $.merge( additionallyFiltered, results );
-   suggest( additionallyFiltered );
+
+   // Put site(s) exactly hit to the top of the complete 
result set:
+   suggest( $.merge( directlyHitSites, results ) );
},
 
/**
@@ -169,8 +181,8 @@
for ( var i in resultSet ) {
var site = 

[MediaWiki-commits] [Gerrit] Update jquery.uls from upstream - change (mediawiki...UniversalLanguageSelector)

2013-08-19 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Update jquery.uls from upstream
..

Update jquery.uls from upstream

Change-Id: I2591f5f8e761f08ef07085f3a73001ec3f84ae36
---
A lib/jquery.uls/i18n/ce.json
M lib/jquery.uls/i18n/ckb.json
M lib/jquery.uls/i18n/hi.json
M lib/jquery.uls/i18n/ky.json
M lib/jquery.uls/i18n/mzn.json
A lib/jquery.uls/i18n/nds-nl.json
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.languagefilter.js
8 files changed, 59 insertions(+), 21 deletions(-)


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

diff --git a/lib/jquery.uls/i18n/ce.json b/lib/jquery.uls/i18n/ce.json
new file mode 100644
index 000..10ef4cc
--- /dev/null
+++ b/lib/jquery.uls/i18n/ce.json
@@ -0,0 +1,13 @@
+{
+@metadata: {
+authors: [
+\u0423\u043c\u0430\u0440
+]
+},
+uls-region-WW: 
\u0414\u0435\u0440\u0440\u0438\u0433\u0434\u0443\u044c\u043d\u0435\u043d\u0430\u043d,
+uls-region-AS: \u0410\u0437\u0438,
+uls-region-ME: \u0413\u0435\u0440\u0433\u0430\u0440\u0430 
\u041c\u0430\u043b\u0445\u0431\u0430\u043b\u0435,
+uls-region-PA: \u041e\u043a\u0435\u0430\u043d\u0438,
+uls-common-languages: \u0428\u0430 
\u0434\u04c0\u0430\u043d\u0438\u0441\u0431\u0435\u043b\u043b\u0430 
\u043c\u0435\u0442\u0442\u0430\u043d\u0430\u0448,
+uls-search-placeholder: \u041b\u0430\u0445\u0430 
\u043c\u043e\u0442\u0442
+}
\ No newline at end of file
diff --git a/lib/jquery.uls/i18n/ckb.json b/lib/jquery.uls/i18n/ckb.json
index edb7bd6..05cf204 100644
--- a/lib/jquery.uls/i18n/ckb.json
+++ b/lib/jquery.uls/i18n/ckb.json
@@ -12,7 +12,7 @@
 uls-region-EU: \u0626\u06d5\u0648\u0631\u0648\u0648\u067e\u0627,
 uls-region-AS: \u0626\u0627\u0633\u06cc\u0627,
 uls-region-ME: \u0695\u06c6\u0698\u06be\u06d5\u06b5\u0627\u062a\u06cc 
\u0646\u0627\u0648\u06cc\u0646,
-uls-region-PA: 
\u0626\u06c6\u0642\u06cc\u0627\u0646\u0648\u0648\u0633\u06cc 
\u067e\u0627\u0633\u06cc\u0641\u06cc\u06a9,
+uls-region-PA: 
\u0626\u06c6\u0642\u06cc\u0627\u0646\u0648\u0648\u0633\u06cc 
\u0626\u0627\u0631\u0627\u0645,
 uls-no-results-found: \u06be\u06cc\u0686 
\u0626\u0627\u06a9\u0627\u0645\u06ce\u06a9 
\u0646\u06d5\u062f\u06c6\u0632\u0631\u0627\u06cc\u06d5\u0648\u06d5,
 uls-common-languages: \u0632\u0645\u0627\u0646\u06d5 
\u06be\u0627\u0648\u0628\u06d5\u0634\u06d5\u06a9\u0627\u0646,
 uls-no-results-suggestion-title: \u0695\u06d5\u0646\u06af\u06d5 
\u062e\u06c6\u0634\u06cc\u062a \u0628\u06ce \u0644\u06d5:,
diff --git a/lib/jquery.uls/i18n/hi.json b/lib/jquery.uls/i18n/hi.json
index 1b8acdc..9d49d61 100644
--- a/lib/jquery.uls/i18n/hi.json
+++ b/lib/jquery.uls/i18n/hi.json
@@ -1,10 +1,13 @@
 {
 @metadata: {
 authors: [
-Santhosh.thottingal
+Santhosh.thottingal,
+Siddhartha Ghai
 ]
 },
 uls-select-language: \u092d\u093e\u0937\u093e 
\u091a\u0941\u0928\u0947\u0902,
+uls-region-WW: \u0935\u0948\u0936\u094d\u0935\u093f\u0915,
+uls-region-SP: \u0935\u093f\u0936\u0947\u0937,
 uls-region-AM: \u0905\u092e\u0947\u0930\u093f\u0915\u093e,
 uls-region-AF: \u0905\u092b\u093c\u094d\u0930\u0940\u0915\u093e,
 uls-region-EU: \u092f\u0942\u0930\u094b\u092a,
@@ -12,5 +15,8 @@
 uls-region-ME: \u092e\u0927\u094d\u092f \u092a\u0942\u0930\u094d\u0935,
 uls-region-PA: \u092a\u094d\u0930\u0936\u093e\u0902\u0924,
 uls-no-results-found: \u0915\u094b\u0908 
\u092a\u0930\u093f\u0923\u093e\u092e \u0928\u0939\u0940\u0902 
\u092e\u093f\u0932\u0947,
-uls-common-languages: \u0906\u092e \u092d\u093e\u0937\u093e
+uls-common-languages: \u0906\u092e 
\u092d\u093e\u0937\u093e\u090f\u0901,
+uls-no-results-suggestion-title: \u0906\u092a\u0915\u0947 
\u0932\u093f\u092f\u0947 \u0938\u0902\u092d\u0935\u0924\u0903 
\u0909\u092a\u092f\u094b\u0917\u0940:,
+uls-search-help: \u0906\u092a \u092d\u093e\u0937\u093e \u0915\u0947 
\u0928\u093e\u092e, \u0932\u093f\u092a\u093f \u0915\u0947 \u0928\u093e\u092e 
\u090f\u0935\u0902 \u092d\u093e\u0937\u093e \u0915\u0947 ISO \u0915\u094b\u0921 
\u0938\u0947 \u0916\u094b\u091c \u0915\u0930 \u0938\u0915\u0924\u0947 
\u0939\u0948\u0902, \u0914\u0930 \u0915\u094d\u0937\u0947\u0924\u094d\u0930 
\u0905\u0928\u0941\u0938\u093e\u0930 \u092c\u094d\u0930\u093e\u0909\u091c\u093c 
\u092d\u0940 \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902:,
+uls-search-placeholder: \u092d\u093e\u0937\u093e \u0916\u094b\u091c
 }
\ No newline at end of file
diff --git a/lib/jquery.uls/i18n/ky.json b/lib/jquery.uls/i18n/ky.json
index 72e555b..c6b9a6f 100644
--- a/lib/jquery.uls/i18n/ky.json
+++ b/lib/jquery.uls/i18n/ky.json
@@ -1,11 +1,13 @@
 {
 @metadata: {
 authors: [
-Growingup
+Growingup,
+\u0412\u0438\u043a\u0438\u043d\u0435\u0439
 ]
 

[MediaWiki-commits] [Gerrit] Followup Ifb005e7c: some cleanup in comments. - change (mediawiki/core)

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

Change subject: Followup Ifb005e7c: some cleanup in comments.
..


Followup Ifb005e7c: some cleanup in comments.

There're still various disable left there in messages, which are
fixable on translatewiki.net:

MessagesIke_cans.php:'variantname-iu' = 'disable',
MessagesIke_latn.php:'variantname-iu' = 'disable',
MessagesKk.php:'variantname-kk-kz'   = 'disable',
MessagesKk.php:'variantname-kk-tr'   = 'disable',
MessagesKk.php:'variantname-kk-cn'   = 'disable',
MessagesKk.php:'variantname-kk'  = 'disable',
MessagesKu_latn.php:'variantname-ku' = 'disable',
MessagesShi.php:'variantname-shi' = 'disable',

Change-Id: Ic8f874660f3b6f266ab791422cc5ee1749546a00
---
M languages/messages/MessagesZh_tw.php
1 file changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/languages/messages/MessagesZh_tw.php 
b/languages/messages/MessagesZh_tw.php
index 7d98460..2d9b818 100644
--- a/languages/messages/MessagesZh_tw.php
+++ b/languages/messages/MessagesZh_tw.php
@@ -875,12 +875,7 @@
 只有列示項目(以 * 開頭的項目)會被考慮。第一個連結一定要連接去壞圖片中。
 然後在同一行的連結會考慮作例外,即是幅圖片可以在哪一個頁面中同時顯示。',
 
-/*
-Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' = 'disable',
-Variants for Chinese language
-*/
+# Variants for Chinese language
 'variantname-zh-tw' = '台灣繁體',
 
 # Metadata

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8f874660f3b6f266ab791422cc5ee1749546a00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Liangent liang...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Liangent liang...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@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 jquery.uls from upstream - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update jquery.uls from upstream
..


Update jquery.uls from upstream

Change-Id: I2591f5f8e761f08ef07085f3a73001ec3f84ae36
---
A lib/jquery.uls/i18n/ce.json
M lib/jquery.uls/i18n/ckb.json
M lib/jquery.uls/i18n/hi.json
M lib/jquery.uls/i18n/ky.json
M lib/jquery.uls/i18n/mzn.json
A lib/jquery.uls/i18n/nds-nl.json
M lib/jquery.uls/src/jquery.uls.core.js
M lib/jquery.uls/src/jquery.uls.languagefilter.js
8 files changed, 59 insertions(+), 21 deletions(-)

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



diff --git a/lib/jquery.uls/i18n/ce.json b/lib/jquery.uls/i18n/ce.json
new file mode 100644
index 000..10ef4cc
--- /dev/null
+++ b/lib/jquery.uls/i18n/ce.json
@@ -0,0 +1,13 @@
+{
+@metadata: {
+authors: [
+\u0423\u043c\u0430\u0440
+]
+},
+uls-region-WW: 
\u0414\u0435\u0440\u0440\u0438\u0433\u0434\u0443\u044c\u043d\u0435\u043d\u0430\u043d,
+uls-region-AS: \u0410\u0437\u0438,
+uls-region-ME: \u0413\u0435\u0440\u0433\u0430\u0440\u0430 
\u041c\u0430\u043b\u0445\u0431\u0430\u043b\u0435,
+uls-region-PA: \u041e\u043a\u0435\u0430\u043d\u0438,
+uls-common-languages: \u0428\u0430 
\u0434\u04c0\u0430\u043d\u0438\u0441\u0431\u0435\u043b\u043b\u0430 
\u043c\u0435\u0442\u0442\u0430\u043d\u0430\u0448,
+uls-search-placeholder: \u041b\u0430\u0445\u0430 
\u043c\u043e\u0442\u0442
+}
\ No newline at end of file
diff --git a/lib/jquery.uls/i18n/ckb.json b/lib/jquery.uls/i18n/ckb.json
index edb7bd6..05cf204 100644
--- a/lib/jquery.uls/i18n/ckb.json
+++ b/lib/jquery.uls/i18n/ckb.json
@@ -12,7 +12,7 @@
 uls-region-EU: \u0626\u06d5\u0648\u0631\u0648\u0648\u067e\u0627,
 uls-region-AS: \u0626\u0627\u0633\u06cc\u0627,
 uls-region-ME: \u0695\u06c6\u0698\u06be\u06d5\u06b5\u0627\u062a\u06cc 
\u0646\u0627\u0648\u06cc\u0646,
-uls-region-PA: 
\u0626\u06c6\u0642\u06cc\u0627\u0646\u0648\u0648\u0633\u06cc 
\u067e\u0627\u0633\u06cc\u0641\u06cc\u06a9,
+uls-region-PA: 
\u0626\u06c6\u0642\u06cc\u0627\u0646\u0648\u0648\u0633\u06cc 
\u0626\u0627\u0631\u0627\u0645,
 uls-no-results-found: \u06be\u06cc\u0686 
\u0626\u0627\u06a9\u0627\u0645\u06ce\u06a9 
\u0646\u06d5\u062f\u06c6\u0632\u0631\u0627\u06cc\u06d5\u0648\u06d5,
 uls-common-languages: \u0632\u0645\u0627\u0646\u06d5 
\u06be\u0627\u0648\u0628\u06d5\u0634\u06d5\u06a9\u0627\u0646,
 uls-no-results-suggestion-title: \u0695\u06d5\u0646\u06af\u06d5 
\u062e\u06c6\u0634\u06cc\u062a \u0628\u06ce \u0644\u06d5:,
diff --git a/lib/jquery.uls/i18n/hi.json b/lib/jquery.uls/i18n/hi.json
index 1b8acdc..9d49d61 100644
--- a/lib/jquery.uls/i18n/hi.json
+++ b/lib/jquery.uls/i18n/hi.json
@@ -1,10 +1,13 @@
 {
 @metadata: {
 authors: [
-Santhosh.thottingal
+Santhosh.thottingal,
+Siddhartha Ghai
 ]
 },
 uls-select-language: \u092d\u093e\u0937\u093e 
\u091a\u0941\u0928\u0947\u0902,
+uls-region-WW: \u0935\u0948\u0936\u094d\u0935\u093f\u0915,
+uls-region-SP: \u0935\u093f\u0936\u0947\u0937,
 uls-region-AM: \u0905\u092e\u0947\u0930\u093f\u0915\u093e,
 uls-region-AF: \u0905\u092b\u093c\u094d\u0930\u0940\u0915\u093e,
 uls-region-EU: \u092f\u0942\u0930\u094b\u092a,
@@ -12,5 +15,8 @@
 uls-region-ME: \u092e\u0927\u094d\u092f \u092a\u0942\u0930\u094d\u0935,
 uls-region-PA: \u092a\u094d\u0930\u0936\u093e\u0902\u0924,
 uls-no-results-found: \u0915\u094b\u0908 
\u092a\u0930\u093f\u0923\u093e\u092e \u0928\u0939\u0940\u0902 
\u092e\u093f\u0932\u0947,
-uls-common-languages: \u0906\u092e \u092d\u093e\u0937\u093e
+uls-common-languages: \u0906\u092e 
\u092d\u093e\u0937\u093e\u090f\u0901,
+uls-no-results-suggestion-title: \u0906\u092a\u0915\u0947 
\u0932\u093f\u092f\u0947 \u0938\u0902\u092d\u0935\u0924\u0903 
\u0909\u092a\u092f\u094b\u0917\u0940:,
+uls-search-help: \u0906\u092a \u092d\u093e\u0937\u093e \u0915\u0947 
\u0928\u093e\u092e, \u0932\u093f\u092a\u093f \u0915\u0947 \u0928\u093e\u092e 
\u090f\u0935\u0902 \u092d\u093e\u0937\u093e \u0915\u0947 ISO \u0915\u094b\u0921 
\u0938\u0947 \u0916\u094b\u091c \u0915\u0930 \u0938\u0915\u0924\u0947 
\u0939\u0948\u0902, \u0914\u0930 \u0915\u094d\u0937\u0947\u0924\u094d\u0930 
\u0905\u0928\u0941\u0938\u093e\u0930 \u092c\u094d\u0930\u093e\u0909\u091c\u093c 
\u092d\u0940 \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902:,
+uls-search-placeholder: \u092d\u093e\u0937\u093e \u0916\u094b\u091c
 }
\ No newline at end of file
diff --git a/lib/jquery.uls/i18n/ky.json b/lib/jquery.uls/i18n/ky.json
index 72e555b..c6b9a6f 100644
--- a/lib/jquery.uls/i18n/ky.json
+++ b/lib/jquery.uls/i18n/ky.json
@@ -1,11 +1,13 @@
 {
 @metadata: {
 authors: [
-Growingup
+Growingup,
+\u0412\u0438\u043a\u0438\u043d\u0435\u0439
 ]
 },
 uls-select-language: \u0422\u0438\u043b\u0434\u0438 

[MediaWiki-commits] [Gerrit] Fix comments for grep - change (mediawiki/core)

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

Change subject: Fix comments for grep
..


Fix comments for grep

* category-*-count
* node-count-exceeded-*
* expansion-depth-exceeded-*

Change-Id: If5a58c4f128d15969c56955af43aff76954ca94b
---
M includes/CategoryViewer.php
M includes/parser/Parser.php
2 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 0c44e96..a9f5d23 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -700,8 +700,8 @@
# category-article-count-limited, 
category-file-count-limited
return $this-msg( category-$type-count-limited 
)-numParams( $rescnt )-parseAsBlock();
}
-   # Give grep a chance to find the usages: 
category-subcat-count-limited,
-   # category-article-count-limited, category-file-count-limited
+   # Give grep a chance to find the usages:
+   # category-subcat-count, category-article-count, 
category-file-count
return $this-msg( category-$type-count )-numParams( 
$rescnt, $totalcnt )-parseAsBlock();
}
 }
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index ba5c8de..b9473d7 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3170,6 +3170,12 @@
 *   'post-expand-template-inclusion' (corresponding messages:
 *   'post-expand-template-inclusion-warning',
 *   'post-expand-template-inclusion-category')
+*   'node-count-exceeded' (corresponding messages:
+*   'node-count-exceeded-warning',
+*   'node-count-exceeded-category')
+*   'expansion-depth-exceeded' (corresponding messages:
+*   'expansion-depth-exceeded-warning',
+*   'expansion-depth-exceeded-category')
 * @param int|null $current Current value
 * @param int|null $max Maximum allowed, when an explicit limit has been
 *   exceeded, provide the values (optional)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5a58c4f128d15969c56955af43aff76954ca94b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@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] Switch from string-based to os.path-based path management - change (pywikibot/core)

2013-08-19 Thread Xqt (Code Review)
Xqt has submitted this change and it was merged.

Change subject: Switch from string-based to os.path-based path management
..


Switch from string-based to os.path-based path management

Instead of doing string manipulation, we now use os.path.split
and os.path.join to copy and delete the relevant i18n test file

Change-Id: I7f177ad85d135e347220ae9fa77ca0eeb8053541
---
M tests/i18n_tests.py
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/tests/i18n_tests.py b/tests/i18n_tests.py
index be8a542..8bef1e6 100644
--- a/tests/i18n_tests.py
+++ b/tests/i18n_tests.py
@@ -59,11 +59,12 @@
 
 class TestTWTranslate(unittest.TestCase):
 def setUp(self):
-self.path = os.path.realpath(__file__)[:-13]
-shutil.copyfile(self.path + 'i18n/test.py', self.path + 
'../scripts/i18n/test.py')
+self.path = os.path.split(os.path.realpath(__file__))[0]
+shutil.copyfile(os.path.join(self.path, 'i18n', 'test.py'),
+os.path.join(self.path, '..', 'scripts', 'i18n', 
'test.py'))
 
 def tearDown(self):
-os.remove(self.path + '../scripts/i18n/test.py')
+os.remove(os.path.join(self.path, '..', 'scripts', 'i18n', 'test.py'))
 
 def testLocalized(self):
 self.assertEqual(i18n.twtranslate('en', 'test-localized'),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f177ad85d135e347220ae9fa77ca0eeb8053541
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Xqt i...@gno.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] Log no-search-results event - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Log no-search-results event
..


Log no-search-results event

Change-Id: Ia272a6783d56c75ba775d71195104aad21214121
---
M resources/js/ext.uls.eventlogger.js
1 file changed, 19 insertions(+), 4 deletions(-)

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



diff --git a/resources/js/ext.uls.eventlogger.js 
b/resources/js/ext.uls.eventlogger.js
index 8a65935..abb0afb 100644
--- a/resources/js/ext.uls.eventlogger.js
+++ b/resources/js/ext.uls.eventlogger.js
@@ -92,16 +92,19 @@
mw.hook( 'mw.uls.interface.morelanguages' ).add( 
$.proxy( this.interfaceMoreLanguages, this ) );
mw.hook( 'mw.uls.interface.language.change' ).add( 
$.proxy( this.interfaceLanguageChange, this ) );
mw.hook( 'mw.uls.font.change' ).add( $.proxy( 
this.fontChange, this ) );
+   $( 'body' ).on( 'noresults.uls', '.uls-menu 
.languagefilter',
+$.proxy( this.noSearchResults, this )
+   );
},
 
/**
 * Log language settings open
-* @param {Array} args
+* @param {string} context Where it was opened from
 */
-   ulsSettingsOpen: function ( args ) {
+   ulsSettingsOpen: function ( context ) {
this.log( {
action: 'settings-open',
-   context: args
+   context: context
} );
},
 
@@ -179,7 +182,7 @@
/**
 * Log font preference changes
 *
-* @param {Object} context Either 'interface' or 'content'
+* @param {string} context Either 'interface' or 'content'
 * @param {string} language
 * @param {string} font
 */
@@ -200,6 +203,18 @@
}
 
this.log( logParams );
+   },
+
+   /**
+* Log search strings which produce no search results.
+* @param {jQuery.event} event The orignal event
+* @param {string} context The query string
+*/
+   noSearchResults: function ( event, context ) {
+   this.log( {
+   action: 'no-search-results',
+   context: context
+   } );
}
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia272a6783d56c75ba775d71195104aad21214121
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] Make MockSite.login return True ('login successful') - change (pywikibot/core)

2013-08-19 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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


Change subject: Make MockSite.login return True ('login successful')
..

Make MockSite.login return True ('login successful')

Otherwise the must_be decorator thinks the login failed, and
raises an Exception.

Change-Id: Id34be756f50565a0279e040f00ac5956668f8b31
---
M tests/dry_site_tests.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/58/79758/1

diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py
index f5b7af4..affb8a9 100644
--- a/tests/dry_site_tests.py
+++ b/tests/dry_site_tests.py
@@ -34,6 +34,7 @@
 
 def login(self, as_sysop):
 self.last_login = 'sysop' if as_sysop else 'user'
+return True
 
 def inner_fn(self, *args, **kwargs):
 self.last_fn_called = (args, kwargs)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id34be756f50565a0279e040f00ac5956668f8b31
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] Make MockSite.login return True ('login successful') - change (pywikibot/core)

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

Change subject: Make MockSite.login return True ('login successful')
..


Make MockSite.login return True ('login successful')

Otherwise the must_be decorator thinks the login failed, and
raises an Exception.

Fix-For-Change-Id: Ic7196732b0841a5c3a956fa0c7a2b558eba16371
Change-Id: Id34be756f50565a0279e040f00ac5956668f8b31
---
M tests/dry_site_tests.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/dry_site_tests.py b/tests/dry_site_tests.py
index f5b7af4..affb8a9 100644
--- a/tests/dry_site_tests.py
+++ b/tests/dry_site_tests.py
@@ -34,6 +34,7 @@
 
 def login(self, as_sysop):
 self.last_login = 'sysop' if as_sysop else 'user'
+return True
 
 def inner_fn(self, *args, **kwargs):
 self.last_fn_called = (args, kwargs)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id34be756f50565a0279e040f00ac5956668f8b31
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl
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: Implement language-selection-method event - change (mediawiki...UniversalLanguageSelector)

2013-08-19 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: WIP: Implement language-selection-method event
..

WIP: Implement language-selection-method event

Change-Id: If2d207f8a221c8f2a560b1399ad69a3032b2064b
---
M resources/js/ext.uls.eventlogger.js
M resources/js/ext.uls.interface.js
2 files changed, 26 insertions(+), 0 deletions(-)


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

diff --git a/resources/js/ext.uls.eventlogger.js 
b/resources/js/ext.uls.eventlogger.js
index abb0afb..8bc7c48 100644
--- a/resources/js/ext.uls.eventlogger.js
+++ b/resources/js/ext.uls.eventlogger.js
@@ -95,6 +95,7 @@
$( 'body' ).on( 'noresults.uls', '.uls-menu 
.languagefilter',
 $.proxy( this.noSearchResults, this )
);
+   mw.hook( 'mw.uls.interface.language.method' ).add( 
$.proxy( this.languageSelectionMethod, this ) );
},
 
/**
@@ -170,6 +171,18 @@
},
 
/**
+* Log usage of different language selection methods
+*
+* @param {string} context One of 'map', 'search' or 'browser'
+*/
+   languageSelectionMethod: function ( context ) {
+   this.log( {
+   action: 'language-selection-method',
+   context: context
+   }, 500 ).always( callback );
+   },
+
+   /**
 * More languages in display settings is clicked
 */
interfaceMoreLanguages: function () {
diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index 28f74a1..e0c0339 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -410,6 +410,19 @@
},
onSelect: function ( 
language ) {

mw.uls.changeLanguage( language );
+   },
+   onVisible: function () {
+   $( '#map-block' 
).on( 'click', function () {
+   
mw.hook( 'mw.uls.settings.open' ).fire( 'map' );
+   } );
+
+   $( 
'#languagefilter' ).on( 'keydown', function () {
+   // If 
it's the first letter,
+   // log 
the usage of the search box
+   if ( $( 
this ).val() === '' ) {
+   
mw.hook( 'mw.uls.settings.open' ).fire( 'search' );
+   }
+   } );
}
};
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2d207f8a221c8f2a560b1399ad69a3032b2064b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] First commit - change (mediawiki...SectionDisqus)

2013-08-19 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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


Change subject: First commit
..

First commit

Submitting the basic extension files

Change-Id: Ibe34b71d66a5f6e21d0ffd288f5d9487ae4ca22b
---
A SectionDisqus.body.php
A SectionDisqus.css
A SectionDisqus.i18n.php
A SectionDisqus.js
A SectionDisqus.php
5 files changed, 125 insertions(+), 0 deletions(-)


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

diff --git a/SectionDisqus.body.php b/SectionDisqus.body.php
new file mode 100644
index 000..0c65a6a
--- /dev/null
+++ b/SectionDisqus.body.php
@@ -0,0 +1,33 @@
+?php
+
+class SectionDisqus {
+
+   static function addResources( $out ) {
+   $out-addModules( 'ext.SectionDisqus' );
+   return true;
+   }
+
+   static function addDisqusButton( $skin, $title, $section, $tooltip, 
$result ) {
+   $result .= ' span class=disqus_button[ a 
onclick=window.showDisqusDialog(' . $tooltip . ');disqus/a ]/span';
+   return true;
+   }
+
+   static function addDisqusDialog( $data ) {
+   global $wgSectionDisqusShortname;
+   $data .= 'div id=disqus_dialog title=Discuss this 
sectiondiv id=disqus_thread/div/div';
+   $data .= 'script type=text/javascript
+
+   var disqus_url = http://wikineering.org/;;
+   var disqus_shortname = ' . $wgSectionDisqusShortname . 
';
+
+   (function() {
+   var dsq = document.createElement(script);
+   dsq.type = text/javascript;
+   dsq.async = true;
+   dsq.src = // + disqus_shortname + 
.disqus.com/embed.js;
+   
document.getElementsByTagName(body)[0].appendChild(dsq);
+   })();
+   /script';
+   return true;
+   }
+}
\ No newline at end of file
diff --git a/SectionDisqus.css b/SectionDisqus.css
new file mode 100644
index 000..5ee6210
--- /dev/null
+++ b/SectionDisqus.css
@@ -0,0 +1,9 @@
+.disqus_button {
+   cursor: pointer;
+   font-size: small;
+   font-weight: normal;
+}
+
+#disqus_dialog {
+   display: none;
+}
\ No newline at end of file
diff --git a/SectionDisqus.i18n.php b/SectionDisqus.i18n.php
new file mode 100644
index 000..509e78f
--- /dev/null
+++ b/SectionDisqus.i18n.php
@@ -0,0 +1,31 @@
+?php
+/**
+ * Internationalisation for SectionDisqus extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+/** English
+ * @author Luis Felipe Schenone
+ */
+$messages['en'] = array(
+   'sectiondisqus-desc' = 'Adds a Discuss button next to the Edit 
button of every section, that when clicked, opens a Disqus lightbox for that 
section.',
+);
+
+/** Message documentation (Message documentation)
+ * @author Raimond Spekking
+ * @author Shirayuki
+ */
+$messages['qqq'] = array(
+   'sectiondisqus-desc' = 
'{{desc|name=SectionDisqus|url=http://www.mediawiki.org/wiki/Extension:HoverGallery}}',
+);
+
+/** Spanish (español)
+ * @author Luis Felipe Schenone
+ */
+$messages['es'] = array(
+   'sectiondisqus-desc' = 'Añade un botón Discutir junto al botón 
Editar de cada sección, que al clickearlo, abre una ventana de discusión para 
esa sección.',
+);
diff --git a/SectionDisqus.js b/SectionDisqus.js
new file mode 100644
index 000..6945eeb
--- /dev/null
+++ b/SectionDisqus.js
@@ -0,0 +1,15 @@
+window.showDisqusDialog = function( tooltip ) {
+
+   $( '#disqus_dialog' ).dialog({'width':800,'position':'top'});
+
+   //Use the URL (without parameters) plus the section tooltip as 
identifier
+   var url = identifier = location.protocol + '//' + location.hostname + 
location.pathname + '#!'  + section;
+
+   //Reset Disqus to show the thread corresponding to the clicked section
+   DISQUS.reset({
+   reload: true,
+   config: function () {
+   this.page.identifier = identifier;
+   }
+   });
+}
\ No newline at end of file
diff --git a/SectionDisqus.php b/SectionDisqus.php
new file mode 100644
index 000..ff28796
--- /dev/null
+++ b/SectionDisqus.php
@@ -0,0 +1,37 @@
+?php
+/**
+ * SectionDisqus extension
+ *
+ * @file
+ * @ingroup Extensions
+ *
+ * @author Luis Felipe Schenone scheno...@gmail.com
+ * @license GPL v2 or later
+ * @version 0.1
+ */
+
+$wgExtensionCredits['specialpage'][] = array(
+   'path'   = __FILE__,
+   'name'   = 'SectionDisqus',
+   'description'= 'Adds a disqus button next to the edit button 
of every section, that when clicked, opens a Disqus dialog for that section.',
+   'descriptionmsg' = 'sectiondisqus-desc',
+   'version'= '0.1',
+   'author' = 

[MediaWiki-commits] [Gerrit] Disable slow list=allusersauactiveusers query in miser mode - change (mediawiki/core)

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

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


Change subject: Disable slow list=allusersauactiveusers query in miser mode
..

Disable slow list=allusersauactiveusers query in miser mode

Bug: 52979

Example slow query that was frying our servers yesterday:

 EXPLAIN SELECT /* ApiQueryAllUsers::execute MaxSem */  COUNT(*) AS 
 recentedits,user_name,user_id  FROM `user` FORCE INDEX (user_name) INNER JOIN 
 `recentchanges` ON ((rc_user_text=user_name))  WHERE (rc_log_type IS NULL OR 
 rc_log_type != 'newusers') AND (rc_timestamp = '20130720085133')  GROUP BY 
 rc_user_text ORDER BY rc_user_text LIMIT 501\G
*** 1. row ***
   id: 1
  select_type: SIMPLE
table: recentchanges
 type: range
possible_keys: rc_timestamp,rc_user_text
  key: rc_timestamp
  key_len: 16
  ref: NULL
 rows: 3007662
Extra: Using index condition; Using where; Rowid-ordered scan; Using 
temporary; Using filesort

Change-Id: I7cdd298c15ff729410b24085e65e702218f534da
---
M includes/api/ApiQueryAllUsers.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/79761/1

diff --git a/includes/api/ApiQueryAllUsers.php 
b/includes/api/ApiQueryAllUsers.php
index 1948a51..4ea51b4 100644
--- a/includes/api/ApiQueryAllUsers.php
+++ b/includes/api/ApiQueryAllUsers.php
@@ -151,7 +151,12 @@
}
 
if ( $params['activeusers'] ) {
-   global $wgActiveUserDays;
+   global $wgActiveUserDays, $wgMiserMode;
+
+   if ( !$wgMiserMode ) {
+   $this-dieUsage( 'Active users listing is 
disabled in miser mode', 'activeusersdisabled' );
+   }
+
$this-addTables( 'recentchanges' );
 
$this-addJoinConds( array( 'recentchanges' = array(
@@ -432,6 +437,7 @@
public function getPossibleErrors() {
return array_merge( parent::getPossibleErrors(), array(
array( 'code' = 'group-excludegroup', 'info' = 'group 
and excludegroup cannot be used together' ),
+   array( 'code' = 'activeusersdisabled', 'info' = 
'Active users listing is disabled in miser mode' ),
) );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cdd298c15ff729410b24085e65e702218f534da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Submitting the basic extension files - change (mediawiki...SectionDisqus)

2013-08-19 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has submitted this change and it was merged.

Change subject: Submitting the basic extension files
..


Submitting the basic extension files

Change-Id: Ibe34b71d66a5f6e21d0ffd288f5d9487ae4ca22b
---
A SectionDisqus.body.php
A SectionDisqus.css
A SectionDisqus.i18n.php
A SectionDisqus.js
A SectionDisqus.php
5 files changed, 124 insertions(+), 0 deletions(-)

Approvals:
  Luis Felipe Schenone: Verified; Looks good to me, approved



diff --git a/SectionDisqus.body.php b/SectionDisqus.body.php
new file mode 100644
index 000..e46f604
--- /dev/null
+++ b/SectionDisqus.body.php
@@ -0,0 +1,32 @@
+?php
+
+class SectionDisqus {
+
+   static function addResources( $out ) {
+   $out-addModules( 'ext.SectionDisqus' );
+   return true;
+   }
+
+   static function addDisqusButton( $skin, $title, $section, $tooltip, 
$result ) {
+   $result .= ' span class=disqus_button[ a 
onclick=window.showDisqusDialog(\'' . $tooltip . '\');disqus/a ]/span';
+   return true;
+   }
+
+   static function addDisqusDialog( $data ) {
+   global $wgSectionDisqusShortname;
+   $data .= 'div id=disqus_dialog title=Discuss this 
sectiondiv id=disqus_thread/div/div';
+   $data .= 'script type=text/javascript
+
+   var disqus_shortname = ' . $wgSectionDisqusShortname . 
';
+
+   (function() {
+   var dsq = document.createElement(script);
+   dsq.type = text/javascript;
+   dsq.async = true;
+   dsq.src = // + disqus_shortname + 
.disqus.com/embed.js;
+   
document.getElementsByTagName(body)[0].appendChild(dsq);
+   })();
+   /script';
+   return true;
+   }
+}
\ No newline at end of file
diff --git a/SectionDisqus.css b/SectionDisqus.css
new file mode 100644
index 000..5ee6210
--- /dev/null
+++ b/SectionDisqus.css
@@ -0,0 +1,9 @@
+.disqus_button {
+   cursor: pointer;
+   font-size: small;
+   font-weight: normal;
+}
+
+#disqus_dialog {
+   display: none;
+}
\ No newline at end of file
diff --git a/SectionDisqus.i18n.php b/SectionDisqus.i18n.php
new file mode 100644
index 000..509e78f
--- /dev/null
+++ b/SectionDisqus.i18n.php
@@ -0,0 +1,31 @@
+?php
+/**
+ * Internationalisation for SectionDisqus extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+/** English
+ * @author Luis Felipe Schenone
+ */
+$messages['en'] = array(
+   'sectiondisqus-desc' = 'Adds a Discuss button next to the Edit 
button of every section, that when clicked, opens a Disqus lightbox for that 
section.',
+);
+
+/** Message documentation (Message documentation)
+ * @author Raimond Spekking
+ * @author Shirayuki
+ */
+$messages['qqq'] = array(
+   'sectiondisqus-desc' = 
'{{desc|name=SectionDisqus|url=http://www.mediawiki.org/wiki/Extension:HoverGallery}}',
+);
+
+/** Spanish (español)
+ * @author Luis Felipe Schenone
+ */
+$messages['es'] = array(
+   'sectiondisqus-desc' = 'Añade un botón Discutir junto al botón 
Editar de cada sección, que al clickearlo, abre una ventana de discusión para 
esa sección.',
+);
diff --git a/SectionDisqus.js b/SectionDisqus.js
new file mode 100644
index 000..2b11644
--- /dev/null
+++ b/SectionDisqus.js
@@ -0,0 +1,15 @@
+window.showDisqusDialog = function( tooltip ) {
+
+   $( '#disqus_dialog' ).dialog({'width':800,'position':'top'});
+
+   //Use the URL (without parameters) plus the section tooltip as 
identifier
+   var identifier = location.protocol + '//' + location.hostname + 
location.pathname + '#!'  + tooltip;
+
+   //Reset Disqus to show the thread corresponding to the clicked section
+   DISQUS.reset({
+   reload: true,
+   config: function () {
+   this.page.identifier = identifier;
+   }
+   });
+}
\ No newline at end of file
diff --git a/SectionDisqus.php b/SectionDisqus.php
new file mode 100644
index 000..ff28796
--- /dev/null
+++ b/SectionDisqus.php
@@ -0,0 +1,37 @@
+?php
+/**
+ * SectionDisqus extension
+ *
+ * @file
+ * @ingroup Extensions
+ *
+ * @author Luis Felipe Schenone scheno...@gmail.com
+ * @license GPL v2 or later
+ * @version 0.1
+ */
+
+$wgExtensionCredits['specialpage'][] = array(
+   'path'   = __FILE__,
+   'name'   = 'SectionDisqus',
+   'description'= 'Adds a disqus button next to the edit button 
of every section, that when clicked, opens a Disqus dialog for that section.',
+   'descriptionmsg' = 'sectiondisqus-desc',
+   'version'= '0.1',
+   'author' = 'Luis Felipe Schenone',
+   'url'= 
'http://www.mediawiki.org/wiki/Extension:SectionDisqus'
+);
+

[MediaWiki-commits] [Gerrit] Make sure Set-Cookie responses are not cacheable, and log vi... - change (operations/puppet)

2013-08-19 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Make sure Set-Cookie responses are not cacheable, and log 
violations
..

Make sure Set-Cookie responses are not cacheable, and log violations

Change-Id: Ia15b2dd16151fcabcb5fae8e6b8123572255c098
---
M templates/varnish/text-backend.inc.vcl.erb
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/79762/1

diff --git a/templates/varnish/text-backend.inc.vcl.erb 
b/templates/varnish/text-backend.inc.vcl.erb
index 1bad43d..33b4c5a 100644
--- a/templates/varnish/text-backend.inc.vcl.erb
+++ b/templates/varnish/text-backend.inc.vcl.erb
@@ -34,6 +34,13 @@
 }
 
 sub vcl_fetch {
+   /* Make sure Set-Cookie responses are not cacheable, and log violations 
*/
+   if (beresp.ttl  0  beresp.http.Set-Cookie) {
+   std.log(Cacheable object with Set-Cookie found. req.url:  + 
req.url +  Set-Cookie:  + beresp.http.Set-Cookie);
+   set beresp.ttl = 0;
+   set beresp.http.Cache-Control = private, max-age=0, 
s-maxage=0;
+   }
+
/* FIXME: Fix up missing Vary headers on Apache redirects */
if ((beresp.status == 301 || beresp.status == 302)
 beresp.http.Location ~ ^http

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia15b2dd16151fcabcb5fae8e6b8123572255c098
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Get rid of verbose gpl headers - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Get rid of verbose gpl headers
..


Get rid of verbose gpl headers

Change-Id: I97d21e1b9e3ea170fb72f501ff3f70bd2843e638
---
M ValueFormatters/includes/FormattingException.php
M ValueFormatters/includes/formatters/TimeFormatter.php
M ValueFormatters/includes/formatters/TimeIsoFormatter.php
M ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
M ValueParsers/includes/ParseException.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
7 files changed, 0 insertions(+), 105 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved



diff --git a/ValueFormatters/includes/FormattingException.php 
b/ValueFormatters/includes/FormattingException.php
index 5f7fd89..f0b1e94 100644
--- a/ValueFormatters/includes/FormattingException.php
+++ b/ValueFormatters/includes/FormattingException.php
@@ -3,21 +3,6 @@
 namespace ValueParsers;
 
 /**
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
  * @since 0.1
  *
  * @file
diff --git a/ValueFormatters/includes/formatters/TimeFormatter.php 
b/ValueFormatters/includes/formatters/TimeFormatter.php
index 5c122cf..5c40d74 100644
--- a/ValueFormatters/includes/formatters/TimeFormatter.php
+++ b/ValueFormatters/includes/formatters/TimeFormatter.php
@@ -11,21 +11,6 @@
  * Some code in this class has been borrowed from the
  * MapsCoordinateParser class of the Maps extension for MediaWiki.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
  * @since 0.1
  *
  * @file
diff --git a/ValueFormatters/includes/formatters/TimeIsoFormatter.php 
b/ValueFormatters/includes/formatters/TimeIsoFormatter.php
index 2d9d001..de8b651 100644
--- a/ValueFormatters/includes/formatters/TimeIsoFormatter.php
+++ b/ValueFormatters/includes/formatters/TimeIsoFormatter.php
@@ -8,21 +8,6 @@
  * Some code in this class has been borrowed from the
  * MapsCoordinateParser class of the Maps extension for MediaWiki.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
  * @since 0.1
  *
  * @file
diff --git a/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php 
b/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
index 2de92f5..add999c 100644
--- a/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
+++ b/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
@@ -8,21 +8,6 @@
 /**
  * Unit tests for the ValueFormatters\TimeFormatter class.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 

[MediaWiki-commits] [Gerrit] Get rid of verbose gpl headers - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Get rid of verbose gpl headers
..

Get rid of verbose gpl headers

Change-Id: I97d21e1b9e3ea170fb72f501ff3f70bd2843e638
---
M ValueFormatters/includes/FormattingException.php
M ValueFormatters/includes/formatters/TimeFormatter.php
M ValueFormatters/includes/formatters/TimeIsoFormatter.php
M ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
M ValueParsers/includes/ParseException.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
7 files changed, 0 insertions(+), 105 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/63/79763/1

diff --git a/ValueFormatters/includes/FormattingException.php 
b/ValueFormatters/includes/FormattingException.php
index 5f7fd89..f0b1e94 100644
--- a/ValueFormatters/includes/FormattingException.php
+++ b/ValueFormatters/includes/FormattingException.php
@@ -3,21 +3,6 @@
 namespace ValueParsers;
 
 /**
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
  * @since 0.1
  *
  * @file
diff --git a/ValueFormatters/includes/formatters/TimeFormatter.php 
b/ValueFormatters/includes/formatters/TimeFormatter.php
index 5c122cf..5c40d74 100644
--- a/ValueFormatters/includes/formatters/TimeFormatter.php
+++ b/ValueFormatters/includes/formatters/TimeFormatter.php
@@ -11,21 +11,6 @@
  * Some code in this class has been borrowed from the
  * MapsCoordinateParser class of the Maps extension for MediaWiki.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
  * @since 0.1
  *
  * @file
diff --git a/ValueFormatters/includes/formatters/TimeIsoFormatter.php 
b/ValueFormatters/includes/formatters/TimeIsoFormatter.php
index 2d9d001..de8b651 100644
--- a/ValueFormatters/includes/formatters/TimeIsoFormatter.php
+++ b/ValueFormatters/includes/formatters/TimeIsoFormatter.php
@@ -8,21 +8,6 @@
  * Some code in this class has been borrowed from the
  * MapsCoordinateParser class of the Maps extension for MediaWiki.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
  * @since 0.1
  *
  * @file
diff --git a/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php 
b/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
index 2de92f5..add999c 100644
--- a/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
+++ b/ValueFormatters/tests/phpunit/formatters/TimeFormatterTest.php
@@ -8,21 +8,6 @@
 /**
  * Unit tests for the ValueFormatters\TimeFormatter class.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either 

[MediaWiki-commits] [Gerrit] Deprecate global variable - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Deprecate global variable
..


Deprecate global variable

Change-Id: I4dafa0aacfe81744ee9c0c03c8c5a6dba01b0691
---
M ValueFormatters/ValueFormatters.mw.php
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ValueFormatters/ValueFormatters.mw.php 
b/ValueFormatters/ValueFormatters.mw.php
index 8eba748..3fc8d05 100644
--- a/ValueFormatters/ValueFormatters.mw.php
+++ b/ValueFormatters/ValueFormatters.mw.php
@@ -16,7 +16,7 @@
die( 'Not an entry point.' );
 }
 
-global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks;
+global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks, 
$wgValueFormatters;
 
 $wgExtensionCredits['datavalues'][] = array(
'path' = __DIR__,
@@ -33,6 +33,9 @@
require_once __DIR__ . '/tests/testLoader.php';
 }
 
+/**
+ * @deprecated
+ */
 $wgValueFormatters = array(
\DataValues\GeoCoordinateValue::getType() = 
'ValueFormatters\GeoCoordinateFormatter',
\DataValues\TimeValue::getType() = 'ValueFormatters\TimeFormatter',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dafa0aacfe81744ee9c0c03c8c5a6dba01b0691
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Optimize imports - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Optimize imports
..


Optimize imports

Change-Id: I516216320d92edd925ce2784d9b0800de534ced1
---
M DataTypes/includes/modules/DataTypesModule.php
M DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
M DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
M ValueParsers/includes/parsers/DdCoordinateParser.php
M ValueParsers/includes/parsers/DmCoordinateParser.php
M ValueParsers/includes/parsers/DmsCoordinateParser.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
7 files changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DataTypes/includes/modules/DataTypesModule.php 
b/DataTypes/includes/modules/DataTypesModule.php
index e5e3026..bcd90ef 100644
--- a/DataTypes/includes/modules/DataTypesModule.php
+++ b/DataTypes/includes/modules/DataTypesModule.php
@@ -3,9 +3,9 @@
 namespace DataTypes\Modules;
 
 use DataTypes\DataTypeFactory;
+use Exception;
 use ResourceLoaderContext;
 use ResourceLoaderModule;
-use Exception;
 
 /**
  * Resource loader module for defining resources that will create a MW config 
var in JavaScript
diff --git a/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php 
b/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
index 5020512..b66eea8 100644
--- a/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
+++ b/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
@@ -2,8 +2,8 @@
 
 namespace DataTypes\Test;
 
-use DataTypes\DataTypesModule;
 use DataTypes\DataTypeFactory;
+use DataTypes\DataTypesModule;
 
 /**
  * @covers DataTypes\DataTypesModule
diff --git 
a/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php 
b/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
index 9555823..da9d52e 100644
--- a/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
+++ b/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
@@ -2,9 +2,9 @@
 
 namespace DataValues\Test;
 
-use DataValues\UnDeserializableValue;
 use DataValues\DataValue;
 use DataValues\StringValue;
+use DataValues\UnDeserializableValue;
 use DataValues\UnknownValue;
 
 /**
diff --git a/ValueParsers/includes/parsers/DdCoordinateParser.php 
b/ValueParsers/includes/parsers/DdCoordinateParser.php
index 0c0e175..c6f0a87 100644
--- a/ValueParsers/includes/parsers/DdCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DdCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * Parser for geographical coordinates in Decimal Degree notation.
diff --git a/ValueParsers/includes/parsers/DmCoordinateParser.php 
b/ValueParsers/includes/parsers/DmCoordinateParser.php
index 437bbe3..296af05 100644
--- a/ValueParsers/includes/parsers/DmCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * Parser for geographical coordinates in Decimal Minute notation.
diff --git a/ValueParsers/includes/parsers/DmsCoordinateParser.php 
b/ValueParsers/includes/parsers/DmsCoordinateParser.php
index de9ff34..5f1fb59 100644
--- a/ValueParsers/includes/parsers/DmsCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmsCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * Parser for geographical coordinates in Degree Minute Second notation.
diff --git a/ValueParsers/includes/parsers/FloatCoordinateParser.php 
b/ValueParsers/includes/parsers/FloatCoordinateParser.php
index 81f6232..4b0507b 100644
--- a/ValueParsers/includes/parsers/FloatCoordinateParser.php
+++ b/ValueParsers/includes/parsers/FloatCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * @since 0.1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I516216320d92edd925ce2784d9b0800de534ced1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Deprecate global variable - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Deprecate global variable
..

Deprecate global variable

Change-Id: I4dafa0aacfe81744ee9c0c03c8c5a6dba01b0691
---
M ValueFormatters/ValueFormatters.mw.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/ValueFormatters/ValueFormatters.mw.php 
b/ValueFormatters/ValueFormatters.mw.php
index 8eba748..3fc8d05 100644
--- a/ValueFormatters/ValueFormatters.mw.php
+++ b/ValueFormatters/ValueFormatters.mw.php
@@ -16,7 +16,7 @@
die( 'Not an entry point.' );
 }
 
-global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks;
+global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks, 
$wgValueFormatters;
 
 $wgExtensionCredits['datavalues'][] = array(
'path' = __DIR__,
@@ -33,6 +33,9 @@
require_once __DIR__ . '/tests/testLoader.php';
 }
 
+/**
+ * @deprecated
+ */
 $wgValueFormatters = array(
\DataValues\GeoCoordinateValue::getType() = 
'ValueFormatters\GeoCoordinateFormatter',
\DataValues\TimeValue::getType() = 'ValueFormatters\TimeFormatter',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dafa0aacfe81744ee9c0c03c8c5a6dba01b0691
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Optimize imports - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Optimize imports
..

Optimize imports

Change-Id: I516216320d92edd925ce2784d9b0800de534ced1
---
M DataTypes/includes/modules/DataTypesModule.php
M DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
M DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
M ValueParsers/includes/parsers/DdCoordinateParser.php
M ValueParsers/includes/parsers/DmCoordinateParser.php
M ValueParsers/includes/parsers/DmsCoordinateParser.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
7 files changed, 3 insertions(+), 7 deletions(-)


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

diff --git a/DataTypes/includes/modules/DataTypesModule.php 
b/DataTypes/includes/modules/DataTypesModule.php
index e5e3026..bcd90ef 100644
--- a/DataTypes/includes/modules/DataTypesModule.php
+++ b/DataTypes/includes/modules/DataTypesModule.php
@@ -3,9 +3,9 @@
 namespace DataTypes\Modules;
 
 use DataTypes\DataTypeFactory;
+use Exception;
 use ResourceLoaderContext;
 use ResourceLoaderModule;
-use Exception;
 
 /**
  * Resource loader module for defining resources that will create a MW config 
var in JavaScript
diff --git a/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php 
b/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
index 5020512..b66eea8 100644
--- a/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
+++ b/DataTypes/tests/phpunit/modules/DataTypesModuleTest.php
@@ -2,8 +2,8 @@
 
 namespace DataTypes\Test;
 
-use DataTypes\DataTypesModule;
 use DataTypes\DataTypeFactory;
+use DataTypes\DataTypesModule;
 
 /**
  * @covers DataTypes\DataTypesModule
diff --git 
a/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php 
b/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
index 9555823..da9d52e 100644
--- a/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
+++ b/DataValues/tests/phpunit/includes/values/UnDeserializableValueTest.php
@@ -2,9 +2,9 @@
 
 namespace DataValues\Test;
 
-use DataValues\UnDeserializableValue;
 use DataValues\DataValue;
 use DataValues\StringValue;
+use DataValues\UnDeserializableValue;
 use DataValues\UnknownValue;
 
 /**
diff --git a/ValueParsers/includes/parsers/DdCoordinateParser.php 
b/ValueParsers/includes/parsers/DdCoordinateParser.php
index 0c0e175..c6f0a87 100644
--- a/ValueParsers/includes/parsers/DdCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DdCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * Parser for geographical coordinates in Decimal Degree notation.
diff --git a/ValueParsers/includes/parsers/DmCoordinateParser.php 
b/ValueParsers/includes/parsers/DmCoordinateParser.php
index 437bbe3..296af05 100644
--- a/ValueParsers/includes/parsers/DmCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * Parser for geographical coordinates in Decimal Minute notation.
diff --git a/ValueParsers/includes/parsers/DmsCoordinateParser.php 
b/ValueParsers/includes/parsers/DmsCoordinateParser.php
index de9ff34..5f1fb59 100644
--- a/ValueParsers/includes/parsers/DmsCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmsCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * Parser for geographical coordinates in Degree Minute Second notation.
diff --git a/ValueParsers/includes/parsers/FloatCoordinateParser.php 
b/ValueParsers/includes/parsers/FloatCoordinateParser.php
index 81f6232..4b0507b 100644
--- a/ValueParsers/includes/parsers/FloatCoordinateParser.php
+++ b/ValueParsers/includes/parsers/FloatCoordinateParser.php
@@ -3,7 +3,6 @@
 namespace ValueParsers;
 
 use DataValues\GeoCoordinateValue;
-use LogicException;
 
 /**
  * @since 0.1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I516216320d92edd925ce2784d9b0800de534ced1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Style fix - change (mediawiki...Wikibase)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Style fix
..

Style fix

Change-Id: I03d2d1f71b29b7787dc13a43d2af88a2e888c27f
---
M lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
1 file changed, 4 insertions(+), 22 deletions(-)


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

diff --git a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php 
b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
index 751b093..bec672f 100644
--- a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
+++ b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
@@ -1,22 +1,8 @@
 ?php
- /**
- *
- * Copyright © 14.06.13 by the authors listed below.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
+
+namespace Wikibase\Test;
+
+/**
  *
  * @license GPL 2+
  * @file
@@ -30,10 +16,6 @@
  *
  * @author Daniel Kinzler
  */
-
-
-namespace Wikibase\Test;
-
 
 use DataTypes\DataType;
 use DataTypes\DataTypeFactory;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03d2d1f71b29b7787dc13a43d2af88a2e888c27f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Selenium: use composition instead of inheritance - change (mediawiki...Wikibase)

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

Change subject: Selenium: use composition instead of inheritance
..


Selenium: use composition instead of inheritance

Bug: 48142
Change-Id: I511187727d001a4995ad130f0baf50e4f5571534
---
R selenium_cuc/features/support/modules/create_entity_module.rb
A selenium_cuc/features/support/modules/entity_module.rb
M selenium_cuc/features/support/modules/url_module.rb
M selenium_cuc/features/support/pages/create_item_page.rb
D selenium_cuc/features/support/pages/entity_page.rb
M selenium_cuc/features/support/pages/item_page.rb
6 files changed, 143 insertions(+), 129 deletions(-)

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



diff --git a/selenium_cuc/features/support/pages/create_entity_page.rb 
b/selenium_cuc/features/support/modules/create_entity_module.rb
similarity index 91%
rename from selenium_cuc/features/support/pages/create_entity_page.rb
rename to selenium_cuc/features/support/modules/create_entity_module.rb
index d94ef83..f073923 100644
--- a/selenium_cuc/features/support/pages/create_entity_page.rb
+++ b/selenium_cuc/features/support/modules/create_entity_module.rb
@@ -6,8 +6,9 @@
 #
 # page object for CreateEntity special page base class
 
-class CreateEntityPage  EntityPage
+module CreateEntityPage
   include PageObject
+  include EntityPage
 
   text_field(:createEntityLabelField, :id = wb-newentity-label)
   text_field(:createEntityDescriptionField, :id = wb-newentity-description)
diff --git a/selenium_cuc/features/support/modules/entity_module.rb 
b/selenium_cuc/features/support/modules/entity_module.rb
new file mode 100644
index 000..1a9f8e0
--- /dev/null
+++ b/selenium_cuc/features/support/modules/entity_module.rb
@@ -0,0 +1,127 @@
+# -*- encoding : utf-8 -*-
+# Wikidata UI tests
+#
+# Author:: Tobias Gritschacher (tobias.gritschac...@wikimedia.de)
+# License:: GNU GPL v2+
+#
+# page object for entity page
+
+#require 'ruby_selenium'
+
+module EntityPage
+  include PageObject
+  include SitelinkPage
+  include AliasPage
+  include StatementPage
+  include ULSPage
+
+  @@property_url = 
+  @@property_id = 
+  @@item_url = 
+  @@item_id = 
+
+  # * ACCESSORS *
+  # label UI
+  h1(:mwFirstHeading, :id = firstHeading)
+  h1(:firstHeading, :xpath = //h1[contains(@class, 'wb-firstHeading')])
+  h1(:uiPropertyEdittool, :class = wb-ui-propertyedittool)
+  span(:entityLabelSpan, :xpath = //h1[contains(@class, 
'wb-firstHeading')]/span/span)
+  text_field(:labelInputField, :xpath = //h1[contains(@class, 
'wb-firstHeading')]/span/span/input)
+  link(:editLabelLink,:css = h1.wb-firstHeading .wikibase-toolbar  
a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1))
+  link(:editLabelLinkDisabled,:css = h1.wb-firstHeading 
.wikibase-toolbar  a.wikibase-toolbarbutton-disabled:nth-child(1))
+  link(:saveLabelLink,:css = h1.wb-firstHeading .wikibase-toolbar  
a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1))
+  link(:saveLabelLinkDisabled,:css = h1.wb-firstHeading 
.wikibase-toolbar  a.wikibase-toolbarbutton-disabled:nth-child(1))
+  link(:cancelLabelLink,  :css = h1.wb-firstHeading .wikibase-toolbar  
a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(2))
+  link(:cancelLabelLinkDisabled,  :css = h1.wb-firstHeading 
.wikibase-toolbar  a.wikibase-toolbarbutton-disabled:nth-child(2))
+
+  # description UI
+  span(:entityDescriptionSpan, :xpath = //div[contains(@class, 
'wb-ui-descriptionedittool')]/span[contains(@class, 
'wb-property-container-value')]/span)
+  text_field(:descriptionInputField, :xpath = //div[contains(@class, 
'wb-ui-descriptionedittool')]/span[contains(@class, 
'wb-property-container-value')]/span/input)
+  link(:editDescriptionLink,  :css = div.wb-ui-descriptionedittool 
.wikibase-toolbar  
a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1))
+  link(:editDescriptionLinkDisabled,  :css = div.wb-ui-descriptionedittool 
.wikibase-toolbar  a.wikibase-toolbarbutton-disabled:nth-child(1))
+  link(:saveDescriptionLink,  :css = div.wb-ui-descriptionedittool 
.wikibase-toolbar  
a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(1))
+  link(:saveDescriptionLinkDisabled,  :css = div.wb-ui-descriptionedittool 
.wikibase-toolbar  a.wikibase-toolbarbutton-disabled:nth-child(1))
+  link(:cancelDescriptionLink,  :css = div.wb-ui-descriptionedittool 
.wikibase-toolbar  
a.wikibase-toolbarbutton:not(.wikibase-toolbarbutton-disabled):nth-child(2))
+  link(:cancelDescriptionLinkDisabled,  :css = div.wb-ui-descriptionedittool 
.wikibase-toolbar  a.wikibase-toolbarbutton-disabled:nth-child(2))
+
+  span(:apiCallWaitingMessage, :class = 
wb-ui-propertyedittool-editablevalue-waitmsg)
+
+  # edit-tab
+  list_item(:editTab, :id = ca-edit)
+
+  # spinner
+  div(:entitySpinner, :xpath = 

[MediaWiki-commits] [Gerrit] Minor cleanup - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Minor cleanup
..

Minor cleanup

Change-Id: I6b59586b4fda5b63caa986940d553f792daa4af4
---
M DataValues/includes/values/GeoCoordinateValue.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/67/79767/1

diff --git a/DataValues/includes/values/GeoCoordinateValue.php 
b/DataValues/includes/values/GeoCoordinateValue.php
index f6c0a57..5c237c9 100644
--- a/DataValues/includes/values/GeoCoordinateValue.php
+++ b/DataValues/includes/values/GeoCoordinateValue.php
@@ -113,7 +113,7 @@
$this-longitude = $longitude;
$this-altitude = $altitude;
$this-precision = $precision;
-   $this-globe = ( is_null( $globe ) ) ? 
'http://www.wikidata.org/entity/Q2' : $globe;
+   $this-globe = is_null( $globe ) ? 
'http://www.wikidata.org/entity/Q2' : $globe;
}
 
/**
diff --git a/ValueParsers/includes/parsers/GeoCoordinateParserBase.php 
b/ValueParsers/includes/parsers/GeoCoordinateParserBase.php
index c22abc8..7f8423a 100644
--- a/ValueParsers/includes/parsers/GeoCoordinateParserBase.php
+++ b/ValueParsers/includes/parsers/GeoCoordinateParserBase.php
@@ -12,6 +12,7 @@
  *
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
 abstract class GeoCoordinateParserBase extends StringValueParser {
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b59586b4fda5b63caa986940d553f792daa4af4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Move hardcoding of wikidata earth globe identifier to the ge... - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Move hardcoding of wikidata earth globe identifier to the geo 
parser
..

Move hardcoding of wikidata earth globe identifier to the geo parser

Next step is to change the default to null and have Wikibase take care
of setting the new parser option.

Change-Id: I48036187b4b3f419ad9ff9c5d828f88aba721fc0
---
M DataValues/includes/values/GeoCoordinateValue.php
M DataValues/tests/phpunit/includes/values/GeoCoordinateValueTest.php
M ValueParsers/includes/parsers/DdCoordinateParser.php
M ValueParsers/includes/parsers/DmCoordinateParser.php
M ValueParsers/includes/parsers/DmsCoordinateParser.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
M ValueParsers/tests/phpunit/parsers/DdCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmsCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/FloatCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/GeoCoordinateParserTest.php
13 files changed, 31 insertions(+), 18 deletions(-)


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

diff --git a/DataValues/includes/values/GeoCoordinateValue.php 
b/DataValues/includes/values/GeoCoordinateValue.php
index 5c237c9..cc5d771 100644
--- a/DataValues/includes/values/GeoCoordinateValue.php
+++ b/DataValues/includes/values/GeoCoordinateValue.php
@@ -113,7 +113,7 @@
$this-longitude = $longitude;
$this-altitude = $altitude;
$this-precision = $precision;
-   $this-globe = is_null( $globe ) ? 
'http://www.wikidata.org/entity/Q2' : $globe;
+   $this-globe = $globe;
}
 
/**
diff --git 
a/DataValues/tests/phpunit/includes/values/GeoCoordinateValueTest.php 
b/DataValues/tests/phpunit/includes/values/GeoCoordinateValueTest.php
index e5b6054..0ead451 100644
--- a/DataValues/tests/phpunit/includes/values/GeoCoordinateValueTest.php
+++ b/DataValues/tests/phpunit/includes/values/GeoCoordinateValueTest.php
@@ -96,8 +96,8 @@
$argLists[] = array( false, 42, 4.2, 'foo' );
 
// #42
-   $argLists[] = array( true, 42, 4.2, 9000.1, null, 
'http://www.wikidata.org/entity/Q2' );
$argLists[] = array( true, 42, 4.2, 9000.1, null );
+   $argLists[] = array( true, 42, 4.2, 9000.1, null,  null );
$argLists[] = array( true, 4.2, 42, 9000.1, null, 'terminus' );
$argLists[] = array( true, 4.2, 42, 0, null, Schar's World );
$argLists[] = array( true, -42, -4.2, -9000.1, null, 
'coruscant' );
@@ -163,14 +163,9 @@
public function testGetGlobe( GeoCoordinateValue $geoCoord, array 
$arguments ) {
$expected = array_key_exists( 4, $arguments )
? $arguments[4]
-   : 'http://www.wikidata.org/entity/Q2';
+   : null;
 
$actual = $geoCoord-getGlobe();
-
-   $this-assertTrue(
-   is_string( $actual ),
-   'getGlobe should return a string'
-   );
 
$this-assertEquals( $expected, $actual );
}
diff --git a/ValueParsers/includes/parsers/DdCoordinateParser.php 
b/ValueParsers/includes/parsers/DdCoordinateParser.php
index c6f0a87..9d33f55 100644
--- a/ValueParsers/includes/parsers/DdCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DdCoordinateParser.php
@@ -33,6 +33,7 @@
parent::__construct( $options );
 
$this-defaultOption( self::OPT_DEGREE_SYMBOL, '°' );
+   $this-defaultOption( self::OPT_DEFAULT_GLOBE, 
'http://www.wikidata.org/entity/Q2' );
 
$this-defaultDelimiters = array( $this-getOption( 
self::OPT_DEGREE_SYMBOL ) );
}
diff --git a/ValueParsers/includes/parsers/DmCoordinateParser.php 
b/ValueParsers/includes/parsers/DmCoordinateParser.php
index 296af05..c7e3d37 100644
--- a/ValueParsers/includes/parsers/DmCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmCoordinateParser.php
@@ -33,6 +33,7 @@
parent::__construct( $options );
 
$this-defaultOption( self::OPT_MINUTE_SYMBOL, ' );
+   $this-defaultOption( self::OPT_DEFAULT_GLOBE, 
'http://www.wikidata.org/entity/Q2' );
 
$this-defaultDelimiters = array( $this-getOption( 
self::OPT_MINUTE_SYMBOL ) );
}
diff --git a/ValueParsers/includes/parsers/DmsCoordinateParser.php 
b/ValueParsers/includes/parsers/DmsCoordinateParser.php
index 5f1fb59..7f071bc 100644
--- a/ValueParsers/includes/parsers/DmsCoordinateParser.php
+++ 

[MediaWiki-commits] [Gerrit] Style fix - change (mediawiki...Wikibase)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Style fix
..


Style fix

Change-Id: I03d2d1f71b29b7787dc13a43d2af88a2e888c27f
---
M lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
1 file changed, 4 insertions(+), 22 deletions(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php 
b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
index 751b093..bec672f 100644
--- a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
+++ b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
@@ -1,22 +1,8 @@
 ?php
- /**
- *
- * Copyright © 14.06.13 by the authors listed below.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
+
+namespace Wikibase\Test;
+
+/**
  *
  * @license GPL 2+
  * @file
@@ -30,10 +16,6 @@
  *
  * @author Daniel Kinzler
  */
-
-
-namespace Wikibase\Test;
-
 
 use DataTypes\DataType;
 use DataTypes\DataTypeFactory;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I03d2d1f71b29b7787dc13a43d2af88a2e888c27f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Minor cleanup - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Minor cleanup
..


Minor cleanup

Change-Id: I6b59586b4fda5b63caa986940d553f792daa4af4
---
M DataValues/includes/values/GeoCoordinateValue.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
2 files changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DataValues/includes/values/GeoCoordinateValue.php 
b/DataValues/includes/values/GeoCoordinateValue.php
index f6c0a57..5c237c9 100644
--- a/DataValues/includes/values/GeoCoordinateValue.php
+++ b/DataValues/includes/values/GeoCoordinateValue.php
@@ -113,7 +113,7 @@
$this-longitude = $longitude;
$this-altitude = $altitude;
$this-precision = $precision;
-   $this-globe = ( is_null( $globe ) ) ? 
'http://www.wikidata.org/entity/Q2' : $globe;
+   $this-globe = is_null( $globe ) ? 
'http://www.wikidata.org/entity/Q2' : $globe;
}
 
/**
diff --git a/ValueParsers/includes/parsers/GeoCoordinateParserBase.php 
b/ValueParsers/includes/parsers/GeoCoordinateParserBase.php
index c22abc8..7f8423a 100644
--- a/ValueParsers/includes/parsers/GeoCoordinateParserBase.php
+++ b/ValueParsers/includes/parsers/GeoCoordinateParserBase.php
@@ -12,6 +12,7 @@
  *
  * @licence GNU GPL v2+
  * @author H. Snater  mediaw...@snater.com 
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
 abstract class GeoCoordinateParserBase extends StringValueParser {
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b59586b4fda5b63caa986940d553f792daa4af4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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 ERB typo in bacula fileset template - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Fix ERB typo in bacula fileset template
..

Fix ERB typo in bacula fileset template

Change-Id: I734ce707837fa157e5bd024005692dd7490b8fb4
---
M modules/bacula/templates/bacula-dir-fileset.erb
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/bacula/templates/bacula-dir-fileset.erb 
b/modules/bacula/templates/bacula-dir-fileset.erb
index f014c8f..d74a40f 100644
--- a/modules/bacula/templates/bacula-dir-fileset.erb
+++ b/modules/bacula/templates/bacula-dir-fileset.erb
@@ -4,14 +4,14 @@
 Name = %= @name %
 Include {
 Options { signature = MD5 }
-% @includes.each do |include| %
-File = include
+% @includes.each do |include| -%
+   File = %= include %
 % end -%
 }
 % if @excludes -%
 Exclude {
-% @excludes.each do |exclude| %
-File = exclude
+% @excludes.each do |exclude| -%
+   File = %= exclude %
 % end -%
 }
 % end -%

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

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

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


[MediaWiki-commits] [Gerrit] Extending the label cucumber test - change (mediawiki...Wikibase)

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

Change subject: Extending the label cucumber test
..


Extending the label cucumber test

Change-Id: I35c54506580ce097307f992ebc923f2b5afec259
---
M selenium_cuc/features/label.feature
M selenium_cuc/features/steps/label_steps.rb
M selenium_cuc/features/support/modules/entity_module.rb
3 files changed, 80 insertions(+), 8 deletions(-)

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



diff --git a/selenium_cuc/features/label.feature 
b/selenium_cuc/features/label.feature
index 4ae6df2..d5d3864 100644
--- a/selenium_cuc/features/label.feature
+++ b/selenium_cuc/features/label.feature
@@ -21,14 +21,50 @@
   And Label cancel button should be there
   Scenario: Modify the label
 When I click the label edit button
-  And I modify the label
+  And I enter MODIFIED LABEL as label
 Then Label save button should be there
   And Label cancel button should be there
   And Label edit button should not be there
   Scenario: Label cancel
 When I click the label edit button
-  And I modify the label
+  And I enter MODIFIED LABEL as label
   And I click the label cancel button
 Then Original label should be displayed
   And Label edit button should be there
-  And Label cancel button should not be there
\ No newline at end of file
+  And Label cancel button should not be there
+  Scenario: Label cancel with ESCAPE
+When I click the label edit button
+  And I enter MODIFIED LABEL as label
+  And I press the ESC key
+Then Original label should be displayed
+  And Label edit button should be there
+  And Label cancel button should not be there
+  Scenario: Label save
+When I click the label edit button
+  And I enter MODIFIED LABEL as label
+  And I click the label save button
+Then MODIFIED LABEL should be displayed as label
+When I reload the page
+Then MODIFIED LABEL should be displayed as label
+  Scenario: Label save with RETURN
+When I click the label edit button
+  And I enter MODIFIED LABEL as label
+  And I press the RETURN key
+Then MODIFIED LABEL should be displayed as label
+When I reload the page
+Then MODIFIED LABEL should be displayed as label
+  Scenario: Label with unnormalized value
+When I click the label edit button
+  And I enterbla   blaas label
+  And I click the label save button
+Then bla bla should be displayed as label
+  Scenario: Label with 0 as value
+When I click the label edit button
+  And I enter 0 as label
+  And I click the label save button
+Then 0 should be displayed as label
+  Scenario: Label with a too long value
+When I click the label edit button
+  And I enter 
long
 as label
+  And I click the label save button
+Then An error message should be displayed
diff --git a/selenium_cuc/features/steps/label_steps.rb 
b/selenium_cuc/features/steps/label_steps.rb
index e254d83..e9cb1a4 100644
--- a/selenium_cuc/features/steps/label_steps.rb
+++ b/selenium_cuc/features/steps/label_steps.rb
@@ -6,8 +6,7 @@
 #
 # tests for item label
 
-label = generate_random_string(10)
-label_changed = label +  Adding something.
+label = generate_random_string(8)
 
 Given /^I am on an entity page$/ do
   visit(CreateItemPage).create_new_item(label, generate_random_string(20))
@@ -17,15 +16,39 @@
   on(ItemPage).editLabelLink
 end
 
+When /^I press the ESC key$/ do
+  on(ItemPage).labelInputField_element.send_keys :escape
+end
+
+When /^I press the RETURN key$/ do
+  on(ItemPage) do |page|
+page.labelInputField_element.send_keys :return
+#page.ajax_wait
+page.wait_for_api_callback
+  end
+end
+
 When /^I click the label cancel button$/ do
   on(ItemPage).cancelLabelLink
 end
 
-When /^I modify the label$/ do
+When /^I click the label save button$/ do
+  on(ItemPage) do |page|
+page.saveLabelLink
+#page.ajax_wait
+page.wait_for_api_callback
+  end
+end
+
+When /^I enter (.+) as label$/ do |value|
   on(ItemPage) do |page|
 page.labelInputField_element.clear
-page.labelInputField = label_changed
+page.labelInputField = value
   end
+end
+
+When /^I reload the page$/ do
+  @browser.refresh
 end
 
 Then /^Label edit button should be there$/ do
@@ -68,3 +91,16 @@
 page.entityLabelSpan.should == label
   end
 end
+
+Then /^(.+) should be displayed as label$/ do |value|
+  on(ItemPage) do |page|
+page.firstHeading.should be_true
+

[MediaWiki-commits] [Gerrit] Use WikibaseAPI to create new entities for selenium tests - change (mediawiki...Wikibase)

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

Change subject: Use WikibaseAPI to create new entities for selenium tests
..


Use WikibaseAPI to create new entities for selenium tests

Change-Id: Iea0982751c61236408479741c8e2fc08878ca541
---
M selenium_cuc/Gemfile
M selenium_cuc/Gemfile.lock
M selenium_cuc/features/steps/label_steps.rb
M selenium_cuc/features/support/env.rb
M selenium_cuc/features/support/modules/url_module.rb
M selenium_cuc/features/support/pages/item_page.rb
M selenium_cuc/features/support/utils/utils.rb
7 files changed, 68 insertions(+), 11 deletions(-)

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



diff --git a/selenium_cuc/Gemfile b/selenium_cuc/Gemfile
index 33c4b3b..6bb1726 100644
--- a/selenium_cuc/Gemfile
+++ b/selenium_cuc/Gemfile
@@ -9,4 +9,5 @@
 gem 'syntax'
 gem 'parallel_tests'
 gem 'cucumber'
-gem 'json', '~ 1.7.7'
+gem 'json'
+gem 'activesupport'
diff --git a/selenium_cuc/Gemfile.lock b/selenium_cuc/Gemfile.lock
index fee6607..52d094c 100644
--- a/selenium_cuc/Gemfile.lock
+++ b/selenium_cuc/Gemfile.lock
@@ -1,6 +1,13 @@
 GEM
   remote: https://rubygems.org/
   specs:
+activesupport (4.0.0)
+  i18n (~ 0.6, = 0.6.4)
+  minitest (~ 4.2)
+  multi_json (~ 1.3)
+  thread_safe (~ 0.1)
+  tzinfo (~ 0.3.37)
+atomic (1.1.13)
 builder (3.2.0)
 childprocess (0.3.9)
   ffi (~ 1.0, = 1.0.11)
@@ -20,6 +27,7 @@
   multi_json (~ 1.3)
 i18n (0.6.4)
 json (1.7.7)
+minitest (4.3.2)
 multi_json (1.7.3)
 page-object (0.8.10)
   page_navigation (= 0.8)
@@ -48,6 +56,9 @@
   rubyzip
   websocket (~ 1.0.4)
 syntax (1.0.0)
+thread_safe (0.1.2)
+  atomic
+tzinfo (0.3.37)
 watir-webdriver (0.6.4)
   selenium-webdriver (= 2.18.0)
 websocket (1.0.7)
@@ -57,8 +68,9 @@
   x86-mingw32
 
 DEPENDENCIES
+  activesupport
   cucumber
-  json (~ 1.7.7)
+  json
   page-object
   parallel_tests
   rake
diff --git a/selenium_cuc/features/steps/label_steps.rb 
b/selenium_cuc/features/steps/label_steps.rb
index e9cb1a4..738fa33 100644
--- a/selenium_cuc/features/steps/label_steps.rb
+++ b/selenium_cuc/features/steps/label_steps.rb
@@ -9,7 +9,9 @@
 label = generate_random_string(8)
 
 Given /^I am on an entity page$/ do
-  visit(CreateItemPage).create_new_item(label, generate_random_string(20))
+  item_data = '{labels:{en:{language:en,value:' + label + 
'}},descriptions:{en:{language:en,value:' + 
generate_random_string(20) + '}}}'
+  item = create_new_entity(item_data, 'item')
+  on(ItemPage).navigate_to_item item[url]
 end
 
 When /^I click the label edit button$/ do
diff --git a/selenium_cuc/features/support/env.rb 
b/selenium_cuc/features/support/env.rb
index 0afa83d..1b11a33 100644
--- a/selenium_cuc/features/support/env.rb
+++ b/selenium_cuc/features/support/env.rb
@@ -14,6 +14,8 @@
 require 'page-object/page_factory'
 require 'watir-webdriver'
 require 'yaml'
+require 'net/http'
+require 'active_support/all'
 require 'require_all'
 
 config = YAML.load_file('config/config.yml')
diff --git a/selenium_cuc/features/support/modules/url_module.rb 
b/selenium_cuc/features/support/modules/url_module.rb
index 69ba144..9fcaecf 100644
--- a/selenium_cuc/features/support/modules/url_module.rb
+++ b/selenium_cuc/features/support/modules/url_module.rb
@@ -11,19 +11,28 @@
 module URL
   def self.client_url(name)
 if ENV['WIKIDATA_CLIENT_URL']
-  wikidata_url = ENV['WIKIDATA_CLIENT_URL']
+  url = ENV['WIKIDATA_CLIENT_URL']
 else
-  wikidata_url = WIKIDATA_CLIENT_URL
+  url = WIKIDATA_CLIENT_URL
 end
-#{wikidata_url}#{name}
+#{url}#{name}
   end
 
   def self.repo_url(name)
 if ENV['WIKIDATA_REPO_URL']
-  wikidata_url = ENV['WIKIDATA_REPO_URL']
+  url = ENV['WIKIDATA_REPO_URL']
 else
-  wikidata_url = WIKIDATA_REPO_URL
+  url = WIKIDATA_REPO_URL
 end
-#{wikidata_url}#{name}
+#{url}#{name}
+  end
+
+  def self.repo_api()
+if ENV['WIKIDATA_REPO_URL']
+  url = ENV['WIKIDATA_REPO_API']
+else
+  url = WIKIDATA_REPO_API
+end
+#{url}
   end
 end
diff --git a/selenium_cuc/features/support/pages/item_page.rb 
b/selenium_cuc/features/support/pages/item_page.rb
index b6d2764..51fb6e6 100644
--- a/selenium_cuc/features/support/pages/item_page.rb
+++ b/selenium_cuc/features/support/pages/item_page.rb
@@ -14,8 +14,9 @@
 
   # * METHODS *
   # item url navigation
-  def navigate_to_item
-navigate_to @@item_url
+  def navigate_to_item url
+navigate_to url
+wait_for_entity_to_load
   end
 
   def navigate_to_item_en
diff --git a/selenium_cuc/features/support/utils/utils.rb 
b/selenium_cuc/features/support/utils/utils.rb
index be21639..7065aa8 100644
--- a/selenium_cuc/features/support/utils/utils.rb
+++ b/selenium_cuc/features/support/utils/utils.rb
@@ -6,10 +6,40 @@
 #
 # common used methods
 
+include URL
+
 # 

[MediaWiki-commits] [Gerrit] (bug 52997) $wgCategoryCollation to 'uca-ru' on all Russian-... - change (operations/mediawiki-config)

2013-08-19 Thread Andrey Kiselev (Code Review)
Andrey Kiselev has uploaded a new change for review.

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


Change subject: (bug 52997) $wgCategoryCollation to 'uca-ru' on all 
Russian-language
..

(bug 52997) $wgCategoryCollation to 'uca-ru' on all Russian-language

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3a6a697..816a95f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10638,6 +10638,13 @@
'plwiktionary' = 'uca-default', // bug 46081
'ptwiki' = 'uca-pt', // bug 45911
'ptwikibooks' = 'uca-pt', // bug 45911
+   'ruwiki' = 'uca-ru', // bug 52997
+   'ruwikibooks' = 'uca-ru', // bug 52997
+   'ruwikinews' = 'uca-ru', // bug 52997
+   'ruwikiquote' = 'uca-ru', // bug 52997
+   'ruwikisource' = 'uca-ru', // bug 52997
+   'ruwikivoyage' = 'uca-ru', // bug 52997
+   'ruwiktionary' = 'uca-ru', // bug 52997
'svwiki' = 'uca-sv', // bug 45446
'svwikisource' = 'uca-sv@collation=standard', // bug 46058
'thwikibooks' = 'uca-default', // bug 48097

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c03613a3f5596c09dd076a152b16d31402e220f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Andrey Kiselev rum...@pop3.ru

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


[MediaWiki-commits] [Gerrit] Fix ERB typo in bacula fileset template - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Fix ERB typo in bacula fileset template
..


Fix ERB typo in bacula fileset template

Change-Id: I734ce707837fa157e5bd024005692dd7490b8fb4
---
M modules/bacula/templates/bacula-dir-fileset.erb
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/bacula/templates/bacula-dir-fileset.erb 
b/modules/bacula/templates/bacula-dir-fileset.erb
index f014c8f..d74a40f 100644
--- a/modules/bacula/templates/bacula-dir-fileset.erb
+++ b/modules/bacula/templates/bacula-dir-fileset.erb
@@ -4,14 +4,14 @@
 Name = %= @name %
 Include {
 Options { signature = MD5 }
-% @includes.each do |include| %
-File = include
+% @includes.each do |include| -%
+   File = %= include %
 % end -%
 }
 % if @excludes -%
 Exclude {
-% @excludes.each do |exclude| %
-File = exclude
+% @excludes.each do |exclude| -%
+   File = %= exclude %
 % end -%
 }
 % end -%

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I734ce707837fa157e5bd024005692dd7490b8fb4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris 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] Adding Default pool to backup - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Adding Default pool to backup
..

Adding Default pool to backup

Also fix a disambiguity  in a fileset name

Change-Id: Ia98d0b4185a74b1728fbcb0ad3d357780b8596f0
---
M manifests/role/backup.pp
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/79771/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 7010364..ece10fa 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -24,6 +24,13 @@
 volume_retention = '180 days',
 }
 
+# Default pool needed internally by bacula
+bacula::director::pool { 'Default':
+max_vols = 1,
+storage  = 'FileStorage1',
+volume_retention = '1800 days',
+}
+
 # One schedule per day of the week.
 # Setting execution times so that it is unlikely jobs will run concurrently
 # with cron.{hourly,daily,monthly} or other cronscripts
@@ -57,7 +64,7 @@
 bacula::director::fileset { 'mnt-a':
 includes = [ '/mnt/a' ]
 }
-bacula::director::fileset { 'root':
+bacula::director::fileset { 'roothome':
 includes = [ '/root' ]
 }
 bacula::director::fileset { 'srv-autoinstall':

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

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

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


[MediaWiki-commits] [Gerrit] Adding helium.eqiad.wmnet as backed-up host - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Adding helium.eqiad.wmnet as backed-up host
..

Adding helium.eqiad.wmnet as backed-up host

Change-Id: If91806f4f9a8e08c79bdc2304d5fc6b5ca94cecc
---
M manifests/backups.pp
M manifests/site.pp
2 files changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/79772/1

diff --git a/manifests/backups.pp b/manifests/backups.pp
index 4e53cdc..a5f0902 100644
--- a/manifests/backups.pp
+++ b/manifests/backups.pp
@@ -4,9 +4,11 @@
 # Transitioning to bacula stanzas
 
 class backup::host($sets) {
+include role::backup::config
+
 class { 'bacula::client':
-director= $director,
-catalog = 'WMF',
+director= $role::backup::config::director,
+catalog = 'production',
 file_retention  = '90 days',
 job_retention   = '6 months',
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index a3384c3..cfedcf3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1040,6 +1040,13 @@
 role::poolcounter,
 role::backup::director,
 role::backup::storage
+
+   class { 'backup::host':
+   sets= {
+   'roothome' = { fileset = 'roothome',
+   jobdefaults = 
'Monthly-1st-Mon-production', },
+   }
+   }
 }
 
 node holmium.wikimedia.org {

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

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

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


[MediaWiki-commits] [Gerrit] Adding helium.eqiad.wmnet as backed-up host - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Adding helium.eqiad.wmnet as backed-up host
..


Adding helium.eqiad.wmnet as backed-up host

Change-Id: If91806f4f9a8e08c79bdc2304d5fc6b5ca94cecc
---
M manifests/backups.pp
M manifests/site.pp
2 files changed, 11 insertions(+), 2 deletions(-)

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



diff --git a/manifests/backups.pp b/manifests/backups.pp
index 4e53cdc..a5f0902 100644
--- a/manifests/backups.pp
+++ b/manifests/backups.pp
@@ -4,9 +4,11 @@
 # Transitioning to bacula stanzas
 
 class backup::host($sets) {
+include role::backup::config
+
 class { 'bacula::client':
-director= $director,
-catalog = 'WMF',
+director= $role::backup::config::director,
+catalog = 'production',
 file_retention  = '90 days',
 job_retention   = '6 months',
 }
diff --git a/manifests/site.pp b/manifests/site.pp
index a3384c3..cfedcf3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1040,6 +1040,13 @@
 role::poolcounter,
 role::backup::director,
 role::backup::storage
+
+   class { 'backup::host':
+   sets= {
+   'roothome' = { fileset = 'roothome',
+   jobdefaults = 
'Monthly-1st-Mon-production', },
+   }
+   }
 }
 
 node holmium.wikimedia.org {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If91806f4f9a8e08c79bdc2304d5fc6b5ca94cecc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris 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] Bug 53032: change the name of the session cookie - change (operations/mediawiki-config)

2013-08-19 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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


Change subject: Bug 53032: change the name of the session cookie
..

Bug 53032: change the name of the session cookie

To reset all sessions and all session IDs.

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 1dd8f02..76594a5 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -332,6 +332,8 @@
 
 # Object cache and session settings
 
+$wgSessionName = $wgDBname . 'Session';
+
 $pcTemplate = array( 'type' = 'mysql',
'dbname' = 'parsercache',
'user' = $wgDBuser,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ae6bf1e2c197893c120974466071f240c770aec
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] Tabs vs spaces in site.pp - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Tabs vs spaces in site.pp
..

Tabs vs spaces in site.pp

Should have caught that earlier. Should also remove vim modeline that
sets no-expandtab

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/79774/1

diff --git a/manifests/site.pp b/manifests/site.pp
index cfedcf3..ea36fe4 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1041,12 +1041,12 @@
 role::backup::director,
 role::backup::storage
 
-   class { 'backup::host':
-   sets= {
-   'roothome' = { fileset = 'roothome',
-   jobdefaults = 
'Monthly-1st-Mon-production', },
-   }
-   }
+class { 'backup::host':
+sets   = {
+'roothome' = { fileset = 'roothome',
+jobdefaults = 'Monthly-1st-Mon-production', },
+}
+}
 }
 
 node holmium.wikimedia.org {

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

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

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


[MediaWiki-commits] [Gerrit] Tabs vs spaces in site.pp - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Tabs vs spaces in site.pp
..


Tabs vs spaces in site.pp

Should have caught that earlier. Should also remove vim modeline that
sets no-expandtab

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

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



diff --git a/manifests/site.pp b/manifests/site.pp
index cfedcf3..ea36fe4 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1041,12 +1041,12 @@
 role::backup::director,
 role::backup::storage
 
-   class { 'backup::host':
-   sets= {
-   'roothome' = { fileset = 'roothome',
-   jobdefaults = 
'Monthly-1st-Mon-production', },
-   }
-   }
+class { 'backup::host':
+sets   = {
+'roothome' = { fileset = 'roothome',
+jobdefaults = 'Monthly-1st-Mon-production', },
+}
+}
 }
 
 node holmium.wikimedia.org {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec9537a6dc0ac1cd711eff7b05d64c89ab8fd19e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris 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] Fire Echo event when revision is approved - change (mediawiki...FlaggedRevs)

2013-08-19 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: Fire Echo event when revision is approved
..

Fire Echo event when revision is approved

This is a little rudimentary, but works and handles 90% of use cases.

Things to maybe do sometime in the future:

* handle various approval levels
  (currently the same text is used for any reviewed revision)
* batching
  (if multiple edits to one page are approved in order)
* notifications for implicitly approved revisions
  (if only last edit from a stack of edits to one page is approved)

Bug: 52510
Change-Id: I974402262feafc321fbebd9fc514a483b48ba650
---
M FlaggedRevs.php
M FlaggedRevs.setup.php
M backend/FlaggedRevs.hooks.php
M business/RevisionReviewForm.php
M frontend/language/FlaggedRevs.i18n.php
5 files changed, 109 insertions(+), 6 deletions(-)


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

diff --git a/FlaggedRevs.php b/FlaggedRevs.php
index de60e62..6403313 100644
--- a/FlaggedRevs.php
+++ b/FlaggedRevs.php
@@ -66,6 +66,9 @@
 $wgDefaultUserOptions['flaggedrevsstable'] = FR_SHOW_STABLE_DEFAULT;
 $wgDefaultUserOptions['flaggedrevseditdiffs'] = true;
 $wgDefaultUserOptions['flaggedrevsviewdiffs'] = false;
+# Echo integration, same config as for built-in notifications
+$wgDefaultUserOptions['echo-subscriptions-web-flaggedrevs'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-flaggedrevs'] = false;
 
 # Add review log
 $wgLogTypes[] = 'review';
diff --git a/FlaggedRevs.setup.php b/FlaggedRevs.setup.php
index 2d8ec50..9e63894 100644
--- a/FlaggedRevs.setup.php
+++ b/FlaggedRevs.setup.php
@@ -229,6 +229,10 @@
 
# Database schema changes
$wgHooks['LoadExtensionSchemaUpdates'][] = 
'FlaggedRevsUpdaterHooks::addSchemaUpdates';
+   
+   # Echo integration
+   $wgHooks['BeforeCreateEchoEvent'][] = 
'FlaggedRevsHooks::onBeforeCreateEchoEvent';
+   $wgHooks['EchoGetDefaultNotifiedUsers'][] = 
'FlaggedRevsHooks::onEchoGetDefaultNotifiedUsers';
# 
}
 
@@ -250,8 +254,6 @@
$wgHooks['ParserGetVariableValueSwitch'][] = 
'FlaggedRevsHooks::onParserGetVariableValueSwitch';
$wgHooks['MagicWordwgVariableIDs'][] = 
'FlaggedRevsHooks::onMagicWordwgVariableIDs';
}
-
-   $wgHooks['EchoGetDefaultNotifiedUsers'][] = 
'FlaggedRevsHooks::onEchoGetDefaultNotifiedUsers';
 
#  User interface #
FlaggedRevsUISetup::defineHookHandlers( $wgHooks );
diff --git a/backend/FlaggedRevs.hooks.php b/backend/FlaggedRevs.hooks.php
index 6fb52b4..f2f0a54 100644
--- a/backend/FlaggedRevs.hooks.php
+++ b/backend/FlaggedRevs.hooks.php
@@ -1011,6 +1011,38 @@
}
 
/**
+* Add FlaggedRevs events to Echo
+*
+* @param $notifications array a list of enabled Echo events
+* @param $notificationCategories array details for Echo events
+* @param $icons array of icon details
+*/
+   public static function onBeforeCreateEchoEvent( $notifications, 
$notificationCategories, $icons ) {
+   $notificationCategories['flaggedrevs'] = array(
+   'priority' = 3,
+   'tooltip' = 'echo-pref-tooltip-flaggedrevs',
+   );
+
+   $notifications['flaggedrevs-reviewed'] = array(
+   'category' = 'flaggedrevs',
+   'group' = 'neutral',
+   'formatter-class' = 'EchoEditFormatter',
+   'title-message' = 'flaggedrevs-reviewed',
+   'title-params' = array( 'agent', 'difflink', 'title' ),
+   'primary-link' = array( 'message' = 
'notification-link-text-view-edit', 'destination' = 'diff' ),
+   'email-subject-message' = 
'flaggedrevs-reviewed-email-subject',
+   'email-subject-params' = array( 'title' ),
+   'email-body-message' = 
'flaggedrevs-reviewed-email-body',
+   'email-body-params' = array( 'agent', 'difflink', 
'title', 'titlelink', 'email-footer' ),
+   'email-body-batch-message' = 
'flaggedrevs-reviewed-email-batch',
+   'email-body-batch-params' = array( 'agent', 
'difflink', 'title', 'titlelink' ),
+   'icon' = 'reviewed',
+   );
+
+   return true;
+   }
+
+   /**
 * Handler for EchoGetDefaultNotifiedUsers hook.
 * @param $event EchoEvent to get implicitly subscribed users for
 * @param $users Array to append implicitly subscribed users to.
@@ -1018,11 +1050,21 @@
 */
public static function onEchoGetDefaultNotifiedUsers( $event, $users ) 
{

[MediaWiki-commits] [Gerrit] toolbarcontroller: Detach event handlers before re-attaching. - change (mediawiki...Wikibase)

2013-08-19 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: toolbarcontroller: Detach event handlers before re-attaching.
..

toolbarcontroller: Detach event handlers before re-attaching.

Change-Id: Iaa854768c658f173ca19061e29e7792bf765efda
---
M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
1 file changed, 27 insertions(+), 20 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 
b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
index 9833b97..78ef4b5 100644
--- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
+++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js
@@ -65,6 +65,7 @@
 *(re-)initialization is in a pending state.
 *
 * @throws {Error} in case a given toolbar ID is not registered 
for the toolbar type given.
+* @throws {Error} if the callback provided in an event 
definition is not a function.
 */
initToolbars: function( isPending ) {
var self = this;
@@ -88,12 +89,28 @@
// definition:
var defaultCallbacks = 
createDefaultEventHandlers( type, options );
 
-   // Toolbars that shall be 
created upon certain events.
+   // Detach all event handlers 
first in order to not end up with having the
+   // handler attached multiple 
times. This cannot be done along with
+   // re-attaching the handlers 
since multiple event handlers may be registered
+   // for the same event.
+   $.each( def.events, function( 
eventNames, callbackOrKeyword ) {
+   $initNode.off( 
self._nameSpace( eventNames, type ) );
+   } );
+
+   // Attach event handlers for 
toolbars that shall be created upon certain
+   // events:
$.each( def.events, function( 
eventNames, callbackOrKeyword ) {
var callback =

defaultCallbacks[ callbackOrKeyword ] || callbackOrKeyword;
 
-   
self._attachToolbarEventListener( $initNode, eventNames, callback );
+   if( !$.isFunction( 
callback ) ) {
+   throw new 
Error( 'No callback or known default action given for '
+   + 
'event ' + eventNames + '' );
+   }
+
+   $initNode.on( 
self._nameSpace( eventNames, type ), function( event ) {
+   callback( 
event, $( event.target ) );
+   } );
} );
}
 
@@ -107,27 +124,17 @@
},
 
/**
-* Attaches an event listener defined by the toolbar definition 
to the node the toolbar is
-* initialized on.
+* Applies namespaces to event names passed in as a string.
 * @since 0.4
 *
-* @param {jQuery} $toolbar
-* @param {string[]} eventNames
-* @param {Function} callback
-*
-* @throws {Error} if the provided callback is not a function.
+* @param {string} eventNames
+* @param {string} toolbarType
+* @return {string}
 */
-   _attachToolbarEventListener: function( $toolbar, eventNames, 
callback ) {
-   if( !$.isFunction( callback ) ) {
-   throw new Error( 'No callback or known default 
action given for event ' +
-   eventNames + '' );
-   }
-   var namespacedEventNames = ( eventNames + ' ' )
-   .split( ' ' ).join( '.' + this.widgetName + ' ' 
);
-
-   $toolbar.on( namespacedEventNames, 

[MediaWiki-commits] [Gerrit] Bug 53032: change the name of the session cookie - change (operations/mediawiki-config)

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

Change subject: Bug 53032: change the name of the session cookie
..


Bug 53032: change the name of the session cookie

To reset all sessions and all session IDs.

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

Approvals:
  Tim Starling: Looks good to me, approved
  Ori.livneh: Looks good to me, but someone else must approve
  Mark Bergsma: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 1dd8f02..76594a5 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -332,6 +332,8 @@
 
 # Object cache and session settings
 
+$wgSessionName = $wgDBname . 'Session';
+
 $pcTemplate = array( 'type' = 'mysql',
'dbname' = 'parsercache',
'user' = $wgDBuser,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ae6bf1e2c197893c120974466071f240c770aec
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
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] Re-enable multiwrites for Ceph - change (operations/mediawiki-config)

2013-08-19 Thread Faidon (Code Review)
Faidon has submitted this change and it was merged.

Change subject: Re-enable multiwrites for Ceph
..


Re-enable multiwrites for Ceph

Swift remains the MultiMaster, for now.

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

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



diff --git a/wmf-config/filebackend.php b/wmf-config/filebackend.php
index 7a94004..4ba64b2 100644
--- a/wmf-config/filebackend.php
+++ b/wmf-config/filebackend.php
@@ -144,7 +144,7 @@
'backends'= array(
# DO NOT change the master backend unless it is fully trusted 
or autoRsync is off
array( 'template' = 'local-swift', 'isMultiMaster' = true ),
-   #array( 'template' = 'local-ceph', 'isMultiMaster' = true ) 
-- aaron 5/30/2013
+   array( 'template' = 'local-ceph', 'isMultiMaster' = false )
),
'syncChecks'  = ( 1 | 4 ), // (size  sha1)
'autoResync'  = 'conservative' // bug 39221
@@ -158,7 +158,7 @@
'backends'= array(
# DO NOT change the master backend unless it is fully trusted 
or autoRsync is off
array( 'template' = 'shared-swift', 'isMultiMaster' = true ),
-   #array( 'template' = 'shared-ceph', 'isMultiMaster' = true ) 
-- aaron 5/30/2013
+   array( 'template' = 'shared-ceph', 'isMultiMaster' = false )
),
'syncChecks'  = ( 1 | 4 ), // (size  sha1)
'autoResync'  = 'conservative' // bug 39221
@@ -171,7 +171,7 @@
'backends'= array(
# DO NOT change the master backend unless it is fully trusted 
or autoRsync is off
array( 'template' = 'global-swift', 'isMultiMaster' = true ),
-   #array( 'template' = 'global-ceph', 'isMultiMaster' = true ) 
-- aaron 5/30/2013
+   array( 'template' = 'global-ceph', 'isMultiMaster' = false )
),
'syncChecks'  = ( 1 | 4 ), // (size  sha1)
'autoResync'  = 'conservative'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If001f6e148fd63cdd94958bd1a8457ac8ac46176
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@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 various typos in bacula module - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Fix various typos in bacula module
..

Fix various typos in bacula module

Change-Id: I6c05fb5902bb7cf2216595b880eb0253f55ae202
---
M modules/bacula/manifests/client.pp
M modules/bacula/templates/bacula-client-job.erb
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/79777/1

diff --git a/modules/bacula/manifests/client.pp 
b/modules/bacula/manifests/client.pp
index a19dad5..23c9c03 100644
--- a/modules/bacula/manifests/client.pp
+++ b/modules/bacula/manifests/client.pp
@@ -62,8 +62,8 @@
 # resource
 exec { 'concat-bacula-keypair':
 command = /bin/cat /var/lib/puppet/ssl/certs/$::fqdn.pem \
- /var/lib/puppet/ssl/certs//$::fqdn.pem  \
- /var/lib/puppet/ssl/private_keys/bacula_keypair-$::fqdn.pem,
+ /var/lib/puppet/ssl/private_keys/$::fqdn.pem  \
+ /var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
 creates = 
/var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
 }
 
diff --git a/modules/bacula/templates/bacula-client-job.erb 
b/modules/bacula/templates/bacula-client-job.erb
index cfd6747..91401ac 100644
--- a/modules/bacula/templates/bacula-client-job.erb
+++ b/modules/bacula/templates/bacula-client-job.erb
@@ -1,9 +1,9 @@
 # This file has been autogenerated by puppet. Don't edit by hand
 
 Job {
-Name = %= @fqdn %-%= @jobdef %-%= @fileset %
+Name = %= @fqdn %-%= @jobdefaults %-%= @fileset %
 Client = %= @fqdn %-fd
-JobDefs = %= @jobdef %
+JobDefs = %= @jobdefaults %
 FileSet = %= @fileset %
-Write Bootstrap = /var/lib/bacula/%= @fqdn %-%= @jobdef %-%= 
@fileset %.bsr
+Write Bootstrap = /var/lib/bacula/%= @fqdn %-%= @jobdefaults %-%= 
@fileset %.bsr
 }

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

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

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


[MediaWiki-commits] [Gerrit] Fix various typos in bacula module - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Fix various typos in bacula module
..


Fix various typos in bacula module

Change-Id: I6c05fb5902bb7cf2216595b880eb0253f55ae202
---
M modules/bacula/manifests/client.pp
M modules/bacula/templates/bacula-client-job.erb
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/modules/bacula/manifests/client.pp 
b/modules/bacula/manifests/client.pp
index a19dad5..23c9c03 100644
--- a/modules/bacula/manifests/client.pp
+++ b/modules/bacula/manifests/client.pp
@@ -62,8 +62,8 @@
 # resource
 exec { 'concat-bacula-keypair':
 command = /bin/cat /var/lib/puppet/ssl/certs/$::fqdn.pem \
- /var/lib/puppet/ssl/certs//$::fqdn.pem  \
- /var/lib/puppet/ssl/private_keys/bacula_keypair-$::fqdn.pem,
+ /var/lib/puppet/ssl/private_keys/$::fqdn.pem  \
+ /var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
 creates = 
/var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
 }
 
diff --git a/modules/bacula/templates/bacula-client-job.erb 
b/modules/bacula/templates/bacula-client-job.erb
index cfd6747..91401ac 100644
--- a/modules/bacula/templates/bacula-client-job.erb
+++ b/modules/bacula/templates/bacula-client-job.erb
@@ -1,9 +1,9 @@
 # This file has been autogenerated by puppet. Don't edit by hand
 
 Job {
-Name = %= @fqdn %-%= @jobdef %-%= @fileset %
+Name = %= @fqdn %-%= @jobdefaults %-%= @fileset %
 Client = %= @fqdn %-fd
-JobDefs = %= @jobdef %
+JobDefs = %= @jobdefaults %
 FileSet = %= @fileset %
-Write Bootstrap = /var/lib/bacula/%= @fqdn %-%= @jobdef %-%= 
@fileset %.bsr
+Write Bootstrap = /var/lib/bacula/%= @fqdn %-%= @jobdefaults %-%= 
@fileset %.bsr
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c05fb5902bb7cf2216595b880eb0253f55ae202
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris 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] Added LatLongValue - change (mediawiki...DataValues)

2013-08-19 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Added LatLongValue
..

Added LatLongValue

Change-Id: Ifa0c008d1c60708ed7885369b5ce49295e3da765
---
M DataValues/DataValues.classes.php
A DataValues/includes/values/LatLongValue.php
A DataValues/tests/phpunit/includes/values/LatLongValueTest.php
3 files changed, 320 insertions(+), 0 deletions(-)


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

diff --git a/DataValues/DataValues.classes.php 
b/DataValues/DataValues.classes.php
index d88aa23..2df21eb 100644
--- a/DataValues/DataValues.classes.php
+++ b/DataValues/DataValues.classes.php
@@ -15,6 +15,7 @@
'DataValues\BooleanValue' = 'includes/values/BooleanValue.php',
'DataValues\GeoCoordinateValue' = 
'includes/values/GeoCoordinateValue.php',
'DataValues\IriValue' = 'includes/values/IriValue.php',
+   'DataValues\LatLongValue' = 'includes/values/LatLongValue.php',
'DataValues\MonolingualTextValue' = 
'includes/values/MonolingualTextValue.php',
'DataValues\MultilingualTextValue' = 
'includes/values/MultilingualTextValue.php',
'DataValues\NumberValue' = 'includes/values/NumberValue.php',
diff --git a/DataValues/includes/values/LatLongValue.php 
b/DataValues/includes/values/LatLongValue.php
new file mode 100644
index 000..9da75dc
--- /dev/null
+++ b/DataValues/includes/values/LatLongValue.php
@@ -0,0 +1,208 @@
+?php
+
+namespace DataValues;
+
+use InvalidArgumentException;
+use OutOfRangeException;
+
+/**
+ * Object representing a geographic point.
+ *
+ * Latitude is specified in degrees within the range [-90, 90].
+ * Longitude is specified in degrees within the range [-180, 180].
+ *
+ * @since 0.1
+ *
+ * @file
+ * @ingroup DataValue
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+class LatLongValue extends DataValueObject {
+
+   /**
+* The locations latitude.
+*
+* @since 0.1
+*
+* @var float
+*/
+   protected $latitude;
+
+   /**
+* The locations longitude.
+*
+* @since 0.1
+*
+* @var float
+*/
+   protected $longitude;
+
+   /**
+* @since 0.1
+*
+* @param float|int $latitude
+* @param float|int $longitude
+*
+* @throws InvalidArgumentException
+*/
+   public function __construct( $latitude, $longitude ) {
+   if ( is_int( $latitude ) ) {
+   $latitude = (float)$latitude;
+   }
+
+   if ( is_int( $longitude ) ) {
+   $longitude = (float)$longitude;
+   }
+
+   $this-assertIsLatitude( $latitude );
+   $this-assertIsLongitude( $longitude );
+
+   $this-latitude = $latitude;
+   $this-longitude = $longitude;
+   }
+
+   protected function assertIsLatitude( $latitude ) {
+   if ( !is_float( $latitude ) ) {
+   throw new InvalidArgumentException( 'Can only construct 
LatLongValue with a numeric latitude' );
+   }
+
+   if ( $latitude  -90 || $latitude  90 ) {
+   throw new OutOfRangeException( 'Latitude needs to be 
between -90 and 90' );
+   }
+   }
+
+   protected function assertIsLongitude( $longitude ) {
+   if ( !is_float( $longitude ) ) {
+   throw new InvalidArgumentException( 'Can only construct 
LatLongValue with a numeric longitude' );
+   }
+
+   if ( $longitude  -180 || $longitude  180 ) {
+   throw new OutOfRangeException( 'Longitude needs to be 
between -180 and 180' );
+   }
+   }
+
+   /**
+* @see Serializable::serialize
+*
+* @since 0.1
+*
+* @return string
+*/
+   public function serialize() {
+   $data = array(
+   $this-latitude,
+   $this-longitude
+   );
+
+   return implode( '|', $data );
+   }
+
+   /**
+* @see Serializable::unserialize
+*
+* @since 0.1
+*
+* @param string $value
+*
+* @return LatLongValue
+* @throws InvalidArgumentException
+*/
+   public function unserialize( $value ) {
+   $data = explode( '|', $value, 2 );
+
+   if ( count( $data )  2 ) {
+   throw new InvalidArgumentException( 'Invalid 
serialization provided in ' . __METHOD__ );
+   }
+
+   $this-__construct(
+   (float)$data[0],
+   (float)$data[1]
+   );
+   }
+
+   /**
+* @see 

[MediaWiki-commits] [Gerrit] Followup I59dfcfb25c, language change work with out event lo... - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Followup I59dfcfb25c, language change work with out event 
logging
..


Followup I59dfcfb25c, language change work with out event logging

In I59dfcfb25c, for logging events when page is navigating away, we
used callbacks with mw.hook. That is wrong approach. If event logging
is disabled those callbacks will never called: it broke language change
and all use cases which navigates away from current page.

Event logging should not interfere with any ULS functionality. If ULS
functionality depends on callbacks from event logging, it is wrong.

In this patch, we give a small time window to make sure event logging is
fired, but we won't wait for its success or failure.

If eventlogging is disabled, this time window does not exist.

Change-Id: I0b7d9d8b9d1d01b99422010596ebfa80b2589d04
---
M resources/js/ext.uls.displaysettings.js
M resources/js/ext.uls.eventlogger.js
M resources/js/ext.uls.init.js
M resources/js/ext.uls.interface.js
4 files changed, 50 insertions(+), 36 deletions(-)

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

Objections:
  Aude: There's a problem with this change, please improve



diff --git a/resources/js/ext.uls.displaysettings.js 
b/resources/js/ext.uls.displaysettings.js
index 51940ba..cf764e6 100644
--- a/resources/js/ext.uls.displaysettings.js
+++ b/resources/js/ext.uls.displaysettings.js
@@ -158,18 +158,30 @@
 
new mw.Api().parse( $.i18n( 
'ext-uls-display-settings-anon-log-in-cta' ) )
.done( function ( parsedCta ) {
+   var deferred = new $.Deferred();
+
$loginCta.html( parsedCta );
$loginCta.find( 'a' ).click( 
function ( event ) {
event.preventDefault();
// Because browsers 
navigate away when clicking a link,
// we are are 
overriding the normal click behavior to
// allow the event be 
logged first - currently there is no
-   // local queue for 
events. The timeout is there to make sure
-   // the user gets to the 
new page even if event logging is slow
-   // or fails.
-   mw.hook( 
'mw.uls.login.click' ).fire( function () {
+   // local queue for 
events. Since the hook system does not
+   // allow returning 
values, we have this ugly event logging
+   // specific hack to 
delay the page load if event logging
+   // is enabled. The 
promise is passed to the hook, so that
+   // if event logging is 
enabled, in can resole the promise
+   // immediately to avoid 
extra delays.
+   deferred.done( function 
() {

window.location.href = event.target.href;
} );
+
+   mw.hook( 
'mw.uls.login.click' ).fire( deferred );
+
+   // Delay is zero if 
event logging is not enabled
+   window.setTimeout( 
function () {
+   
deferred.resolve();
+   }, mw.config.get( 
'wgULSEventLogging' ) * 500 );
} );
} );
 
diff --git a/resources/js/ext.uls.eventlogger.js 
b/resources/js/ext.uls.eventlogger.js
index abb0afb..20ad827 100644
--- a/resources/js/ext.uls.eventlogger.js
+++ b/resources/js/ext.uls.eventlogger.js
@@ -48,21 +48,16 @@
},
 
/**
-* Local wrapper for 'mw.eventLog.logEvent' which handles 
default params
-* and ensures the correct schema is loaded.
+* Local wrapper for 'mw.eventLog.logEvent'
 *
 * @param {Object} event Event action and optional fields
-* @param {int} [timeout] Fail the request if it is not 
completed within
-*  

[MediaWiki-commits] [Gerrit] Added LatLongValue - change (mediawiki...DataValues)

2013-08-19 Thread Daniel Werner (Code Review)
Daniel Werner has submitted this change and it was merged.

Change subject: Added LatLongValue
..


Added LatLongValue

Change-Id: Ifa0c008d1c60708ed7885369b5ce49295e3da765
---
M DataValues/DataValues.classes.php
A DataValues/includes/values/LatLongValue.php
A DataValues/tests/phpunit/includes/values/LatLongValueTest.php
3 files changed, 320 insertions(+), 0 deletions(-)

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



diff --git a/DataValues/DataValues.classes.php 
b/DataValues/DataValues.classes.php
index d88aa23..2df21eb 100644
--- a/DataValues/DataValues.classes.php
+++ b/DataValues/DataValues.classes.php
@@ -15,6 +15,7 @@
'DataValues\BooleanValue' = 'includes/values/BooleanValue.php',
'DataValues\GeoCoordinateValue' = 
'includes/values/GeoCoordinateValue.php',
'DataValues\IriValue' = 'includes/values/IriValue.php',
+   'DataValues\LatLongValue' = 'includes/values/LatLongValue.php',
'DataValues\MonolingualTextValue' = 
'includes/values/MonolingualTextValue.php',
'DataValues\MultilingualTextValue' = 
'includes/values/MultilingualTextValue.php',
'DataValues\NumberValue' = 'includes/values/NumberValue.php',
diff --git a/DataValues/includes/values/LatLongValue.php 
b/DataValues/includes/values/LatLongValue.php
new file mode 100644
index 000..9da75dc
--- /dev/null
+++ b/DataValues/includes/values/LatLongValue.php
@@ -0,0 +1,208 @@
+?php
+
+namespace DataValues;
+
+use InvalidArgumentException;
+use OutOfRangeException;
+
+/**
+ * Object representing a geographic point.
+ *
+ * Latitude is specified in degrees within the range [-90, 90].
+ * Longitude is specified in degrees within the range [-180, 180].
+ *
+ * @since 0.1
+ *
+ * @file
+ * @ingroup DataValue
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+class LatLongValue extends DataValueObject {
+
+   /**
+* The locations latitude.
+*
+* @since 0.1
+*
+* @var float
+*/
+   protected $latitude;
+
+   /**
+* The locations longitude.
+*
+* @since 0.1
+*
+* @var float
+*/
+   protected $longitude;
+
+   /**
+* @since 0.1
+*
+* @param float|int $latitude
+* @param float|int $longitude
+*
+* @throws InvalidArgumentException
+*/
+   public function __construct( $latitude, $longitude ) {
+   if ( is_int( $latitude ) ) {
+   $latitude = (float)$latitude;
+   }
+
+   if ( is_int( $longitude ) ) {
+   $longitude = (float)$longitude;
+   }
+
+   $this-assertIsLatitude( $latitude );
+   $this-assertIsLongitude( $longitude );
+
+   $this-latitude = $latitude;
+   $this-longitude = $longitude;
+   }
+
+   protected function assertIsLatitude( $latitude ) {
+   if ( !is_float( $latitude ) ) {
+   throw new InvalidArgumentException( 'Can only construct 
LatLongValue with a numeric latitude' );
+   }
+
+   if ( $latitude  -90 || $latitude  90 ) {
+   throw new OutOfRangeException( 'Latitude needs to be 
between -90 and 90' );
+   }
+   }
+
+   protected function assertIsLongitude( $longitude ) {
+   if ( !is_float( $longitude ) ) {
+   throw new InvalidArgumentException( 'Can only construct 
LatLongValue with a numeric longitude' );
+   }
+
+   if ( $longitude  -180 || $longitude  180 ) {
+   throw new OutOfRangeException( 'Longitude needs to be 
between -180 and 180' );
+   }
+   }
+
+   /**
+* @see Serializable::serialize
+*
+* @since 0.1
+*
+* @return string
+*/
+   public function serialize() {
+   $data = array(
+   $this-latitude,
+   $this-longitude
+   );
+
+   return implode( '|', $data );
+   }
+
+   /**
+* @see Serializable::unserialize
+*
+* @since 0.1
+*
+* @param string $value
+*
+* @return LatLongValue
+* @throws InvalidArgumentException
+*/
+   public function unserialize( $value ) {
+   $data = explode( '|', $value, 2 );
+
+   if ( count( $data )  2 ) {
+   throw new InvalidArgumentException( 'Invalid 
serialization provided in ' . __METHOD__ );
+   }
+
+   $this-__construct(
+   (float)$data[0],
+   (float)$data[1]
+   );
+   }
+
+   /**
+* @see DataValue::getType
+*
+* @since 0.1
+*
+

[MediaWiki-commits] [Gerrit] new backup file for non-private squid log data, for now to s... - change (analytics/wikistats)

2013-08-19 Thread Erik Zachte (Code Review)
Erik Zachte has uploaded a new change for review.

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


Change subject: new backup file for non-private squid log data, for now to stat1
..

new backup file for non-private squid log data, for now to stat1

Change-Id: Ib51a09a20b6afaaef31bb237358b35ff6c55b913
---
A squids/bash/backup.sh
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats 
refs/changes/79/79779/1

diff --git a/squids/bash/backup.sh b/squids/bash/backup.sh
new file mode 100755
index 000..02ef475
--- /dev/null
+++ b/squids/bash/backup.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+ulimit -v 400
+
+rsync -avr  /a/wikistats_git/squids/csv/* --exclude=private 
stat1.wikimedia.org:/a/backup_stat1002/wikistats_git/squids/csv
+rsync -avr  /a/wikistats_git/squids/reports/* --exclude=private 
stat1.wikimedia.org:/a/backup_stat1002/wikistats_git/squids/reports
+rsync -avr  /a/wikistats_git/squids/bash/*  
stat1.wikimedia.org:/a/backup_stat1002/wikistats_git/squids/bash
+rsync -avr  /a/wikistats_git/squids/perl/*  
stat1.wikimedia.org:/a/backup_stat1002/wikistats_git/squids/perl
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib51a09a20b6afaaef31bb237358b35ff6c55b913
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats
Gerrit-Branch: master
Gerrit-Owner: Erik Zachte ezac...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Change config file to work with cloudbees - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Change config file to work with cloudbees
..

Change config file to work with cloudbees

Change-Id: Iaf9e0ca89b42aaf34c09233f1338732a7620b65c
---
M selenium_cuc/config/config.yml.sample
1 file changed, 15 insertions(+), 9 deletions(-)


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

diff --git a/selenium_cuc/config/config.yml.sample 
b/selenium_cuc/config/config.yml.sample
index 89dae33..738743e 100644
--- a/selenium_cuc/config/config.yml.sample
+++ b/selenium_cuc/config/config.yml.sample
@@ -1,10 +1,16 @@
-WIKIDATA_REPO_URL: http://wikidata-test-repo.wikimedia.de/wiki/;
+ #WIKIDATA_REPO_URL: http://localhost/mediawiki/index.php/;
+ WIKIDATA_REPO_URL: http://wikidata.beta.wmflabs.org/wiki/;
+ #WIKIDATA_REPO_URL: http://wikidata-test-repo.wikimedia.de/wiki/;
 
-# the namespace of the data items (e.g. Data: or  for main namespace)
-ITEM_NAMESPACE: 
-PROPERTY_NAMESPACE: Property:
-ITEM_ID_PREFIX: Q
-PROPERTY_ID_PREFIX: P
-LANGUAGE: en
-LANGUAGE_CODE: en
-LANGUAGE_NAME: English
+ #WIKIDATA_REPO_API: http://localhost/mediawiki/api.php/;
+ WIKIDATA_REPO_API: http://wikidata.beta.wmflabs.org/w/api.php;
+ #WIKIDATA_REPO_URL: http://wikidata-test-repo.wikimedia.de/w/api.php;
+
+ # the namespace of the data items (e.g. Data: or  for main namespace)
+ ITEM_NAMESPACE: 
+ PROPERTY_NAMESPACE: Property:
+ ITEM_ID_PREFIX: Q
+ PROPERTY_ID_PREFIX: P
+ LANGUAGE: en
+ LANGUAGE_CODE: en
+ LANGUAGE_NAME: English

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf9e0ca89b42aaf34c09233f1338732a7620b65c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] exclude dates with faulty data - change (analytics/wikistats)

2013-08-19 Thread Erik Zachte (Code Review)
Erik Zachte has submitted this change and it was merged.

Change subject: exclude dates with faulty data
..


exclude dates with faulty data

Change-Id: I5388ae043373f8a32025a36cd6545a254a3c2c2d
---
M dumps/perl/WikiCountsSummarizeProjectCounts.pl
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/dumps/perl/WikiCountsSummarizeProjectCounts.pl 
b/dumps/perl/WikiCountsSummarizeProjectCounts.pl
index 5ff4ee8..52c623e 100644
--- a/dumps/perl/WikiCountsSummarizeProjectCounts.pl
+++ b/dumps/perl/WikiCountsSummarizeProjectCounts.pl
@@ -474,6 +474,7 @@
   next if $file ge projectcounts-20111223-01 and $file lt 
projectcounts-20111226-16 ; # bad measurements on these dates
   next if $file ge projectcounts-20120413-00 and $file lt 
projectcounts-20120417-00 ; # bad measurements on these dates
   next if $file ge projectcounts-20121214-00 and $file lt 
projectcounts-20130108-00 ; # bad measurements on these dates
+  next if $file ge projectcounts-20130723-00 and $file lt 
projectcounts-20130724-00 ; # bad measurements on these dates
 
   push @files, $file ;
   $file_in_tar {$file} = $file_in ;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5388ae043373f8a32025a36cd6545a254a3c2c2d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats
Gerrit-Branch: master
Gerrit-Owner: Erik Zachte ezac...@wikimedia.org
Gerrit-Reviewer: Erik Zachte ezac...@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] added rsync to web site - change (analytics/wikistats)

2013-08-19 Thread Erik Zachte (Code Review)
Erik Zachte has submitted this change and it was merged.

Change subject: added rsync to web site
..


added rsync to web site

Change-Id: I43eb1c8817086830244b3b2022deb218c721271f
---
M dumps/bash/collect_countable_namespaces.sh
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/dumps/bash/collect_countable_namespaces.sh 
b/dumps/bash/collect_countable_namespaces.sh
index f17c5f0..eab8187 100755
--- a/dumps/bash/collect_countable_namespaces.sh
+++ b/dumps/bash/collect_countable_namespaces.sh
@@ -6,6 +6,7 @@
 perl=$wikistats/dumps/perl
 perl=/home/ezachte/wikistats/dumps/perl # tests
 csv=$wikistats/dumps/csv
+htdocs=stat1001.wikimedia.org::a/srv/stats.wikimedia.org/htdocs/
 
 clear
 
@@ -22,4 +23,6 @@
 date  StatisticsContentNamespacesExtraNamespacesDiff.csv
 diff StatisticsContentNamespacesExtraNamespaces.csv 
StatisticsContentNamespacesExtraNamespaces.bak  
StatisticsContentNamespacesExtraNamespacesDiff.csv
 
+rsync -av StatisticsContentNamespacesExtraNamespaces.csv $htdocs/wikimedia/misc
+
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43eb1c8817086830244b3b2022deb218c721271f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikistats
Gerrit-Branch: master
Gerrit-Owner: Erik Zachte ezac...@wikimedia.org
Gerrit-Reviewer: Erik Zachte ezac...@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] Change config file to work with cloudbees - change (mediawiki...Wikibase)

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

Change subject: Change config file to work with cloudbees
..


Change config file to work with cloudbees

Change-Id: Iaf9e0ca89b42aaf34c09233f1338732a7620b65c
---
M selenium_cuc/config/config.yml.sample
1 file changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/selenium_cuc/config/config.yml.sample 
b/selenium_cuc/config/config.yml.sample
index 89dae33..738743e 100644
--- a/selenium_cuc/config/config.yml.sample
+++ b/selenium_cuc/config/config.yml.sample
@@ -1,10 +1,16 @@
-WIKIDATA_REPO_URL: http://wikidata-test-repo.wikimedia.de/wiki/;
+ #WIKIDATA_REPO_URL: http://localhost/mediawiki/index.php/;
+ WIKIDATA_REPO_URL: http://wikidata.beta.wmflabs.org/wiki/;
+ #WIKIDATA_REPO_URL: http://wikidata-test-repo.wikimedia.de/wiki/;
 
-# the namespace of the data items (e.g. Data: or  for main namespace)
-ITEM_NAMESPACE: 
-PROPERTY_NAMESPACE: Property:
-ITEM_ID_PREFIX: Q
-PROPERTY_ID_PREFIX: P
-LANGUAGE: en
-LANGUAGE_CODE: en
-LANGUAGE_NAME: English
+ #WIKIDATA_REPO_API: http://localhost/mediawiki/api.php/;
+ WIKIDATA_REPO_API: http://wikidata.beta.wmflabs.org/w/api.php;
+ #WIKIDATA_REPO_URL: http://wikidata-test-repo.wikimedia.de/w/api.php;
+
+ # the namespace of the data items (e.g. Data: or  for main namespace)
+ ITEM_NAMESPACE: 
+ PROPERTY_NAMESPACE: Property:
+ ITEM_ID_PREFIX: Q
+ PROPERTY_ID_PREFIX: P
+ LANGUAGE: en
+ LANGUAGE_CODE: en
+ LANGUAGE_NAME: English

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf9e0ca89b42aaf34c09233f1338732a7620b65c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Fixing Common language functionality - change (mediawiki...UniversalLanguageSelector)

2013-08-19 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Fixing Common language functionality
..

Fixing Common language functionality

If was broken in
Icda498f676d1d3ddaefad75fd9212150f696

Change-Id: Ida29364073b07b985050565cacc6634c134f8d6c
---
M resources/js/ext.uls.interface.js
1 file changed, 6 insertions(+), 7 deletions(-)


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

diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index c5553b6..128ac66 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -400,16 +400,17 @@
} );
} else {
$ulsTrigger.on( 'click', function ( e, 
eventParams ) {
-   var uls = $ulsTrigger.data( 'uls' ),
-   ulsOptions;
+   var uls = $ulsTrigger.data( 'uls' );
 
if ( uls ) {
if ( !uls.shown ) {
mw.hook( 
'mw.uls.settings.open' ).fire( eventParams  eventParams.source || 'personal' 
);
}
} else {
-   // ULS options that are common 
to all modes of showing
-   ulsOptions = {
+   $ulsTrigger.uls( {
+   quickList: function () {
+   return 
mw.uls.getFrequentLanguageList();
+   },
onReady: function () {
var uls = this;

mw.loader.using( mw.uls.languageSettingsModules, function () {
@@ -420,9 +421,7 @@
onSelect: function ( 
language ) {

mw.uls.changeLanguage( language );
}
-   };
-
-   $ulsTrigger.uls( ulsOptions 
).trigger( 'click', eventParams );
+   } ).trigger( 'click', 
eventParams );
 
e.stopPropagation();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida29364073b07b985050565cacc6634c134f8d6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Make sure that responses with any of private, no-cache, no-s... - change (operations/puppet)

2013-08-19 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Make sure that responses with any of private, no-cache, 
no-store are never cached
..

Make sure that responses with any of private, no-cache, no-store are never 
cached

Previously, if a response was sent with:

Cache-Control: private, max-age=300

Varnish would still cache this object for 5 minutes.

Change-Id: Ie64400bd1a8f64dc9d69b5c9588a1b01ccaa8fe0
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 8 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/79782/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index ad4a34b..278bd16 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -237,23 +237,20 @@
 }
 
 sub vcl_fetch {
-   /* Add max-age/s-maxage to CC to fix Varnish's broken behaviour */
-   if (beresp.http.Cache-Control !~ (max-age|s-maxage)
-beresp.http.Cache-Control ~ (private|no-cache)) {
+   /* Don't cache private, no-cache, no-store objects */
+   if (beresp.http.Cache-Control ~ (private|no-cache|no-store)) {
set beresp.ttl = 0s;
-   set beresp.http.Cache-Control = beresp.http.Cache-Control + , 
s-maxage=0, max-age=0;
+   /* This should be translated into hit_for_pass later */
}
-
-   set beresp.grace = 60m;
-
+   elsif (beresp.status = 400  beresp.status = 499  beresp.ttl  %= 
vcl_config.fetch(cache4xx, 5m) %) {
+   set beresp.ttl = %= vcl_config.fetch(cache4xx, 5m) %;
+   }
 % if vcl_config.fetch(retry5xx, 0) == 1 -%
-   if (beresp.status  499  beresp.status  505) {
+   if (beresp.status = 500  beresp.status  505) {
return(restart);
}
 % end -%
-   if (beresp.status = 400  beresp.ttl  %= 
vcl_config.fetch(cache4xx, 5m) %) {
-   set beresp.ttl = %= vcl_config.fetch(cache4xx, 5m) %;
-   }
+   set beresp.grace = 60m;
 
/* Function vcl_fetch in %= vcl %.inc.vcl will be appended here */
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie64400bd1a8f64dc9d69b5c9588a1b01ccaa8fe0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use login-throttled properly everywhere - change (mediawiki/core)

2013-08-19 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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


Change subject: Use login-throttled properly everywhere
..

Use login-throttled properly everywhere

Actually proper usage would probably be to split the messages.
Followup to Id385be840f340476fbe7a818ff1d05154fe86d68;
spotted by Shirayuki.
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Login-throttled/en

Change-Id: I565971a90fc383327a51d717a80013cb7a3e9c9b
---
M includes/specials/SpecialChangeEmail.php
M includes/specials/SpecialChangePassword.php
M languages/messages/MessagesQqq.php
3 files changed, 9 insertions(+), 4 deletions(-)


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

diff --git a/includes/specials/SpecialChangeEmail.php 
b/includes/specials/SpecialChangeEmail.php
index 816938d..5ed1cc3 100644
--- a/includes/specials/SpecialChangeEmail.php
+++ b/includes/specials/SpecialChangeEmail.php
@@ -225,7 +225,7 @@
 * @return bool|string true or string on success, false on failure
 */
protected function attemptChange( User $user, $pass, $newaddr ) {
-   global $wgAuth;
+   global $wgAuth, $wgPasswordAttemptThrottle;
 
if ( $newaddr != ''  !Sanitizer::validateEmail( $newaddr ) ) {
$this-error( 'invalidemailaddress' );
@@ -235,7 +235,7 @@
 
$throttleCount = LoginForm::incLoginThrottle( $user-getName() 
);
if ( $throttleCount === true ) {
-   $this-error( 'login-throttled' );
+   $this-error( array ( 'login-throttled', 
$lang-formatDuration( $wgPasswordAttemptThrottle['seconds'] ) ) );
 
return false;
}
diff --git a/includes/specials/SpecialChangePassword.php 
b/includes/specials/SpecialChangePassword.php
index 139bb6d..eaafac8 100644
--- a/includes/specials/SpecialChangePassword.php
+++ b/includes/specials/SpecialChangePassword.php
@@ -230,6 +230,8 @@
 * @throws PasswordError when cannot set the new password because 
requirements not met.
 */
protected function attemptReset( $newpass, $retype ) {
+   global $wgPasswordAttemptThrottle;
+
$isSelf = ( $this-mUserName === $this-getUser()-getName() );
if ( $isSelf ) {
$user = $this-getUser();
@@ -248,7 +250,10 @@
 
$throttleCount = LoginForm::incLoginThrottle( $this-mUserName 
);
if ( $throttleCount === true ) {
-   throw new PasswordError( $this-msg( 'login-throttled' 
)-text() );
+   throw new PasswordError( $this-msg( 'login-throttled' )
+   -params ( $lang-formatDuration( 
$wgPasswordAttemptThrottle['seconds'] ) )
+   -text()
+   );
}
 
$abortMsg = 'resetpass-abort-generic';
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index e7e9897..63ee553 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -1466,7 +1466,7 @@
 *Parameter $2 is the name entered as username.
 *Parameter $3 is a password (randomly generated).
 *Parameter $4 is a URL to the wiki',
-'login-throttled' = 'Error message shown at [[Special:UserLogin]] after the 
user has tried to login with incorrect password too many times. The user has to 
wait a certain time before trying to log in again.
+'login-throttled' = 'Error message shown at [[Special:UserLogin]] after the 
user has tried to login with incorrect password too many times; also used by 
[[Special:ChangeEmail]] and [[Special:ChangeEmail]]. The user has to wait a 
certain time before trying to log in again.
 * $1: the time to wait before the next login attempt. Automatically formatted 
using the 
[//www.mediawiki.org/w/index.php?title=Special%3AAllMessagesprefix=durationfilter=all
 duration-* messages].
 This is a protection against robots trying to find the password by trying lots 
of them. The number of attempts and waiting time are configured via 
[[mw:Manual:$wgPasswordAttemptThrottle|$wgPasswordAttemptThrottle]].',
 'login-abort-generic' = 'The generic unsuccessful login message is used 
unless otherwise specified by hook writers',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I565971a90fc383327a51d717a80013cb7a3e9c9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Fixing Common language functionality - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Fixing Common language functionality
..


Fixing Common language functionality

If was broken in
Icda498f676d1d3ddaefad75fd9212150f696

Bug: 53035
Change-Id: Ida29364073b07b985050565cacc6634c134f8d6c
---
M resources/js/ext.uls.interface.js
1 file changed, 6 insertions(+), 7 deletions(-)

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



diff --git a/resources/js/ext.uls.interface.js 
b/resources/js/ext.uls.interface.js
index c5553b6..128ac66 100644
--- a/resources/js/ext.uls.interface.js
+++ b/resources/js/ext.uls.interface.js
@@ -400,16 +400,17 @@
} );
} else {
$ulsTrigger.on( 'click', function ( e, 
eventParams ) {
-   var uls = $ulsTrigger.data( 'uls' ),
-   ulsOptions;
+   var uls = $ulsTrigger.data( 'uls' );
 
if ( uls ) {
if ( !uls.shown ) {
mw.hook( 
'mw.uls.settings.open' ).fire( eventParams  eventParams.source || 'personal' 
);
}
} else {
-   // ULS options that are common 
to all modes of showing
-   ulsOptions = {
+   $ulsTrigger.uls( {
+   quickList: function () {
+   return 
mw.uls.getFrequentLanguageList();
+   },
onReady: function () {
var uls = this;

mw.loader.using( mw.uls.languageSettingsModules, function () {
@@ -420,9 +421,7 @@
onSelect: function ( 
language ) {

mw.uls.changeLanguage( language );
}
-   };
-
-   $ulsTrigger.uls( ulsOptions 
).trigger( 'click', eventParams );
+   } ).trigger( 'click', 
eventParams );
 
e.stopPropagation();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida29364073b07b985050565cacc6634c134f8d6c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
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] Make sure that responses with any of private, no-cache, no-s... - change (operations/puppet)

2013-08-19 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Make sure that responses with any of private, no-cache, 
no-store are never cached
..


Make sure that responses with any of private, no-cache, no-store are never 
cached

Previously, if a response was sent with:

Cache-Control: private, max-age=300

Varnish would still cache this object for 5 minutes.

Change-Id: Ie64400bd1a8f64dc9d69b5c9588a1b01ccaa8fe0
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index ad4a34b..278bd16 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -237,23 +237,20 @@
 }
 
 sub vcl_fetch {
-   /* Add max-age/s-maxage to CC to fix Varnish's broken behaviour */
-   if (beresp.http.Cache-Control !~ (max-age|s-maxage)
-beresp.http.Cache-Control ~ (private|no-cache)) {
+   /* Don't cache private, no-cache, no-store objects */
+   if (beresp.http.Cache-Control ~ (private|no-cache|no-store)) {
set beresp.ttl = 0s;
-   set beresp.http.Cache-Control = beresp.http.Cache-Control + , 
s-maxage=0, max-age=0;
+   /* This should be translated into hit_for_pass later */
}
-
-   set beresp.grace = 60m;
-
+   elsif (beresp.status = 400  beresp.status = 499  beresp.ttl  %= 
vcl_config.fetch(cache4xx, 5m) %) {
+   set beresp.ttl = %= vcl_config.fetch(cache4xx, 5m) %;
+   }
 % if vcl_config.fetch(retry5xx, 0) == 1 -%
-   if (beresp.status  499  beresp.status  505) {
+   if (beresp.status = 500  beresp.status  505) {
return(restart);
}
 % end -%
-   if (beresp.status = 400  beresp.ttl  %= 
vcl_config.fetch(cache4xx, 5m) %) {
-   set beresp.ttl = %= vcl_config.fetch(cache4xx, 5m) %;
-   }
+   set beresp.grace = 60m;
 
/* Function vcl_fetch in %= vcl %.inc.vcl will be appended here */
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie64400bd1a8f64dc9d69b5c9588a1b01ccaa8fe0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] Complete permission settings for revdel/oversight - change (translatewiki)

2013-08-19 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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


Change subject: Complete permission settings for revdel/oversight
..

Complete permission settings for revdel/oversight

Change-Id: I4cc4091b12bf9b473512082ba58d309891e24b0a
---
M PermissionSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/86/79786/1

diff --git a/PermissionSettings.php b/PermissionSettings.php
index 90c9386..1c47df7 100644
--- a/PermissionSettings.php
+++ b/PermissionSettings.php
@@ -54,6 +54,7 @@
 $wgGroupPermissions['bureaucrat'   ]['renameuser']  = false;
 $wgGroupPermissions['bureaucrat'   ]['userrights']  = false;
 $wgGroupPermissions['bureaucrat'   ]['deleterevision']  = true;
+$wgGroupPermissions['bureaucrat'   ]['deletelogentry']  = true;
 $wgGroupPermissions['bureaucrat'   ]['suppressionlog']  = true;
 $wgGroupPermissions['bureaucrat'   ]['nuke']= true;
 $wgGroupPermissions['bureaucrat'   ]['interwiki']   = true;
@@ -68,6 +69,7 @@
 $wgGroupPermissions['staff']['nuke']= true;
 $wgGroupPermissions['staff']['replacetext'] = true;
 $wgGroupPermissions['sysop']['replacetext'] = false;
+$wgGroupPermissions['staff '   ]['suppressrevision']= true;
 
 $wgGroupPermissions['offline'  ]['translate-import']= true;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cc4091b12bf9b473512082ba58d309891e24b0a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
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] making the report results backwards compatible - change (analytics/wikimetrics)

2013-08-19 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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


Change subject: making the report results backwards compatible
..

making the report results backwards compatible

Change-Id: I23cd0ece2ca97520f3f1af0648419f42bc3af405
---
M wikimetrics/controllers/reports.py
1 file changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/87/79787/1

diff --git a/wikimetrics/controllers/reports.py 
b/wikimetrics/controllers/reports.py
index 7f01ee3..bfc25c6 100644
--- a/wikimetrics/controllers/reports.py
+++ b/wikimetrics/controllers/reports.py
@@ -82,6 +82,15 @@
 return (celery_task, pj)
 
 
+def get_celery_task_result(celery_task, db_report):
+# this indicates an old style result, the celery task result can be 
returned directly
+if db_report.result_key == db_report.queue_result_key:
+return celery_task.get()
+# otherwise, it's a new style result, the celery task is a dictionary
+else:
+return celery_task.get()[db_report.result_key]
+
+
 @app.route('/reports/status/result_key')
 def report_status(result_key):
 celery_task, pj = get_celery_task(result_key)
@@ -95,7 +104,7 @@
 return json_error('no task exists with id: {0}'.format(result_key))
 
 if celery_task.ready():
-task_result = celery_task.get()[result_key]
+task_result = get_celery_task_result(celery_task, pj)
 
 csv_io = StringIO()
 if task_result:
@@ -157,7 +166,7 @@
 return json_error('no task exists with id: {0}'.format(result_key))
 
 if celery_task.ready():
-task_result = celery_task.get()[result_key]
+task_result = get_celery_task_result(celery_task, pj)
 
 return json_response(
 result=task_result,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23cd0ece2ca97520f3f1af0648419f42bc3af405
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric dandree...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] making the report results backwards compatible - change (analytics/wikimetrics)

2013-08-19 Thread Milimetric (Code Review)
Milimetric has submitted this change and it was merged.

Change subject: making the report results backwards compatible
..


making the report results backwards compatible

Change-Id: I23cd0ece2ca97520f3f1af0648419f42bc3af405
---
M wikimetrics/controllers/reports.py
1 file changed, 11 insertions(+), 2 deletions(-)

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



diff --git a/wikimetrics/controllers/reports.py 
b/wikimetrics/controllers/reports.py
index 7f01ee3..bfc25c6 100644
--- a/wikimetrics/controllers/reports.py
+++ b/wikimetrics/controllers/reports.py
@@ -82,6 +82,15 @@
 return (celery_task, pj)
 
 
+def get_celery_task_result(celery_task, db_report):
+# this indicates an old style result, the celery task result can be 
returned directly
+if db_report.result_key == db_report.queue_result_key:
+return celery_task.get()
+# otherwise, it's a new style result, the celery task is a dictionary
+else:
+return celery_task.get()[db_report.result_key]
+
+
 @app.route('/reports/status/result_key')
 def report_status(result_key):
 celery_task, pj = get_celery_task(result_key)
@@ -95,7 +104,7 @@
 return json_error('no task exists with id: {0}'.format(result_key))
 
 if celery_task.ready():
-task_result = celery_task.get()[result_key]
+task_result = get_celery_task_result(celery_task, pj)
 
 csv_io = StringIO()
 if task_result:
@@ -157,7 +166,7 @@
 return json_error('no task exists with id: {0}'.format(result_key))
 
 if celery_task.ready():
-task_result = celery_task.get()[result_key]
+task_result = get_celery_task_result(celery_task, pj)
 
 return json_response(
 result=task_result,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23cd0ece2ca97520f3f1af0648419f42bc3af405
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric dandree...@wikimedia.org
Gerrit-Reviewer: Milimetric dandree...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Tests for prefix search scoring. - change (mediawiki...CirrusSearch)

2013-08-19 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Tests for prefix search scoring.
..

Tests for prefix search scoring.

For bug 52886.

Change-Id: I27794574ce1d7f421e3289ade2f358582433e54c
---
M tests/browser/features/prefix.feature
M tests/browser/features/support/build_pages.rb
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/tests/browser/features/prefix.feature 
b/tests/browser/features/prefix.feature
index d647b2f..23dddf1 100644
--- a/tests/browser/features/prefix.feature
+++ b/tests/browser/features/prefix.feature
@@ -10,6 +10,8 @@
 Then I am on a page titled title
   Examples:
 | term   | first_result   | title  
|
+# Note that there are more links to catapult then to any other page that 
starts with the
+# word catapult so it should be first
 | catapult   | Catapult   | Catapult   
|
 | catapul| Catapult   | Search results 
|
 | two words  | Two Words  | Two Words  
|
diff --git a/tests/browser/features/support/build_pages.rb 
b/tests/browser/features/support/build_pages.rb
index d71c059..6ef747f 100644
--- a/tests/browser/features/support/build_pages.rb
+++ b/tests/browser/features/support/build_pages.rb
@@ -4,8 +4,10 @@
   if !$setup_main
 steps %Q{
   Given a page named Template:Template Test exists with contents pickles 
[[Category:TemplateTagged]]
+  And a page named Catapult/adsf exists with contents catapult subpage 
[[Catapult]]
+  And a page named Links To Catapult exists with contents [[Catapult]]
   And a page named Catapult exists with contents ♙ asdf 
[[Category:Weaponry]]
-  And a page named Amazing Catapult exists with contents test 
[[Category:Weaponry]]
+  And a page named Amazing Catapult exists with contents test [[Catapult]] 
[[Category:Weaponry]]
   And a page named Two Words exists with contents ffnonesenseword catapult 
{{Template_Test}} [[Category:TwoWords]]
   And a page named África exists with contents for testing
   And a page named Rdir exists with contents #REDIRECT [[Two Words]]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27794574ce1d7f421e3289ade2f358582433e54c
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] Return most relevent prefix search results. - change (mediawiki...CirrusSearch)

2013-08-19 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Return most relevent prefix search results.
..

Return most relevent prefix search results.

Relevency is calculated in much the same way as lsearchd - based on the
number of incoming links.

This solution will also create some knock-on work, namely that we'll
have to reindex pages when the number of links to them changes
substantially.  Exactly what that means is up for debate but without
doing something a page won't notice it has become popular until it has
changed.

For bug 52886.

Change-Id: I099849fa1d9b5cd4bedef2266ac8f7ec3e31e990
---
M CirrusSearch.body.php
M CirrusSearchMappingConfigBuilder.php
M CirrusSearchUpdater.php
M forceSearchIndex.php
M updateOneSearchIndexConfig.php
5 files changed, 74 insertions(+), 32 deletions(-)


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

diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index 2673975..4d3c30c 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -109,14 +109,20 @@
 
// Query params
$query-setLimit( $limit );
-   $query-setFilter( CirrusSearch::buildNamespaceFilter( $ns ) );
-   $indexType = CirrusSearch::pickIndexTypeFromNamespaces( $ns );
+   $mainFilter = new \Elastica\Filter\Bool();
+   $mainFilter-addMust( CirrusSearch::buildNamespaceFilter( $ns ) 
);
+   $prefixFilterQuery = new \Elastica\Filter\Query();
$match = new \Elastica\Query\Match();
$match-setField( 'title.prefix', array(
'query' = substr( $search, 0, 
CirrusSearch::MAX_PREFIX_SEARCH ),
'analyzer' = 'prefix_query'
) );
-   $query-setQuery( $match );
+   $mainFilter-addMust( new \Elastica\Filter\Query( $match ) );
+   $query-setFilter( $mainFilter );
+   // This query doesn't have a score because it is all filters so 
force sorting on the boost
+   $query-setSort( array( 'boost' ) );
+
+   $indexType = CirrusSearch::pickIndexTypeFromNamespaces( $ns );
 
// Perform the search
$work = new PoolCounterWorkViaCallback( 'CirrusSearch-Search', 
_elasticsearch, array(
@@ -387,7 +393,7 @@
}
CirrusSearchUpdater::updateRevisions( array( array(
'rev' = $revision,
-   'text' = $text
+   'text' = $text,
) ) );
CirrusSearch::$updated[] = $id;
}
diff --git a/CirrusSearchMappingConfigBuilder.php 
b/CirrusSearchMappingConfigBuilder.php
index 68d7772..91928fd 100644
--- a/CirrusSearchMappingConfigBuilder.php
+++ b/CirrusSearchMappingConfigBuilder.php
@@ -31,14 +31,20 @@
// Note never to set something as type='object' here because 
that isn't returned by elasticsearch
// and is infered anyway.
return array(
-   'title' = $this-buildStringField( 'title', array( 
'suggest', 'prefix' ), true ),
-   'text' = $this-buildStringField( 'text', array( 
'suggest' ), true ),
-   'category' = $this-buildStringField(),
-   'redirect' = array(
-   'properties' = array(
-   'title' = $this-buildStringField( 
'title', null, true )
+   'properties' = array(
+   'title' = $this-buildStringField( 'title', 
array( 'suggest', 'prefix' ), true ),
+   'text' = $this-buildStringField( 'text', 
array( 'suggest' ), true ),
+   'category' = $this-buildStringField(),
+   'redirect' = array(
+   'properties' = array(
+   'title' = 
$this-buildStringField( 'title', null, true )
+   )
)
-   )
+   ),
+   '_boost' = array(
+   'name' = 'boost',
+   'null_value' = 1.0,
+   ),
);
}
 
diff --git a/CirrusSearchUpdater.php b/CirrusSearchUpdater.php
index 482b951..d44ccfb 100644
--- a/CirrusSearchUpdater.php
+++ b/CirrusSearchUpdater.php
@@ -23,7 +23,12 @@
 *
 * @param array $pageData An array of revisions and their pre-processed
 * data. The format is as follows:
-*   array( array( 'rev' = $revision, 'text' = $text ), ... )
+*   array(
+*

[MediaWiki-commits] [Gerrit] (Bug 53034) Handling redirects ($redirid == 0) - change (mediawiki...SemanticMediaWiki)

2013-08-19 Thread Mwjames (Code Review)
Mwjames has uploaded a new change for review.

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


Change subject: (Bug 53034) Handling redirects ($redirid == 0)
..

(Bug 53034) Handling redirects ($redirid == 0)

Change-Id: Ib5184a17eb8e927804a482d0fbc7f1cb5ac0bd54
---
M includes/storage/SQLStore/SMW_SQLStore3_Writers.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/90/79790/1

diff --git a/includes/storage/SQLStore/SMW_SQLStore3_Writers.php 
b/includes/storage/SQLStore/SMW_SQLStore3_Writers.php
index c1b9d4e..1e90991 100644
--- a/includes/storage/SQLStore/SMW_SQLStore3_Writers.php
+++ b/includes/storage/SQLStore/SMW_SQLStore3_Writers.php
@@ -726,8 +726,9 @@
// to ensure that no ghost references exists for an 
deleted oldTitle
// @see Title::moveTo(), createRedirect
if ( $redirid == 0 ) {
+   $this-updateRedirects( $oldtitle-getDBkey(), 
$oldtitle-getNamespace() );
// Delete any existing data (including 
redirects) from old title
-   $this-doDataUpdate( new SMWSemanticData( 
SMWDIWikiPage::newFromTitle( $oldtitle ) ) );
+   //  $this-doDataUpdate( new SMWSemanticData( 
SMWDIWikiPage::newFromTitle( $oldtitle ) ) );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5184a17eb8e927804a482d0fbc7f1cb5ac0bd54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com

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


[MediaWiki-commits] [Gerrit] Don't emit Surface changes back to the Surface - change (mediawiki...VisualEditor)

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

Change subject: Don't emit Surface changes back to the Surface
..


Don't emit Surface changes back to the Surface

modules/ve/ce/ve.ce.SurfaceObserver.js
* add emitChangeEvents argument to poll (and start and stop)

modules/ve/ce/ve.ce.Surface.js
* Pass emitChangeEvents=false to calls to start/stop in certain places
* Pass async=false in the onDocumentKeyDown call to stop
* Explicitly pass emitChangeEvents=true elsewhere, to preserve prior behaviour

modules/ve/ui/ve.ui.Surface.js
* Explicitly pass emitChangeEvents=true to poll

modules/ve/test/ve.test.js
* Escape non-BMP unicode text literal (to prevent potential editor problems)

Change-Id: Ia96efad0c808b9a02e508bbfda65fdf4f5cedeff
---
M modules/ve/ce/ve.ce.Surface.js
M modules/ve/ce/ve.ce.SurfaceObserver.js
M modules/ve/test/ve.test.js
M modules/ve/ui/ve.ui.Surface.js
4 files changed, 52 insertions(+), 46 deletions(-)

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



diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 3c554f4..48a58e4 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -292,7 +292,7 @@
'compositionstart.ve-ce-Surface': ve.bind( 
this.onDocumentCompositionStart, this ),
'compositionend.ve-ce-Surface': ve.bind( 
this.onDocumentCompositionEnd, this )
} );
-   this.surfaceObserver.start( true );
+   this.surfaceObserver.start( true, true );
 };
 
 /**
@@ -303,7 +303,7 @@
  */
 ve.ce.Surface.prototype.documentOnBlur = function () {
this.$document.off( '.ve-ce-Surface' );
-   this.surfaceObserver.stop( true );
+   this.surfaceObserver.stop( true, true );
this.dragging = false;
 };
 
@@ -323,7 +323,7 @@
// this.$$( e.target ).closest( '.ve-ce-documentNode' ).length === 0
 
if ( e.which === 1 ) {
-   this.surfaceObserver.stop( true );
+   this.surfaceObserver.stop( true, true );
}
 
// Handle triple click
@@ -349,7 +349,7 @@
  * @emits selectionEnd
  */
 ve.ce.Surface.prototype.onDocumentMouseUp = function ( e ) {
-   this.surfaceObserver.start();
+   this.surfaceObserver.start( false, true );
if ( !e.shiftKey  this.selecting ) {
this.emit( 'selectionEnd' );
this.selecting = false;
@@ -467,7 +467,7 @@
return;
}
 
-   this.surfaceObserver.stop( true );
+   this.surfaceObserver.stop( false, true );
switch ( e.keyCode ) {
case ve.Keys.LEFT:
case ve.Keys.RIGHT:
@@ -502,7 +502,7 @@
}
break;
}
-   this.surfaceObserver.start();
+   this.surfaceObserver.start( false, false );
 };
 
 /**
@@ -540,7 +540,7 @@
 
this.handleInsertion();
setTimeout( ve.bind( function () {
-   this.surfaceObserver.start();
+   this.surfaceObserver.start( false, true );
}, this ) );
 };
 
@@ -566,7 +566,7 @@
  * @param {jQuery.Event} e Cut event
  */
 ve.ce.Surface.prototype.onCut = function ( e ) {
-   this.surfaceObserver.stop();
+   this.surfaceObserver.stop( false, true );
this.onCopy( e );
setTimeout( ve.bind( function () {
var selection, tx;
@@ -580,7 +580,7 @@
 
this.model.change( tx, new ve.Range( selection.start ) );
this.surfaceObserver.clear();
-   this.surfaceObserver.start();
+   this.surfaceObserver.start( false, true );
}, this ) );
 };
 
@@ -627,7 +627,7 @@
view = this,
selection = this.model.getSelection();
 
-   this.surfaceObserver.stop();
+   this.surfaceObserver.stop( false, true );
 
// Pasting into a range? Remove first.
if ( !rangy.getSelection( this.$document[0] ).isCollapsed ) {
@@ -708,7 +708,7 @@
  */
 ve.ce.Surface.prototype.onDocumentCompositionEnd = function () {
this.inIme = false;
-   this.surfaceObserver.start();
+   this.surfaceObserver.start( false, false );
 };
 
 /*! Custom Events */
@@ -942,7 +942,7 @@
  * @method
  */
 ve.ce.Surface.prototype.onLock = function () {
-   this.surfaceObserver.stop();
+   this.surfaceObserver.stop( false, true );
 };
 
 /**
@@ -952,7 +952,7 @@
  */
 ve.ce.Surface.prototype.onUnlock = function () {
this.surfaceObserver.clear( this.model.getSelection() );
-   this.surfaceObserver.start();
+   this.surfaceObserver.start( false, true );
 };
 
 /*! Relocation */
@@ -1000,7 +1000,7 @@
// Selection is going to be displayed programmatically so prevent 
default browser behaviour
e.preventDefault();
// Stop with final poll cycle so we have correct information in model
-   this.surfaceObserver.stop( true );
+   

[MediaWiki-commits] [Gerrit] Default to more accurate but slower search_type. - change (mediawiki...CirrusSearch)

2013-08-19 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Default to more accurate but slower search_type.
..

Default to more accurate but slower search_type.

If performing a full text search (the only search where term frequency
is currently important) then ask elasticsearch to make sure it uses
accurate numbers for the term frequency if configured to do so. Default
to configuring to do so.

Bug 53039.

Change-Id: I50c3a8538d120dd5db83d2c40b2365d69324f275
---
M CirrusSearch.body.php
M CirrusSearch.php
2 files changed, 12 insertions(+), 2 deletions(-)


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

diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index c4dfdca..4542c98 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -147,6 +147,7 @@
public function searchText( $term ) {
wfDebugLog( 'CirrusSearch', Searching:  $term );
global $wgCirrusSearchPhraseSuggestMaxErrors, 
$wgCirrusSearchPhraseSuggestConfidence;
+   global $wgCirrusSearchMoreAccurateScoringMode;

$originalTerm = $term;
 
@@ -157,6 +158,7 @@
 
$query = new Elastica\Query();
$query-setFields( array( 'id', 'title', 'namespace', 
'redirect' ) );
+   $queryOptions = array();
 
$filters = array();
 
@@ -261,13 +263,16 @@
)
)
));
+   if ( $wgCirrusSearchMoreAccurateScoringMode ) {
+   $queryOptions[ 'search_type' ] = 
'dfs_query_then_fetch';
+   }
}
 
// Perform the search
$work = new PoolCounterWorkViaCallback( 'CirrusSearch-Search', 
_elasticsearch, array(
-   'doWork' = function() use ( $indexType, $originalTerm, 
$query ) {
+   'doWork' = function() use ( $indexType, $originalTerm, 
$query, $queryOptions ) {
try {
-   $result = CirrusSearch::getPageType( 
$indexType )-search( $query );
+   $result = CirrusSearch::getPageType( 
$indexType )-search( $query, $queryOptions );
wfDebugLog( 'CirrusSearch', 'Search 
completed in ' . $result-getTotalTime() . ' millis' );
return $result;
} catch ( 
\Elastica\Exception\ExceptionInterface $e ) {
diff --git a/CirrusSearch.php b/CirrusSearch.php
index 312cc4d..c8e5a64 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -43,6 +43,11 @@
 // Number of replicas per shard for each index
 $wgCirrusSearchContentReplicaCount = array( 'content' = 1, 'general' = 1 );
 
+// If true CirrusSearch asks Elasticsearch to perform searches using a mode 
that should
+// product more accurate results at the cost of performance. See this for more 
info:
+// 
http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/
+$wgCirrusSearchMoreAccurateScoringMode = true;
+
 // Maximum number of terms that we ask phrase suggest to correct.
 // See max_errors on 
http://www.elasticsearch.org/guide/reference/api/search/suggest/
 $wgCirrusSearchPhraseSuggestMaxErrors = 5;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50c3a8538d120dd5db83d2c40b2365d69324f275
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] WIP Refactor VE headings scenarios - change (qa/browsertests)

2013-08-19 Thread Rachel99 (Code Review)
Rachel99 has uploaded a new change for review.

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


Change subject: WIP  Refactor VE headings scenarios
..

WIP  Refactor VE headings scenarios

Change-Id: I9bde8431fbc8a2e783043595e4329bc7a64afed7
---
M features/step_definitions/visual_editor_headings_steps.rb
M features/visual_editor_headings.feature
2 files changed, 37 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/94/79794/1

diff --git a/features/step_definitions/visual_editor_headings_steps.rb 
b/features/step_definitions/visual_editor_headings_steps.rb
index c4e24af..d985aec 100644
--- a/features/step_definitions/visual_editor_headings_steps.rb
+++ b/features/step_definitions/visual_editor_headings_steps.rb
@@ -6,7 +6,7 @@
   on(VisualEditorPage).ve_heading_ui.should match Regexp.escape('Paragraph')
 end
 
-When(/^I click the down arrow$/) do
+When(/^I click the down arrow on Headings interface$/) do
   on(VisualEditorPage).downarrow_element.when_present.click
 end
 
diff --git a/features/visual_editor_headings.feature 
b/features/visual_editor_headings.feature
index 2eeb536..823ac8c 100644
--- a/features/visual_editor_headings.feature
+++ b/features/visual_editor_headings.feature
@@ -1,47 +1,48 @@
 @ie6-bug  @ie7-bug  @ie8-bug  @ie9-bug @ie10-bug @test2.wikipedia.org @login
 Feature: VisualEditor Headings
 
-  Background:
+  Scenario: Choose VE
 Given I am logged in
-  And I am at my user page
+And I am at my user page
 When I click Edit for VisualEditor
-  And I click the Headings pull-down menu
+And I click the Headings pull-down menu
 
-Scenario: Choose Paragraph
-Given I can see the Headings interface
-When I edit the page with a string
-  And I click the down arrow
-  And I click Paragraph
-  And I click Save page
-  And I click Review your changes
-Then a paragraph should appear in the diff view
+ Scenario: Choose Paragraph
+ Given I can see the Headings interface
+ When I edit the page with a string
+   And I click the down arrow on Headings interface
+   And I click Paragraph
+   And I click Save page
+   And I click Review your changes
+ Then a paragraph should appear in the diff view
+   And I should be able to click the up arrow on the save box
 
-Scenario: Choose Heading
-Given I can see the Headings interface
-When I edit the page with a string
-  And I click the down arrow
-  And I click Heading
-  And I click Save page
-  And I click Review your changes
-Then a heading should appear in the diff view
+#  Scenario: Choose Heading
+#  Given I can see the Headings interface
+# When I edit the page with a string
+#And I click the down arrow on Headings interface  And I click Heading
+#   And I click Save page
+#   And I click Review your changes
+# Then a heading should appear in the diff view
+#   And I should be able to click the up arrow on the save box
 
-  Scenario: Choose Sub-Heading1
-  Given I can see the Headings interface
-  When I edit the page with a string
-And I click the down arrow
-And I click Sub-Heading1
-And I click Save page
-And I click Review your changes
-  Then a sub-heading1 should appear in the diff view
+# Scenario: Choose Sub-Heading1
+#Given I can see the Headings interface
+#  When I edit the page with a string
+#  And I click the down arrow
+#  And I click Sub-Heading1
+#  And I click Save page
+#  And I click Review your changes
+#Then a sub-heading1 should appear in the diff view
 
-  Scenario: Choose Sub-Heading2
-Given I can see the Headings interface
-When I edit the page with a string
-And I click the down arrow
-And I click Sub-Heading2
-And I click Save page
-And I click Review your changes
-Then a sub-heading2 should appear in the diff view
+# Scenario: Choose Sub-Heading2
+# Given I can see the Headings interface
+#  When I edit the page with a string
+#  And I click the down arrow
+#  And I click Sub-Heading2
+# And I click Save page
+# And I click Review your changes
+# Then a sub-heading2 should appear in the diff view
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bde8431fbc8a2e783043595e4329bc7a64afed7
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Rachel99 rachelq...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add some return type hints - change (mediawiki...CirrusSearch)

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

Change subject: Add some return type hints
..


Add some return type hints

Remove a couple of unused variables

Improve some existing parameter type hints

__method__ - __METHOD__

Change-Id: I3e9bb75dbc01505cc3ffee24d5c9edd81d0f0632
---
M CirrusSearch.body.php
M CirrusSearchAnalysisConfigBuilder.php
M CirrusSearchMappingConfigBuilder.php
M CirrusSearchUpdater.php
M forceSearchIndex.php
M updateOneSearchIndexConfig.php
M updateSearchIndexConfig.php
7 files changed, 79 insertions(+), 23 deletions(-)

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



diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index c4dfdca..c78aaca 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -47,11 +47,14 @@
 */
private static $updated = array();
 
+   /**
+* @return \Elastica\Client|null
+*/
public static function getClient() {
if ( self::$client != null ) {
return self::$client;
}
-   global $wgCirrusSearchServers, $wgCirrusSearchMaxRetries;
+   global $wgCirrusSearchServers;
 
// Setup the Elastica endpoints
$servers = array();
@@ -100,15 +103,21 @@
return CirrusSearch::getIndex( $type )-getType( 
CirrusSearch::PAGE_TYPE_NAME );
}
 
+   /**
+* @param $ns
+* @param $search
+* @param $limit
+* @param $results
+* @return bool
+*/
public static function prefixSearch( $ns, $search, $limit, $results ) {
wfDebugLog( 'CirrusSearch', Prefix searching:  $search );
// Boilerplate
-   $nsNames = 
RequestContext::getMain()-getLanguage()-getNamespaces();
$query = new Elastica\Query();
$query-setFields( array( 'id', 'title', 'namespace' ) );
 
// Query params
-   $query-setLimit( $limit );
+   $query-setSize( $limit );
$query-setFilter( CirrusSearch::buildNamespaceFilter( $ns ) );
$indexType = CirrusSearch::pickIndexTypeFromNamespaces( $ns );
$match = new \Elastica\Query\Match();
@@ -144,10 +153,14 @@
return false;
}
 
+   /**
+* @param string $term
+* @return CirrusSearchResultSet|null|SearchResultSet|Status
+*/
public function searchText( $term ) {
wfDebugLog( 'CirrusSearch', Searching:  $term );
global $wgCirrusSearchPhraseSuggestMaxErrors, 
$wgCirrusSearchPhraseSuggestConfidence;
-   
+
$originalTerm = $term;
 
// Ignore leading ~ because it is used to force displaying 
search results but not to effect them
@@ -165,7 +178,7 @@
$query-setFrom( $this-offset );
}
if( $this-limit ) {
-   $query-setLimit( $this-limit );
+   $query-setSize( $this-limit );
}
$filters[] = CirrusSearch::buildNamespaceFilter( 
$this-namespaces );
$indexType = CirrusSearch::pickIndexTypeFromNamespaces( 
$this-namespaces );
@@ -290,6 +303,7 @@
 * Filter a query to only return results in given namespace(s)
 *
 * @param array $ns Array of namespaces
+* @return \Elastica\Filter\Terms|null
 */
private static function buildNamespaceFilter( array $ns ) {
if ( $ns !== null  count( $ns ) ) {
@@ -393,6 +407,9 @@
}
}
 
+   /**
+* @param $linkUpdate LinksUpdate
+*/
public static function linksUpdateCompletedHook( $linkUpdate ) {
$title = $linkUpdate-getTitle();
$articleId = $title-getArticleID();
@@ -441,7 +458,7 @@
  * A set of results from Elasticsearch.
  */
 class CirrusSearchResultSet extends SearchResultSet {
-   private $result, $docs, $hits, $totalHits, $suggestionQuery, 
$suggestionSnippet;
+   private $result, $hits, $totalHits, $suggestionQuery, 
$suggestionSnippet;
 
public function __construct( $res ) {
$this-result = $res;
@@ -500,7 +517,7 @@
$current = $this-result-current();
if ( $current ) {
$this-result-next();
-   return new CirrusSearchResult( $current );  
+   return new CirrusSearchResult( $current );
}
return false;
}
diff --git a/CirrusSearchAnalysisConfigBuilder.php 
b/CirrusSearchAnalysisConfigBuilder.php
index 4f1588b..d65d06b 100644
--- a/CirrusSearchAnalysisConfigBuilder.php
+++ b/CirrusSearchAnalysisConfigBuilder.php
@@ -20,6 +20,9 @@
 class CirrusSearchAnalysisConfigBuilder {
  

[MediaWiki-commits] [Gerrit] Run selenium tests on saucelabs if correct environment vars ... - change (mediawiki...Wikibase)

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

Change subject: Run selenium tests on saucelabs if correct environment vars are 
set
..


Run selenium tests on saucelabs if correct environment vars are set

Change-Id: Ie96697452db89f3e70ec984ada75bb4d75b7d83b
---
M selenium_cuc/Gemfile
M selenium_cuc/Gemfile.lock
M selenium_cuc/features/support/env.rb
3 files changed, 57 insertions(+), 27 deletions(-)

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



diff --git a/selenium_cuc/Gemfile b/selenium_cuc/Gemfile
index 6bb1726..70f2967 100644
--- a/selenium_cuc/Gemfile
+++ b/selenium_cuc/Gemfile
@@ -11,3 +11,4 @@
 gem 'cucumber'
 gem 'json'
 gem 'activesupport'
+gem 'net-http-persistent'
diff --git a/selenium_cuc/Gemfile.lock b/selenium_cuc/Gemfile.lock
index 52d094c..ecd7b56 100644
--- a/selenium_cuc/Gemfile.lock
+++ b/selenium_cuc/Gemfile.lock
@@ -8,49 +8,52 @@
   thread_safe (~ 0.1)
   tzinfo (~ 0.3.37)
 atomic (1.1.13)
-builder (3.2.0)
+builder (3.2.2)
 childprocess (0.3.9)
   ffi (~ 1.0, = 1.0.11)
-cucumber (1.3.1)
+cucumber (1.3.6)
   builder (= 2.1.2)
   diff-lcs (= 1.1.3)
   gherkin (~ 2.12.0)
-  multi_json (~ 1.3)
-data_magic (0.14)
+  multi_json (~ 1.7.5)
+  multi_test (= 0.0.2)
+data_magic (0.15.2)
   faker (= 1.1.2)
   yml_reader (= 0.2)
 diff-lcs (1.2.4)
-faker (1.1.2)
+faker (1.2.0)
   i18n (~ 0.5)
-ffi (1.8.1-x86-mingw32)
-gherkin (2.12.0-x86-mingw32)
+ffi (1.9.0-x86-mingw32)
+gherkin (2.12.1-x86-mingw32)
   multi_json (~ 1.3)
-i18n (0.6.4)
-json (1.7.7)
-minitest (4.3.2)
-multi_json (1.7.3)
-page-object (0.8.10)
+i18n (0.6.5)
+json (1.8.0)
+minitest (4.7.5)
+multi_json (1.7.9)
+multi_test (0.0.2)
+net-http-persistent (2.9)
+page-object (0.9.1)
   page_navigation (= 0.8)
-  selenium-webdriver (= 2.32.1)
+  selenium-webdriver (= 2.33.0)
   watir-webdriver (= 0.6.4)
 page_navigation (0.9)
   data_magic (= 0.14)
-parallel (0.6.4)
-parallel_tests (0.12.1)
+parallel (0.7.1)
+parallel_tests (0.15.1)
   parallel
-rake (10.0.4)
+rake (10.1.0)
 require_all (1.2.1)
-rspec (2.13.0)
-  rspec-core (~ 2.13.0)
-  rspec-expectations (~ 2.13.0)
-  rspec-mocks (~ 2.13.0)
-rspec-core (2.13.1)
-rspec-expectations (2.13.0)
+rspec (2.14.1)
+  rspec-core (~ 2.14.0)
+  rspec-expectations (~ 2.14.0)
+  rspec-mocks (~ 2.14.0)
+rspec-core (2.14.5)
+rspec-expectations (2.14.2)
   diff-lcs (= 1.1.3,  2.0)
 rspec-extra-formatters (1.0.0)
-rspec-mocks (2.13.1)
+rspec-mocks (2.14.3)
 rubyzip (0.9.9)
-selenium-webdriver (2.32.1)
+selenium-webdriver (2.35.0)
   childprocess (= 0.2.5)
   multi_json (~ 1.0)
   rubyzip
@@ -71,6 +74,7 @@
   activesupport
   cucumber
   json
+  net-http-persistent
   page-object
   parallel_tests
   rake
diff --git a/selenium_cuc/features/support/env.rb 
b/selenium_cuc/features/support/env.rb
index 1b11a33..b55e9c7 100644
--- a/selenium_cuc/features/support/env.rb
+++ b/selenium_cuc/features/support/env.rb
@@ -19,7 +19,7 @@
 require 'require_all'
 
 config = YAML.load_file('config/config.yml')
-config.each do |k,v|
+config.each do |k, v|
   eval(#{k} = '#{v}')
 end
 
@@ -30,13 +30,38 @@
 World(PageObject::PageFactory)
 
 def browser(environment, test_name, language)
-  local_browser(language)
+  if environment == :cloudbees
+sauce_browser(test_name)
+  else
+local_browser(language)
+  end
 end
 
 def environment
-  :local
+  if ENV['SAUCE_ONDEMAND_ACCESS_KEY']  ENV['SAUCE_ONDEMAND_USERNAME']
+:cloudbees
+  else
+:local
+  end
 end
 
+def sauce_browser(test_name)
+  caps = Selenium::WebDriver::Remote::Capabilities.firefox
+  caps.version = 23
+  caps.platform = Windows 7
+  caps[:name] = #{test_name} #{ENV['JOB_NAME']}##{ENV['BUILD_NUMBER']}
+
+  require 'selenium/webdriver/remote/http/persistent' # http_client
+  browser = Watir::Browser.new(
+  :remote,
+  :http_client = Selenium::WebDriver::Remote::Http::Persistent.new,
+  :url = 
http://#{ENV['SAUCE_ONDEMAND_USERNAME']}:#{ENV['SAUCE_ONDEMAND_ACCESS_KEY']}@ondemand.saucelabs.com:80/wd/hub,
+  :desired_capabilities = caps)
+
+  browser
+end
+
+
 def local_browser(language)
   if ENV['BROWSER_LABEL']
 browser_label = ENV['BROWSER_LABEL'].to_sym

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie96697452db89f3e70ec984ada75bb4d75b7d83b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot


[MediaWiki-commits] [Gerrit] Restore/Migrate Job templates - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Restore/Migrate Job templates
..

Restore/Migrate Job templates

Add root fileset
Fix bacula-dir.conf permissions
Whitespace/type cleanups/fixes

Change-Id: Idcb1420e8d29cd194112a81d8833ba4922e1e2ba
---
M manifests/role/backup.pp
M modules/bacula/manifests/director.pp
M modules/bacula/templates/bacula-fd.conf.erb
A modules/bacula/templates/restore-migrate-jobs.conf.erb
4 files changed, 39 insertions(+), 5 deletions(-)


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

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index ece10fa..437b1a2 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -49,8 +49,11 @@
 }
 
 # This has been taken straight from old files/backup/disklist-*
+bacula::director::fileset { 'root':
+includes = [ '/' ]
+}
 bacula::director::fileset { 'a-sqldata':
-includes = [ '/a/sqldata']
+includes = [ '/a/sqldata' ]
 }
 bacula::director::fileset { 'a-backup':
 includes = [ '/a/backup' ]
diff --git a/modules/bacula/manifests/director.pp 
b/modules/bacula/manifests/director.pp
index 810b0ca..0698e1c 100644
--- a/modules/bacula/manifests/director.pp
+++ b/modules/bacula/manifests/director.pp
@@ -47,8 +47,8 @@
 file { '/etc/bacula/bacula-dir.conf':
 ensure  = present,
 owner   = root,
-group   = root,
-mode= '0400',
+group   = bacula,
+mode= '0440',
 notify  = Service['bacula-director'],
 content = template('bacula/bacula-dir.conf.erb'),
 require = Package[bacula-director-${sqlvariant}],
@@ -89,6 +89,16 @@
 require = Package[bacula-director-${sqlvariant}],
 }
 
+# Populating restore template/migrate jobs
+file { '/etc/bacula/jobs.d/restore-migrate-jobs.conf':
+ensure  = file,
+mode= '0444',
+owner   = root,
+group   = bacula,
+require = File['/etc/bacula/jobs.d'],
+content = template('bacula/restore-migrate-jobs.conf.erb'),
+}
+
 # Storage daemons will export their resources here
 file { '/etc/bacula/storages.d':
 ensure  = directory,
diff --git a/modules/bacula/templates/bacula-fd.conf.erb 
b/modules/bacula/templates/bacula-fd.conf.erb
index fe0878a..3ac4fb7 100644
--- a/modules/bacula/templates/bacula-fd.conf.erb
+++ b/modules/bacula/templates/bacula-fd.conf.erb
@@ -1,9 +1,9 @@
 # This file has been autogenerated by puppet. Don't edit by hand
 
-# The directors allowed to contect to us
+# The directors allowed to connect to us
 Director {
 Name = %= @director %
-Password = %= @directorpass %
+Password = %= @directorpassword %
 # Have the Control channel encrypted
 TLS Enable = yes
 TLS Require = yes
diff --git a/modules/bacula/templates/restore-migrate-jobs.conf.erb 
b/modules/bacula/templates/restore-migrate-jobs.conf.erb
new file mode 100644
index 000..60d664c
--- /dev/null
+++ b/modules/bacula/templates/restore-migrate-jobs.conf.erb
@@ -0,0 +1,21 @@
+Job {
+  Name = RestoreFiles
+  Type = Restore
+  FileSet = root
+  Pool = Default
+  Client = %= @fqdn -%-fd
+  Messages = Standard
+  Where = /var/tmp/bacula-restores
+}
+
+Job {
+  Name = Migrate Job
+  Type = Migrate
+  Level = Full
+  Pool = Default
+  FileSet = root
+  Client = %= @fqdn -%-fd
+  Messages = Standard
+  Selection Type = SQLQuery
+  Selection Pattern = SELECT 15515
+}

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

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

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


[MediaWiki-commits] [Gerrit] Restore/Migrate Job templates - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Restore/Migrate Job templates
..


Restore/Migrate Job templates

Add root fileset
Fix bacula-dir.conf permissions
Whitespace/type cleanups/fixes

Change-Id: Idcb1420e8d29cd194112a81d8833ba4922e1e2ba
---
M manifests/role/backup.pp
M modules/bacula/manifests/director.pp
M modules/bacula/templates/bacula-fd.conf.erb
A modules/bacula/templates/restore-migrate-jobs.conf.erb
4 files changed, 39 insertions(+), 5 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index ece10fa..437b1a2 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -49,8 +49,11 @@
 }
 
 # This has been taken straight from old files/backup/disklist-*
+bacula::director::fileset { 'root':
+includes = [ '/' ]
+}
 bacula::director::fileset { 'a-sqldata':
-includes = [ '/a/sqldata']
+includes = [ '/a/sqldata' ]
 }
 bacula::director::fileset { 'a-backup':
 includes = [ '/a/backup' ]
diff --git a/modules/bacula/manifests/director.pp 
b/modules/bacula/manifests/director.pp
index 810b0ca..0698e1c 100644
--- a/modules/bacula/manifests/director.pp
+++ b/modules/bacula/manifests/director.pp
@@ -47,8 +47,8 @@
 file { '/etc/bacula/bacula-dir.conf':
 ensure  = present,
 owner   = root,
-group   = root,
-mode= '0400',
+group   = bacula,
+mode= '0440',
 notify  = Service['bacula-director'],
 content = template('bacula/bacula-dir.conf.erb'),
 require = Package[bacula-director-${sqlvariant}],
@@ -89,6 +89,16 @@
 require = Package[bacula-director-${sqlvariant}],
 }
 
+# Populating restore template/migrate jobs
+file { '/etc/bacula/jobs.d/restore-migrate-jobs.conf':
+ensure  = file,
+mode= '0444',
+owner   = root,
+group   = bacula,
+require = File['/etc/bacula/jobs.d'],
+content = template('bacula/restore-migrate-jobs.conf.erb'),
+}
+
 # Storage daemons will export their resources here
 file { '/etc/bacula/storages.d':
 ensure  = directory,
diff --git a/modules/bacula/templates/bacula-fd.conf.erb 
b/modules/bacula/templates/bacula-fd.conf.erb
index fe0878a..3ac4fb7 100644
--- a/modules/bacula/templates/bacula-fd.conf.erb
+++ b/modules/bacula/templates/bacula-fd.conf.erb
@@ -1,9 +1,9 @@
 # This file has been autogenerated by puppet. Don't edit by hand
 
-# The directors allowed to contect to us
+# The directors allowed to connect to us
 Director {
 Name = %= @director %
-Password = %= @directorpass %
+Password = %= @directorpassword %
 # Have the Control channel encrypted
 TLS Enable = yes
 TLS Require = yes
diff --git a/modules/bacula/templates/restore-migrate-jobs.conf.erb 
b/modules/bacula/templates/restore-migrate-jobs.conf.erb
new file mode 100644
index 000..60d664c
--- /dev/null
+++ b/modules/bacula/templates/restore-migrate-jobs.conf.erb
@@ -0,0 +1,21 @@
+Job {
+  Name = RestoreFiles
+  Type = Restore
+  FileSet = root
+  Pool = Default
+  Client = %= @fqdn -%-fd
+  Messages = Standard
+  Where = /var/tmp/bacula-restores
+}
+
+Job {
+  Name = Migrate Job
+  Type = Migrate
+  Level = Full
+  Pool = Default
+  FileSet = root
+  Client = %= @fqdn -%-fd
+  Messages = Standard
+  Selection Type = SQLQuery
+  Selection Pattern = SELECT 15515
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcb1420e8d29cd194112a81d8833ba4922e1e2ba
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris 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] Run selenium tests on saucelabs if correct environment vars ... - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Run selenium tests on saucelabs if correct environment vars are 
set
..

Run selenium tests on saucelabs if correct environment vars are set

Change-Id: Ie96697452db89f3e70ec984ada75bb4d75b7d83b
---
M selenium_cuc/Gemfile
M selenium_cuc/Gemfile.lock
M selenium_cuc/features/support/env.rb
3 files changed, 57 insertions(+), 27 deletions(-)


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

diff --git a/selenium_cuc/Gemfile b/selenium_cuc/Gemfile
index 6bb1726..70f2967 100644
--- a/selenium_cuc/Gemfile
+++ b/selenium_cuc/Gemfile
@@ -11,3 +11,4 @@
 gem 'cucumber'
 gem 'json'
 gem 'activesupport'
+gem 'net-http-persistent'
diff --git a/selenium_cuc/Gemfile.lock b/selenium_cuc/Gemfile.lock
index 52d094c..ecd7b56 100644
--- a/selenium_cuc/Gemfile.lock
+++ b/selenium_cuc/Gemfile.lock
@@ -8,49 +8,52 @@
   thread_safe (~ 0.1)
   tzinfo (~ 0.3.37)
 atomic (1.1.13)
-builder (3.2.0)
+builder (3.2.2)
 childprocess (0.3.9)
   ffi (~ 1.0, = 1.0.11)
-cucumber (1.3.1)
+cucumber (1.3.6)
   builder (= 2.1.2)
   diff-lcs (= 1.1.3)
   gherkin (~ 2.12.0)
-  multi_json (~ 1.3)
-data_magic (0.14)
+  multi_json (~ 1.7.5)
+  multi_test (= 0.0.2)
+data_magic (0.15.2)
   faker (= 1.1.2)
   yml_reader (= 0.2)
 diff-lcs (1.2.4)
-faker (1.1.2)
+faker (1.2.0)
   i18n (~ 0.5)
-ffi (1.8.1-x86-mingw32)
-gherkin (2.12.0-x86-mingw32)
+ffi (1.9.0-x86-mingw32)
+gherkin (2.12.1-x86-mingw32)
   multi_json (~ 1.3)
-i18n (0.6.4)
-json (1.7.7)
-minitest (4.3.2)
-multi_json (1.7.3)
-page-object (0.8.10)
+i18n (0.6.5)
+json (1.8.0)
+minitest (4.7.5)
+multi_json (1.7.9)
+multi_test (0.0.2)
+net-http-persistent (2.9)
+page-object (0.9.1)
   page_navigation (= 0.8)
-  selenium-webdriver (= 2.32.1)
+  selenium-webdriver (= 2.33.0)
   watir-webdriver (= 0.6.4)
 page_navigation (0.9)
   data_magic (= 0.14)
-parallel (0.6.4)
-parallel_tests (0.12.1)
+parallel (0.7.1)
+parallel_tests (0.15.1)
   parallel
-rake (10.0.4)
+rake (10.1.0)
 require_all (1.2.1)
-rspec (2.13.0)
-  rspec-core (~ 2.13.0)
-  rspec-expectations (~ 2.13.0)
-  rspec-mocks (~ 2.13.0)
-rspec-core (2.13.1)
-rspec-expectations (2.13.0)
+rspec (2.14.1)
+  rspec-core (~ 2.14.0)
+  rspec-expectations (~ 2.14.0)
+  rspec-mocks (~ 2.14.0)
+rspec-core (2.14.5)
+rspec-expectations (2.14.2)
   diff-lcs (= 1.1.3,  2.0)
 rspec-extra-formatters (1.0.0)
-rspec-mocks (2.13.1)
+rspec-mocks (2.14.3)
 rubyzip (0.9.9)
-selenium-webdriver (2.32.1)
+selenium-webdriver (2.35.0)
   childprocess (= 0.2.5)
   multi_json (~ 1.0)
   rubyzip
@@ -71,6 +74,7 @@
   activesupport
   cucumber
   json
+  net-http-persistent
   page-object
   parallel_tests
   rake
diff --git a/selenium_cuc/features/support/env.rb 
b/selenium_cuc/features/support/env.rb
index 1b11a33..b55e9c7 100644
--- a/selenium_cuc/features/support/env.rb
+++ b/selenium_cuc/features/support/env.rb
@@ -19,7 +19,7 @@
 require 'require_all'
 
 config = YAML.load_file('config/config.yml')
-config.each do |k,v|
+config.each do |k, v|
   eval(#{k} = '#{v}')
 end
 
@@ -30,13 +30,38 @@
 World(PageObject::PageFactory)
 
 def browser(environment, test_name, language)
-  local_browser(language)
+  if environment == :cloudbees
+sauce_browser(test_name)
+  else
+local_browser(language)
+  end
 end
 
 def environment
-  :local
+  if ENV['SAUCE_ONDEMAND_ACCESS_KEY']  ENV['SAUCE_ONDEMAND_USERNAME']
+:cloudbees
+  else
+:local
+  end
 end
 
+def sauce_browser(test_name)
+  caps = Selenium::WebDriver::Remote::Capabilities.firefox
+  caps.version = 23
+  caps.platform = Windows 7
+  caps[:name] = #{test_name} #{ENV['JOB_NAME']}##{ENV['BUILD_NUMBER']}
+
+  require 'selenium/webdriver/remote/http/persistent' # http_client
+  browser = Watir::Browser.new(
+  :remote,
+  :http_client = Selenium::WebDriver::Remote::Http::Persistent.new,
+  :url = 
http://#{ENV['SAUCE_ONDEMAND_USERNAME']}:#{ENV['SAUCE_ONDEMAND_ACCESS_KEY']}@ondemand.saucelabs.com:80/wd/hub,
+  :desired_capabilities = caps)
+
+  browser
+end
+
+
 def local_browser(language)
   if ENV['BROWSER_LABEL']
 browser_label = ENV['BROWSER_LABEL'].to_sym

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie96697452db89f3e70ec984ada75bb4d75b7d83b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

___

[MediaWiki-commits] [Gerrit] Fix suggestion tests. - change (mediawiki...CirrusSearch)

2013-08-19 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Fix suggestion tests.
..

Fix suggestion tests.

They had a mistake causing them to fail when the feature still works.

Change-Id: I4d2743c48f558a38c86818dfee6703902ca60f7f
---
M tests/browser/features/support/build_pages.rb
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/tests/browser/features/support/build_pages.rb 
b/tests/browser/features/support/build_pages.rb
index d71c059..d95bb1a 100644
--- a/tests/browser/features/support/build_pages.rb
+++ b/tests/browser/features/support/build_pages.rb
@@ -27,7 +27,7 @@
 end
 
 Before('@setup_suggestions') do
-  if !$setup_namespaces
+  if !$setup_suggestions
 steps %Q{
   Given a page named Popular Culture exists with contents popular culture
   And a page named Nobel Prize exists with contents nobel prize
@@ -41,7 +41,7 @@
   And a page named Noble Somethingelse7 exists with contents noble 
somethingelse
   And a page named Template:Noble Pipe exists with contents pipes are so 
noble
 }
-$setup_namespaces = true
+$setup_suggestions = true
   end
 end
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d2743c48f558a38c86818dfee6703902ca60f7f
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] Mark tests as passed on success on saucelabs - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Mark tests as passed on success on saucelabs
..

Mark tests as passed on success on saucelabs

Change-Id: I2c68e52471f5caf74c5939c52ba82ceb1e16892f
---
M selenium_cuc/features/support/env.rb
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/selenium_cuc/features/support/env.rb 
b/selenium_cuc/features/support/env.rb
index b55e9c7..2e4b2a5 100644
--- a/selenium_cuc/features/support/env.rb
+++ b/selenium_cuc/features/support/env.rb
@@ -95,9 +95,17 @@
 Before do |scenario|
   @config = config
   @browser = browser(environment, test_name(scenario), 'default')
+  $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
+end
+
+def sauce_api(json)
+  %x{curl -H 'Content-Type:text/json' -s -X PUT -d '#{json}' 
http://#{ENV['SAUCE_ONDEMAND_USERNAME']}:#{ENV['SAUCE_ONDEMAND_ACCESS_KEY']}@saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{$session_id}}
 end
 
 After do |scenario|
-  $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
+  if environment == :cloudbees  !ENV[windir]
+sauce_api(%Q{{passed: #{scenario.passed?}}})
+sauce_api(%Q{{public: true}})
+  end
   @browser.close
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c68e52471f5caf74c5939c52ba82ceb1e16892f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Undecom mexia - change (operations/puppet)

2013-08-19 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: Undecom mexia
..

Undecom mexia

Repurposed  reinstalled two weeks ago.

Change-Id: Iefda0a1e17e150bf991a6a4cd492344d2eeaa215
---
M manifests/decommissioning.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/79798/1

diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp
index 64acd15..229ad10 100644
--- a/manifests/decommissioning.pp
+++ b/manifests/decommissioning.pp
@@ -105,7 +105,6 @@
 'lily',
 'lomaria',
 'loudon', #moved to frack.eqiad 7-15-13
-'mexia',
 'mc1', #Remove mc1-16 7/12/13 or later
 'mc2',
 'mc3',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefda0a1e17e150bf991a6a4cd492344d2eeaa215
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Generate report XML for selenium tests - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Generate report XML for selenium tests
..

Generate report XML for selenium tests

Change-Id: If8ee815e91bb971ae6fbccb9064e18d08d5242d9
---
M selenium_cuc/config/cucumber.yml
A selenium_cuc/features/support/sauce.rb
2 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/selenium_cuc/config/cucumber.yml b/selenium_cuc/config/cucumber.yml
index ecb6857..8b7c877 100644
--- a/selenium_cuc/config/cucumber.yml
+++ b/selenium_cuc/config/cucumber.yml
@@ -1 +1,2 @@
+ci: --format Cucumber::Formatter::Sauce -out reports/junit
 default: --format progress
diff --git a/selenium_cuc/features/support/sauce.rb 
b/selenium_cuc/features/support/sauce.rb
new file mode 100644
index 000..e3f82f0
--- /dev/null
+++ b/selenium_cuc/features/support/sauce.rb
@@ -0,0 +1,10 @@
+require 'cucumber/formatter/junit'
+
+module Cucumber::Formatter
+  class Sauce  Junit
+def format_exception(exception)
+  sauce_job_page = Sauce Labs job URL: 
http://saucelabs.com/jobs/#{$session_id}\n;
+  ([sauce_job_page] + [#{exception.message} (#{exception.class})] + 
exception.backtrace).join(\n)
+end
+  end
+end
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8ee815e91bb971ae6fbccb9064e18d08d5242d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Undecom mexia - change (operations/puppet)

2013-08-19 Thread Faidon (Code Review)
Faidon has submitted this change and it was merged.

Change subject: Undecom mexia
..


Undecom mexia

Repurposed  reinstalled two weeks ago.

Change-Id: Iefda0a1e17e150bf991a6a4cd492344d2eeaa215
---
M manifests/decommissioning.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp
index 64acd15..229ad10 100644
--- a/manifests/decommissioning.pp
+++ b/manifests/decommissioning.pp
@@ -105,7 +105,6 @@
 'lily',
 'lomaria',
 'loudon', #moved to frack.eqiad 7-15-13
-'mexia',
 'mc1', #Remove mc1-16 7/12/13 or later
 'mc2',
 'mc3',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefda0a1e17e150bf991a6a4cd492344d2eeaa215
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Generate report XML for selenium tests - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Generate report XML for selenium tests
..


Generate report XML for selenium tests

Change-Id: If8ee815e91bb971ae6fbccb9064e18d08d5242d9
---
M selenium_cuc/config/cucumber.yml
A selenium_cuc/features/support/sauce.rb
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/selenium_cuc/config/cucumber.yml b/selenium_cuc/config/cucumber.yml
index ecb6857..8b7c877 100644
--- a/selenium_cuc/config/cucumber.yml
+++ b/selenium_cuc/config/cucumber.yml
@@ -1 +1,2 @@
+ci: --format Cucumber::Formatter::Sauce -out reports/junit
 default: --format progress
diff --git a/selenium_cuc/features/support/sauce.rb 
b/selenium_cuc/features/support/sauce.rb
new file mode 100644
index 000..e3f82f0
--- /dev/null
+++ b/selenium_cuc/features/support/sauce.rb
@@ -0,0 +1,10 @@
+require 'cucumber/formatter/junit'
+
+module Cucumber::Formatter
+  class Sauce  Junit
+def format_exception(exception)
+  sauce_job_page = Sauce Labs job URL: 
http://saucelabs.com/jobs/#{$session_id}\n;
+  ([sauce_job_page] + [#{exception.message} (#{exception.class})] + 
exception.backtrace).join(\n)
+end
+  end
+end
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8ee815e91bb971ae6fbccb9064e18d08d5242d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Mark tests as passed on success on saucelabs - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Mark tests as passed on success on saucelabs
..


Mark tests as passed on success on saucelabs

Change-Id: I2c68e52471f5caf74c5939c52ba82ceb1e16892f
---
M selenium_cuc/features/support/env.rb
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/selenium_cuc/features/support/env.rb 
b/selenium_cuc/features/support/env.rb
index b55e9c7..2e4b2a5 100644
--- a/selenium_cuc/features/support/env.rb
+++ b/selenium_cuc/features/support/env.rb
@@ -95,9 +95,17 @@
 Before do |scenario|
   @config = config
   @browser = browser(environment, test_name(scenario), 'default')
+  $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
+end
+
+def sauce_api(json)
+  %x{curl -H 'Content-Type:text/json' -s -X PUT -d '#{json}' 
http://#{ENV['SAUCE_ONDEMAND_USERNAME']}:#{ENV['SAUCE_ONDEMAND_ACCESS_KEY']}@saucelabs.com/rest/v1/#{ENV['SAUCE_ONDEMAND_USERNAME']}/jobs/#{$session_id}}
 end
 
 After do |scenario|
-  $session_id = @browser.driver.instance_variable_get(:@bridge).session_id
+  if environment == :cloudbees  !ENV[windir]
+sauce_api(%Q{{passed: #{scenario.passed?}}})
+sauce_api(%Q{{public: true}})
+  end
   @browser.close
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c68e52471f5caf74c5939c52ba82ceb1e16892f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Present our cert to clients, autolabel volumes - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has uploaded a new change for review.

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


Change subject: Present our cert to clients, autolabel volumes
..

Present our cert to clients, autolabel volumes

Change-Id: Iaa81c69512d03320fd0758009662ea3a3e61ae04
---
M manifests/role/backup.pp
M modules/bacula/templates/bacula-client.erb
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/79800/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 437b1a2..9612236 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -22,6 +22,7 @@
 max_vols = 30,
 storage  = 'FileStorage1',
 volume_retention = '180 days',
+label_fmt= 'production',
 }
 
 # Default pool needed internally by bacula
diff --git a/modules/bacula/templates/bacula-client.erb 
b/modules/bacula/templates/bacula-client.erb
index e38986d..e4ffe00 100644
--- a/modules/bacula/templates/bacula-client.erb
+++ b/modules/bacula/templates/bacula-client.erb
@@ -12,6 +12,8 @@
 TLS Enable = yes
 TLS Require = yes
 TLS CA Certificate File = /var/lib/puppet/ssl/certs/ca.pem
+TLS Certificate = /var/lib/puppet/ssl/certs/%= @director -%.pem
+TLS Key = /var/lib/puppet/ssl/private_keys/%= @director -%.pem
 # Priority = 10
 # Maximum Bandwith Per Job =
 # Autoprune = yes

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

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

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


[MediaWiki-commits] [Gerrit] Present our cert to clients, autolabel volumes - change (operations/puppet)

2013-08-19 Thread Akosiaris (Code Review)
Akosiaris has submitted this change and it was merged.

Change subject: Present our cert to clients, autolabel volumes
..


Present our cert to clients, autolabel volumes

Change-Id: Iaa81c69512d03320fd0758009662ea3a3e61ae04
---
M manifests/role/backup.pp
M modules/bacula/templates/bacula-client.erb
2 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 437b1a2..9612236 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -22,6 +22,7 @@
 max_vols = 30,
 storage  = 'FileStorage1',
 volume_retention = '180 days',
+label_fmt= 'production',
 }
 
 # Default pool needed internally by bacula
diff --git a/modules/bacula/templates/bacula-client.erb 
b/modules/bacula/templates/bacula-client.erb
index e38986d..e4ffe00 100644
--- a/modules/bacula/templates/bacula-client.erb
+++ b/modules/bacula/templates/bacula-client.erb
@@ -12,6 +12,8 @@
 TLS Enable = yes
 TLS Require = yes
 TLS CA Certificate File = /var/lib/puppet/ssl/certs/ca.pem
+TLS Certificate = /var/lib/puppet/ssl/certs/%= @director -%.pem
+TLS Key = /var/lib/puppet/ssl/private_keys/%= @director -%.pem
 # Priority = 10
 # Maximum Bandwith Per Job =
 # Autoprune = yes

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa81c69512d03320fd0758009662ea3a3e61ae04
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris 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] Fix typo in cucumber config - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Fix typo in cucumber config
..

Fix typo in cucumber config

Change-Id: I24e22ae3acea2f12a5d57335e8b44ff40c69
---
M selenium_cuc/config/cucumber.yml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/selenium_cuc/config/cucumber.yml b/selenium_cuc/config/cucumber.yml
index 8b7c877..150c284 100644
--- a/selenium_cuc/config/cucumber.yml
+++ b/selenium_cuc/config/cucumber.yml
@@ -1,2 +1,2 @@
-ci: --format Cucumber::Formatter::Sauce -out reports/junit
+ci: --format Cucumber::Formatter::Sauce --out reports/junit
 default: --format progress

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24e22ae3acea2f12a5d57335e8b44ff40c69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix typo in cucumber config - change (mediawiki...Wikibase)

2013-08-19 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Fix typo in cucumber config
..


Fix typo in cucumber config

Change-Id: I24e22ae3acea2f12a5d57335e8b44ff40c69
---
M selenium_cuc/config/cucumber.yml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved



diff --git a/selenium_cuc/config/cucumber.yml b/selenium_cuc/config/cucumber.yml
index 8b7c877..150c284 100644
--- a/selenium_cuc/config/cucumber.yml
+++ b/selenium_cuc/config/cucumber.yml
@@ -1,2 +1,2 @@
-ci: --format Cucumber::Formatter::Sauce -out reports/junit
+ci: --format Cucumber::Formatter::Sauce --out reports/junit
 default: --format progress

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24e22ae3acea2f12a5d57335e8b44ff40c69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Mac OS needs different Ruby gems than Windows - change (mediawiki...Wikibase)

2013-08-19 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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


Change subject: Mac OS needs different Ruby gems than Windows
..

Mac OS needs different Ruby gems than Windows

Change-Id: I09cc54aae1ebcd0824126439cfdb2591fcf578b7
---
M selenium_cuc/Gemfile.lock
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/selenium_cuc/Gemfile.lock b/selenium_cuc/Gemfile.lock
index ecd7b56..6d314c8 100644
--- a/selenium_cuc/Gemfile.lock
+++ b/selenium_cuc/Gemfile.lock
@@ -23,7 +23,10 @@
 diff-lcs (1.2.4)
 faker (1.2.0)
   i18n (~ 0.5)
+ffi (1.9.0)
 ffi (1.9.0-x86-mingw32)
+gherkin (2.12.1)
+  multi_json (~ 1.3)
 gherkin (2.12.1-x86-mingw32)
   multi_json (~ 1.3)
 i18n (0.6.5)
@@ -68,6 +71,7 @@
 yml_reader (0.2)
 
 PLATFORMS
+  ruby
   x86-mingw32
 
 DEPENDENCIES

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09cc54aae1ebcd0824126439cfdb2591fcf578b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add OAuth - change (mediawiki/core)

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

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


Change subject: Add OAuth
..

Add OAuth

Change-Id: Iedeed8cd16aaa62998b4e8e05a42b70583463a20
---
M .gitmodules
A extensions/OAuth
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/79803/1

diff --git a/.gitmodules b/.gitmodules
index 890348d..89689c3 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -466,3 +466,6 @@
 [submodule extensions/Validator]
path = extensions/Validator
url = 
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Validator.git
+[submodule extensions/OAuth]
+   path = extensions/OAuth
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/extensions/OAuth.git
diff --git a/extensions/OAuth b/extensions/OAuth
new file mode 16
index 000..c9fe520
--- /dev/null
+++ b/extensions/OAuth
+Subproject commit c9fe520fa8ee67d60b4a227f4b19caa4f94b0df7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedeed8cd16aaa62998b4e8e05a42b70583463a20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf13
Gerrit-Owner: CSteipp cste...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Increase line height in beta warning - change (mediawiki...VisualEditor)

2013-08-19 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Increase line height in beta warning
..

Increase line height in beta warning

See bug for screenshots.

Bug: 53045
Change-Id: Ia4e97f42786cb8ced9ab1c94b1cce9f4abd17750
---
M modules/ve-mw/ui/styles/ve.ui.MWDialog.css
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css 
b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
index bb2712d..89f68de 100644
--- a/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
+++ b/modules/ve-mw/ui/styles/ve.ui.MWDialog.css
@@ -76,7 +76,7 @@
 
 .ve-ui-mwBetaWelcomeDialog-content {
padding: 1.5em;
-   line-height: 1.25em;
+   line-height: 1.5em;
font-size: 1.1em;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4e97f42786cb8ced9ab1c94b1cce9f4abd17750
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Temporary setup of new authdns servers - change (operations/puppet)

2013-08-19 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: Temporary setup of new authdns servers
..

Temporary setup of new authdns servers

rubidium, mexia and eeden are the designated to become ns0/ns1/ns2.  We
already have role classes for those but this will mess up production if
prematurely applied (nagios check, ssh host keys for nsN, IPs) and they
won't work, as the scripts try to SSH to the service hostnames.

Before putting them into prod though, we'd like to run a few tests, so
add some rudimentary setup on those boxes and use the authdns class
directly from site.pp. Ugly, non-DRY but very temporary :)

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/79805/1

diff --git a/manifests/site.pp b/manifests/site.pp
index ea36fe4..5836e06 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -794,6 +794,23 @@
 include standard
 }
 
+node 'eeden.esams.wikimedia.org' {
+# FIXME: to be switched to role::authdns::ns2 after the transition
+include standard
+
+$gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
+$nameservers = [
+'rubidium.wikimedia.org',
+'mexia.wikimedia.org',
+'eeden.esams.wikimedia.org',
+]
+
+class { 'authdns':
+nameservers   = $nameservers,
+gitrepo   = $gitrepo,
+}
+}
+
 node ekrem.wikimedia.org {
 include standard,
 misc::irc-server,
@@ -1807,6 +1824,23 @@
 class { role::db::redis : redis_replication = $redis_replication }
 }
 
+node 'rubidium.wikimedia.org' {
+# FIXME: to be switched to role::authdns::ns0 after the transition
+include standard
+
+$gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
+$nameservers = [
+'rubidium.wikimedia.org',
+'mexia.wikimedia.org',
+'eeden.esams.wikimedia.org',
+]
+
+class { 'authdns':
+nameservers   = $nameservers,
+gitrepo   = $gitrepo,
+}
+}
+
 node mchenry.wikimedia.org {
 $gid = 500
 
@@ -1836,6 +1870,23 @@
 class { misc::maintenance::mail_exim_aliases: enabled = true }
 }
 
+node 'mexia.wikimedia.org' {
+# FIXME: to be switched to role::authdns::ns1 after the transition
+include standard
+
+$gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
+$nameservers = [
+'rubidium.wikimedia.org',
+'mexia.wikimedia.org',
+'eeden.esams.wikimedia.org',
+]
+
+class { 'authdns':
+nameservers   = $nameservers,
+gitrepo   = $gitrepo,
+}
+}
+
 node /mobile100[1-4]\.wikimedia\.org/ {
 include standard-noexim
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide7666813b52eae9d5f8f5730d83164b838f8cc5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Mac OS needs different Ruby gems than Windows - change (mediawiki...Wikibase)

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

Change subject: Mac OS needs different Ruby gems than Windows
..


Mac OS needs different Ruby gems than Windows

Change-Id: I09cc54aae1ebcd0824126439cfdb2591fcf578b7
---
M selenium_cuc/Gemfile.lock
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/selenium_cuc/Gemfile.lock b/selenium_cuc/Gemfile.lock
index ecd7b56..6d314c8 100644
--- a/selenium_cuc/Gemfile.lock
+++ b/selenium_cuc/Gemfile.lock
@@ -23,7 +23,10 @@
 diff-lcs (1.2.4)
 faker (1.2.0)
   i18n (~ 0.5)
+ffi (1.9.0)
 ffi (1.9.0-x86-mingw32)
+gherkin (2.12.1)
+  multi_json (~ 1.3)
 gherkin (2.12.1-x86-mingw32)
   multi_json (~ 1.3)
 i18n (0.6.5)
@@ -68,6 +71,7 @@
 yml_reader (0.2)
 
 PLATFORMS
+  ruby
   x86-mingw32
 
 DEPENDENCIES

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09cc54aae1ebcd0824126439cfdb2591fcf578b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Update CentralAuth to master - needed by OAuth - change (mediawiki/core)

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

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


Change subject: Update CentralAuth to master - needed by OAuth
..

Update CentralAuth to master - needed by OAuth

Change-Id: I85446f70eed3a25933bbc5a9d64f2df948783b4f
---
M extensions/CentralAuth
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/extensions/CentralAuth b/extensions/CentralAuth
index 85ab2f4..ce6fc94 16
--- a/extensions/CentralAuth
+++ b/extensions/CentralAuth
-Subproject commit 85ab2f4af2c2395d41a6879128080628387c1209
+Subproject commit ce6fc94dd2e4cf4b49c8503bd380e539b4d38ef5

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85446f70eed3a25933bbc5a9d64f2df948783b4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf13
Gerrit-Owner: CSteipp cste...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Whitespace cleanup of Cucumber feature file - change (mediawiki...Wikibase)

2013-08-19 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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


Change subject: Whitespace cleanup of Cucumber feature file
..

Whitespace cleanup of Cucumber feature file

Change-Id: Ice8eee56b19a3f524fea916f91be886b0ad94c1a
---
M selenium_cuc/features/label.feature
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/selenium_cuc/features/label.feature 
b/selenium_cuc/features/label.feature
index d5d3864..50b3046 100644
--- a/selenium_cuc/features/label.feature
+++ b/selenium_cuc/features/label.feature
@@ -14,17 +14,20 @@
 Then Original label should be displayed
   And Label edit button should be there
   And Label cancel button should not be there
+
   Scenario: Click edit button
 When I click the label edit button
 Then Label input element should be there
   And Label input element should contain original label
   And Label cancel button should be there
+
   Scenario: Modify the label
 When I click the label edit button
   And I enter MODIFIED LABEL as label
 Then Label save button should be there
   And Label cancel button should be there
   And Label edit button should not be there
+
   Scenario: Label cancel
 When I click the label edit button
   And I enter MODIFIED LABEL as label
@@ -32,6 +35,7 @@
 Then Original label should be displayed
   And Label edit button should be there
   And Label cancel button should not be there
+
   Scenario: Label cancel with ESCAPE
 When I click the label edit button
   And I enter MODIFIED LABEL as label
@@ -39,6 +43,7 @@
 Then Original label should be displayed
   And Label edit button should be there
   And Label cancel button should not be there
+
   Scenario: Label save
 When I click the label edit button
   And I enter MODIFIED LABEL as label
@@ -46,6 +51,7 @@
 Then MODIFIED LABEL should be displayed as label
 When I reload the page
 Then MODIFIED LABEL should be displayed as label
+
   Scenario: Label save with RETURN
 When I click the label edit button
   And I enter MODIFIED LABEL as label
@@ -53,16 +59,19 @@
 Then MODIFIED LABEL should be displayed as label
 When I reload the page
 Then MODIFIED LABEL should be displayed as label
+
   Scenario: Label with unnormalized value
 When I click the label edit button
   And I enterbla   blaas label
   And I click the label save button
 Then bla bla should be displayed as label
+
   Scenario: Label with 0 as value
 When I click the label edit button
   And I enter 0 as label
   And I click the label save button
 Then 0 should be displayed as label
+
   Scenario: Label with a too long value
 When I click the label edit button
   And I enter 
long
 as label

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice8eee56b19a3f524fea916f91be886b0ad94c1a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update CentralAuth to master - needed by OAuth - change (mediawiki/core)

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

Change subject: Update CentralAuth to master - needed by OAuth
..


Update CentralAuth to master - needed by OAuth

Change-Id: I85446f70eed3a25933bbc5a9d64f2df948783b4f
---
M extensions/CentralAuth
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/CentralAuth b/extensions/CentralAuth
index 85ab2f4..ce6fc94 16
--- a/extensions/CentralAuth
+++ b/extensions/CentralAuth
-Subproject commit 85ab2f4af2c2395d41a6879128080628387c1209
+Subproject commit ce6fc94dd2e4cf4b49c8503bd380e539b4d38ef5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85446f70eed3a25933bbc5a9d64f2df948783b4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf13
Gerrit-Owner: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@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] Add MP4 to mime.types - change (mediawiki/core)

2013-08-19 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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


Change subject: Add MP4 to mime.types
..

Add MP4 to mime.types

Its a popular video format, we should recognize its type.

This will also prevent people from uploading mp4's to commons.

Wikipedia claims m4a sometimes used for video content.
RFC 4337 says audio/mp4 is mime type for mp4 with no
video (which is usually what an m4a extension means).

Bug: 52990
Change-Id: I5c24c3e318651241cced5b36d107d3603a289427
---
M includes/mime.info
M includes/mime.types
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/79809/1

diff --git a/includes/mime.info b/includes/mime.info
index f7576e4..a4e8b64 100644
--- a/includes/mime.info
+++ b/includes/mime.info
@@ -30,6 +30,7 @@
 
 
 audio/mpeg audio/mp3 audio/mpeg3   [AUDIO]
+audio/mp4  [AUDIO]
 audio/wav audio/x-wav audio/wave   [AUDIO]
 audio/midi audio/mid   [AUDIO]
 audio/basic[AUDIO]
@@ -46,6 +47,7 @@
 video/x-flv[VIDEO]
 video/webm [VIDEO]
 video/x-matroska   [VIDEO]
+video/mp4  [VIDEO]
 
 application/ogg application/x-ogg audio/ogg audio/x-ogg video/ogg video/x-ogg  
[MULTIMEDIA]
 
diff --git a/includes/mime.types b/includes/mime.types
index a89d229..378f274 100644
--- a/includes/mime.types
+++ b/includes/mime.types
@@ -118,6 +118,8 @@
 text/x-setext etx
 text/x-sawfish jl
 video/mpeg mpeg mpg mpe
+video/mp4 mp4 m4a m4p m4b m4r m4v
+audio/mp4 m4a
 video/ogg ogv ogm ogg
 video/quicktime qt mov
 video/vnd.mpegurl mxu

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c24c3e318651241cced5b36d107d3603a289427
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff bawolff...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add an authdns module associated role classes - change (operations/puppet)

2013-08-19 Thread Faidon (Code Review)
Faidon has submitted this change and it was merged.

Change subject: Add an authdns module  associated role classes
..


Add an authdns module  associated role classes

This adds an authdns module. The module is an uncommon for our tree
mixture of a role module, a package replacement (scripts) and internal
logic to handle the configuration of the authdns cluster. It serves as a
replacement to both dns.pp's authdns parts and the
wikimedia-task-dns-auth package, although both are significantly
rewritten.

A gdnsd module is not provided here, as the software is simple enough to
not warrant it (a single Package  Service definition).

This also adds role classes for each of ns0/ns1/ns2 (with their current
IPs) and a testns class for playing with in labs. These are all UNUSED
for now.

This is the initial work. Pending work includes adding IPv6 addresses,
switching to the commercial GeoIP databases and providing scripts for CI
integration. Plus, bug fixes :)

Change-Id: Ice119ead68bd7cb5a232f31c778b03791a917012
---
A manifests/role/authdns.pp
A modules/authdns/files/authdns-gen-zones.py
A modules/authdns/files/authdns-git-pull
A modules/authdns/files/authdns-local-update
A modules/authdns/files/authdns-update
A modules/authdns/manifests/account.pp
A modules/authdns/manifests/init.pp
A modules/authdns/manifests/monitoring.pp
A modules/authdns/manifests/scripts.pp
A modules/authdns/templates/config-head.erb
A modules/authdns/templates/wikimedia-authdns.conf.erb
11 files changed, 730 insertions(+), 0 deletions(-)

Approvals:
  Mark Bergsma: Looks good to me, but someone else must approve
  Faidon: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/authdns.pp b/manifests/role/authdns.pp
new file mode 100644
index 000..dddf2c6
--- /dev/null
+++ b/manifests/role/authdns.pp
@@ -0,0 +1,77 @@
+# authdns role classes, heavily relying on the authdns role module
+
+class role::authdns::base {
+include standard
+
+system_role { 'authdns': description = 'Authoritative DNS server' }
+
+$nameservers = [
+'ns0.wikimedia.org',
+'ns1.wikimedia.org',
+'ns2.wikimedia.org',
+]
+$gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
+
+include authdns::monitoring
+}
+
+# ns0 @ eqiad
+class role::authdns::ns0 inherits role::authdns::base {
+$ipv4 = '208.80.154.238'
+
+interface::ip { 'authdns_ipv4':
+interface = 'lo',
+address   = $ipv4,
+prefixlen = '32',
+}
+
+class { 'authdns':
+fqdn  = 'ns0.wikimedia.org',
+ipaddress = $ipv4,
+nameservers   = $nameservers,
+gitrepo   = $gitrepo,
+}
+}
+
+# ns1 @ pmtpa
+class role::authdns::ns1 inherits role::authdns::base {
+$ipv4 = '208.80.152.214'
+
+interface::ip { 'authdns_ipv4':
+interface = 'lo',
+address   = $ipv4,
+prefixlen = '32',
+}
+
+class { 'authdns':
+fqdn  = 'ns1.wikimedia.org',
+ipaddress = $ipv4,
+nameservers   = $nameservers,
+gitrepo   = $gitrepo,
+}
+}
+
+# ns2 @ esams
+class role::authdns::ns2 inherits role::authdns::base {
+$ipv4 = '91.198.174.4'
+
+interface::ip { 'authdns_ipv4':
+interface = 'eth0', # note: this is interface-bound, unlike ns0/ns1
+address   = $ipv4,
+prefixlen = '32',
+}
+
+class { 'authdns':
+fqdn  = 'ns2.wikimedia.org',
+ipaddress = $ipv4,
+nameservers   = $nameservers,
+gitrepo   = $gitrepo,
+}
+}
+
+class role::authdns::testns {
+$gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
+class { 'authdns':
+gitrepo   = $gitrepo,
+}
+}
diff --git a/modules/authdns/files/authdns-gen-zones.py 
b/modules/authdns/files/authdns-gen-zones.py
new file mode 100644
index 000..e084ea2
--- /dev/null
+++ b/modules/authdns/files/authdns-gen-zones.py
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+import os
+import time
+import jinja2
+from filecmp import dircmp
+
+HEADER = '''; WARNING!
+; This file was automatically generated from a template
+; Do NOT edit this file directly!
+
+'''
+
+
+def parse_args():
+Sets ups argument parser and its arguments, returns args
+parser = argparse.ArgumentParser()
+parser.add_argument(templatedir,
+help=the directory containing the zone templates)
+parser.add_argument(zonedir,
+help=the directory containing the formatted zones)
+parser.add_argument(zones,
+help=zones to regenerate (optional, implies -f -k),
+nargs=*)
+parser.add_argument(-v, --verbose,
+help=increase output verbosity,
+action=store_true,
+default=0)
+parser.add_argument(-f, 

[MediaWiki-commits] [Gerrit] Start with a fresh list in html2unicode every time - change (pywikibot/compat)

2013-08-19 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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


Change subject: Start with a fresh list in html2unicode every time
..

Start with a fresh list in html2unicode every time

def x(..., something=[]):
something.extend([1,2,3])

means something becomes [1,2,3] on the first call, but
[1,2,3,1,2,3] on the *second* call. This meant html2unicode
got a longer list of replacements every time it is called.

This commit changes it to the standart

def x(..., something=None):
   if something is None:
   something = []

which means it's always an empty list, instead of what's left from
the last call.

Change-Id: Ie490b575a8a0cc4b5d45bbb97c0606e0fd64d4f9
---
M wikipedia.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/11/79811/1

diff --git a/wikipedia.py b/wikipedia.py
index 976a310..f304932 100644
--- a/wikipedia.py
+++ b/wikipedia.py
@@ -5657,13 +5657,16 @@
 
 # Utility functions for parsing page titles
 
-def html2unicode(text, ignore = []):
+def html2unicode(text, ignore = None):
 Return text, replacing HTML entities by equivalent unicode 
characters.
+
+if ignore is None:
+ignore = []
 # This regular expression will match any decimal and hexadecimal entity and
 # also entities that might be named entities.
 entityR = re.compile(
 
r'(?:amp;)?(#(?Pdecimal\d+)|#x(?Phex[0-9a-fA-F]+)|(?Pname[A-Za-z]+));')
-   
+
 ignore.extend((38, # Ampersand (amp;)
39, # Bugzilla 24093
60, # Less than (lt;)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie490b575a8a0cc4b5d45bbb97c0606e0fd64d4f9
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


  1   2   3   >