[MediaWiki-commits] [Gerrit] Rewrite mobile login page to be less hacky and closer to cor... - change (mediawiki...MobileFrontend)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rewrite mobile login page to be less hacky and closer to core 
version
..


Rewrite mobile login page to be less hacky and closer to core version

This makes it easier for other extensions, such as Gather, to pass
their own messages to the page (without using hooks).

This removes the mobile-only login message header, which should be
implemented in the core login page if it is actually useful.

This will also simplify the transition from a custom mobile login
page to sharing the login page with core.

Bug: T95065
Change-Id: If5ec2ca2f345ab95851ecd2d658332d94a8d4270
---
M i18n/en.json
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinerva.php
M includes/skins/UserAccountCreateMobileTemplate.php
M includes/skins/UserLoginAndCreateTemplate.php
M includes/skins/UserLoginMobileTemplate.php
M includes/specials/SpecialMobileEditWatchlist.php
M includes/specials/SpecialMobileWatchlist.php
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/editor/init.js
M javascripts/modules/watchstar/Watchstar.js
M less/specials/common.less
M less/specials/userlogin.less
M less/ui.less
14 files changed, 99 insertions(+), 210 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 306f504..3847da8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -45,17 +45,15 @@
mobile-frontend-dismiss-notification: dismiss this notification,
mobile-frontend-donate-image-anon: Please log in to view the uploads 
page.,
mobile-frontend-donate-image-heading: Your recent contributions,
-   mobile-frontend-donate-image-login: Media on {{SITENAME}} is donated 
by people like you.,
-   mobile-frontend-donate-image-login-action: Log in to share your 
media.,
+   mobile-frontend-donate-image-login-action: strongMedia on 
{{SITENAME}} is donated by people like you./strongbr/Log in to share your 
media.,
mobile-frontend-donate-image-nouploads: No uploads.,
mobile-frontend-donate-image-signup-action: Sign up to share your 
media with the world.,
mobile-frontend-donate-image-title: Uploads,
mobile-frontend-donate-photo-first-upload-success: Success! Thanks 
for your first contribution!,
mobile-frontend-donate-photo-upload-success: Success! Your image can 
now be used on {{SITENAME}}!,
mobile-frontend-drawer-cancel: Cancel,
-   mobile-frontend-edit-login: Help improve the $1 page.,
-   mobile-frontend-edit-login-action: Log in to edit.,
-   mobile-frontend-edit-signup-action: Sign up to edit.,
+   mobile-frontend-edit-login-action: strongHelp improve 
{{SITENAME}}./strongbr/Log in to edit.,
+   mobile-frontend-edit-signup-action: strongHelp improve 
{{SITENAME}}./strongbr/Sign up to edit.,
mobile-frontend-editor-abusefilter-disallow: This edit cannot be 
saved because we have detected an issue.,
mobile-frontend-editor-abusefilter-read-more: Read more,
mobile-frontend-editor-abusefilter-warning: Warning: Are you sure 
you want to save this edit? There may be an issue with it.,
@@ -346,9 +344,9 @@
mobile-frontend-watchlist-more: more,
mobile-frontend-watchlist-please-wait: Please wait, watch action is 
taking longer than expected.,
mobile-frontend-watchlist-error: There was a problem watching this 
page. Please try again.,
-   mobile-frontend-watchlist-purpose: A watchlist helps you bookmark 
pages and keep track of changes to them.,
+   mobile-frontend-watchlist-purpose: strongA watchlist helps you 
bookmark pages and keep track of changes to them./strongbrLog in to see 
it.,
mobile-frontend-watchlist-removed: Removed $1 from your watchlist,
-   mobile-frontend-watchlist-signup-action: Sign up to start one now.,
+   mobile-frontend-watchlist-signup-action: strongA watchlist helps 
you bookmark pages and keep track of changes to them./strongSign up to start 
one now.,
mobile-frontend-watchlist-view: View your watchlist,
mobile-frontend-quick-lookup-looking: Looking for \$1\.,
mobile-frontend-quick-lookup-no-results: Couldn't find anything 
matching \$1\.,
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index f786c93..db37754 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1024,6 +1024,15 @@
 * @param array $messages Array of already added messages
 */
public static function onLoginFormValidErrorMessages( $messages ) {
-   $messages[] = 'mobile-frontend-donate-image-anon';
+   $messages = array_merge( $messages,
+   array(
+   'mobile-frontend-watchlist-signup-action', // 
watchstart sign 

[MediaWiki-commits] [Gerrit] Make toolbars keyboard-accessible - change (oojs/ui)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make toolbars keyboard-accessible
..


Make toolbars keyboard-accessible

* Mix in TabIndexedElement into stuff.
* Duplicate mousedown/mouseup/mouseover/mouseout event handling for
  keydown/keyup/focus/blur.
* Tweak the magic for More/Fewer tool in ListToolGroup.

This is not perfect (especially the visual display of focus marker
is sometimes very weird), but it is functional.

Bug: T93240
Change-Id: I4ca8c77bdcea8ea8472d013af28a41361bf69065
---
M src/Tool.js
M src/ToolGroup.js
M src/Toolbar.js
M src/toolgroups/ListToolGroup.js
M src/toolgroups/PopupToolGroup.js
5 files changed, 106 insertions(+), 73 deletions(-)

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



diff --git a/src/Tool.js b/src/Tool.js
index 00ffd75..93e8e99 100644
--- a/src/Tool.js
+++ b/src/Tool.js
@@ -6,6 +6,7 @@
  * @extends OO.ui.Widget
  * @mixins OO.ui.IconElement
  * @mixins OO.ui.FlaggedElement
+ * @mixins OO.ui.TabIndexedElement
  *
  * @constructor
  * @param {OO.ui.ToolGroup} toolGroup
@@ -25,10 +26,6 @@
// Parent constructor
OO.ui.Tool.super.call( this, config );
 
-   // Mixin constructors
-   OO.ui.IconElement.call( this, config );
-   OO.ui.FlaggedElement.call( this, config );
-
// Properties
this.toolGroup = toolGroup;
this.toolbar = this.toolGroup.getToolbar();
@@ -37,6 +34,11 @@
this.$accel = $( 'span' );
this.$link = $( 'a' );
this.title = null;
+
+   // Mixin constructors
+   OO.ui.IconElement.call( this, config );
+   OO.ui.FlaggedElement.call( this, config );
+   OO.ui.TabIndexedElement.call( this, $.extend( {}, config, { 
$tabIndexed: this.$link } ) );
 
// Events
this.toolbar.connect( this, { updateState: 'onUpdateState' } );
@@ -54,7 +56,6 @@
this.$link
.addClass( 'oo-ui-tool-link' )
.append( this.$icon, this.$title, this.$accel )
-   .attr( 'tabindex', 0 )
.attr( 'role', 'button' );
this.$element
.data( 'oo-ui-tool', this )
@@ -71,6 +72,7 @@
 OO.inheritClass( OO.ui.Tool, OO.ui.Widget );
 OO.mixinClass( OO.ui.Tool, OO.ui.IconElement );
 OO.mixinClass( OO.ui.Tool, OO.ui.FlaggedElement );
+OO.mixinClass( OO.ui.Tool, OO.ui.TabIndexedElement );
 
 /* Events */
 
diff --git a/src/ToolGroup.js b/src/ToolGroup.js
index 9046dae..eab3cea 100644
--- a/src/ToolGroup.js
+++ b/src/ToolGroup.js
@@ -45,14 +45,18 @@
this.exclude = config.exclude || [];
this.promote = config.promote || [];
this.demote = config.demote || [];
-   this.onCapturedMouseUpHandler = this.onCapturedMouseUp.bind( this );
+   this.onCapturedMouseKeyUpHandler = this.onCapturedMouseKeyUp.bind( this 
);
 
// Events
this.$element.on( {
-   mousedown: this.onPointerDown.bind( this ),
-   mouseup: this.onPointerUp.bind( this ),
-   mouseover: this.onMouseOver.bind( this ),
-   mouseout: this.onMouseOut.bind( this )
+   mousedown: this.onMouseKeyDown.bind( this ),
+   mouseup: this.onMouseKeyUp.bind( this ),
+   keydown: this.onMouseKeyDown.bind( this ),
+   keyup: this.onMouseKeyUp.bind( this ),
+   focus: this.onMouseOverFocus.bind( this ),
+   blur: this.onMouseOutBlur.bind( this ),
+   mouseover: this.onMouseOverFocus.bind( this ),
+   mouseout: this.onMouseOutBlur.bind( this )
} );
this.toolbar.getToolFactory().connect( this, { register: 
'onToolFactoryRegister' } );
this.aggregate( { disable: 'itemDisable' } );
@@ -135,57 +139,64 @@
 };
 
 /**
- * Handle mouse down events.
+ * Handle mouse down and key down events.
  *
- * @param {jQuery.Event} e Mouse down event
+ * @param {jQuery.Event} e Mouse down or key down event
  */
-OO.ui.ToolGroup.prototype.onPointerDown = function ( e ) {
-   if ( !this.isDisabled()  e.which === 1 ) {
+OO.ui.ToolGroup.prototype.onMouseKeyDown = function ( e ) {
+   if (
+   !this.isDisabled() 
+   ( e.which === 1 || e.which === OO.ui.Keys.SPACE || e.which === 
OO.ui.Keys.ENTER )
+   ) {
this.pressed = this.getTargetTool( e );
if ( this.pressed ) {
this.pressed.setActive( true );
-   this.getElementDocument().addEventListener(
-   'mouseup', this.onCapturedMouseUpHandler, true
-   );
+   this.getElementDocument().addEventListener( 'mouseup', 
this.onCapturedMouseKeyUpHandler, true );
+   this.getElementDocument().addEventListener( 'keyup', 
this.onCapturedMouseKeyUpHandler, true );
}
+   return false;
}
-   return false;
 

[MediaWiki-commits] [Gerrit] Do not use deprecated strict setting - change (mediawiki...WikidataQualityExternalValidation)

2015-04-27 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Do not use deprecated strict setting
..


Do not use deprecated strict setting

Change-Id: I6e53664afd01537b73d7211a98842c49110f9ad0
---
M phpunit.xml.dist
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 5109a2d..c15c31e 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -11,7 +11,6 @@
  timeoutForSmallTests=10
  timeoutForMediumTests=30
  timeoutForLargeTests=60
- strict=true
  verbose=true
 testsuites
 testsuite name=Common

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e53664afd01537b73d7211a98842c49110f9ad0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] Use common Wikibase style for JSON indent - change (mediawiki...WikidataQualityExternalValidation)

2015-04-27 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Use common Wikibase style for JSON indent
..


Use common Wikibase style for JSON indent

Change-Id: I61b5452b906ec963e150161057f9456ed3b75b10
---
M composer.json
1 file changed, 34 insertions(+), 34 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/composer.json b/composer.json
index c606a9b..eaf2ea6 100644
--- a/composer.json
+++ b/composer.json
@@ -1,36 +1,36 @@
 {
-  name: wikidataquality/wikidata-quality-external-validation,
-  type: mediawiki-extension,
-  description: Extension for WikidataQuality to perform cross checks with 
external databases.,
-  homepage: https://www.mediawiki.org/wiki/WikidataQuality/;,
-  license: GPL-2.0+,
-  authors: [
-{
-  name: BP2014N1
-}
-  ],
-  support: {
-issues: https://phabricator.wikimedia.org/project/profile/989/;
-  },
-  require: {
-wikibase/data-model: ~2.6,
-wikibase/data-model-serialization: ~1.3,
-serialization/serialization: 3.*,=3.2.1
-  },
-  require-dev: {
-phpunit/phpunit: ~4.5,
-satooshi/php-coveralls: dev-master
-  },
-  autoload: {
-psr-4: {
-  WikidataQuality\\ExternalValidation\\: includes/,
-  WikidataQuality\\ExternalValidation\\Api\\: api/,
-  WikidataQuality\\ExternalValidation\\Specials\\: specials/,
-  WikidataQuality\\ExternalValidation\\Tests\\: tests/phpunit/
-},
-classmap: [
-  WikidataQualityExternalValidationHooks.php,
-  maintenance/UpdateTable.php
-]
-  }
+   name: wikidataquality/wikidata-quality-external-validation,
+   type: mediawiki-extension,
+   description: Extension for WikidataQuality to perform cross checks 
with external databases.,
+   homepage: https://www.mediawiki.org/wiki/WikidataQuality/;,
+   license: GPL-2.0+,
+   authors: [
+   {
+   name: BP2014N1
+   }
+   ],
+   support: {
+   issues: 
https://phabricator.wikimedia.org/project/profile/989/;
+   },
+   require: {
+   wikibase/data-model: ~2.6,
+   wikibase/data-model-serialization: ~1.3,
+   serialization/serialization: 3.*,=3.2.1
+   },
+   require-dev: {
+   phpunit/phpunit: ~4.5,
+   satooshi/php-coveralls: dev-master
+   },
+   autoload: {
+   psr-4: {
+   WikidataQuality\\ExternalValidation\\: includes/,
+   WikidataQuality\\ExternalValidation\\Api\\: api/,
+   WikidataQuality\\ExternalValidation\\Specials\\: 
specials/,
+   WikidataQuality\\ExternalValidation\\Tests\\: 
tests/phpunit/
+   },
+   classmap: [
+   WikidataQualityExternalValidationHooks.php,
+   maintenance/UpdateTable.php
+   ]
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61b5452b906ec963e150161057f9456ed3b75b10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] Make DB setup work for installs using a table prefix - change (mediawiki...WikidataQualityExternalValidation)

2015-04-27 Thread Soeren.oldag (Code Review)
Soeren.oldag has submitted this change and it was merged.

Change subject: Make DB setup work for installs using a table prefix
..


Make DB setup work for installs using a table prefix

Change-Id: I199d371d32a59c455df072208cd4e1d0794120b1
---
M sql/create_wdqa_dump_information.sql
M sql/create_wdqa_external_data.sql
M sql/create_wdqa_identifier_properties.sql
3 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Soeren.oldag: Verified; Looks good to me, approved



diff --git a/sql/create_wdqa_dump_information.sql 
b/sql/create_wdqa_dump_information.sql
index 6768a1f..480c370 100644
--- a/sql/create_wdqa_dump_information.sql
+++ b/sql/create_wdqa_dump_information.sql
@@ -1,4 +1,4 @@
-CREATE TABLE IF NOT EXISTS wdqa_dump_information (
+CREATE TABLE IF NOT EXISTS /*_*/wdqa_dump_information (
   dump_id  VARBINARY(25)   PRIMARY KEY NOT NULL,
   source_qid   VARBINARY(15)   NOT NULL,
   import_date  VARBINARY(25)   NOT NULL,
@@ -6,4 +6,4 @@
   source_url   VARBINARY(300)  UNIQUE NOT NULL,
   size INT UNSIGNEDNOT NULL,
   license_qid  VARBINARY(15)   NOT NULL
-);
\ No newline at end of file
+) /*$wgDBTableOptions*/;
\ No newline at end of file
diff --git a/sql/create_wdqa_external_data.sql 
b/sql/create_wdqa_external_data.sql
index 1428169..bf909af 100644
--- a/sql/create_wdqa_external_data.sql
+++ b/sql/create_wdqa_external_data.sql
@@ -1,9 +1,9 @@
-CREATE TABLE IF NOT EXISTS wdqa_external_data (
+CREATE TABLE IF NOT EXISTS /*_*/wdqa_external_data (
   row_id  BIGINT UNSIGNED  PRIMARY KEY AUTO_INCREMENT,
   dump_id VARBINARY(25)NOT NULL,
   external_id VARBINARY(100)   NOT NULL,
   pid VARBINARY(15)NOT NULL,
   external_value  VARBINARY(255)   NOT NULL
-);
+) /*$wgDBTableOptions*/;
 
-CREATE INDEX dump_id_external_id ON wdqa_external_data (dump_id, external_id);
+CREATE INDEX /*i*/dump_id_external_id ON /*_*/wdqa_external_data (dump_id, 
external_id);
diff --git a/sql/create_wdqa_identifier_properties.sql 
b/sql/create_wdqa_identifier_properties.sql
index 289b400..0f68bfd 100644
--- a/sql/create_wdqa_identifier_properties.sql
+++ b/sql/create_wdqa_identifier_properties.sql
@@ -1,5 +1,5 @@
-CREATE TABLE IF NOT EXISTS wdqa_identifier_properties (
+CREATE TABLE IF NOT EXISTS /*_*/wdqa_identifier_properties (
   identifier_pid  VARBINARY(15)  NOT NULL,
   dump_id VARBINARY(25)  NOT NULL,
   PRIMARY KEY (identifier_pid, dump_id)
-);
\ No newline at end of file
+) /*$wgDBTableOptions*/;
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I199d371d32a59c455df072208cd4e1d0794120b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de
Gerrit-Reviewer: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove throws from Title::getContentModel() - change (mediawiki/core)

2015-04-27 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Remove throws from Title::getContentModel()
..

Remove throws from Title::getContentModel()

ContentHandler::getDefaultModelFor() always returns a contentmodel,
so this exception is never thrown.

Change-Id: I7678964f229da8fcd15eb49e9e8c8e9a258e35a1
---
M includes/Title.php
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/206765/1

diff --git a/includes/Title.php b/includes/Title.php
index b0df15f..7e2b39e 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -940,7 +940,6 @@
/**
 * Get the page's content model id, see the CONTENT_MODEL_XXX constants.
 *
-* @throws MWException
 * @param int $flags A bit field; may be Title::GAID_FOR_UPDATE to 
select for update
 * @return string Content model id
 */
@@ -953,10 +952,6 @@
 
if ( !$this-mContentModel ) {
$this-mContentModel = 
ContentHandler::getDefaultModelFor( $this );
-   }
-
-   if ( !$this-mContentModel ) {
-   throw new MWException( 'Failed to determine content 
model!' );
}
 
return $this-mContentModel;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7678964f229da8fcd15eb49e9e8c8e9a258e35a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de

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


[MediaWiki-commits] [Gerrit] Moved ReferenceHandlerTest into right directory. - change (mediawiki...WikidataQualityExternalValidation)

2015-04-27 Thread Dominic.sauer (Code Review)
Dominic.sauer has submitted this change and it was merged.

Change subject: Moved ReferenceHandlerTest into right directory.
..


Moved ReferenceHandlerTest into right directory.

Change-Id: I42e62b6b71fec92dac84363db534cb791a1524b6
---
M tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
R tests/phpunit/CrossCheck/ReferenceHandlerTest.php
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Dominic.sauer: Verified; Looks good to me, approved



diff --git a/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php 
b/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
index 0d594f4..4612e9b 100755
--- a/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
+++ b/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
@@ -15,7 +15,7 @@
  *
  * @uses   WikidataQuality\ExternalValidation\CrossCheck\Result\CompareResult
  * @uses   
WikidataQuality\ExternalValidation\CrossCheck\Comparer\DataValueComparer
- * @uses 
WikidataQuality\ExternalValidation\CrossCheck\Comparer\SimilarityChecker
+ * @uses   
WikidataQuality\ExternalValidation\CrossCheck\Comparer\SimilarityChecker
  *
  * @author BP2014N1
  * @license GNU GPL v2+
diff --git a/tests/phpunit/ReferenceHandlerTest.php 
b/tests/phpunit/CrossCheck/ReferenceHandlerTest.php
similarity index 98%
rename from tests/phpunit/ReferenceHandlerTest.php
rename to tests/phpunit/CrossCheck/ReferenceHandlerTest.php
index 9cf22db..6baa0c8 100644
--- a/tests/phpunit/ReferenceHandlerTest.php
+++ b/tests/phpunit/CrossCheck/ReferenceHandlerTest.php
@@ -1,6 +1,6 @@
 ?php
 
-namespace WikidataQuality\ExternalValidation\Tests\DumpMetaInformation;
+namespace WikidataQuality\ExternalValidation\Tests\CrossCheck;
 
 use DataValues\StringValue;
 use Wikibase\DataModel\Claim\Claim;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42e62b6b71fec92dac84363db534cb791a1524b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Soeren.oldag soeren_ol...@freenet.de
Gerrit-Reviewer: Dominic.sauer dominic.sa...@yahoo.de

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


[MediaWiki-commits] [Gerrit] Hygiene: Remove outdated comment - change (mediawiki...Gather)

2015-04-27 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: Hygiene: Remove outdated comment
..

Hygiene: Remove outdated comment

Change-Id: I442b4f14bb235420eb402f7c429ac0c14a07314b
---
M includes/views/Collection.php
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 08cbae9..0f4de6f 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -159,9 +159,6 @@
$view = new CollectionItemCard( $item );
$html .= $view-getHtml();
}
-   // FIXME: Pagination(??) currently we
-   // limit the size of the collection
-   // Pagination may or may not be needed.
$html .= Html::closeElement( 'div' );
return $html;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I442b4f14bb235420eb402f7c429ac0c14a07314b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez jhernan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] BS Notifications: Fixes/Improvements/Standardizations - change (mediawiki...BlueSpiceExtensions)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: BS Notifications: Fixes/Improvements/Standardizations
..


BS Notifications: Fixes/Improvements/Standardizations

* Added formatter and decorator classes to use own intro and footer
* Used own formatting also for mw mails
* Added realname param
* bs-newuser is (really) only for admins
* bs-newuser works also on MW AddNewAccount
* bs-newuser user setting is hidden for non-admins
* Used GENDER destinction for messages
* Added real name params to every mail
* Fixed some messages in de, de-formal and en
* Fixed qqq
* Fixed some Notices
* Added de-fromal message for echo default footer
* Deaktivated mention, page-linked and reverted notifications-did not work
* Deaktivated batch mails - currently wont work in BS
= This will kind a do for next release. TODO: crlt+a, entf, re-write

Change-Id: Id5037ba1999174c4837153c42896ee41d3604354
---
M Notifications/Notifications.class.php
M Notifications/Notifications.setup.php
M Notifications/i18n/de-formal.json
M Notifications/i18n/de.json
M Notifications/i18n/en.json
M Notifications/i18n/qqq.json
A Notifications/includes/BsEchoEmailSingle.class.php
A Notifications/includes/BsEchoTextEmailDecorator.class.php
A Notifications/includes/BsEchoTextEmailFormatter.class.php
M Notifications/includes/BsNotificationsFormatter.class.php
M ShoutBox/ShoutBox.class.php
M ShoutBox/i18n/de-formal.json
M ShoutBox/i18n/de.json
M ShoutBox/i18n/en.json
M ShoutBox/i18n/qqq.json
15 files changed, 405 insertions(+), 90 deletions(-)

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



diff --git a/Notifications/Notifications.class.php 
b/Notifications/Notifications.class.php
index 4cefc91..54d2137 100644
--- a/Notifications/Notifications.class.php
+++ b/Notifications/Notifications.class.php
@@ -22,6 +22,7 @@
  * For further information visit http://www.blue-spice.org
  *
  * @author Stefan Widmann widm...@hallowelt.biz
+ * @author Patric Wirth wi...@hallowelt.biz
  * @version2.23.1
  * @packageBlueSpice_Extensions
  * @subpackage Notifications
@@ -62,7 +63,10 @@
$this-mInfo = array(
EXTINFO::NAME= 'Notifications',
EXTINFO::DESCRIPTION = 'bs-notifications-desc',
-   EXTINFO::AUTHOR  = array( 
'[https://www.mediawiki.org/wiki/User:Swidmann Stefan Widmann]' ),
+   EXTINFO::AUTHOR  = array(
+   '[https://www.mediawiki.org/wiki/User:Swidmann 
Stefan Widmann]',
+   'Patric Wirth',
+   ),
EXTINFO::VERSION = 'default',
EXTINFO::STATUS  = 'default',
EXTINFO::PACKAGE = 'default',
@@ -83,6 +87,7 @@
$this-setHook( 'ArticleDeleteComplete' );
$this-setHook( 'TitleMoveComplete' );
$this-setHook( 'BSUserManagerAfterAddUser' );
+   $this-setHook( 'AddNewAccount' );
$this-setHook( 'BSShoutBoxAfterInsertShout' );
$this-setHook( 'BeforeCreateEchoEvent' );
$this-setHook( 'EchoGetDefaultNotifiedUsers' );
@@ -90,6 +95,7 @@
$this-setHook( 'UserSaveOptions' );
$this-setHook( 'BeforePageDisplay' );
$this-setHook( 'SkinTemplateOutputPageBeforeExec' );
+   $this-setHook( 'EchoAbortEmailNotification' );
 
// Variables
BsConfig::registerVar( 'MW::Notifications::Active', true, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_BOOL, 'bs-notifications-pref-active', 
'toggle' );
@@ -204,6 +210,10 @@
// category definition via self::$aNotificationCategories
//  HINT: 
http://www.mediawiki.org/wiki/Echo_(Notifications)/Developer_guide#Notification_category_parameters
foreach( self::$aNotificationCategories as $sCategory = 
$aCategoryDefinition ) {
+   //Hide admin-only notifications
+   if( $sCategory == 'bs-newuser-cat'  
!$this-getUser()-isAllowed('wikiadmin') ) {
+   continue;
+   }
$notificationCategories[$sCategory] = 
$aCategoryDefinition;
}
 
@@ -214,13 +224,14 @@
'title-message' = 'bs-echo-page-edit',
'title-params' = array( 'title' ),
'flyout-message' = 
'bs-notifications-email-edit-subject',
-   'flyout-params' = array( 'titlelink', 'agentlink' ),
+   // params are wrong, but email subject is in use here...
+   'flyout-params' = array( 'titlelink', 'agentlink', 
'agentlink' ),
'email-subject-message' = 
'bs-notifications-email-edit-subject',
- 

[MediaWiki-commits] [Gerrit] Make DB setup work for installs using a table prefix - change (mediawiki...WikidataQuality)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make DB setup work for installs using a table prefix
..


Make DB setup work for installs using a table prefix

Change-Id: I3b13fea7400140e86808e92f66bbb03e706bc00b
---
M sql/create_wdqa_evaluation.sql
M sql/create_wdqa_violations.sql
2 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Soeren.oldag: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sql/create_wdqa_evaluation.sql b/sql/create_wdqa_evaluation.sql
index 9c06916..dd61b33 100644
--- a/sql/create_wdqa_evaluation.sql
+++ b/sql/create_wdqa_evaluation.sql
@@ -1,7 +1,7 @@
-   CREATE TABLE IF NOT EXISTS wdqa_evaluation (
+   CREATE TABLE IF NOT EXISTS /*_*/wdqa_evaluation (
  special_page_id   int   NOT 
NULL,
  entity_id VARCHAR(15)   NOT 
NULL,
  insertion_timestamp   int   NOT 
NULL,
  reference_timestamp   int   
DEFAULT NULL,
  result_string TEXT  
DEFAULT NULL
-   );
\ No newline at end of file
+   ) /*$wgDBTableOptions*/;
\ No newline at end of file
diff --git a/sql/create_wdqa_violations.sql b/sql/create_wdqa_violations.sql
index 40bed1a..e5c29e7 100644
--- a/sql/create_wdqa_violations.sql
+++ b/sql/create_wdqa_violations.sql
@@ -1,4 +1,4 @@
-CREATE TABLE IF NOT EXISTS wdqa_violations (
+CREATE TABLE IF NOT EXISTS /*_*/wdqa_violations (
   entity_id VARBINARY(15) NOT NULL,
   pid   VARBINARY(15) NOT NULL,
   claim_guidVARBINARY(63) NOT NULL,
@@ -9,7 +9,7 @@
   revision_id   INT(10) UNSIGNED  NOT NULL,
   statusVARBINARY(31) NOT NULL,
   PRIMARY KEY (claim_guid, constraint_id)
-);
+) /*$wgDBTableOptions*/;
 
-CREATE INDEX claim_guid ON wdqa_violations (claim_guid);
-CREATE INDEX constraint_id ON wdqa_violations (constraint_id);
\ No newline at end of file
+CREATE INDEX /*i*/claim_guid ON /*_*/wdqa_violations (claim_guid);
+CREATE INDEX /*i*/constraint_id ON /*_*/wdqa_violations (constraint_id);
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b13fea7400140e86808e92f66bbb03e706bc00b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Soeren.oldag soeren_ol...@freenet.de
Gerrit-Reviewer: Springle sprin...@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] Use common Wikibase style for JSON indent - change (mediawiki...WikidataQuality)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use common Wikibase style for JSON indent
..


Use common Wikibase style for JSON indent

Change-Id: Id6f746ad32f2b161345e06905168d8375339fe28
---
M composer.json
1 file changed, 33 insertions(+), 33 deletions(-)

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



diff --git a/composer.json b/composer.json
index 2ebe70c..628ad99 100644
--- a/composer.json
+++ b/composer.json
@@ -1,35 +1,35 @@
 {
-  name: wikidataquality/wikidata-quality,
-  type: mediawiki-extension,
-  description: Extension for Wikibase to improve the data quality.,
-  homepage: https://www.mediawiki.org/wiki/WikidataQuality/;,
-  license: GPL-2.0+,
-  authors: [
-{
-  name: BP2014N1
-}
-  ],
-  support: {
-issues: https://phabricator.wikimedia.org/project/profile/989/;
-  },
-  require: {
-php: =5.3.0,
-wikibase/data-model: ~2.6,
-wikibase/data-model-serialization: ~1.3,
-serialization/serialization: 3.*,=3.2.1
-  },
-  require-dev: {
-phpunit/phpunit: ~4.5,
-satooshi/php-coveralls: dev-master
-  },
-  autoload: {
-psr-4: {
-  WikidataQuality\\: includes/,
-  WikidataQuality\\Specials\\: specials/,
-  WikidataQuality\\Tests\\: tests/phpunit/
-},
-classmap: [
-  WikidataQualityHooks.php
-]
-  }
+   name: wikidataquality/wikidata-quality,
+   type: mediawiki-extension,
+   description: Extension for Wikibase to improve the data quality.,
+   homepage: https://www.mediawiki.org/wiki/WikidataQuality/;,
+   license: GPL-2.0+,
+   authors: [
+   {
+   name: BP2014N1
+   }
+   ],
+   support: {
+   issues: 
https://phabricator.wikimedia.org/project/profile/989/;
+   },
+   require: {
+   php: =5.3.0,
+   wikibase/data-model: ~2.6,
+   wikibase/data-model-serialization: ~1.3,
+   serialization/serialization: 3.*,=3.2.1
+   },
+   require-dev: {
+   phpunit/phpunit: ~4.5,
+   satooshi/php-coveralls: dev-master
+   },
+   autoload: {
+   psr-4: {
+   WikidataQuality\\: includes/,
+   WikidataQuality\\Specials\\: specials/,
+   WikidataQuality\\Tests\\: tests/phpunit/
+   },
+   classmap: [
+   WikidataQualityHooks.php
+   ]
+   }
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6f746ad32f2b161345e06905168d8375339fe28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jonaskeutel jonas.keu...@student.hpi.de
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] Add contentmodel prop to mobileview Api module - change (mediawiki...MobileFrontend)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add contentmodel prop to mobileview Api module
..


Add contentmodel prop to mobileview Api module

Bug: T97249
Change-Id: Icf791d4acebb0b9c3556f9041bb90b3d6f042db7
---
M includes/api/ApiMobileView.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index ab30dce..4bbd433 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -127,6 +127,11 @@
array( 'displaytitle' = $data['displaytitle'] )
);
}
+   if ( isset( $prop['contentmodel'] )  isset( 
$data['contentmodel'] ) ) {
+   $this-getResult()-addValue( null, 
$this-getModuleName(),
+   array( 'contentmodel' = $data['contentmodel'] )
+   );
+   }
if ( isset( $prop['pageprops'] ) ) {
$propNames = $params['pageprops'];
if ( $propNames == '*'  isset( $data['pageprops'] ) ) 
{
@@ -599,6 +604,8 @@
$data['pageprops'] = array();
}
 
+   $data['contentmodel'] = $title-getContentModel();
+
if ( $title-getPageLanguage()-hasVariants() ) {
$data['hasvariants'] = true;
}
@@ -755,6 +762,7 @@
'displaytitle',
'pageprops',
'description',
+   'contentmodel',
)
),
'sectionprop' = array(
@@ -838,6 +846,7 @@
' displaytitle- the rendered title of the 
page, with {{DISPLAYTITLE}} and such applied',
' pageprops   - page properties',
' description - page description from 
Wikidata',
+   'contentmodel - page contentmodel'
),
'sectionprop' = 'What information about sections to 
get',
'pageprops' = 'What page properties to return, a pipe 
(|) separated list or * for'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf791d4acebb0b9c3556f9041bb90b3d6f042db7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Deskana dga...@wikimedia.org
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] remove what has something to do with class Violation - change (mediawiki...WikidataQualityConstraints)

2015-04-27 Thread Jonaskeutel (Code Review)
Jonaskeutel has uploaded a new change for review.

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

Change subject: remove what has something to do with class Violation
..

remove what has something to do with class Violation

since we decided not have it in version 1, also removed hook that was
there for testing purposes

Change-Id: Ibb2e5f3d8a894c2f41bd807bf481aee17c82e993
---
M WikidataQualityConstraints.php
M WikidataQualityConstraintsHooks.php
D includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
M specials/SpecialConstraintReport.php
D tests/phpunit/Result/CheckResultToViolationTranslatorTest.php
M tests/phpunit/Specials/SpecialConstraintReportTest.php
6 files changed, 0 insertions(+), 179 deletions(-)


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

diff --git a/WikidataQualityConstraints.php b/WikidataQualityConstraints.php
index cdd4029..9c92cd6 100644
--- a/WikidataQualityConstraints.php
+++ b/WikidataQualityConstraints.php
@@ -34,8 +34,6 @@
// Register hooks for Unit Tests
$GLOBALS['wgHooks']['UnitTestsList'][] = 
'WikidataQualityConstraintsHooks::onUnitTestsList';
 
-   $GLOBALS['wgHooks']['NewRevisionFromEditComplete'][] = 
'WikidataQualityConstraintsHooks::onNewRevisionFromEditComplete';
-
// Initialize special pages
$GLOBALS['wgSpecialPages']['ConstraintReport'] = 
'WikidataQuality\ConstraintReport\Specials\SpecialConstraintReport';
 
diff --git a/WikidataQualityConstraintsHooks.php 
b/WikidataQualityConstraintsHooks.php
index d272a20..45ef5e3 100644
--- a/WikidataQualityConstraintsHooks.php
+++ b/WikidataQualityConstraintsHooks.php
@@ -18,18 +18,4 @@
glob( __DIR__ . '/tests/phpunit/*Test.php' ) );
return true;
}
-
-   public static function onNewRevisionFromEditComplete( $article, 
Revision $rev, $baseID, User $user ) {
-   $accumulator = array (
-   'special_page_id' = 42,
-   'entity_id' = $article-mTitle-mTextform,
-   'insertion_timestamp' = 
$article-mPreparedEdit-timestamp,
-   'reference_timestamp' = null,
-   'result_string' = 'This was written by 
onNewRevisionFromEditComplete'
-   );
-   wfWaitForSlaves();
-   $loadBalancer = wfGetLB();
-   $db = $loadBalancer-getConnection( DB_MASTER );
-   $db-insert( EVALUATION_TABLE, $accumulator );
-   }
 }
\ No newline at end of file
diff --git 
a/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php 
b/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
deleted file mode 100755
index f193ec8..000
--- a/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
+++ /dev/null
@@ -1,51 +0,0 @@
-?php
-
-namespace WikidataQuality\ConstraintReport\ConstraintCheck\Result;
-
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\Entity\Entity;
-use WikidataQuality\Result\ResultToViolationTranslator;
-use WikidataQuality\Violations\Violation;
-
-
-class CheckResultToViolationTranslator extends ResultToViolationTranslator {
-
-   public function translateToViolation( Entity $entity, 
$checkResultOrArray ) {
-
-   if ( $checkResultOrArray instanceof CheckResult ) {
-   $checkResultArray = array ( $checkResultOrArray );
-   } elseif ( is_array( $checkResultOrArray ) ) {
-   $checkResultArray = $checkResultOrArray;
-   } else {
-   throw new InvalidArgumentException;
-   }
-
-   $violationArray = array ();
-   foreach ( $checkResultArray as $checkResult ) {
-   if ( $checkResult-getStatus() !== 
CheckResult::STATUS_VIOLATION ) {
-   continue;
-   }
-
-   $statement = $checkResult-getStatement();
-   $entityId = $entity-getId();
-
-   //TODO: Use real claimGuid
-   $constraintTypeEntityId = 
$checkResult-getConstraintName();
-   $constraintClaimGuid = $statement-getGuid() . 
$constraintTypeEntityId;
-   $parameters = $checkResult-getParameters();
-   if ( is_array( $parameters ) ) {
-   foreach ( $parameters as $par ) {
-   $constraintClaimGuid .= implode( ', ', 
$par );
-   }
-   }
-   $constraintClaimGuid = md5( $constraintClaimGuid );
-   $revisionId = $this-getRevisionIdForEntity( $entityId 
);
-   $status = CheckResult::STATUS_VIOLATION;
-
- 

[MediaWiki-commits] [Gerrit] Moved ReferenceHandlerTest into right directory. - change (mediawiki...WikidataQualityExternalValidation)

2015-04-27 Thread Soeren.oldag (Code Review)
Soeren.oldag has uploaded a new change for review.

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

Change subject: Moved ReferenceHandlerTest into right directory.
..

Moved ReferenceHandlerTest into right directory.

Change-Id: I42e62b6b71fec92dac84363db534cb791a1524b6
---
M tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
R tests/phpunit/CrossCheck/ReferenceHandlerTest.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php 
b/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
index 0d594f4..4612e9b 100755
--- a/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
+++ b/tests/phpunit/CrossCheck/Comparer/EntityIdValueComparerTest.php
@@ -15,7 +15,7 @@
  *
  * @uses   WikidataQuality\ExternalValidation\CrossCheck\Result\CompareResult
  * @uses   
WikidataQuality\ExternalValidation\CrossCheck\Comparer\DataValueComparer
- * @uses 
WikidataQuality\ExternalValidation\CrossCheck\Comparer\SimilarityChecker
+ * @uses   
WikidataQuality\ExternalValidation\CrossCheck\Comparer\SimilarityChecker
  *
  * @author BP2014N1
  * @license GNU GPL v2+
diff --git a/tests/phpunit/ReferenceHandlerTest.php 
b/tests/phpunit/CrossCheck/ReferenceHandlerTest.php
similarity index 98%
rename from tests/phpunit/ReferenceHandlerTest.php
rename to tests/phpunit/CrossCheck/ReferenceHandlerTest.php
index 9cf22db..6baa0c8 100644
--- a/tests/phpunit/ReferenceHandlerTest.php
+++ b/tests/phpunit/CrossCheck/ReferenceHandlerTest.php
@@ -1,6 +1,6 @@
 ?php
 
-namespace WikidataQuality\ExternalValidation\Tests\DumpMetaInformation;
+namespace WikidataQuality\ExternalValidation\Tests\CrossCheck;
 
 use DataValues\StringValue;
 use Wikibase\DataModel\Claim\Claim;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42e62b6b71fec92dac84363db534cb791a1524b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Soeren.oldag soeren_ol...@freenet.de

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


[MediaWiki-commits] [Gerrit] Add unit tests for preservation of html tag attributes - change (VisualEditor/VisualEditor)

2015-04-27 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Add unit tests for preservation of html tag attributes
..

Add unit tests for preservation of html tag attributes

This exposed a bug in the innerHTML technique which failed
if the document wasn't valid XML (i.e. most cases).

Change-Id: Ic63b0184643ac933ea588a4a4ebf0e137683
---
M src/ve.utils.js
M tests/ve.test.js
2 files changed, 36 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/67/206767/1

diff --git a/src/ve.utils.js b/src/ve.utils.js
index 37fc855..c52d47d 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -874,7 +874,7 @@
  * @returns {HTMLDocument} Document constructed from the HTML string
  */
 ve.createDocumentFromHtmlUsingInnerHtml = function ( html ) {
-   var i, xmlDoc,
+   var i, htmlAttributes, wrapper, attributes,
newDocument = document.implementation.createHTMLDocument( '' );
 
html = html || 'body/body';
@@ -883,18 +883,21 @@
newDocument.documentElement.innerHTML = html
.replace(/^\s*(?:!doctype[^]*)?\s*html[^]*/i, '' )
.replace(/\/html\s*$/i, '' );
+
// Preserve html attributes, if any
-   try {
-   xmlDoc = new DOMParser().parseFromString( html, 'text/xml' );
-   if ( xmlDoc.documentElement.tagName.toLowerCase() === 'html' ) {
-   for ( i = 0; i  
xmlDoc.documentElement.attributes.length; i++ ) {
-   newDocument.documentElement.setAttribute(
-   
xmlDoc.documentElement.attributes[i].name,
-   
xmlDoc.documentElement.attributes[i].value
-   );
-   }
+   htmlAttributes = html.match( /html([^]*)/i );
+   if ( htmlAttributes  htmlAttributes[1] ) {
+   wrapper = document.createElement( 'div' );
+   wrapper.innerHTML = 'div ' + htmlAttributes[1] + '/div';
+   attributes = wrapper.firstChild.attributes;
+   for ( i = 0; i  attributes.length; i++ ) {
+   newDocument.documentElement.setAttribute(
+   attributes[i].name,
+   attributes[i].value
+   );
}
-   } catch ( e ) { }
+   }
+
return newDocument;
 };
 
diff --git a/tests/ve.test.js b/tests/ve.test.js
index 0784a12..c8d1d21 100644
--- a/tests/ve.test.js
+++ b/tests/ve.test.js
@@ -389,40 +389,54 @@
cases = [
{
msg: 'simple document with doctype, head and 
body',
-   html: '!doctype 
htmlhtmlheadtitleFoo/title/headbodypBar/p/body/html',
+   html: '!doctype htmlhtml 
lang=enheadtitleFoo/title/headbodypBar/p/body/html',
head: 'titleFoo/title',
-   body: 'pBar/p'
+   body: 'pBar/p',
+   htmlAttributes: {
+   lang: 'en'
+   }
},
{
msg: 'simple document without doctype',
-   html: 
'htmlheadtitleFoo/title/headbodypBar/p/body/html',
+   html: 'html 
lang=enheadtitleFoo/title/headbodypBar/p/body/html',
head: 'titleFoo/title',
-   body: 'pBar/p'
+   body: 'pBar/p',
+   htmlAttributes: {
+   lang: 'en'
+   }
},
{
msg: 'document with missing closing tags and 
missing html tag',
html: '!doctype 
htmlheadtitleFoo/titlebase href=yaybodypBarbBaz',
head: 'titleFoo/titlebase href=yay /',
-   body: 'pBarbBaz/b/p'
+   body: 'pBarbBaz/b/p',
+   htmlAttributes: {}
},
{
msg: 'empty string results in empty document',
html: '',
head: '',
-   body: ''
+   body: '',
+   htmlAttributes: {}
}
];
 
-   QUnit.expect( cases.length * 2 * ( 2 + ( supportsDomParser ? 1 : 0 ) + 
( supportsIframe ? 1 : 0 ) ) );
+   QUnit.expect( cases.length * 3 * ( 2 + ( supportsDomParser ? 

[MediaWiki-commits] [Gerrit] Create unit tests for createDocumentFromHtml - change (VisualEditor/VisualEditor)

2015-04-27 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Create unit tests for createDocumentFromHtml
..

Create unit tests for createDocumentFromHtml

Break out browser techniques as private, but exposed, methods
so they can be tested individually.

Change-Id: I564267898eb06b531dbfb0993f4221394c0b20a2
---
M src/ve.utils.js
M tests/ve.test.js
2 files changed, 96 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/66/206766/1

diff --git a/src/ve.utils.js b/src/ve.utils.js
index 3377050..37fc855 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -771,20 +771,49 @@
  * @returns {HTMLDocument} Document constructed from the HTML string
  */
 ve.createDocumentFromHtml = function ( html ) {
-   // Try using DOMParser if available. This only works in Firefox 12+ and 
very modern
-   // versions of other browsers (Chrome 30+, Opera 17+, IE10+)
-   var newDocument, $iframe, iframe, xmlDoc, i;
+   var newDocument;
+
+   newDocument = ve.createDocumentFromHtmlUsingDomParser( html );
+   if ( newDocument ) {
+   return newDocument;
+   }
+
+   newDocument = ve.createDocumentFromHtmlUsingIframe( html );
+   if ( newDocument ) {
+   return newDocument;
+   }
+
+   return ve.createDocumentFromHtmlUsingInnerHtml( html );
+};
+
+/**
+ * Private method for creating an HTMLDocument using the DOMParser
+ *
+ * @private
+ * @param {string} html HTML string
+ * @returns {HTMLDocument|undefined} Document constructed from the HTML string 
or undefined if it failed
+ */
+ve.createDocumentFromHtmlUsingDomParser = function ( html ) {
+   // IE doesn't like empty strings
+   html = html || 'body/body';
+
try {
-   if ( html === '' ) {
-   // IE doesn't like empty strings
-   html = 'body/body';
-   }
-   newDocument = new DOMParser().parseFromString( html, 
'text/html' );
+   var newDocument = new DOMParser().parseFromString( html, 
'text/html' );
if ( newDocument ) {
return newDocument;
}
} catch ( e ) { }
+};
 
+/**
+ * Private fallback for browsers which don't support DOMParser
+ *
+ * @private
+ * @param {string} html HTML string
+ * @returns {HTMLDocument|undefined} Document constructed from the HTML string 
or undefined if it failed
+ */
+ve.createDocumentFromHtmlUsingIframe = function ( html ) {
+   var newDocument, $iframe, iframe;
// Here's what this fallback code should look like:
//
// var newDocument = document.implementation.createHtmlDocument( '' 
);
@@ -811,6 +840,8 @@
// value is not actually a Document, but something which behaves just 
like an empty regular
// object...), so we're detecting that and using the innerHTML hack 
described above.
 
+   html = html || 'body/body';
+
// Create an invisible iframe
$iframe = $( 'iframe frameborder=0 width=0 height=0 /' );
iframe = $iframe.get( 0 );
@@ -829,29 +860,45 @@
// Surprise! The document is not a document! Only happens on 
Opera.
// (Or its nodes are not actually nodes, while the document
// *is* a document. This only happens when debugging with 
Dragonfly.)
-   newDocument = document.implementation.createHTMLDocument( '' );
-   // Carefully unwrap the HTML out of the root node (and doctype, 
if any).
-   newDocument.documentElement.innerHTML = html
-   .replace(/^\s*(?:!doctype[^]*)?\s*html[^]*/i, '' )
-   .replace(/\/html\s*$/i, '' );
-   // Preserve html attributes, if any
-   try {
-   xmlDoc = new DOMParser().parseFromString( html, 
'text/xml' );
-   if ( xmlDoc.documentElement.tagName.toLowerCase() === 
'html' ) {
-   for ( i = 0; i  
xmlDoc.documentElement.attributes.length; i++ ) {
-   
newDocument.documentElement.setAttribute(
-   
xmlDoc.documentElement.attributes[i].name,
-   
xmlDoc.documentElement.attributes[i].value
-   );
-   }
-   }
-   } catch ( e ) { }
+   return;
}
 
return newDocument;
 };
 
 /**
+ * Private fallback for browsers which don't support iframe technique
+ *
+ * @private
+ * @param {string} html HTML string
+ * @returns {HTMLDocument} Document constructed from the HTML string
+ */
+ve.createDocumentFromHtmlUsingInnerHtml = function ( html ) {
+   var i, xmlDoc,
+   newDocument 

[MediaWiki-commits] [Gerrit] BS Notifications: Fixes/Improvements/Standardizations - change (mediawiki...BlueSpiceExtensions)

2015-04-27 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: BS Notifications: Fixes/Improvements/Standardizations
..

BS Notifications: Fixes/Improvements/Standardizations

* Added formatter and decorator classes to use own intro and footer
* Used own formatting also for mw mails
* Added realname param
* bs-newuser is (really) only for admins
* bs-newuser works also on MW AddNewAccount
* bs-newuser user setting is hidden for non-admins
* Used GENDER destinction for messages
* Added real name params to every mail
* Fixed some messages in de, de-formal and en
* Fixed qqq
* Fixed some Notices
* Added de-fromal message for echo default footer
* Deaktivated mention, page-linked and reverted notifications-did not work
* Deaktivated batch mails - currently wont work in BS
= This will kind a do for next release. TODO: crlt+a, entf, re-write

Change-Id: Id5037ba1999174c4837153c42896ee41d3604354
---
M Notifications/Notifications.class.php
M Notifications/Notifications.setup.php
M Notifications/i18n/de-formal.json
M Notifications/i18n/de.json
M Notifications/i18n/en.json
M Notifications/i18n/qqq.json
A Notifications/includes/BsEchoEmailSingle.class.php
A Notifications/includes/BsEchoTextEmailDecorator.class.php
A Notifications/includes/BsEchoTextEmailFormatter.class.php
M Notifications/includes/BsNotificationsFormatter.class.php
M ShoutBox/ShoutBox.class.php
M ShoutBox/i18n/de-formal.json
M ShoutBox/i18n/de.json
M ShoutBox/i18n/en.json
M ShoutBox/i18n/qqq.json
15 files changed, 405 insertions(+), 90 deletions(-)


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

diff --git a/Notifications/Notifications.class.php 
b/Notifications/Notifications.class.php
index 4cefc91..54d2137 100644
--- a/Notifications/Notifications.class.php
+++ b/Notifications/Notifications.class.php
@@ -22,6 +22,7 @@
  * For further information visit http://www.blue-spice.org
  *
  * @author Stefan Widmann widm...@hallowelt.biz
+ * @author Patric Wirth wi...@hallowelt.biz
  * @version2.23.1
  * @packageBlueSpice_Extensions
  * @subpackage Notifications
@@ -62,7 +63,10 @@
$this-mInfo = array(
EXTINFO::NAME= 'Notifications',
EXTINFO::DESCRIPTION = 'bs-notifications-desc',
-   EXTINFO::AUTHOR  = array( 
'[https://www.mediawiki.org/wiki/User:Swidmann Stefan Widmann]' ),
+   EXTINFO::AUTHOR  = array(
+   '[https://www.mediawiki.org/wiki/User:Swidmann 
Stefan Widmann]',
+   'Patric Wirth',
+   ),
EXTINFO::VERSION = 'default',
EXTINFO::STATUS  = 'default',
EXTINFO::PACKAGE = 'default',
@@ -83,6 +87,7 @@
$this-setHook( 'ArticleDeleteComplete' );
$this-setHook( 'TitleMoveComplete' );
$this-setHook( 'BSUserManagerAfterAddUser' );
+   $this-setHook( 'AddNewAccount' );
$this-setHook( 'BSShoutBoxAfterInsertShout' );
$this-setHook( 'BeforeCreateEchoEvent' );
$this-setHook( 'EchoGetDefaultNotifiedUsers' );
@@ -90,6 +95,7 @@
$this-setHook( 'UserSaveOptions' );
$this-setHook( 'BeforePageDisplay' );
$this-setHook( 'SkinTemplateOutputPageBeforeExec' );
+   $this-setHook( 'EchoAbortEmailNotification' );
 
// Variables
BsConfig::registerVar( 'MW::Notifications::Active', true, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_BOOL, 'bs-notifications-pref-active', 
'toggle' );
@@ -204,6 +210,10 @@
// category definition via self::$aNotificationCategories
//  HINT: 
http://www.mediawiki.org/wiki/Echo_(Notifications)/Developer_guide#Notification_category_parameters
foreach( self::$aNotificationCategories as $sCategory = 
$aCategoryDefinition ) {
+   //Hide admin-only notifications
+   if( $sCategory == 'bs-newuser-cat'  
!$this-getUser()-isAllowed('wikiadmin') ) {
+   continue;
+   }
$notificationCategories[$sCategory] = 
$aCategoryDefinition;
}
 
@@ -214,13 +224,14 @@
'title-message' = 'bs-echo-page-edit',
'title-params' = array( 'title' ),
'flyout-message' = 
'bs-notifications-email-edit-subject',
-   'flyout-params' = array( 'titlelink', 'agentlink' ),
+   // params are wrong, but email subject is in use here...
+   'flyout-params' = array( 'titlelink', 'agentlink', 
'agentlink' ),

[MediaWiki-commits] [Gerrit] Removed Violations and ResultToViolationTranslator - change (mediawiki...WikidataQuality)

2015-04-27 Thread Tamslo (Code Review)
Tamslo has uploaded a new change for review.

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

Change subject: Removed Violations and ResultToViolationTranslator
..

Removed Violations and ResultToViolationTranslator

In order to publish the first version we remove everything that writes
into the violations table.

Change-Id: Ic10451fe8ac9959e0ba77e3ea16a8e2e13b0b2d0
---
D includes/Result/ResultToViolationTranslator.php
D includes/Violations/Violation.php
D includes/Violations/ViolationLookup.php
D includes/Violations/ViolationQuery.php
D includes/Violations/ViolationStore.php
D tests/phpunit/Violations/ViolationLookupTest.php
D tests/phpunit/Violations/ViolationQueryTest.php
D tests/phpunit/Violations/ViolationStoreTest.php
D tests/phpunit/Violations/ViolationTest.php
9 files changed, 0 insertions(+), 1,154 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/61/206761/1

diff --git a/includes/Result/ResultToViolationTranslator.php 
b/includes/Result/ResultToViolationTranslator.php
deleted file mode 100644
index 0307aa3..000
--- a/includes/Result/ResultToViolationTranslator.php
+++ /dev/null
@@ -1,27 +0,0 @@
-?php
-
-namespace WikidataQuality\Result;
-
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Repo\WikibaseRepo;
-
-
-class ResultToViolationTranslator {
-
-   private $revisionLookup;
-
-   public function __construct() {
-   $this-revisionLookup = 
WikibaseRepo::getDefaultInstance()-getEntityRevisionLookup();
-   }
-
-   /**
-* @param EntityId $entityId
-*
-* @return int|false
-*/
-
-   protected function getRevisionIdForEntity( EntityId $entityId ) {
-   return $this-revisionLookup-getLatestRevisionId( $entityId );
-   }
-
-}
\ No newline at end of file
diff --git a/includes/Violations/Violation.php 
b/includes/Violations/Violation.php
deleted file mode 100644
index 871f37a..000
--- a/includes/Violations/Violation.php
+++ /dev/null
@@ -1,218 +0,0 @@
-?php
-
-namespace WikidataQuality\Violations;
-
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\Statement\Statement;
-use InvalidArgumentException;
-
-
-/**
- * Class Violation
- *
- * Holds data that will be inserted into the violation table
- *
- * @package WikidataQuality\Violation
- * @author BP2014N1
- * @license GNU GPL v2+
- */
-class Violation {
-
-   const STATUS_VIOLATION = 'violation';
-   const STATUS_EXCEPTION = 'exception';
-   const STATUS_UNVERIFIED = 'unverified';
-
-   /**
-* entity that contains the violation
-*
-* @var EntityId $entityId
-*/
-   private $entityId;
-
-   /**
-* property of the claim that contains the violation
-*
-* @var PropertyId $pid
-*/
-   private $pid;
-
-   /**
-* claim that contains the violation
-*
-* @var string $claimGuid
-*/
-   private $claimGuid;
-
-   /**
-* constraint that is violated
-*
-* @var string $constraintClaimGuid
-*/
-   private $constraintClaimGuid;
-
-   /**
-* type of the constraint that is violated
-*
-* @var EntityId $constraintTypeEntityId
-*/
-   private $constraintTypeEntityId;
-
-   /**
-* additional information that is used when the violation is displayed 
in the UI
-*
-* @var string $additionalInfo
-*/
-   private $additionalInfo;
-
-   /**
-* wfTimestamp of last update in table
-*
-* @var string $updatedAt
-*/
-   private $updatedAt;
-
-   /**
-* @var int $revisionId
-*/
-   private $revisionId;
-
-   /**
-* status of the violation
-*
-* @var string $status
-*/
-   private $status;
-
-   /**
-* @param EntityId $entityId
-* @param Statement|array $statement
-* @param string $constraintClaimGuid
-* @param EntityId $constraintTypeEntityId
-* @param $revisionId
-* @param string $status
-* @param string $additionalInfo
-*/
-   // TODO: Argument 4 -- EntityId as TypeHint
-   public function __construct( EntityId $entityId, $statement, 
$constraintClaimGuid, $constraintTypeEntityId, $revisionId, $status, 
$additionalInfo = null, $updatedAt = null ) {
-   $this-entityId = $entityId;
-   if ( $statement instanceof Statement ) {
-   $this-pid = $statement-getPropertyId();
-   $this-claimGuid = $statement-getGuid();
-   } else if ( is_array( $statement ) ) {
-   if ( !( $statement[ 'pid' ] instanceof PropertyId ) ) {
-   throw new InvalidArgumentException( 'pid must 
be of type 

[MediaWiki-commits] [Gerrit] Removed features for v1 and fixed EntityLookup - change (mediawiki...WikidataQuality)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Removed features for v1 and fixed EntityLookup
..


Removed features for v1 and fixed EntityLookup

Removed Violations/* and ResultToViolationsTranslator for first version.
Fixed JsonFileEntityLookup.

Change-Id: I7980b2c8a529f51bd2d3a6b1a8587abf0dadd9e9
---
D includes/Result/ResultToViolationTranslator.php
D includes/Violations/Violation.php
D includes/Violations/ViolationLookup.php
D includes/Violations/ViolationQuery.php
D includes/Violations/ViolationStore.php
M tests/phpunit/Helper/JsonFileEntityLookup.php
D tests/phpunit/Violations/ViolationLookupTest.php
D tests/phpunit/Violations/ViolationQueryTest.php
D tests/phpunit/Violations/ViolationStoreTest.php
D tests/phpunit/Violations/ViolationTest.php
10 files changed, 1 insertion(+), 1,155 deletions(-)

Approvals:
  Soeren.oldag: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Result/ResultToViolationTranslator.php 
b/includes/Result/ResultToViolationTranslator.php
deleted file mode 100644
index 0307aa3..000
--- a/includes/Result/ResultToViolationTranslator.php
+++ /dev/null
@@ -1,27 +0,0 @@
-?php
-
-namespace WikidataQuality\Result;
-
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Repo\WikibaseRepo;
-
-
-class ResultToViolationTranslator {
-
-   private $revisionLookup;
-
-   public function __construct() {
-   $this-revisionLookup = 
WikibaseRepo::getDefaultInstance()-getEntityRevisionLookup();
-   }
-
-   /**
-* @param EntityId $entityId
-*
-* @return int|false
-*/
-
-   protected function getRevisionIdForEntity( EntityId $entityId ) {
-   return $this-revisionLookup-getLatestRevisionId( $entityId );
-   }
-
-}
\ No newline at end of file
diff --git a/includes/Violations/Violation.php 
b/includes/Violations/Violation.php
deleted file mode 100644
index 871f37a..000
--- a/includes/Violations/Violation.php
+++ /dev/null
@@ -1,218 +0,0 @@
-?php
-
-namespace WikidataQuality\Violations;
-
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\Statement\Statement;
-use InvalidArgumentException;
-
-
-/**
- * Class Violation
- *
- * Holds data that will be inserted into the violation table
- *
- * @package WikidataQuality\Violation
- * @author BP2014N1
- * @license GNU GPL v2+
- */
-class Violation {
-
-   const STATUS_VIOLATION = 'violation';
-   const STATUS_EXCEPTION = 'exception';
-   const STATUS_UNVERIFIED = 'unverified';
-
-   /**
-* entity that contains the violation
-*
-* @var EntityId $entityId
-*/
-   private $entityId;
-
-   /**
-* property of the claim that contains the violation
-*
-* @var PropertyId $pid
-*/
-   private $pid;
-
-   /**
-* claim that contains the violation
-*
-* @var string $claimGuid
-*/
-   private $claimGuid;
-
-   /**
-* constraint that is violated
-*
-* @var string $constraintClaimGuid
-*/
-   private $constraintClaimGuid;
-
-   /**
-* type of the constraint that is violated
-*
-* @var EntityId $constraintTypeEntityId
-*/
-   private $constraintTypeEntityId;
-
-   /**
-* additional information that is used when the violation is displayed 
in the UI
-*
-* @var string $additionalInfo
-*/
-   private $additionalInfo;
-
-   /**
-* wfTimestamp of last update in table
-*
-* @var string $updatedAt
-*/
-   private $updatedAt;
-
-   /**
-* @var int $revisionId
-*/
-   private $revisionId;
-
-   /**
-* status of the violation
-*
-* @var string $status
-*/
-   private $status;
-
-   /**
-* @param EntityId $entityId
-* @param Statement|array $statement
-* @param string $constraintClaimGuid
-* @param EntityId $constraintTypeEntityId
-* @param $revisionId
-* @param string $status
-* @param string $additionalInfo
-*/
-   // TODO: Argument 4 -- EntityId as TypeHint
-   public function __construct( EntityId $entityId, $statement, 
$constraintClaimGuid, $constraintTypeEntityId, $revisionId, $status, 
$additionalInfo = null, $updatedAt = null ) {
-   $this-entityId = $entityId;
-   if ( $statement instanceof Statement ) {
-   $this-pid = $statement-getPropertyId();
-   $this-claimGuid = $statement-getGuid();
-   } else if ( is_array( $statement ) ) {
-   if ( !( $statement[ 'pid' ] instanceof PropertyId ) ) {
-   throw new InvalidArgumentException( 'pid must 
be of type 

[MediaWiki-commits] [Gerrit] Update how deleted pages behave - change (mediawiki...Gather)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update how deleted pages behave
..


Update how deleted pages behave

* Footer link removed
* Do not redirect to editor

Bug: T93295
Change-Id: I893bd1efac5b2015d9ef441f810b7eb0c915dd54
---
M includes/models/Collection.php
M includes/models/CollectionItem.php
M includes/views/CollectionItemCard.php
3 files changed, 48 insertions(+), 21 deletions(-)

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



diff --git a/includes/models/Collection.php b/includes/models/Collection.php
index 8365d97..b1d5b24 100644
--- a/includes/models/Collection.php
+++ b/includes/models/Collection.php
@@ -208,7 +208,11 @@
$extract = 
$extract['*'];
}
}
-   $collection-add( new CollectionItem( 
$title, $pi, $extract ) );
+   $item = new CollectionItem( $title, 
$pi, $extract );
+   if ( isset( $page['missing'] ) ) {
+   $item-setMissing( true );
+   }
+   $collection-add( $item );
}
}
if ( isset( $data['continue'] ) ) {
diff --git a/includes/models/CollectionItem.php 
b/includes/models/CollectionItem.php
index baeaffe..f2c0776 100644
--- a/includes/models/CollectionItem.php
+++ b/includes/models/CollectionItem.php
@@ -38,6 +38,22 @@
$this-title = $title;
$this-file = $file;
$this-extract = $extract;
+   $this-missing = false;
+   }
+
+   /**
+* Cheap method for determining whether the page is in the collection 
or not.
+* @return Boolean
+*/
+   public function isMissing() {
+   return $this-missing;
+   }
+
+   /**
+* @param Boolean $missing whether the associated title exists.
+*/
+   public function setMissing( $missing ) {
+   $this-missing = $missing;
}
 
/**
diff --git a/includes/views/CollectionItemCard.php 
b/includes/views/CollectionItemCard.php
index 11a0619..8098592 100644
--- a/includes/views/CollectionItemCard.php
+++ b/includes/views/CollectionItemCard.php
@@ -49,6 +49,9 @@
$item = $this-item;
$title = $item-getTitle();
$img = $this-image-getHtml();
+   $pageUrl = $title-getLocalUrl();
+   $isMissing = $item-isMissing();
+
if ( $img ) {
$img = Html::openElement( 'a', array( 'href' = 
$title-getLocalUrl() ) ) .
$img .
@@ -57,37 +60,41 @@
$html = Html::openElement( 'div', array( 'class' = 
'collection-card' ) ) .
$img .
Html::openElement( 'h2', array( 'class' = 
'collection-card-title', 'dir' = $dir ) ) .
-   Linker::link( $title ) .
+   Html::element( 'a', array( 'href' = $pageUrl, 'class' 
= $isMissing ? 'new' : '' ),
+   $title-getPrefixedText() ) .
Html::closeElement( 'h2' );
// Handle excerpt for titles with an extract or unknown pages
-   if ( $item-hasExtract() || !$title-isKnown() ) {
+   if ( $item-hasExtract() || $isMissing ) {
if ( $item-hasExtract() ) {
$itemExcerpt = $item-getExtract();
-   } elseif ( !$title-isKnown() ) {
+   } elseif ( $isMissing ) {
$itemExcerpt = wfMessage( 
'gather-page-not-found' )-escaped();
}
$html .= Html::element(
'p', array( 'class' = 
'collection-card-excerpt', 'dir' = $dir ), $itemExcerpt
);
}
-   $html .= Html::openElement( 'div', array( 'class' = 
'collection-card-footer' ) )
-   . Html::openElement( 'a',
-   array(
-   'href' = $title-getLocalUrl(),
-   'class' = CSS::anchorClass( 
'progressive' )
+
+   if ( !$isMissing ) {
+   $html .= Html::openElement( 'div', array( 'class' = 
'collection-card-footer' ) )
+   . Html::openElement( 'a',
+   array(
+   'href' = $pageUrl,
+   'class' = CSS::anchorClass( 
'progressive' )
+ 

[MediaWiki-commits] [Gerrit] Removed features for v1 and fixed EntityLookup - change (mediawiki...WikidataQuality)

2015-04-27 Thread Tamslo (Code Review)
Tamslo has uploaded a new change for review.

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

Change subject: Removed features for v1 and fixed EntityLookup
..

Removed features for v1 and fixed EntityLookup

Removed Violations/* and ResultToViolationsTranslator for first version.
Fixed JsonFileEntityLookup.

Change-Id: I7980b2c8a529f51bd2d3a6b1a8587abf0dadd9e9
---
D includes/Result/ResultToViolationTranslator.php
D includes/Violations/Violation.php
D includes/Violations/ViolationLookup.php
D includes/Violations/ViolationQuery.php
D includes/Violations/ViolationStore.php
M tests/phpunit/Helper/JsonFileEntityLookup.php
D tests/phpunit/Violations/ViolationLookupTest.php
D tests/phpunit/Violations/ViolationQueryTest.php
D tests/phpunit/Violations/ViolationStoreTest.php
D tests/phpunit/Violations/ViolationTest.php
10 files changed, 1 insertion(+), 1,155 deletions(-)


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

diff --git a/includes/Result/ResultToViolationTranslator.php 
b/includes/Result/ResultToViolationTranslator.php
deleted file mode 100644
index 0307aa3..000
--- a/includes/Result/ResultToViolationTranslator.php
+++ /dev/null
@@ -1,27 +0,0 @@
-?php
-
-namespace WikidataQuality\Result;
-
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Repo\WikibaseRepo;
-
-
-class ResultToViolationTranslator {
-
-   private $revisionLookup;
-
-   public function __construct() {
-   $this-revisionLookup = 
WikibaseRepo::getDefaultInstance()-getEntityRevisionLookup();
-   }
-
-   /**
-* @param EntityId $entityId
-*
-* @return int|false
-*/
-
-   protected function getRevisionIdForEntity( EntityId $entityId ) {
-   return $this-revisionLookup-getLatestRevisionId( $entityId );
-   }
-
-}
\ No newline at end of file
diff --git a/includes/Violations/Violation.php 
b/includes/Violations/Violation.php
deleted file mode 100644
index 871f37a..000
--- a/includes/Violations/Violation.php
+++ /dev/null
@@ -1,218 +0,0 @@
-?php
-
-namespace WikidataQuality\Violations;
-
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\Statement\Statement;
-use InvalidArgumentException;
-
-
-/**
- * Class Violation
- *
- * Holds data that will be inserted into the violation table
- *
- * @package WikidataQuality\Violation
- * @author BP2014N1
- * @license GNU GPL v2+
- */
-class Violation {
-
-   const STATUS_VIOLATION = 'violation';
-   const STATUS_EXCEPTION = 'exception';
-   const STATUS_UNVERIFIED = 'unverified';
-
-   /**
-* entity that contains the violation
-*
-* @var EntityId $entityId
-*/
-   private $entityId;
-
-   /**
-* property of the claim that contains the violation
-*
-* @var PropertyId $pid
-*/
-   private $pid;
-
-   /**
-* claim that contains the violation
-*
-* @var string $claimGuid
-*/
-   private $claimGuid;
-
-   /**
-* constraint that is violated
-*
-* @var string $constraintClaimGuid
-*/
-   private $constraintClaimGuid;
-
-   /**
-* type of the constraint that is violated
-*
-* @var EntityId $constraintTypeEntityId
-*/
-   private $constraintTypeEntityId;
-
-   /**
-* additional information that is used when the violation is displayed 
in the UI
-*
-* @var string $additionalInfo
-*/
-   private $additionalInfo;
-
-   /**
-* wfTimestamp of last update in table
-*
-* @var string $updatedAt
-*/
-   private $updatedAt;
-
-   /**
-* @var int $revisionId
-*/
-   private $revisionId;
-
-   /**
-* status of the violation
-*
-* @var string $status
-*/
-   private $status;
-
-   /**
-* @param EntityId $entityId
-* @param Statement|array $statement
-* @param string $constraintClaimGuid
-* @param EntityId $constraintTypeEntityId
-* @param $revisionId
-* @param string $status
-* @param string $additionalInfo
-*/
-   // TODO: Argument 4 -- EntityId as TypeHint
-   public function __construct( EntityId $entityId, $statement, 
$constraintClaimGuid, $constraintTypeEntityId, $revisionId, $status, 
$additionalInfo = null, $updatedAt = null ) {
-   $this-entityId = $entityId;
-   if ( $statement instanceof Statement ) {
-   $this-pid = $statement-getPropertyId();
-   $this-claimGuid = $statement-getGuid();
-   } else if ( is_array( $statement ) ) {
-   if ( !( $statement[ 'pid' ] instanceof PropertyId ) ) {
-   throw new 

[MediaWiki-commits] [Gerrit] Write log entries for showlist and hidelist to Special:Log - change (mediawiki...Gather)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Write log entries for showlist and hidelist to Special:Log
..


Write log entries for showlist and hidelist to Special:Log

http://localhost:/w/index.php?title=Special%3ALogtype=user=page=special%3AGatherpattern=1
will now show hidelist and showlist actions.
* Also clean up some broken data - invalid url and irrelevant parameter
left over from testing.

Note: Showing as red link for some reason but URLs work.

Bug: T95250
Change-Id: I8f27acd82916ab799277a4fce21e7b9d407afab7
---
M i18n/en.json
M includes/api/ApiEditList.php
2 files changed, 19 insertions(+), 13 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 5fb5447..9f0269c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -11,7 +11,7 @@
gather: Gather,
gathereditfeed: Gather lists edit feed,
gatherlists: Gather lists,
-   gather-checkuser-log-action: performed action \$1\ on $2 via the 
Gather extension,
+   gather-checkuser-log-action: performed action \$1\ on [[$2]] via 
the Gather extension,
gather-purpose-login-action: bNow you can group pages into 
collections to share with friends or save for later./bbr/Log in to try.,
gather-purpose-signup-action: bNow you can group pages into 
collections to share with friends or save for later./bbr/Sign up to try.,
gather-lists-showhidden: Show hidden lists,
diff --git a/includes/api/ApiEditList.php b/includes/api/ApiEditList.php
index 9178c6b..9a38651 100644
--- a/includes/api/ApiEditList.php
+++ b/includes/api/ApiEditList.php
@@ -171,21 +171,27 @@
 */
private function logEntry( $action, $id ) {
// If CheckUser installed, give it a heads up
+   $user = $this-getUser();
+   $target = SpecialPage::getTitleFor( 'Gather' )-getSubPage( 
'id' )
+   -getSubPage( $id );
+   $entry = new ManualLogEntry( 'gather', 'action' );
+   $entry-setPerformer( $user );
+   $entry-setTarget( $target );
+   $params = array(
+   'action' = $action,
+   );
+   $entry-setParameters( $params );
+   $rc = $entry-getRecentChange();
+
if ( is_callable( '\CheckUserHooks::updateCheckUserData' ) ) {
-   $user = $this-getUser();
-   $target = SpecialPage::getTitleFor( 'Gather' 
)-getSubPage( 'by' )
-   -getSubPage( $user-getName() )-getSubPage( 
$id  );
-   $entry = new ManualLogEntry( 'gather', 'action' );
-   $entry-setPerformer( $user );
-   $entry-setTarget( $target );
-   $params = array(
-   'username' = 'bob',
-   'action' = $action,
-   );
-   $entry-setParameters( $params );
-   $rc = $entry-getRecentChange();
\CheckUserHooks::updateCheckUserData( $rc );
}
+
+   // Surface hide and unhide actions in Special:Log
+   if ( $action === 'hidelist' || $action === 'showlist' ) {
+   $logId = $entry-insert();
+   $entry-publish( $logId, 'udp' );
+   }
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f27acd82916ab799277a4fce21e7b9d407afab7
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Jhernandez jhernan...@wikimedia.org
Gerrit-Reviewer: Robmoen rm...@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] Polish the entry fields after VE integration Adjustments to ... - change (mediawiki...Flow)

2015-04-27 Thread Pginer (Code Review)
Pginer has uploaded a new change for review.

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

Change subject: Polish the entry fields after VE integration Adjustments to the 
input element for Flow: - Size of VE and wikitext versions are the same (before 
a jump was noticed when switching). - The switch to VE looks pressed in 
wikitext. - Wikitext info text is align
..

Polish the entry fields after VE integration
Adjustments to the input element for Flow:
- Size of VE and wikitext versions are the same (before a jump was noticed when 
switching).
- The switch to VE looks pressed in wikitext.
- Wikitext info text is aligned with the text in the text area.

Some changes in the code are required:
- Apply the focused class to the flow-editor element

Bug: T96421
Change-Id: I22207ba35e58aced3936bb215ed2e53fd490e6dd
---
M handlebars/flow_editor_switcher.partial.handlebars
M modules/editor/editors/visualeditor/mw.flow.ve.Target.less
M modules/styles/board/editor-switcher.less
3 files changed, 18 insertions(+), 7 deletions(-)


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

diff --git a/handlebars/flow_editor_switcher.partial.handlebars 
b/handlebars/flow_editor_switcher.partial.handlebars
index 303369c..c651800 100644
--- a/handlebars/flow_editor_switcher.partial.handlebars
+++ b/handlebars/flow_editor_switcher.partial.handlebars
@@ -6,7 +6,7 @@
{{#if enable_switcher}}
a href=#
   title={{l10n 
flow-wikitext-switch-editor-tooltip}}
-  class=mw-ui-button flow-js flow-editor-switcher
+  class=mw-ui-button flow-js flow-editor-switcher 
mw-ui-checked
   data-flow-interactive-handler=switchEditor
   data-flow-target= form textarea

diff --git a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less 
b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
index 0e3dbc5..f2783d1 100644
--- a/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
+++ b/modules/editor/editors/visualeditor/mw.flow.ve.Target.less
@@ -36,6 +36,7 @@
// shifts the toolbar into this location.
// @todo where did this 40 come from, could it be calculated?
padding-bottom: 40px;
+   min-height: 147px; // (112 + 35) wikitext text area min-height 
(inline style) + footer
}
 
.oo-ui-toolbar {
diff --git a/modules/styles/board/editor-switcher.less 
b/modules/styles/board/editor-switcher.less
index 1f0fbec..e3e9c74 100644
--- a/modules/styles/board/editor-switcher.less
+++ b/modules/styles/board/editor-switcher.less
@@ -8,14 +8,25 @@
// it's border and re-apply on the parent node that contains both
.flow-editor-none {
border: 1px solid @colorFieldBorder;
-
+   padding: 2px;
+   background-color: white;
textarea {
border: 0;
+   background: white;
+   padding: 6px 6px 4px 6px;
+   :focus {
+   box-shadow: none;
+   }
+   }
+
+   // TODO: When the textarea is focused, this class needs to be 
added to flow-editor
+   .focused {
+   box-shadow: inset 0 0 0 2px @colorProgressive;
}
 
.flow-switcher-controls {
-   background-color: white;
-   padding: .25em;
+   padding: 4px 6px 6px 6px;
+   position: relative;
}
}
 
@@ -28,11 +39,10 @@
// @todo this is basically the terms of use, come up with a shared
// name for all but the float
.flow-wikitext-editor-help {
-   float: left;
-   vertical-align: middle;
color: @colorTextLight;
font-size: .75em;
-   line-height: 1.4;
+   position: absolute;
+   bottom: 0;
}
 
a.flow-editor-switcher {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22207ba35e58aced3936bb215ed2e53fd490e6dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Pginer pgi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Disable cleanUpLinks in cosmetic_changes.py in Persian langu... - change (pywikibot/compat)

2015-04-27 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Disable cleanUpLinks in cosmetic_changes.py in Persian language 
wikis
..

Disable cleanUpLinks in cosmetic_changes.py in Persian language wikis

Community thinks this function has too many issues.
I do this upon request of User:Yamaha5

Change-Id: I4f40c7a89a6fd698009a6290e18948e3924f4f78
---
M cosmetic_changes.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/75/206775/1

diff --git a/cosmetic_changes.py b/cosmetic_changes.py
index b15c226..4e7fba8 100644
--- a/cosmetic_changes.py
+++ b/cosmetic_changes.py
@@ -156,7 +156,9 @@
 text = self.fixSelfInterwiki(text)
 text = self.standardizePageFooter(text)
 text = self.fixSyntaxSave(text)
-text = self.cleanUpLinks(text)
+if self.site.lang != 'fa':
+# Per community discussion, this one is not allowed
+text = self.cleanUpLinks(text)
 text = self.cleanUpSectionHeaders(text)
 text = self.putSpacesInLists(text)
 text = self.translateAndCapitalizeNamespaces(text)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f40c7a89a6fd698009a6290e18948e3924f4f78
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com

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


[MediaWiki-commits] [Gerrit] [SafeDelete] Register extension - change (translatewiki)

2015-04-27 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [SafeDelete] Register extension
..


[SafeDelete] Register extension

Change-Id: Ie0fe0d6d25d1f9bf5e0257e26ab3afbd79eda927
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 2aaac49..1c3ac72 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1817,6 +1817,9 @@
 
 Sacred Text
 
+Safe Delete
+aliasfile = SafeDelete/SafeDelete.alias.php
+
 Sandbox Link
 ignored = sandboxlink-editintro-pagename, sandboxlink-preload-pagename
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0fe0d6d25d1f9bf5e0257e26ab3afbd79eda927
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] Making the Gather login and signup messages work in standard... - change (mediawiki...Gather)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Making the Gather login and signup messages work in standard way
..


Making the Gather login and signup messages work in standard way

This means they don't have to be hard-coded into MobileFronend and
they will also work with the core login and signup pages in alpha.

Dependency: change If5ec2ca
Bug: T95729
Change-Id: I374fd141d555f1fed06abf92ebd00461f87d96eb
---
M i18n/en.json
M i18n/qqq.json
M includes/Gather.hooks.php
M resources/ext.gather.watchstar/CollectionsWatchstar.js
4 files changed, 14 insertions(+), 9 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 52b9e66..fe755b3 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -12,9 +12,8 @@
gathereditfeed: Gather lists edit feed,
gatherlists: Gather lists,
gather-checkuser-log-action: performed action \$1\ on $2 via the 
Gather extension,
-   gather-purpose: Now you can group pages into collections to share 
with friends or save for later.,
-   gather-purpose-login-action: Log in to try.,
-   gather-purpose-signup-action: Sign up to try.,
+   gather-purpose-login-action: bNow you can group pages into 
collections to share with friends or save for later./bbr/Log in to try.,
+   gather-purpose-signup-action: bNow you can group pages into 
collections to share with friends or save for later./bbr/Sign up to try.,
gather-lists-showhidden: Show hidden lists,
gather-lists-showvisible: Show visible lists,
gather-lists-collection-owner: Owner,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index bb4b95c..8fb6b93 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,7 +17,6 @@
gathereditfeed: Title of special page shown on Special:SpecialPages 
that shows a feed of edits for Gather collections.,
gatherlists: Title of special page shown on Special:SpecialPages 
that allows you to view all publicly created lists.,
gather-checkuser-log-action: Message that shows up in 
Special:CheckUser when an action on a collection is made.\nParameters:\n* $1 - 
action performed on collection.\n* $2 - a link to the collection being operated 
on.,
-   gather-purpose: Shows on [[Special:UserLogin]] explains why someone 
would want to login to add to a collection.,
gather-purpose-login-action: Shows on [[Special:UserLogin]] 
prompting user to login.,
gather-purpose-signup-action: Shows on [[Special:UserLogin]] 
prompting user to sign up.,
gather-lists-showhidden: Link title to show hidden lists on 
[[Special:GatherLists]].,
diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index bd694ac..4b06246 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -190,9 +190,12 @@
 * @param array $messages Array of valid messages, already added
 */
public static function onLoginFormValidErrorMessages( $messages ) {
-   // support for both, mobile and desktop, remove the key 
Gather,
-   // when mobile uses desktop login page
-   $messages['Gather'] = 'gather-loginpage-desc';
-   $messages[] = 'gather-anon-view-lists';
+   $messages = array_merge( $messages,
+   array(
+   'gather-anon-view-lists',
+   'gather-purpose-login-action', // watchstar 
button login CTA
+   'gather-purpose-signup-action', // watchstar 
button sign-up CTA
+   )
+   );
}
 }
diff --git a/resources/ext.gather.watchstar/CollectionsWatchstar.js 
b/resources/ext.gather.watchstar/CollectionsWatchstar.js
index b9414d6..b6ce17a 100644
--- a/resources/ext.gather.watchstar/CollectionsWatchstar.js
+++ b/resources/ext.gather.watchstar/CollectionsWatchstar.js
@@ -41,7 +41,11 @@
content: mw.msg( 'gather-anon-cta' ),
queryParams: {
campaign: 'gather',
-   returntoquery: 
'article_action=add_to_collection'
+   returntoquery: 
'article_action=add_to_collection',
+   warning: 'gather-purpose-login-action'
+   },
+   signupQueryParams: {
+   warning: 'gather-purpose-signup-action'
}
},
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I374fd141d555f1fed06abf92ebd00461f87d96eb
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Bmansurov 

[MediaWiki-commits] [Gerrit] Consistency tweaks in preparation for translatewiki.net - change (mediawiki...MassAction)

2015-04-27 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: Consistency tweaks in preparation for translatewiki.net
..

Consistency tweaks in preparation for translatewiki.net

* Remove Title Case
* Remove leading - from message keys

Change-Id: I757b2aefc24123b49064dfbb11c4227d56c2ba58
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 8052744..c8e9c0c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1,16 +1,16 @@
 {
specialpages-group-MassAction: MassAction,
-   massaction: Mass Action Interface,
+   massaction: Mass action interface,
massaction-error: Error,
massaction-errormessage: Error: $1,
-   massaction-newtask: New Task,
-   massaction-viewtask: View Task,
-   massactionsavechange: Save Change,
+   massaction-newtask: New task,
+   massaction-viewtask: View task,
+   massactionsavechange: Save change,
log-name-massaction: MassAction,
log-description-massaction: These events track when MassAction 
events happen in the system.,
-   logentry-massaction-newtask: $1 {{GENDER:$2|created Mass Action}} 
$4,
-   -massaction-specialpage-general-section:General Options,
-   -massaction-specialpage-matchers-section:Matchers,
-   -massaction-specialpage-actions-section:Actions,
+   logentry-massaction-newtask: $1 {{GENDER:$2|created MassAction}} $4,
+   massaction-specialpage-general-section:General options,
+   massaction-specialpage-matchers-section:Matchers,
+   massaction-specialpage-actions-section:Actions,
massaction-target-wikipage-titleregexmatcher-regex-help:Regex 
characters allowed: . * ?
 }
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
index aa04386..bed8e2e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,7 +9,7 @@
log-name-massaction: Name for the MassAction log type,
log-description-massaction: Description for the MassAction log type,
logentry-massaction-newtask: Log entry format for MassAction logs of 
type newtask,
-   massaction-specialpage-general-section:Title for the section 
containing general options when creating a new tasl,
+   massaction-specialpage-general-section:Title for the section 
containing general options when creating a new task,
massaction-specialpage-matchers-section:Title for the section 
containing options for Matchers when creating a new task,
massaction-specialpage-actions-section:Title for the section 
containing options for Actions when creating a new task,
massaction-target-wikipage-titleregexmatcher-regex-help:Help message 
for the WikiPage TitleRegexMatcher Regex form entry box

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I757b2aefc24123b49064dfbb11c4227d56c2ba58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassAction
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Re-refactor JsonFileEntityLookup - change (mediawiki...WikidataQuality)

2015-04-27 Thread Tamslo (Code Review)
Tamslo has uploaded a new change for review.

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

Change subject: Re-refactor JsonFileEntityLookup
..

Re-refactor JsonFileEntityLookup

Change-Id: I572f7323ee0fc2595c6d2c3c5d6398a821d2e0a3
---
M tests/phpunit/Helper/JsonFileEntityLookup.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/phpunit/Helper/JsonFileEntityLookup.php 
b/tests/phpunit/Helper/JsonFileEntityLookup.php
index ec99363..f98461c 100644
--- a/tests/phpunit/Helper/JsonFileEntityLookup.php
+++ b/tests/phpunit/Helper/JsonFileEntityLookup.php
@@ -49,7 +49,7 @@
WikibaseRepo::getDefaultInstance()-getEntityIdParser()
);
 
-   $this-entityDeserializer = 
WikibaseRepo::getDefaultInstance()- $factory-newEntityDeserializer();
+   $this-entityDeserializer = $factory-newEntityDeserializer();
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I572f7323ee0fc2595c6d2c3c5d6398a821d2e0a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
Gerrit-Branch: master
Gerrit-Owner: Tamslo tamaraslosa...@gmail.com

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


[MediaWiki-commits] [Gerrit] BS Notifications: Fixes/Improvements/Standardizations - change (mediawiki...BlueSpiceExtensions)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: BS Notifications: Fixes/Improvements/Standardizations
..


BS Notifications: Fixes/Improvements/Standardizations

* Added formatter and decorator classes to use own intro and footer
* Used own formatting also for mw mails
* Added realname param
* bs-newuser is (really) only for admins
* bs-newuser works also on MW AddNewAccount
* bs-newuser user setting is hidden for non-admins
* Used GENDER destinction for messages
* Added real name params to every mail
* Fixed some messages in de, de-formal and en
* Fixed qqq
* Fixed some Notices
* Added de-fromal message for echo default footer
* Deaktivated mention, page-linked and reverted notifications-did not work
* Deaktivated batch mails - currently wont work in BS
= This will kind a do for next release. TODO: crlt+a, entf, re-write

Change-Id: Id5037ba1999174c4837153c42896ee41d3604354
---
M Notifications/Notifications.class.php
M Notifications/Notifications.setup.php
M Notifications/i18n/de-formal.json
M Notifications/i18n/de.json
M Notifications/i18n/en.json
M Notifications/i18n/qqq.json
A Notifications/includes/BsEchoEmailSingle.class.php
A Notifications/includes/BsEchoTextEmailDecorator.class.php
A Notifications/includes/BsEchoTextEmailFormatter.class.php
M Notifications/includes/BsNotificationsFormatter.class.php
M ShoutBox/ShoutBox.class.php
M ShoutBox/i18n/de-formal.json
M ShoutBox/i18n/de.json
M ShoutBox/i18n/en.json
M ShoutBox/i18n/qqq.json
15 files changed, 405 insertions(+), 90 deletions(-)

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



diff --git a/Notifications/Notifications.class.php 
b/Notifications/Notifications.class.php
index 4cefc91..54d2137 100644
--- a/Notifications/Notifications.class.php
+++ b/Notifications/Notifications.class.php
@@ -22,6 +22,7 @@
  * For further information visit http://www.blue-spice.org
  *
  * @author Stefan Widmann widm...@hallowelt.biz
+ * @author Patric Wirth wi...@hallowelt.biz
  * @version2.23.1
  * @packageBlueSpice_Extensions
  * @subpackage Notifications
@@ -62,7 +63,10 @@
$this-mInfo = array(
EXTINFO::NAME= 'Notifications',
EXTINFO::DESCRIPTION = 'bs-notifications-desc',
-   EXTINFO::AUTHOR  = array( 
'[https://www.mediawiki.org/wiki/User:Swidmann Stefan Widmann]' ),
+   EXTINFO::AUTHOR  = array(
+   '[https://www.mediawiki.org/wiki/User:Swidmann 
Stefan Widmann]',
+   'Patric Wirth',
+   ),
EXTINFO::VERSION = 'default',
EXTINFO::STATUS  = 'default',
EXTINFO::PACKAGE = 'default',
@@ -83,6 +87,7 @@
$this-setHook( 'ArticleDeleteComplete' );
$this-setHook( 'TitleMoveComplete' );
$this-setHook( 'BSUserManagerAfterAddUser' );
+   $this-setHook( 'AddNewAccount' );
$this-setHook( 'BSShoutBoxAfterInsertShout' );
$this-setHook( 'BeforeCreateEchoEvent' );
$this-setHook( 'EchoGetDefaultNotifiedUsers' );
@@ -90,6 +95,7 @@
$this-setHook( 'UserSaveOptions' );
$this-setHook( 'BeforePageDisplay' );
$this-setHook( 'SkinTemplateOutputPageBeforeExec' );
+   $this-setHook( 'EchoAbortEmailNotification' );
 
// Variables
BsConfig::registerVar( 'MW::Notifications::Active', true, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_BOOL, 'bs-notifications-pref-active', 
'toggle' );
@@ -204,6 +210,10 @@
// category definition via self::$aNotificationCategories
//  HINT: 
http://www.mediawiki.org/wiki/Echo_(Notifications)/Developer_guide#Notification_category_parameters
foreach( self::$aNotificationCategories as $sCategory = 
$aCategoryDefinition ) {
+   //Hide admin-only notifications
+   if( $sCategory == 'bs-newuser-cat'  
!$this-getUser()-isAllowed('wikiadmin') ) {
+   continue;
+   }
$notificationCategories[$sCategory] = 
$aCategoryDefinition;
}
 
@@ -214,13 +224,14 @@
'title-message' = 'bs-echo-page-edit',
'title-params' = array( 'title' ),
'flyout-message' = 
'bs-notifications-email-edit-subject',
-   'flyout-params' = array( 'titlelink', 'agentlink' ),
+   // params are wrong, but email subject is in use here...
+   'flyout-params' = array( 'titlelink', 'agentlink', 
'agentlink' ),
'email-subject-message' = 
'bs-notifications-email-edit-subject',
- 

[MediaWiki-commits] [Gerrit] [SafeDelete] Register extension - change (translatewiki)

2015-04-27 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [SafeDelete] Register extension
..

[SafeDelete] Register extension

Change-Id: Ie0fe0d6d25d1f9bf5e0257e26ab3afbd79eda927
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/60/206760/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 2aaac49..1c3ac72 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1817,6 +1817,9 @@
 
 Sacred Text
 
+Safe Delete
+aliasfile = SafeDelete/SafeDelete.alias.php
+
 Sandbox Link
 ignored = sandboxlink-editintro-pagename, sandboxlink-preload-pagename
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0fe0d6d25d1f9bf5e0257e26ab3afbd79eda927
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] remove what has something to do with class Violation - change (mediawiki...WikidataQualityConstraints)

2015-04-27 Thread Andreasburmeister (Code Review)
Andreasburmeister has submitted this change and it was merged.

Change subject: remove what has something to do with class Violation
..


remove what has something to do with class Violation

since we decided not have it in version 1, also removed hook that was
there for testing purposes

Change-Id: Ibb2e5f3d8a894c2f41bd807bf481aee17c82e993
---
M WikidataQualityConstraints.php
M WikidataQualityConstraintsHooks.php
D includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
M specials/SpecialConstraintReport.php
D tests/phpunit/Result/CheckResultToViolationTranslatorTest.php
M tests/phpunit/Specials/SpecialConstraintReportTest.php
6 files changed, 0 insertions(+), 179 deletions(-)

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



diff --git a/WikidataQualityConstraints.php b/WikidataQualityConstraints.php
index cdd4029..9c92cd6 100644
--- a/WikidataQualityConstraints.php
+++ b/WikidataQualityConstraints.php
@@ -34,8 +34,6 @@
// Register hooks for Unit Tests
$GLOBALS['wgHooks']['UnitTestsList'][] = 
'WikidataQualityConstraintsHooks::onUnitTestsList';
 
-   $GLOBALS['wgHooks']['NewRevisionFromEditComplete'][] = 
'WikidataQualityConstraintsHooks::onNewRevisionFromEditComplete';
-
// Initialize special pages
$GLOBALS['wgSpecialPages']['ConstraintReport'] = 
'WikidataQuality\ConstraintReport\Specials\SpecialConstraintReport';
 
diff --git a/WikidataQualityConstraintsHooks.php 
b/WikidataQualityConstraintsHooks.php
index d272a20..45ef5e3 100644
--- a/WikidataQualityConstraintsHooks.php
+++ b/WikidataQualityConstraintsHooks.php
@@ -18,18 +18,4 @@
glob( __DIR__ . '/tests/phpunit/*Test.php' ) );
return true;
}
-
-   public static function onNewRevisionFromEditComplete( $article, 
Revision $rev, $baseID, User $user ) {
-   $accumulator = array (
-   'special_page_id' = 42,
-   'entity_id' = $article-mTitle-mTextform,
-   'insertion_timestamp' = 
$article-mPreparedEdit-timestamp,
-   'reference_timestamp' = null,
-   'result_string' = 'This was written by 
onNewRevisionFromEditComplete'
-   );
-   wfWaitForSlaves();
-   $loadBalancer = wfGetLB();
-   $db = $loadBalancer-getConnection( DB_MASTER );
-   $db-insert( EVALUATION_TABLE, $accumulator );
-   }
 }
\ No newline at end of file
diff --git 
a/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php 
b/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
deleted file mode 100755
index f193ec8..000
--- a/includes/ConstraintCheck/Result/CheckResultToViolationTranslator.php
+++ /dev/null
@@ -1,51 +0,0 @@
-?php
-
-namespace WikidataQuality\ConstraintReport\ConstraintCheck\Result;
-
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\Entity\Entity;
-use WikidataQuality\Result\ResultToViolationTranslator;
-use WikidataQuality\Violations\Violation;
-
-
-class CheckResultToViolationTranslator extends ResultToViolationTranslator {
-
-   public function translateToViolation( Entity $entity, 
$checkResultOrArray ) {
-
-   if ( $checkResultOrArray instanceof CheckResult ) {
-   $checkResultArray = array ( $checkResultOrArray );
-   } elseif ( is_array( $checkResultOrArray ) ) {
-   $checkResultArray = $checkResultOrArray;
-   } else {
-   throw new InvalidArgumentException;
-   }
-
-   $violationArray = array ();
-   foreach ( $checkResultArray as $checkResult ) {
-   if ( $checkResult-getStatus() !== 
CheckResult::STATUS_VIOLATION ) {
-   continue;
-   }
-
-   $statement = $checkResult-getStatement();
-   $entityId = $entity-getId();
-
-   //TODO: Use real claimGuid
-   $constraintTypeEntityId = 
$checkResult-getConstraintName();
-   $constraintClaimGuid = $statement-getGuid() . 
$constraintTypeEntityId;
-   $parameters = $checkResult-getParameters();
-   if ( is_array( $parameters ) ) {
-   foreach ( $parameters as $par ) {
-   $constraintClaimGuid .= implode( ', ', 
$par );
-   }
-   }
-   $constraintClaimGuid = md5( $constraintClaimGuid );
-   $revisionId = $this-getRevisionIdForEntity( $entityId 
);
-   $status = CheckResult::STATUS_VIOLATION;
-
-   $violationArray[ ] = new Violation( $entityId, 

[MediaWiki-commits] [Gerrit] When editing collection: Done - Save - change (mediawiki...Gather)

2015-04-27 Thread Jhernandez (Code Review)
Jhernandez has uploaded a new change for review.

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

Change subject: When editing collection: Done - Save
..

When editing collection: Done - Save

Bug: T97266
Change-Id: I90dd88e402abbd7254b2e3c4879d6df33e794b65
---
M i18n/en.json
M i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 9f0269c..5fc205f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -39,7 +39,7 @@
gather-edit-collection-label-name: Name,
gather-edit-collection-label-description: Description,
gather-edit-collection-label-public: Public collection,
-   gather-edit-collection-save-label: Done,
+   gather-edit-collection-save-label: Save,
gather-edit-collection-failed-error: There was an issue with your 
attempted change, please try something else.,
gather-edit-collection-clear-label: Clear,
gather-delete-collection-confirm: Are you sure you want to delete 
this collection?,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 02db085..60702d0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -43,7 +43,7 @@
gather-edit-collection-heading: Heading for collection editor 
overlay,
gather-edit-collection-label-name: Label above input field for name 
of collection\n{{Identical|Name}},
gather-edit-collection-label-description: Label above input field 
for description of collection\n{{Identical|Description}},
-   gather-edit-collection-save-label: Label for save button in 
collection editor.\n{{Identical|Done}},
+   gather-edit-collection-save-label: Label for save button in 
collection editor.\n{{Identical|Save}},
gather-edit-collection-failed-error: There was a problem saving the 
changes.,
gather-edit-collection-clear-label: Label for button that clears 
search.\n{{Identical|Clear}},
gather-delete-collection-confirm: Text under the heading asking the 
user if they would like to delete a collection.,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90dd88e402abbd7254b2e3c4879d6df33e794b65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jhernandez jhernan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Cleaned up a few exceptions and IDE errors in BagOStuff - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Cleaned up a few exceptions and IDE errors in BagOStuff
..

Cleaned up a few exceptions and IDE errors in BagOStuff

Change-Id: I7ae88009f50c259c20572349b5d01480e36f7cb8
---
M includes/libs/objectcache/BagOStuff.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/85/206885/1

diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 5447ee7..7708eb1 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -119,10 +119,11 @@
 * @param int $exptime Either an interval in seconds or a unix 
timestamp for expiry
 * @param int $attempts The amount of times to attempt a merge in case 
of failure
 * @return bool Success
+* @throws InvalidArgumentException
 */
public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) {
if ( !is_callable( $callback ) ) {
-   throw new Exception( Got invalid callback. );
+   throw new InvalidArgumentException( Got invalid 
callback. );
}
 
return $this-mergeViaLock( $key, $callback, $exptime, 
$attempts );
@@ -166,6 +167,7 @@
 * @param mixed $value
 * @param int $exptime Either an interval in seconds or a unix 
timestamp for expiry
 * @return bool Success
+* @throws Exception
 */
protected function cas( $casToken, $key, $value, $exptime = 0 ) {
throw new Exception( CAS is not implemented in  . __CLASS__ );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ae88009f50c259c20572349b5d01480e36f7cb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make oxygen use private instead of public IP. It will be re... - change (operations/dns)

2015-04-27 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Make oxygen use private instead of public IP.  It will be 
reinstalled
..

Make oxygen use private instead of public IP.  It will be reinstalled

Bug: T96616
Change-Id: I626cd0dbf43e505299913056ff32cf873037476c
---
M templates/10.in-addr.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/39/206939/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index d2f2c7a..0b7760a 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -444,6 +444,7 @@
 219 1H IN PTR   wtp1024.eqiad.wmnet.
 220 1H IN PTR   restbase1001.eqiad.wmnet.
 221 1H IN PTR   restbase1002.eqiad.wmnet.
+222 1H IN PTR   oxygen.eqiad.wmnet.
 
 $ORIGIN 1.64.{{ zonename }}.
 
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index 168d3a3..9f9f42e 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -28,7 +28,6 @@
 12  1H  IN PTR  holmium.wikimedia.org.
 13  1H  IN PTR  protactinium.wikimedia.org.
 14  1H  IN PTR  neon.wikimedia.org.
-15  1H  IN PTR  oxygen.wikimedia.org.
 16  1H  IN PTR  ms1001.wikimedia.org.
 17  1H  IN PTR  nitrogen.wikimedia.org.
 18  1H  IN PTR  virt1000.wikimedia.org.
@@ -132,7 +131,7 @@
 ; LVS out-of-subnet service IPs (208.80.154.224/27)
 ; FIXME : These will be slowly rearranged to fit
 
-; Desktop Text  Assets  208.80.154.224 - 231 (208.80.154.224/29)  
+; Desktop Text  Assets  208.80.154.224 - 231 (208.80.154.224/29)
 224 1H  IN PTR  text-lb.eqiad.wikimedia.org.
 
 ; Mobile Zero  general Support 208.80.154.232 - 39 (208.80.154.232/29)
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 331d401..f6d684f 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -165,7 +165,6 @@
 1H  IN  2620:0:861:2:208:80:154:159
 nitrogen1H  IN A208.80.154.17
 1H  IN  2620:0:861:1:208:80:154:17
-oxygen  1H  IN A208.80.154.15
 pay-lvs1001 1H  IN A208.80.155.2
 pay-lvs1002 1H  IN A208.80.155.3
 plutonium   1H  IN A208.80.154.62
diff --git a/templates/wmnet b/templates/wmnet
index 9080589..0d71ff3 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -668,6 +668,7 @@
 osm-web1003 1H  IN A10.64.32.95
 osm-web1004 1H  IN A10.64.32.96
 osmium  1H  IN A10.64.32.146
+oxygen  1H  IN A10.64.0.222
 palladium   1H  IN A10.64.16.160
 pc1001  1H  IN A10.64.16.156
 pc1002  1H  IN A10.64.16.157
@@ -2001,6 +2002,7 @@
 wmf4661 1H  IN A10.65.2.114
 restbase10061H  IN A10.65.2.114
 
+
 ; Labs VMs c.
 eth4-1102.labnet10011H  IN A10.68.16.1
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I626cd0dbf43e505299913056ff32cf873037476c
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Bump src to ebdac59b for deploy - change (mediawiki...deploy)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Bump src to ebdac59b for deploy
..


Bump src to ebdac59b for deploy

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

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



diff --git a/src b/src
index d2135c6..ebdac59 16
--- a/src
+++ b/src
-Subproject commit d2135c6b69197037169bfd9fb4b37d2e6d90740f
+Subproject commit ebdac59b8c4475cf95b1ea8745e6d7cca34bdb22

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I917cd46c6a4aa4bf625be963dd582bed2c4e7200
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: Arlolra abrea...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Marcoil marc...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@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] Fixed getLagTimes() locking - change (mediawiki/core)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixed getLagTimes() locking
..


Fixed getLagTimes() locking

* Previously it deleted the value it just cached due to a missing suffix,
  which would lead to connection spam to get the new lag values.

Change-Id: I1040b2b87d3d4ddd7c368291cab87daf4227c2d0
---
M includes/db/LoadMonitor.php
M includes/libs/objectcache/BagOStuff.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php
index 91840dd..3d853cb 100644
--- a/includes/db/LoadMonitor.php
+++ b/includes/db/LoadMonitor.php
@@ -115,10 +115,10 @@
}
 
# Cache key missing or expired
-   if ( $cache-add( $memcKey:lock, 1, 10 ) ) {
+   if ( $cache-lock( $memcKey, 0, 10 ) ) {
# Let this process alone update the cache value
$unlocker = new ScopedCallback( function () use ( 
$cache, $memcKey ) {
-   $cache-delete( $memcKey );
+   $cache-unlock( $memcKey );
} );
} elseif ( is_array( $times ) ) {
# Could not acquire lock but an old cache exists, so 
use it
diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 5447ee7..a34b265 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -205,7 +205,7 @@
 
/**
 * @param string $key
-* @param int $timeout Lock wait timeout [optional]
+* @param int $timeout Lock wait timeout; 0 for non-blocking [optional]
 * @param int $expiry Lock expiry [optional]
 * @return bool Success
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1040b2b87d3d4ddd7c368291cab87daf4227c2d0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@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] Don't skip slug contents in getNodeAndOffset() - change (VisualEditor/VisualEditor)

2015-04-27 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Don't skip slug contents in getNodeAndOffset()
..

Don't skip slug contents in getNodeAndOffset()

Now that users can type content directly into inline
slugs and we're no longer pawning there, text inside
of inline slugs should be counted.

Change-Id: I85c4d9069814b4e958c6e3086b4a3c70d7fe1d60
---
M src/ce/ve.ce.Document.js
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/51/206951/1

diff --git a/src/ce/ve.ce.Document.js b/src/ce/ve.ce.Document.js
index 90b6050..aac942b 100644
--- a/src/ce/ve.ce.Document.js
+++ b/src/ce/ve.ce.Document.js
@@ -228,10 +228,6 @@
startOffset += length;
}
}
-   } else if ( $item.hasClass( 've-ce-branchNode-slug' ) ) 
{
-   // Skip contents without incrementing offset
-   current[1]++;
-   continue;
} else {
stack.push( [$item.contents(), 0] );
current[1]++;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85c4d9069814b4e958c6e3086b4a3c70d7fe1d60
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com

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


[MediaWiki-commits] [Gerrit] Cleaned up a few exceptions and IDE errors in BagOStuff - change (mediawiki/core)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Cleaned up a few exceptions and IDE errors in BagOStuff
..


Cleaned up a few exceptions and IDE errors in BagOStuff

Change-Id: I7ae88009f50c259c20572349b5d01480e36f7cb8
---
M includes/libs/objectcache/BagOStuff.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 5447ee7..7708eb1 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -119,10 +119,11 @@
 * @param int $exptime Either an interval in seconds or a unix 
timestamp for expiry
 * @param int $attempts The amount of times to attempt a merge in case 
of failure
 * @return bool Success
+* @throws InvalidArgumentException
 */
public function merge( $key, $callback, $exptime = 0, $attempts = 10 ) {
if ( !is_callable( $callback ) ) {
-   throw new Exception( Got invalid callback. );
+   throw new InvalidArgumentException( Got invalid 
callback. );
}
 
return $this-mergeViaLock( $key, $callback, $exptime, 
$attempts );
@@ -166,6 +167,7 @@
 * @param mixed $value
 * @param int $exptime Either an interval in seconds or a unix 
timestamp for expiry
 * @return bool Success
+* @throws Exception
 */
protected function cas( $casToken, $key, $value, $exptime = 0 ) {
throw new Exception( CAS is not implemented in  . __CLASS__ );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ae88009f50c259c20572349b5d01480e36f7cb8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
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] Simplify feature/element status filter using aggregates - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Simplify feature/element status filter using aggregates
..


Simplify feature/element status filter using aggregates

Introduced aggregate properties of build/feature/feature-element for
result duration and status. The latter removes the need to infer an
overall status from constituent steps for each filter or comparison.

Change-Id: I51c0e3119a544248df9430636d11b546c3db1b92
---
M db/mappings/feature-element.json
M src/pl-build-info.tag
M src/pl-element.tag
M src/pl-feature.tag
M src/platter.js
M test/fixtures/data.json
D test/fixtures/feature1.json
D test/fixtures/feature2.json
D test/fixtures/feature3.json
D test/fixtures/scenarios1.json
D test/fixtures/scenarios2.json
D test/fixtures/scenarios3.json
12 files changed, 47 insertions(+), 143 deletions(-)

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



diff --git a/db/mappings/feature-element.json b/db/mappings/feature-element.json
index 66a517e..911eb59 100644
--- a/db/mappings/feature-element.json
+++ b/db/mappings/feature-element.json
@@ -26,7 +26,7 @@
result.status: { type: string, 
index: not_analyzed },
result.duration: { type: long }
}
-   }
+   },
result.status: { type: string, index: 
not_analyzed },
result.duration: { type: long }
}
diff --git a/src/pl-build-info.tag b/src/pl-build-info.tag
index 1159168..176e346 100644
--- a/src/pl-build-info.tag
+++ b/src/pl-build-info.tag
@@ -43,14 +43,8 @@
self.features.forEach(function (feature) {
feature.elements.forEach(function 
(element) {
if (element.type == 'scenario') 
{
-   var steps = 
element.steps;
-
-   if (steps.some(function 
(step) { return step.result.status == 'failed'; })) {
-   
self.stats.failed++;
-   } else if 
(steps.some(function (step) { return step.result.status == 'skipped'; })) {
-   
self.stats.skipped++;
-   } else {
-   
self.stats.passed++;
+   if (typeof 
self.stats[element.result.status] !== 'undefined') {
+   
self.stats[element.result.status]++;
}
 
total++;
diff --git a/src/pl-element.tag b/src/pl-element.tag
index 9986bd1..ec17ac3 100644
--- a/src/pl-element.tag
+++ b/src/pl-element.tag
@@ -1,6 +1,6 @@
 pl-element
h4 class=list-group-item-headingspan class=keyword{ keyword 
}/span: { name }/h4
-   pspan class=label label-{ statuses[status] }{ status }/span/p
+   pspan class=label label-{ statuses[result.status] }{ 
result.status }/span/p
 
div class=steps list-group
pl-step each={ nonBackgroundSteps() }
@@ -13,18 +13,6 @@
self.background = opts.background;
self.statuses = { 'passed': 'success', 'skipped': 'warning', 
'failed': 'danger' };
 
-   function statusOf(steps) {
-   for (var i = 0; i  steps.length; i++) {
-   if (steps[i].result.status == 'failed') {
-   return 'failed';
-   } else if (steps[i].result.status == 'skipped') 
{
-   return 'skipped';
-   }
-   }
-
-   return 'passed';
-   };
-
self.nonBackgroundSteps = function () {
if (self.type === 'background' || !self.background) {
return self.steps;
@@ -32,11 +20,5 @@
return 
self.steps.slice(self.background.steps.length);
}
};
-
-   self.on('update', function () {
-   if (self.steps) {
-   self.status = statusOf(self.steps);
-   }
-   });
/script
 /pl-element
diff --git a/src/pl-feature.tag b/src/pl-feature.tag
index 3c3a7d8..f3176a1 100644
--- a/src/pl-feature.tag
+++ b/src/pl-feature.tag
@@ -1,5 +1,6 @@
 pl-feature
h4 class=list-group-item-headingspan class=keyword{ keyword 

[MediaWiki-commits] [Gerrit] @qualify a local .erb variable - change (operations/puppet)

2015-04-27 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: @qualify a local .erb variable
..


@qualify a local .erb variable

Bug T97251

Change-Id: Ia63c60ca2c6509d171faa07d1904ea9f3dd9c0aa
---
M templates/misc/labsdebrepo.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/misc/labsdebrepo.erb b/templates/misc/labsdebrepo.erb
index ec54d92..d85533f 100644
--- a/templates/misc/labsdebrepo.erb
+++ b/templates/misc/labsdebrepo.erb
@@ -1 +1 @@
-deb [trusted=yes] file://%= dir %/ /
+deb [trusted=yes] file://%= @dir %/ /

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia63c60ca2c6509d171faa07d1904ea9f3dd9c0aa
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Matanya mata...@foss.co.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] @qualify some .erb variable references. - change (operations/puppet)

2015-04-27 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: @qualify some .erb variable references.
..


@qualify some .erb variable references.

Bug T97251

Change-Id: I2b6263ef59915e272b68750bb2fccdcacd64d223
---
M modules/mysql/templates/apparmor.template.usr.sbin.mysqld.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/mysql/templates/apparmor.template.usr.sbin.mysqld.erb 
b/modules/mysql/templates/apparmor.template.usr.sbin.mysqld.erb
index cf3c19d..b5f5b0d 100644
--- a/modules/mysql/templates/apparmor.template.usr.sbin.mysqld.erb
+++ b/modules/mysql/templates/apparmor.template.usr.sbin.mysqld.erb
@@ -29,8 +29,8 @@
   /usr/share/mysql/** r,
   /var/log/mysql.log rw,
   /var/log/mysql.err rw,
-  %= config_hash['datadir'] %/ r,
-  %= config_hash['datadir'] %/** rwk,
+  %= @config_hash['datadir'] %/ r,
+  %= @config_hash['datadir'] %/** rwk,
   /var/log/mysql/ r,
   /var/log/mysql/* rw,
   %= pidfile % w,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b6263ef59915e272b68750bb2fccdcacd64d223
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Matanya mata...@foss.co.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] T95441: represent novalue in the same way as WDTK - change (mediawiki...Wikibase)

2015-04-27 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: T95441: represent novalue in the same way as WDTK
..

T95441: represent novalue in the same way as WDTK

Change-Id: I4e0b001a056541a10550d3f85a51b6ed79ab86d1
---
M repo/includes/rdf/FullStatementRdfBuilder.php
M repo/includes/rdf/RdfBuilder.php
M repo/includes/rdf/RdfVocabulary.php
M repo/includes/rdf/TruthyStatementRdfBuilder.php
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_minimal.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_statements.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_values.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q6_with_qualifiers.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_refs.nt
M repo/tests/phpunit/data/rdf/Q4_all_statements.nt
M repo/tests/phpunit/data/rdf/Q4_claims.nt
M repo/tests/phpunit/data/rdf/Q4_props.nt
M repo/tests/phpunit/data/rdf/Q4_resolved.nt
M repo/tests/phpunit/data/rdf/Q4_truthy_statements.nt
M repo/tests/phpunit/data/rdf/Q4_values.nt
M repo/tests/phpunit/data/rdf/Q6_qualifiers.nt
M repo/tests/phpunit/data/rdf/Q6_with_qualifiers.nt
M repo/tests/phpunit/data/rdf/Q7_Q9_dedup.nt
M repo/tests/phpunit/data/rdf/Q7_references.nt
M repo/tests/phpunit/data/rdf/Q7_refs.nt
M repo/tests/phpunit/data/rdf/TruthyStatementRdfBuilder/Q4_statements.nt
M repo/tests/phpunit/data/rdf/dump_entities.nt
M repo/tests/phpunit/data/rdf/dump_refs.nt
24 files changed, 97 insertions(+), 24 deletions(-)


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

diff --git a/repo/includes/rdf/FullStatementRdfBuilder.php 
b/repo/includes/rdf/FullStatementRdfBuilder.php
index 1187bbe..6c1785c 100644
--- a/repo/includes/rdf/FullStatementRdfBuilder.php
+++ b/repo/includes/rdf/FullStatementRdfBuilder.php
@@ -273,7 +273,7 @@
case 'novalue':
$propertyValueLName = 
$this-vocabulary-getEntityLName( $propertyId );
 
-   $writer-say( $propertyNamespace, 
$propertyValueLName )-is( RdfVocabulary::NS_ONTOLOGY, 'Novalue' );
+   $writer-say( 'a' )-is( 
RdfVocabulary::NSP_NOVALUE, $propertyValueLName );
break;
default:
throw new InvalidArgumentException( 'Unknown 
snak type: ' . $snak-getType() );
diff --git a/repo/includes/rdf/RdfBuilder.php b/repo/includes/rdf/RdfBuilder.php
index 71200c1..1d565d0 100644
--- a/repo/includes/rdf/RdfBuilder.php
+++ b/repo/includes/rdf/RdfBuilder.php
@@ -274,6 +274,19 @@
}
 
/**
+* Write definition for wdno:P123 class to use as novalue
+* @param string $id
+*/
+   private function writeNovalueClass( $id ) {
+   $this-writer-about( RdfVocabulary::NSP_NOVALUE, $id )-say( 
'a' )-is( 'owl', 'Class' );
+   $internalClass = $this-writer-blank();
+   $this-writer-say( 'owl', 'complementOf' )-is( '_', 
$internalClass );
+   $this-writer-about( '_', $internalClass )-say( 'a' )-is( 
'owl', 'Restriction' );
+   $this-writer-say( 'owl', 'onProperty' )-is( 
RdfVocabulary::NSP_DIRECT_CLAIM, $id );
+   $this-writer-say( 'owl', 'someValuesFrom' )-is( 'owl', 
'Thing' );
+   }
+
+   /**
 * Write predicates linking property entity to property predicates
 * @param string $id
 */
@@ -286,6 +299,7 @@
$this-writer-say( RdfVocabulary::NS_ONTOLOGY, 
'qualifierValue' )-is( RdfVocabulary::NSP_QUALIFIER_VALUE, $id );
$this-writer-say( RdfVocabulary::NS_ONTOLOGY, 'reference' 
)-is( RdfVocabulary::NSP_REFERENCE, $id );
$this-writer-say( RdfVocabulary::NS_ONTOLOGY, 
'referenceValue' )-is( RdfVocabulary::NSP_REFERENCE_VALUE, $id );
+   $this-writer-say( RdfVocabulary::NS_ONTOLOGY, 'novalue' 
)-is( RdfVocabulary::NSP_NOVALUE, $id );
}
 
/**
@@ -319,7 +333,9 @@
if( $entity instanceof Property ) {
$this-writer-say( RdfVocabulary::NS_ONTOLOGY, 
'propertyType' )
-is( RdfVocabulary::NS_ONTOLOGY, 
$this-vocabulary-getDataTypeName( $entity ) );
-   $this-writePropertyPredicates( 
$entity-getId()-getSerialization() );
+   $id = $entity-getId()-getSerialization();
+   $this-writePropertyPredicates( $id );
+   $this-writeNovalueClass( $id );
}
}
 
diff --git a/repo/includes/rdf/RdfVocabulary.php 
b/repo/includes/rdf/RdfVocabulary.php
index a056e97..df9321d 100644
--- a/repo/includes/rdf/RdfVocabulary.php
+++ b/repo/includes/rdf/RdfVocabulary.php
@@ -40,6 +40,7 @@
const 

[MediaWiki-commits] [Gerrit] Bump Flow for FlowUpdateWorkflowPageId.php - change (mediawiki/core)

2015-04-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Bump Flow for FlowUpdateWorkflowPageId.php
..

Bump Flow for FlowUpdateWorkflowPageId.php

* Create missing board pages - d46280fc3b096d94c4f16523f01e2b311de8d97a

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/206964/1

diff --git a/extensions/Flow b/extensions/Flow
index 5883253..d46280f 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit 588325397f9f692233f2c18afb0fde419828549b
+Subproject commit d46280fc3b096d94c4f16523f01e2b311de8d97a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ac9094e5c5c3e67ad85e07d3086b968bc68a753
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make oxygen use private instead of public IP. It will be re... - change (operations/dns)

2015-04-27 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Make oxygen use private instead of public IP.  It will be 
reinstalled
..


Make oxygen use private instead of public IP.  It will be reinstalled

Bug: T96616
Change-Id: I626cd0dbf43e505299913056ff32cf873037476c
---
M templates/10.in-addr.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
M templates/wmnet
4 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved
  RobH: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index d2f2c7a..0b7760a 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -444,6 +444,7 @@
 219 1H IN PTR   wtp1024.eqiad.wmnet.
 220 1H IN PTR   restbase1001.eqiad.wmnet.
 221 1H IN PTR   restbase1002.eqiad.wmnet.
+222 1H IN PTR   oxygen.eqiad.wmnet.
 
 $ORIGIN 1.64.{{ zonename }}.
 
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index 168d3a3..9f9f42e 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -28,7 +28,6 @@
 12  1H  IN PTR  holmium.wikimedia.org.
 13  1H  IN PTR  protactinium.wikimedia.org.
 14  1H  IN PTR  neon.wikimedia.org.
-15  1H  IN PTR  oxygen.wikimedia.org.
 16  1H  IN PTR  ms1001.wikimedia.org.
 17  1H  IN PTR  nitrogen.wikimedia.org.
 18  1H  IN PTR  virt1000.wikimedia.org.
@@ -132,7 +131,7 @@
 ; LVS out-of-subnet service IPs (208.80.154.224/27)
 ; FIXME : These will be slowly rearranged to fit
 
-; Desktop Text  Assets  208.80.154.224 - 231 (208.80.154.224/29)  
+; Desktop Text  Assets  208.80.154.224 - 231 (208.80.154.224/29)
 224 1H  IN PTR  text-lb.eqiad.wikimedia.org.
 
 ; Mobile Zero  general Support 208.80.154.232 - 39 (208.80.154.232/29)
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 331d401..f6d684f 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -165,7 +165,6 @@
 1H  IN  2620:0:861:2:208:80:154:159
 nitrogen1H  IN A208.80.154.17
 1H  IN  2620:0:861:1:208:80:154:17
-oxygen  1H  IN A208.80.154.15
 pay-lvs1001 1H  IN A208.80.155.2
 pay-lvs1002 1H  IN A208.80.155.3
 plutonium   1H  IN A208.80.154.62
diff --git a/templates/wmnet b/templates/wmnet
index 9080589..0d71ff3 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -668,6 +668,7 @@
 osm-web1003 1H  IN A10.64.32.95
 osm-web1004 1H  IN A10.64.32.96
 osmium  1H  IN A10.64.32.146
+oxygen  1H  IN A10.64.0.222
 palladium   1H  IN A10.64.16.160
 pc1001  1H  IN A10.64.16.156
 pc1002  1H  IN A10.64.16.157
@@ -2001,6 +2002,7 @@
 wmf4661 1H  IN A10.65.2.114
 restbase10061H  IN A10.65.2.114
 
+
 ; Labs VMs c.
 eth4-1102.labnet10011H  IN A10.68.16.1
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I626cd0dbf43e505299913056ff32cf873037476c
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: RobH r...@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] Refactor into one-way data flow - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Refactor into one-way data flow
..


Refactor into one-way data flow

Introduced main pl-dashboard component to serve as a mediator between
the data store and subcomponents. Removed parent/app dependencies from
subcomponents to achieve a one-way data flow.

Change-Id: I8022941728283ed3a11e1e88828cd04e91a91f5b
---
M index.html
M package.json
M src/pl-build-features.tag
M src/pl-build-info.tag
M src/pl-builds.tag
A src/pl-dashboard.tag
A src/pl-element.tag
A src/pl-feature.tag
A src/pl-step.tag
M src/platter.js
D src/pt-feature.tag
11 files changed, 138 insertions(+), 135 deletions(-)

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



diff --git a/index.html b/index.html
index 7af974f..af07cfc 100644
--- a/index.html
+++ b/index.html
@@ -3,19 +3,25 @@
 head
titleBrowser tests/title
link rel=stylesheet 
href=//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
+
+   style
+   .scenarios  .list-group-item {
+   border: none;
+   }
+
+   .keyword {
+   font-weight: bold;
+   }
+   /style
 /head
 body
-   div class=container
-   pl-builds/pl-builds
-   pl-build-info/pl-build-info
-   pl-build-features/pl-build-features
-   /div
+   div id=dashboard class=container/div
 
script src=//code.jquery.com/jquery-1.11.2.min.js/script
script 
src=//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js/script
script src=node_modules/riot/riot.js/script
script src=src/platter.js/script
script src=build/tags.js/script
-   scriptPlatter.start()/script
+   scriptPlatter.dashboard('#dashboard', '/db/builds');/script
 /body
 /html
diff --git a/package.json b/package.json
index abe3db5..9c20ff2 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,6 @@
 build: riot src/ build/tags.js
   },
   devDependencies: {
-elasticsearch: ^4.0.2,
-riot: ^2.0.14
+riot: 2.0.14
   }
 }
diff --git a/src/pl-build-features.tag b/src/pl-build-features.tag
index 90d0cdd..71a4e86 100644
--- a/src/pl-build-features.tag
+++ b/src/pl-build-features.tag
@@ -1,42 +1,5 @@
 pl-build-features
-   ul class=features list-group
-   pt-feature each={ features }/pt-feature
-   li each={ features } class=list-group-item
-   h4 class=list-group-item-heading{ keyword }: { name 
}/h4
-   ul class=scenarios list-group
-   li each={ elements } class=list-group-item
-   h5 class=list-group-item-heading{ 
keyword }: { name }/h5
-   ul class=steps list-group
-   li each={ steps } 
class=list-group-item list-group-item-{
-   success: result.status 
== 'passed',
-   info: result.status == 
'skipped',
-   danger: result.status 
== ''
-   }
-   p 
class=list-group-item-text{ keyword } { name }/p
-   /li
-   /ul
-   /li
-   /ul
-   /li
-   /ul
-
-   script
-   var self = this,
-   app = opts;
-
-   self.buildId = null;
-   self.features = [];
-
-   app.subscribe(self, {
-   'load-build': function (id, build) {
-   self.buildId = id;
-   },
-   'load-build-features': function (buildId, features) {
-   if (buildId === self.buildId) {
-   console.log(features);
-   self.update({ features: features });
-   }
-   }
-   });
-   /script
+   div class=list-group
+   pl-feature each={ features } 
class=list-group-item/pl-feature
+   /div
 /pl-build-features
diff --git a/src/pl-build-info.tag b/src/pl-build-info.tag
index c6f5be1..34aa186 100644
--- a/src/pl-build-info.tag
+++ b/src/pl-build-info.tag
@@ -1,23 +1,4 @@
 pl-build-info
h2 if={ !buildId }Loading build.../h2
h2 if={ buildId }Build { buildNumber } ({ buildId })/h2
-
-   script
-   var self = this,
-   app = opts;
-
-   self.buildId = null;
-   self.buildNumber = null;
-
-   app.subscribe(self, {
-

[MediaWiki-commits] [Gerrit] Use lvm.cfg for oxygen partman - change (operations/puppet)

2015-04-27 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Use lvm.cfg for oxygen partman
..

Use lvm.cfg for oxygen partman

Bug: T96616
Change-Id: If2c7db4f36a3f9e30421675cc657bb8cdcf112a2
---
M modules/install-server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index 6bb3d9e..857dbac 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -58,7 +58,7 @@
cp1008|cp104[34]|cp300[3-9]|cp301[0-9]|cp302[0-2]) echo 
partman/varnish-oldssd.cfg ;; \
cp[1234][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \
d-i-test) echo partman/flat.cfg ;; \
-   
antimony|arsenic|caesium|erbium|gadolinium|heze|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium)
 echo partman/lvm.cfg ;; \
+   
antimony|arsenic|caesium|erbium|gadolinium|heze|magnesium|neodymium|oxygen|palladium|promethium|rubidium|strontium|terbium)
 echo partman/lvm.cfg ;; \
ganeti[12]00[0-9]) echo partman/ganeti.cfg ;; \
graphite[12]001) echo partman/graphite.cfg ;; \
graphite1002) echo partman/graphite-dmcache.cfg ;; \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2c7db4f36a3f9e30421675cc657bb8cdcf112a2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Prototyping on riotjs - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Prototyping on riotjs
..


Prototyping on riotjs

Change-Id: Id03c5fff4b168325d7d6c65bd0828dcc206213e2
---
A .gitignore
A index.html
A package.json
A src/pl-build-features.tag
A src/pl-build-info.tag
A src/pl-builds.tag
A src/platter.js
A src/pt-feature.tag
8 files changed, 269 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..7d5b7a9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/build
+/node_modules
diff --git a/index.html b/index.html
new file mode 100644
index 000..7af974f
--- /dev/null
+++ b/index.html
@@ -0,0 +1,21 @@
+!DOCTYPE html
+html lang=en-US
+head
+   titleBrowser tests/title
+   link rel=stylesheet 
href=//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
+/head
+body
+   div class=container
+   pl-builds/pl-builds
+   pl-build-info/pl-build-info
+   pl-build-features/pl-build-features
+   /div
+
+   script src=//code.jquery.com/jquery-1.11.2.min.js/script
+   script 
src=//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js/script
+   script src=node_modules/riot/riot.js/script
+   script src=src/platter.js/script
+   script src=build/tags.js/script
+   scriptPlatter.start()/script
+/body
+/html
diff --git a/package.json b/package.json
new file mode 100644
index 000..abe3db5
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+  name: platter,
+  version: 0.0.0,
+  description: Dashboard for Cucumber test results,
+  scripts: {
+watch: riot -w src/ build/tags.js,
+build: riot src/ build/tags.js
+  },
+  devDependencies: {
+elasticsearch: ^4.0.2,
+riot: ^2.0.14
+  }
+}
diff --git a/src/pl-build-features.tag b/src/pl-build-features.tag
new file mode 100644
index 000..90d0cdd
--- /dev/null
+++ b/src/pl-build-features.tag
@@ -0,0 +1,42 @@
+pl-build-features
+   ul class=features list-group
+   pt-feature each={ features }/pt-feature
+   li each={ features } class=list-group-item
+   h4 class=list-group-item-heading{ keyword }: { name 
}/h4
+   ul class=scenarios list-group
+   li each={ elements } class=list-group-item
+   h5 class=list-group-item-heading{ 
keyword }: { name }/h5
+   ul class=steps list-group
+   li each={ steps } 
class=list-group-item list-group-item-{
+   success: result.status 
== 'passed',
+   info: result.status == 
'skipped',
+   danger: result.status 
== ''
+   }
+   p 
class=list-group-item-text{ keyword } { name }/p
+   /li
+   /ul
+   /li
+   /ul
+   /li
+   /ul
+
+   script
+   var self = this,
+   app = opts;
+
+   self.buildId = null;
+   self.features = [];
+
+   app.subscribe(self, {
+   'load-build': function (id, build) {
+   self.buildId = id;
+   },
+   'load-build-features': function (buildId, features) {
+   if (buildId === self.buildId) {
+   console.log(features);
+   self.update({ features: features });
+   }
+   }
+   });
+   /script
+/pl-build-features
diff --git a/src/pl-build-info.tag b/src/pl-build-info.tag
new file mode 100644
index 000..c6f5be1
--- /dev/null
+++ b/src/pl-build-info.tag
@@ -0,0 +1,23 @@
+pl-build-info
+   h2 if={ !buildId }Loading build.../h2
+   h2 if={ buildId }Build { buildNumber } ({ buildId })/h2
+
+   script
+   var self = this,
+   app = opts;
+
+   self.buildId = null;
+   self.buildNumber = null;
+
+   app.subscribe(self, {
+   'load-build': function (id, build) {
+   self.update({ buildId: id, buildNumber: 
build.build_number });
+   },
+   'load-build-features': function (buildId, features) {
+   if (buildId === self.buildId) {
+   // TODO stats
+   }
+ 

[MediaWiki-commits] [Gerrit] Use lvm.cfg for oxygen partman - change (operations/puppet)

2015-04-27 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Use lvm.cfg for oxygen partman
..


Use lvm.cfg for oxygen partman

Bug: T96616
Change-Id: If2c7db4f36a3f9e30421675cc657bb8cdcf112a2
---
M modules/install-server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/install-server/files/autoinstall/netboot.cfg 
b/modules/install-server/files/autoinstall/netboot.cfg
index 6bb3d9e..857dbac 100755
--- a/modules/install-server/files/autoinstall/netboot.cfg
+++ b/modules/install-server/files/autoinstall/netboot.cfg
@@ -58,7 +58,7 @@
cp1008|cp104[34]|cp300[3-9]|cp301[0-9]|cp302[0-2]) echo 
partman/varnish-oldssd.cfg ;; \
cp[1234][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \
d-i-test) echo partman/flat.cfg ;; \
-   
antimony|arsenic|caesium|erbium|gadolinium|heze|magnesium|neodymium|palladium|promethium|rubidium|strontium|terbium)
 echo partman/lvm.cfg ;; \
+   
antimony|arsenic|caesium|erbium|gadolinium|heze|magnesium|neodymium|oxygen|palladium|promethium|rubidium|strontium|terbium)
 echo partman/lvm.cfg ;; \
ganeti[12]00[0-9]) echo partman/ganeti.cfg ;; \
graphite[12]001) echo partman/graphite.cfg ;; \
graphite1002) echo partman/graphite-dmcache.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2c7db4f36a3f9e30421675cc657bb8cdcf112a2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Create missing board pages - change (mediawiki...Flow)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Create missing board pages
..


Create missing board pages

Bug: T95594
Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
(cherry picked from commit 4dd12e25cb96a651704dc6327df42c73c2daad7e)
---
M maintenance/FlowUpdateWorkflowPageId.php
1 file changed, 26 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/FlowUpdateWorkflowPageId.php 
b/maintenance/FlowUpdateWorkflowPageId.php
index 5056ecd..a4a61ac 100644
--- a/maintenance/FlowUpdateWorkflowPageId.php
+++ b/maintenance/FlowUpdateWorkflowPageId.php
@@ -2,6 +2,7 @@
 
 use Flow\Container;
 use Flow\Model\UUID;
+use Flow\OccupationController;
 
 $IP = getenv( 'MW_INSTALL_PATH' );
 if ( $IP === false ) {
@@ -43,7 +44,6 @@
'workflow_wiki' = wfWikiId(),
'workflow_page_id' = 0,
) );
-
 
$gen = new WorkflowPageIdUpdateGenerator( $wgLang );
$writer = new EchoBatchRowWriter( $dbw, 'flow_workflow', 
$wgFlowCluster );
@@ -87,7 +87,31 @@
) );
}
 
-   if ( $title-getArticleID() !== (int)$row-workflow_page_id ) {
+   // title doesn't exist, so create it
+   if ( $title-getArticleID() === 0 ) {
+   // build workflow object (yes, loading them piecemeal 
is suboptimal, but
+   // this is just a one-time script; considering the 
alternative is
+   // creating a derivative EchoBatchRowIterator that 
returns workflows,
+   // it doesn't really matter)
+   $storage = Container::get( 'storage' );
+   $workflow = $storage-get( 'Workflow', UUID::create( 
$row-workflow_id ) );
+
+   try {
+   /** @var OccupationController 
$occupationController */
+   $occupationController = Container::get( 
'occupation_controller' );
+   $occupationController-allowCreation( $title, 
$occupationController-getTalkpageManager() );
+   $occupationController-ensureFlowRevision( new 
Article( $title ), $workflow );
+
+   // force article id to be refetched from db
+   $title-getArticleID( Title::GAID_FOR_UPDATE );
+   } catch ( \Exception $e ) {
+   // catch all exception to keep going with the 
rest we want to
+   // iterate over, we'll report on the failed 
entries at the end
+   $this-failed[] = $row;
+   }
+   }
+
+   if ( $title-getArticleID() !== (int) $row-workflow_page_id ) {
// This makes the assumption the page has not moved or 
been deleted?
++$this-fixedCount;
return array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@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] varnish: enable gzip for mobile / text on labs - change (operations/puppet)

2015-04-27 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: varnish: enable gzip for mobile / text on labs
..

varnish: enable gzip for mobile / text on labs

Change-Id: I803ee5942c79b29f68a45e93ab0e3e90ff86c563
---
M modules/role/manifests/cache/mobile.pp
M modules/role/manifests/cache/text.pp
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/206960/1

diff --git a/modules/role/manifests/cache/mobile.pp 
b/modules/role/manifests/cache/mobile.pp
index c24afa0..3ffe56c 100644
--- a/modules/role/manifests/cache/mobile.pp
+++ b/modules/role/manifests/cache/mobile.pp
@@ -49,7 +49,7 @@
 
 $cluster_options = {
 'enable_geoiplookup' = true,
-'do_gzip'= false,
+'do_gzip'= ( $::realm == 'labs' ),
 }
 
 class { 'varnish::zero_update':
diff --git a/modules/role/manifests/cache/text.pp 
b/modules/role/manifests/cache/text.pp
index 1198655..91c56a4 100644
--- a/modules/role/manifests/cache/text.pp
+++ b/modules/role/manifests/cache/text.pp
@@ -129,6 +129,7 @@
 ]),
 cluster_options = {
 'enable_geoiplookup' = true,
+'do_gzip'= ( $::realm == 'labs' ),
 'do_gzip'= false,
 },
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I803ee5942c79b29f68a45e93ab0e3e90ff86c563
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Converted ChangeTags to using the WAN cache - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Converted ChangeTags to using the WAN cache
..

Converted ChangeTags to using the WAN cache

Change-Id: I11978f3d946d2b50896b6b89acd1014b7b1a6bb9
---
M includes/changetags/ChangeTags.php
1 file changed, 29 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/206966/1

diff --git a/includes/changetags/ChangeTags.php 
b/includes/changetags/ChangeTags.php
index 43f957c..096fedc 100644
--- a/includes/changetags/ChangeTags.php
+++ b/includes/changetags/ChangeTags.php
@@ -1063,10 +1063,10 @@
 * @since 1.25
 */
public static function listExtensionActivatedTags() {
-   // Caching...
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
+
$key = wfMemcKey( 'active-tags' );
-   $tags = $wgMemc-get( $key );
+   $tags = $cache-get( $key );
if ( $tags ) {
return $tags;
}
@@ -1076,7 +1076,8 @@
Hooks::run( 'ChangeTagsListActive', array( $extensionActive ) 
);
 
// Short-term caching.
-   $wgMemc-set( $key, $extensionActive, 300 );
+   $cache-set( $key, $extensionActive, 300 );
+
return $extensionActive;
}
 
@@ -1104,10 +1105,10 @@
 * @since 1.25
 */
public static function listExplicitlyDefinedTags() {
-   // Caching...
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
+
$key = wfMemcKey( 'valid-tags-db' );
-   $tags = $wgMemc-get( $key );
+   $tags = $cache-get( $key );
if ( $tags ) {
return $tags;
}
@@ -1124,7 +1125,8 @@
$emptyTags = array_filter( array_unique( $emptyTags ) );
 
// Short-term caching.
-   $wgMemc-set( $key, $emptyTags, 300 );
+   $cache-set( $key, $emptyTags, 300 );
+
return $emptyTags;
}
 
@@ -1138,10 +1140,10 @@
 * @since 1.25
 */
public static function listExtensionDefinedTags() {
-   // Caching...
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
+
$key = wfMemcKey( 'valid-tags-hook' );
-   $tags = $wgMemc-get( $key );
+   $tags = $cache-get( $key );
if ( $tags ) {
return $tags;
}
@@ -1151,7 +1153,8 @@
$emptyTags = array_filter( array_unique( $emptyTags ) );
 
// Short-term caching.
-   $wgMemc-set( $key, $emptyTags, 300 );
+   $cache-set( $key, $emptyTags, 300 );
+
return $emptyTags;
}
 
@@ -1161,10 +1164,12 @@
 * @since 1.25
 */
public static function purgeTagCacheAll() {
-   global $wgMemc;
-   $wgMemc-delete( wfMemcKey( 'active-tags' ) );
-   $wgMemc-delete( wfMemcKey( 'valid-tags-db' ) );
-   $wgMemc-delete( wfMemcKey( 'valid-tags-hook' ) );
+   $cache = ObjectCache::getMainWANInstance();
+
+   $cache-delete( wfMemcKey( 'active-tags' ) );
+   $cache-delete( wfMemcKey( 'valid-tags-db' ) );
+   $cache-delete( wfMemcKey( 'valid-tags-hook' ) );
+
self::purgeTagUsageCache();
}
 
@@ -1173,8 +1178,9 @@
 * @since 1.25
 */
public static function purgeTagUsageCache() {
-   global $wgMemc;
-   $wgMemc-delete( wfMemcKey( 'change-tag-statistics' ) );
+   $cache = ObjectCache::getMainWANInstance();
+
+   $cache-delete( wfMemcKey( 'change-tag-statistics' ) );
}
 
/**
@@ -1187,10 +1193,10 @@
 * @return array Array of string = int
 */
public static function tagUsageStatistics() {
-   // Caching...
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
+
$key = wfMemcKey( 'change-tag-statistics' );
-   $stats = $wgMemc-get( $key );
+   $stats = $cache-get( $key );
if ( $stats ) {
return $stats;
}
@@ -1216,7 +1222,8 @@
}
 
// Cache for a very short time
-   $wgMemc-set( $key, $out, 300 );
+   $cache-set( $key, $out, 300 );
+
return $out;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11978f3d946d2b50896b6b89acd1014b7b1a6bb9
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] Bump WikimediaEvents for null dereference in XAnalytics list... - change (mediawiki/core)

2015-04-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Bump WikimediaEvents for null dereference in XAnalytics listener
..

Bump WikimediaEvents for null dereference in XAnalytics listener

* The title can be null for internal API requests. - 
36f88158c93580ed6b6f7f3b50890013a96d2c89

Bug: T97104
Change-Id: I114900a0cb86ad44312e0970dbf3692b9f523d82
---
M extensions/WikimediaEvents
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/206965/1

diff --git a/extensions/WikimediaEvents b/extensions/WikimediaEvents
index 21e505f..36f8815 16
--- a/extensions/WikimediaEvents
+++ b/extensions/WikimediaEvents
-Subproject commit 21e505f04eac30a7af48e542f9ef7a1433cbe043
+Subproject commit 36f88158c93580ed6b6f7f3b50890013a96d2c89

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I114900a0cb86ad44312e0970dbf3692b9f523d82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix DoEditTask related tests - change (apps...wikipedia)

2015-04-27 Thread Dbrant (Code Review)
Dbrant has submitted this change and it was merged.

Change subject: Fix DoEditTask related tests
..


Fix DoEditTask related tests

The constructor signature had changed.
Also updating the gradle-wrapper.

Change-Id: I2d51004d51da52e2705275b9f377048115532743
---
M gradle/wrapper/gradle-wrapper.properties
M wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java
M wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java
M wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java
4 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index f986720..c4ea509 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sat Apr 11 20:27:40 MDT 2015
+#Thu Apr 23 15:32:14 MDT 2015
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java
index 34550a4..6e77d53 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/DoEditTaskTests.java
@@ -46,7 +46,7 @@
 app.getEditTokenStorage().get(title.getSite(), new 
EditTokenStorage.TokenRetrievedCallback() {
 @Override
 public void onTokenRetrieved(String token) {
-new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, SECTION_ID, token, ) {
+new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, SECTION_ID, token, , false) {
 @Override
 public void onFinish(EditingResult result) {
 assertNotNull(result);
diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java
index c60a6e5..a47c6c4 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerAbuseFilterTest.java
@@ -39,7 +39,7 @@
 runTestOnUiThread(new Runnable() {
 @Override
 public void run() {
-new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, ) {
+new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, , false) {
 @Override
 public void onFinish(EditingResult result) {
 assertNotNull(result);
@@ -73,7 +73,7 @@
 runTestOnUiThread(new Runnable() {
 @Override
 public void run() {
-new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, ) {
+new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, , false) {
 @Override
 public void onFinish(EditingResult result) {
 assertNotNull(result);
@@ -107,7 +107,7 @@
 runTestOnUiThread(new Runnable() {
 @Override
 public void run() {
-new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, ) {
+new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, , false) {
 @Override
 public void onFinish(EditingResult result) {
 assertNotNull(result);
diff --git 
a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java 
b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java
index e1f4532..a047c60 100644
--- a/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java
+++ b/wikipedia-it/src/main/java/org/wikipedia/test/TriggerEditCaptchaTest.java
@@ -32,7 +32,7 @@
 runTestOnUiThread(new Runnable() {
 @Override
 public void run() {
-new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, ) {
+new DoEditTask(getInstrumentation().getTargetContext(), title, 
wikitext, 0, +\\, , false) {
 @Override
 public void onFinish(EditingResult result) {
 assertNotNull(result);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Config for integration/raita - change (integration/config)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has uploaded a new change for review.

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

Change subject: Config for integration/raita
..

Config for integration/raita

Change-Id: I2f58a7307bd293f8c9a39fe148d93c23698eea2d
---
M zuul/layout.yaml
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/67/206967/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index c748c98..768af05 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2009,6 +2009,17 @@
   - integration-phpunit-mediawiki-master
   - mediawiki-gate
 
+  - name: integration/raita
+template:
+  - name: npm
+check:
+  - jshint
+  - jsonlint
+test:
+  - jsduck
+gate-and-submit:
+  - jsduck
+
   - name: integration/zuul
 experimental:
   - integration-zuul-debian-glue

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f58a7307bd293f8c9a39fe148d93c23698eea2d
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Dduvall dduv...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add policy.wikimedia.org - change (operations/dns)

2015-04-27 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: add policy.wikimedia.org
..

add policy.wikimedia.org

Requested by Yana of legal for a new microsite
similar to the annual or transparency reports.

Bug:T97329
Change-Id: I5f815b99be91088b449bd122e7876dd3575fb017
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/72/206972/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index f9c64cd..c5627a3 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -462,6 +462,7 @@
 payments-listener.frdev 1H  IN CNAMElutetium
 
 people  1H  IN CNAMEmisc-web-lb.eqiad
+policy  1H  IN CNAMEmisc-web-lb.eqiad
 releases1H  IN CNAMEmisc-web-lb.eqiad
 
 reports.frdev   1H  IN CNAMElutetium

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f815b99be91088b449bd122e7876dd3575fb017
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add local crontab monitoring - change (operations/puppet)

2015-04-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Add local crontab monitoring
..


Add local crontab monitoring

Bug: T96472
Change-Id: I6758673ff611a86ed67af23e599e1945227e97fe
---
A modules/diamond/files/collector/localcrontab.py
A modules/diamond/manifests/collector/localcrontab.pp
M modules/toollabs/manifests/init.pp
3 files changed, 102 insertions(+), 0 deletions(-)

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



diff --git a/modules/diamond/files/collector/localcrontab.py 
b/modules/diamond/files/collector/localcrontab.py
new file mode 100644
index 000..17ef717
--- /dev/null
+++ b/modules/diamond/files/collector/localcrontab.py
@@ -0,0 +1,64 @@
+# coding=utf-8
+
+
+LocalCrontabCollector. Collects the number of local user cron tabs.
+
+Main use is tool labs, where there should be no cron tabs on any
+host other than tools-submit.
+
+
+import subprocess
+import os
+import diamond.collector
+from diamond.collector import str_to_bool
+
+
+class LocalCrontabCollector(diamond.collector.Collector):
+def get_default_config_help(self):
+config_help = super(LocalCrontabCollector, 
self).get_default_config_help()  # noqa
+config_help.update({
+'administrative':  'List of user names to report'
+   'as administrative crontabs',
+'use_sudo':'Use sudo?',
+'sudo_cmd':'Path to sudo',
+'sudo_user':   'User to sudo as',
+})
+return config_help
+
+def get_default_config(self):
+
+Returns the default collector settings
+
+config = super(LocalCrontabCollector, self).get_default_config()
+config.update({
+'path': 'localcrontab',
+'administrative':   ['root', 'puppet'],
+'use_sudo': False,
+'sudo_cmd': '/usr/bin/sudo',
+'sudo_user':'root',
+})
+return config
+
+def collect(self):
+command = ['/bin/ls', '/var/spool/cron/crontabs/']
+
+if str_to_bool(self.config['use_sudo']):
+command = [
+self.config['sudo_cmd'],
+'-u',
+self.config['sudo_user']
+] + command
+
+self.log.debug('Running %s' % (' '.join(command)))
+crontabs = subprocess.check_output(command).split(\n)
+crontabs = [c.strip() for c in crontabs]
+crontabs = [c for c in crontabs if c]
+
+total_crontabs = len(crontabs)
+admin_crontabs = len([c for c in crontabs
+  if c in self.config['administrative']])
+other_crontabs = total_crontabs - admin_crontabs
+
+self.publish('total', total_crontabs)
+self.publish('administrative', admin_crontabs)
+self.publish('other', other_crontabs)
diff --git a/modules/diamond/manifests/collector/localcrontab.pp 
b/modules/diamond/manifests/collector/localcrontab.pp
new file mode 100644
index 000..a2c3a2a
--- /dev/null
+++ b/modules/diamond/manifests/collector/localcrontab.pp
@@ -0,0 +1,37 @@
+# == Define: diamond::collector::extendedexim
+#
+# Exim collector. Collects queue properties and paniclog size.
+#
+# Queue properties:
+# - queue.oldest: age of oldest e-mail in queue (seconds)
+# - queue.youngest: age of youngest e-mail in queue (seconds)
+# - queue.size: total size of the queue (bytes)
+# - queue.length: total number of e-mails in the queue
+# - queue.num_frozen: number of frozen e-mails in the queue
+#
+# Paniclog properties:
+# - paniclog.length: number of lines in /var/log/exim4/paniclog
+
+include stdlib
+
+define diamond::collector::localcrontab(
+$settings = {},
+$ensure   = present,
+) {
+$default_settings = {'use_sudo' = 'true'}
+$merged_settings = merge($default_settings, $settings)
+
+diamond::collector { 'LocalCrontabCollector':
+settings = $merged_settings,
+source   = 'puppet:///modules/diamond/collector/localcrontab.py',
+ensure   = $ensure,
+}
+
+if str2bool($merged_settings[use_sudo]) {
+sudo::user { 'diamond_sudo_for_localcrontab':
+user   = 'diamond',
+privileges = [ALL=(root) NOPASSWD: /bin/ls 
/var/spool/cron/crontabs/],
+ensure = $ensure,
+}
+}
+}
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 96c483e..1cc220b 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -198,4 +198,5 @@
 mode   = '0644'
 }
 
+diamond::collector::localcrontab { 'localcrontabcollector': }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6758673ff611a86ed67af23e599e1945227e97fe
Gerrit-PatchSet: 3

[MediaWiki-commits] [Gerrit] Revert Extend Exim diamond collector for Tool Labs - change (operations/puppet)

2015-04-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Revert Extend Exim diamond collector for Tool Labs
..


Revert Extend Exim diamond collector for Tool Labs

Is broken.

This reverts commit e69bf03b6a002340b8b856c6e90381b9cd9cc27c.

Change-Id: I8fc06ea7c24d3e725891b10954eae97e871bfd41
---
D modules/diamond/files/collector/extendedexim.py
D modules/diamond/manifests/collector/extendedexim.pp
M modules/toollabs/manifests/mailrelay.pp
3 files changed, 11 insertions(+), 211 deletions(-)

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



diff --git a/modules/diamond/files/collector/extendedexim.py 
b/modules/diamond/files/collector/extendedexim.py
deleted file mode 100644
index 87f63e8..000
--- a/modules/diamond/files/collector/extendedexim.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# coding=utf-8
-
-
-Exim collector. Collects queue properties and paniclog size.
-
-Queue properties:
-- queue.oldest: age of oldest e-mail in queue (seconds)
-- queue.youngest: age of youngest e-mail in queue (seconds)
-- queue.size: total size of the queue (bytes)
-- queue.length: total number of e-mails in the queue
-- queue.num_frozen: number of frozen e-mails in the queue
-
-Paniclog properties:
-- paniclog.length: number of lines in /var/log/exim4/paniclog
-
-Queue length is retrieved from exim; the paniclog is read directly.
-Both support the use of sudo, so diamond can run as unprivileged user.
-
- History
-Based on EximCollector bundled with Diamond (collectors/exim/exim.py)
-Extended by Merlijn van Deen valhall...@arctus.nl
-
- Dependencies
- * /usr/sbin/exim
-
-
-
-import diamond.collector
-import subprocess
-import os
-from datetime import timedelta
-from collections import namedtuple
-from diamond.collector import str_to_bool
-
-
-class EximCollectorException(Exception):
-pass
-
-
-EximQueueLine = namedtuple('EximQueueLine',
-   ['age', 'size', 'mail_id', 'frozen'])
-
-
-class ExtendedEximCollector(diamond.collector.Collector):
-def get_default_config_help(self):
-config_help = super(ExtendedEximCollector, 
self).get_default_config_help()  # noqa
-config_help.update({
-'bin': 'The path to the exim binary',
-'use_sudo':'Use sudo?',
-'sudo_cmd':'Path to sudo',
-'sudo_user':   'User to sudo as',
-})
-return config_help
-
-def get_default_config(self):
-
-Returns the default collector settings
-
-config = super(ExtendedEximCollector, self).get_default_config()
-config.update({
-'path':'exim',
-'bin':  '/usr/sbin/exim',
-'use_sudo': False,
-'sudo_cmd': '/usr/bin/sudo',
-'sudo_user':'root',
-})
-return config
-
-def _get_file(self, file):
-if not str_to_bool(self.config['use_sudo']):
-return open(file).read()
-else:
-command = [self.config['sudo_cmd'], -u, self.config['sudo_user'],
-   cat, file]
-self.log.debug('Running %s' % (' '.join(command)))
-try:
-return subprocess.check_output(
-command,
-stderr=subprocess.STDOUT
-)
-except subprocess.CalledProcessError as e:
-raise IOError(e)
-
-def _get_queue(self):
-if not os.access(self.config['bin'], os.X_OK):
-raise EximCollectorException('exim not found')
-
-command = [self.config['bin'], '-bpr']
-
-if str_to_bool(self.config['use_sudo']):
-command = [
-self.config['sudo_cmd'],
-'-u',
-self.config['sudo_user']
-] + command
-self.log.debug('Running %s' % (' '.join(command)))
-queue = subprocess.check_output(command)
-
-# remove empty lines
-queue = [l.strip() for l in queue.split(\n)]
-queue = [l for l in queue if l]
-
-# remove indented lines
-queue = [l for l in queue if l[0] !=  ]
-
-return queue
-
-def _parse_age(self, age):
-postfix = age[-1]
-if postfix == m:
-return timedelta(minutes=int(age[:-1]))
-elif postfix == h:
-return timedelta(hours=int(age[:-1]))
-elif postfix == d:
-return timedelta(days=int(age[:-1]))
-elif postfix == w:
-return timedelta(weeks=int(age[:-1]))
-
-def _parse_size(self, size):
-postfix = size[-1]
-if postfix == K:
-return float(size[:-1]) * 1024
-elif postfix == M:
-return float(size[:-1]) * 1024
-else:
-return float(size)
-
-def _parse_line(self, line):
-parts = [x for x in line.split( ) if x]

[MediaWiki-commits] [Gerrit] Revert Extend Exim diamond collector for Tool Labs - change (operations/puppet)

2015-04-27 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Revert Extend Exim diamond collector for Tool Labs
..

Revert Extend Exim diamond collector for Tool Labs

Is broken.

This reverts commit e69bf03b6a002340b8b856c6e90381b9cd9cc27c.

Change-Id: I8fc06ea7c24d3e725891b10954eae97e871bfd41
---
D modules/diamond/files/collector/extendedexim.py
D modules/diamond/manifests/collector/extendedexim.pp
M modules/toollabs/manifests/mailrelay.pp
3 files changed, 11 insertions(+), 211 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/206976/1

diff --git a/modules/diamond/files/collector/extendedexim.py 
b/modules/diamond/files/collector/extendedexim.py
deleted file mode 100644
index 87f63e8..000
--- a/modules/diamond/files/collector/extendedexim.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# coding=utf-8
-
-
-Exim collector. Collects queue properties and paniclog size.
-
-Queue properties:
-- queue.oldest: age of oldest e-mail in queue (seconds)
-- queue.youngest: age of youngest e-mail in queue (seconds)
-- queue.size: total size of the queue (bytes)
-- queue.length: total number of e-mails in the queue
-- queue.num_frozen: number of frozen e-mails in the queue
-
-Paniclog properties:
-- paniclog.length: number of lines in /var/log/exim4/paniclog
-
-Queue length is retrieved from exim; the paniclog is read directly.
-Both support the use of sudo, so diamond can run as unprivileged user.
-
- History
-Based on EximCollector bundled with Diamond (collectors/exim/exim.py)
-Extended by Merlijn van Deen valhall...@arctus.nl
-
- Dependencies
- * /usr/sbin/exim
-
-
-
-import diamond.collector
-import subprocess
-import os
-from datetime import timedelta
-from collections import namedtuple
-from diamond.collector import str_to_bool
-
-
-class EximCollectorException(Exception):
-pass
-
-
-EximQueueLine = namedtuple('EximQueueLine',
-   ['age', 'size', 'mail_id', 'frozen'])
-
-
-class ExtendedEximCollector(diamond.collector.Collector):
-def get_default_config_help(self):
-config_help = super(ExtendedEximCollector, 
self).get_default_config_help()  # noqa
-config_help.update({
-'bin': 'The path to the exim binary',
-'use_sudo':'Use sudo?',
-'sudo_cmd':'Path to sudo',
-'sudo_user':   'User to sudo as',
-})
-return config_help
-
-def get_default_config(self):
-
-Returns the default collector settings
-
-config = super(ExtendedEximCollector, self).get_default_config()
-config.update({
-'path':'exim',
-'bin':  '/usr/sbin/exim',
-'use_sudo': False,
-'sudo_cmd': '/usr/bin/sudo',
-'sudo_user':'root',
-})
-return config
-
-def _get_file(self, file):
-if not str_to_bool(self.config['use_sudo']):
-return open(file).read()
-else:
-command = [self.config['sudo_cmd'], -u, self.config['sudo_user'],
-   cat, file]
-self.log.debug('Running %s' % (' '.join(command)))
-try:
-return subprocess.check_output(
-command,
-stderr=subprocess.STDOUT
-)
-except subprocess.CalledProcessError as e:
-raise IOError(e)
-
-def _get_queue(self):
-if not os.access(self.config['bin'], os.X_OK):
-raise EximCollectorException('exim not found')
-
-command = [self.config['bin'], '-bpr']
-
-if str_to_bool(self.config['use_sudo']):
-command = [
-self.config['sudo_cmd'],
-'-u',
-self.config['sudo_user']
-] + command
-self.log.debug('Running %s' % (' '.join(command)))
-queue = subprocess.check_output(command)
-
-# remove empty lines
-queue = [l.strip() for l in queue.split(\n)]
-queue = [l for l in queue if l]
-
-# remove indented lines
-queue = [l for l in queue if l[0] !=  ]
-
-return queue
-
-def _parse_age(self, age):
-postfix = age[-1]
-if postfix == m:
-return timedelta(minutes=int(age[:-1]))
-elif postfix == h:
-return timedelta(hours=int(age[:-1]))
-elif postfix == d:
-return timedelta(days=int(age[:-1]))
-elif postfix == w:
-return timedelta(weeks=int(age[:-1]))
-
-def _parse_size(self, size):
-postfix = size[-1]
-if postfix == K:
-return float(size[:-1]) * 1024
-elif postfix == M:
-return float(size[:-1]) * 1024
-else:
-return float(size)
-
-def 

[MediaWiki-commits] [Gerrit] policy.wm.org: minimal module/role for microsite - change (operations/puppet)

2015-04-27 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: policy.wm.org: minimal module/role for microsite
..

policy.wm.org: minimal module/role for microsite

Minimal module to Setup Apache and docroot for new microsite
policy.wikimedia.org.

Bug:97329
Change-Id: I707c3f7c21db3147739fa280a5c8c75029514e7e
---
A manifests/role/policysite.pp
A modules/policysite/files/policy.wikimedia.org
A modules/policysite/manifests/init.pp
3 files changed, 63 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/206978/1

diff --git a/manifests/role/policysite.pp b/manifests/role/policysite.pp
new file mode 100644
index 000..19bc8a5
--- /dev/null
+++ b/manifests/role/policysite.pp
@@ -0,0 +1,15 @@
+# https://policy.wikimedia.org/
+# T97329
+class role::policysite {
+
+system::role { 'role::policysite': description = 'policy.wikimedia.org' }
+
+include ::policysite
+
+ferm::service { 'policysite_http':
+proto = 'tcp',
+port  = '80',
+}
+
+}
+
diff --git a/modules/policysite/files/policy.wikimedia.org 
b/modules/policysite/files/policy.wikimedia.org
new file mode 100644
index 000..840867e
--- /dev/null
+++ b/modules/policysite/files/policy.wikimedia.org
@@ -0,0 +1,29 @@
+# vim: filetype=apache
+# https://policy.wikimedia.org (T97329)
+
+VirtualHost *:80
+ServerAdmin n...@wikimedia.org
+ServerName policy.wikimedia.org
+
+DocumentRoot /srv/org/wikimedia/policyreport
+
+ErrorLog /var/log/apache2/error.log
+LogLevel warn
+CustomLog /var/log/apache2/access.log combined
+
+RewriteEngine On
+RewriteCond %{HTTP:X-Forwarded-Proto} !https
+RewriteRule ^/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} 
[R=301,E=ProtoRedirect]
+Header always merge Vary X-Forwarded-Proto
+Header set Strict-Transport-Security max-age=604800
+
+Directory /
+Order Deny,Allow
+AllowOverride All
+/Directory
+
+Directory /srv/org/wikimedia/policyreport
+Allow from all
+/Directory
+
+/VirtualHost
diff --git a/modules/policysite/manifests/init.pp 
b/modules/policysite/manifests/init.pp
new file mode 100644
index 000..66beda8
--- /dev/null
+++ b/modules/policysite/manifests/init.pp
@@ -0,0 +1,19 @@
+# https://policy.wikimedia.org/
+# T97329
+class policysite {
+
+include ::apache
+include ::apache::mod::headers
+
+file { '/srv/org/wikimedia/policy':
+ensure = directory,
+owner  = 'root',
+group  = 'root',
+mode   = '0755',
+}
+
+apache::site { 'policy.wikimedia.org':
+source = 'puppet:///modules/policysite/policy.wikimedia.org',
+}
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I707c3f7c21db3147739fa280a5c8c75029514e7e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Moved WAN cache and relayer to /libs - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Moved WAN cache and relayer to /libs
..

Moved WAN cache and relayer to /libs

Change-Id: I9586d22890ce1cda7f74869ff701de73d65eaaef
---
M autoload.php
R includes/libs/eventrelayer/EventRelayer.php
R includes/libs/eventrelayer/EventRelayerMCRD.php
R includes/libs/objectcache/WANObjectCache.php
4 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index 71bc7b2..81ee8b1 100644
--- a/autoload.php
+++ b/autoload.php
@@ -382,9 +382,9 @@
'EnqueueJob' = __DIR__ . '/includes/jobqueue/jobs/EnqueueJob.php',
'EraseArchivedFile' = __DIR__ . '/maintenance/eraseArchivedFile.php',
'ErrorPageError' = __DIR__ . '/includes/exception/ErrorPageError.php',
-   'EventRelayer' = __DIR__ . '/includes/eventrelayer/EventRelayer.php',
-   'EventRelayerMCRD' = __DIR__ . 
'/includes/eventrelayer/EventRelayerMCRD.php',
-   'EventRelayerNull' = __DIR__ . 
'/includes/eventrelayer/EventRelayer.php',
+   'EventRelayer' = __DIR__ . 
'/includes/libs/eventrelayer/EventRelayer.php',
+   'EventRelayerMCRD' = __DIR__ . 
'/includes/libs/eventrelayer/EventRelayerMCRD.php',
+   'EventRelayerNull' = __DIR__ . 
'/includes/libs/eventrelayer/EventRelayer.php',
'Exif' = __DIR__ . '/includes/media/Exif.php',
'ExifBitmapHandler' = __DIR__ . '/includes/media/ExifBitmap.php',
'ExplodeIterator' = __DIR__ . '/includes/libs/ExplodeIterator.php',
@@ -1316,7 +1316,7 @@
'ViewAction' = __DIR__ . '/includes/actions/ViewAction.php',
'VirtualRESTService' = __DIR__ . 
'/includes/libs/virtualrest/VirtualRESTService.php',
'VirtualRESTServiceClient' = __DIR__ . 
'/includes/libs/virtualrest/VirtualRESTServiceClient.php',
-   'WANObjectCache' = __DIR__ . 
'/includes/objectcache/WANObjectCache.php',
+   'WANObjectCache' = __DIR__ . 
'/includes/libs/objectcache/WANObjectCache.php',
'WaitForSlave' = __DIR__ . '/maintenance/waitForSlave.php',
'WantedCategoriesPage' = __DIR__ . 
'/includes/specials/SpecialWantedcategories.php',
'WantedFilesPage' = __DIR__ . 
'/includes/specials/SpecialWantedfiles.php',
diff --git a/includes/eventrelayer/EventRelayer.php 
b/includes/libs/eventrelayer/EventRelayer.php
similarity index 100%
rename from includes/eventrelayer/EventRelayer.php
rename to includes/libs/eventrelayer/EventRelayer.php
diff --git a/includes/eventrelayer/EventRelayerMCRD.php 
b/includes/libs/eventrelayer/EventRelayerMCRD.php
similarity index 100%
rename from includes/eventrelayer/EventRelayerMCRD.php
rename to includes/libs/eventrelayer/EventRelayerMCRD.php
diff --git a/includes/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
similarity index 100%
rename from includes/objectcache/WANObjectCache.php
rename to includes/libs/objectcache/WANObjectCache.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9586d22890ce1cda7f74869ff701de73d65eaaef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use @certname instead of certname in .erb - change (operations/puppet)

2015-04-27 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Use @certname instead of certname in .erb
..


Use @certname instead of certname in .erb

Bug T97251

Change-Id: Ib4632924d9fa4469c952ee8dbfb14bfecbad385a
---
M modules/base/templates/puppet.conf.d/10-main.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  John F. Lewis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/base/templates/puppet.conf.d/10-main.conf.erb 
b/modules/base/templates/puppet.conf.d/10-main.conf.erb
index 22728fe..9c5d4a3 100644
--- a/modules/base/templates/puppet.conf.d/10-main.conf.erb
+++ b/modules/base/templates/puppet.conf.d/10-main.conf.erb
@@ -12,7 +12,7 @@
 
 [agent]
 server = %= @server %
-% if @certname %certname = %= certname %% end %
+% if @certname %certname = %= @certname %% end %
 configtimeout = 960
 usecacheonfailure = false
 splay = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4632924d9fa4469c952ee8dbfb14bfecbad385a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com
Gerrit-Reviewer: Matanya mata...@foss.co.il
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Reimplement filtering using ES filters - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Reimplement filtering using ES filters
..


Reimplement filtering using ES filters

Refactored type mappings to achieve a feature/scenario structure that is
more easily filtered in the Elasticsearch query. Removed client-side
filtering of feature elements.

Added mappings and test fixtures.

Change-Id: I647bb65f470ea9d62ed612ee2d7304a63fe35409
---
A db/mappings/build.json
A db/mappings/feature-element.json
A db/mappings/feature.json
M src/pl-build-features.tag
M src/pl-build-filter.tag
M src/pl-dashboard.tag
M src/platter.js
A test/fixtures/data.json
M test/fixtures/feature1.json
M test/fixtures/feature2.json
M test/fixtures/feature3.json
A test/fixtures/scenarios1.json
A test/fixtures/scenarios2.json
A test/fixtures/scenarios3.json
14 files changed, 316 insertions(+), 796 deletions(-)

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



diff --git a/db/mappings/build.json b/db/mappings/build.json
new file mode 100644
index 000..5187d71
--- /dev/null
+++ b/db/mappings/build.json
@@ -0,0 +1,13 @@
+{
+   build: {
+   properties: {
+   build_number: { type: integer },
+   result.status: { type: string, index: 
not_analyzed },
+   result.duration: { type: long }
+   },
+   _timestamp: {
+   enabled: true,
+   store: true
+   }
+   }
+}
diff --git a/db/mappings/feature-element.json b/db/mappings/feature-element.json
new file mode 100644
index 000..66a517e
--- /dev/null
+++ b/db/mappings/feature-element.json
@@ -0,0 +1,34 @@
+{
+   feature-element: {
+   _parent: { type: feature },
+   properties: {
+   keyword: { type: string },
+   name: { type: string },
+   line: { type: integer },
+   description: { type: string },
+   tags: {
+   type: nested,
+   properties: {
+   name: { type: string, index: 
not_analyzed },
+   line: { type: integer }
+   }
+   },
+   type: { type: string, index: not_analyzed },
+   steps: {
+   type: nested,
+   properties: {
+   keyword: { type: string },
+   name: { type: string },
+   line: { type: integer },
+   match.arguments.offset: { type: 
integer, index: no },
+   match.arguments.val: { type: 
string, index: no },
+   match.location: { type: string, 
index: not_analyzed },
+   result.status: { type: string, 
index: not_analyzed },
+   result.duration: { type: long }
+   }
+   }
+   result.status: { type: string, index: 
not_analyzed },
+   result.duration: { type: long }
+   }
+   }
+}
diff --git a/db/mappings/feature.json b/db/mappings/feature.json
new file mode 100644
index 000..722a9cb
--- /dev/null
+++ b/db/mappings/feature.json
@@ -0,0 +1,22 @@
+{
+   feature: {
+   _parent: { type: build },
+   properties: {
+   keyword: { type: string },
+   name: { type: string },
+   line: { type: integer },
+   description: { type: string },
+   tags: {
+   type: nested,
+   properties: {
+   name: { type: string, index: 
not_analyzed },
+   line: { type: integer }
+   }
+   },
+   id: { type: string, index: not_analyzed },
+   uri: { type: string, index: not_analyzed },
+   result.status: { type: string, index: 
not_analyzed },
+   result.duration: { type: long }
+   }
+   }
+}
diff --git a/src/pl-build-features.tag b/src/pl-build-features.tag
index 71a4e86..20de155 100644
--- a/src/pl-build-features.tag
+++ b/src/pl-build-features.tag
@@ -1,5 +1,15 @@
 pl-build-features
div class=list-group
-   pl-feature each={ features } 
class=list-group-item/pl-feature
+   pl-feature each={ nonEmptyFeatures() } 
class=list-group-item/pl-feature
/div
+
+   script
+

[MediaWiki-commits] [Gerrit] Defines some fixtures for testing - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Defines some fixtures for testing
..


Defines some fixtures for testing

Change-Id: Ib2be3e48011d4eaf7800b505ba663177e51b90b3
---
A test/fixtures/feature1.json
A test/fixtures/feature2.json
A test/fixtures/feature3.json
3 files changed, 744 insertions(+), 0 deletions(-)

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



diff --git a/test/fixtures/feature1.json b/test/fixtures/feature1.json
new file mode 100644
index 000..0a979a5
--- /dev/null
+++ b/test/fixtures/feature1.json
@@ -0,0 +1,141 @@
+{
+  keyword: Feature,
+  name: VisualEditor Links,
+  line: 2,
+  description: ,
+  tags: [
+{ name: @en.wikipedia.beta.wmflabs.org, line: 1 },
+{ name: @internet_explorer_10, line: 1 },
+{ name: @login, line: 1 },
+{ name: @test2.wikipedia.org, line: 1 }
+  ],
+  id: visualeditor-links,
+  uri: features/links.feature,
+  elements: [
+{
+  keyword: Background,
+  name: ,
+  line: 4,
+  description: ,
+  type: background,
+  steps: [
+{
+  keyword: Given ,
+  name: I go to the \Links VisualEditor Test\ page with content 
\Links VisualEditor Test\,
+  line: 5,
+  match: {
+arguments: [
+  { offset: 13, val: Links VisualEditor Test },
+  { offset: 57, val: Links VisualEditor Test }
+],
+location: features/step_definitions/shared_steps.rb:17
+  },
+  result: { status: passed, duration: 36398509000 }
+},
+{
+  keyword: And ,
+  name: I click in the editable part,
+  line: 6,
+  match: { location: features/step_definitions/shared_steps.rb:6 
},
+  result: { status: passed, duration: 1228741000 }
+},
+{
+  keyword: And ,
+  name: I click the Link button,
+  line: 7,
+  match: { location: features/step_definitions/links_steps.rb:9 
},
+  result: { status: passed, duration: 1342402000 }
+},
+{
+  keyword: And ,
+  name: I can see the Link User Inteface,
+  line: 8,
+  match: { location: features/step_definitions/links_steps.rb:1 
},
+  result: { status: passed, duration: 772573000 }
+}
+  ]
+},
+{
+  keyword: Scenario,
+  name: Enter external link,
+  line: 10,
+  description: ,
+  id: visualeditor-links;enter-external-link,
+  type: scenario,
+  steps: [
+{
+  keyword: Given ,
+  name: I go to the \Links VisualEditor Test\ page with content 
\Links VisualEditor Test\,
+  line: 5,
+  match: {
+arguments: [
+  { offset: 13, val: Links VisualEditor Test },
+  { offset: 57, val: Links VisualEditor Test }
+],
+location: features/step_definitions/shared_steps.rb:17
+  },
+  result: { status: passed, duration: 262000 }
+},
+{
+  keyword: And ,
+  name: I click in the editable part,
+  line: 6,
+  match: { location: features/step_definitions/shared_steps.rb:6 
},
+  result: { status: passed, duration: 192000 }
+},
+{
+  keyword: And ,
+  name: I click the Link button,
+  line: 7,
+  match: { location: features/step_definitions/links_steps.rb:9 
},
+  result: { status: passed, duration: 188000 }
+},
+{
+  keyword: And ,
+  name: I can see the Link User Inteface,
+  line: 8,
+  match: { location: features/step_definitions/links_steps.rb:1 
},
+  result: { status: passed, duration: 44 }
+},
+{
+  keyword: When ,
+  name: I enter external link http://www.example.com into link 
Content box,
+  line: 11,
+  match: {
+arguments: [{ offset: 22, val: http://www.example.com; }],
+location: features/step_definitions/links_steps.rb:13
+  },
+  result: { status: passed, duration: 17927988000 }
+},
+{
+  keyword: And ,
+  name: I click Done to close Link User Interface,
+  line: 12,
+  match: { location: features/step_definitions/links_steps.rb:5 
},
+  result: { status: passed, duration: 1003999 }
+},
+{
+  keyword: And ,
+  name: I click Save page,
+  line: 13,
+  match: { location: 
features/step_definitions/shared_steps.rb:49 },
+  result: { status: passed, duration: 120 }
+},
+{
+  keyword: And ,
+  name: I click Review your changes,
+  line: 14,
+  match: { location: 
features/step_definitions/shared_steps.rb:45 },
+  result: { status: passed, duration: 979000 }
+},
+ 

[MediaWiki-commits] [Gerrit] Omit background steps from scenarios - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Omit background steps from scenarios
..


Omit background steps from scenarios

Change-Id: I4b0a86e791e78d8f22f36862ee167cffb9ba1b71
---
M src/pl-element.tag
M src/pl-feature.tag
2 files changed, 29 insertions(+), 10 deletions(-)

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



diff --git a/src/pl-element.tag b/src/pl-element.tag
index 74b0c90..9986bd1 100644
--- a/src/pl-element.tag
+++ b/src/pl-element.tag
@@ -3,16 +3,15 @@
pspan class=label label-{ statuses[status] }{ status }/span/p
 
div class=steps list-group
-   pl-step each={ steps }
+   pl-step each={ nonBackgroundSteps() }
class=list-group-item list-group-item-{ 
parent.statuses[result.status] }/pl-step
/div
 
script
-   this.statuses = {
-   'passed': 'success',
-   'skipped': 'warning',
-   'failed': 'danger'
-   };
+   var self = this;
+
+   self.background = opts.background;
+   self.statuses = { 'passed': 'success', 'skipped': 'warning', 
'failed': 'danger' };
 
function statusOf(steps) {
for (var i = 0; i  steps.length; i++) {
@@ -26,9 +25,17 @@
return 'passed';
};
 
-   this.on('update', function () {
-   if (this.steps) {
-   this.status = statusOf(this.steps);
+   self.nonBackgroundSteps = function () {
+   if (self.type === 'background' || !self.background) {
+   return self.steps;
+   } else {
+   return 
self.steps.slice(self.background.steps.length);
+   }
+   };
+
+   self.on('update', function () {
+   if (self.steps) {
+   self.status = statusOf(self.steps);
}
});
/script
diff --git a/src/pl-feature.tag b/src/pl-feature.tag
index 90daf59..3c3a7d8 100644
--- a/src/pl-feature.tag
+++ b/src/pl-feature.tag
@@ -1,6 +1,18 @@
 pl-feature
h4 class=list-group-item-headingspan class=keyword{ keyword 
}/span: { name }/h4
div class=scenarios list-group
-   pl-element each={ elements } 
class=list-group-item/pl-element
+   pl-element each={ elements } background={ parent.background } 
class=list-group-item/pl-element
/div
+
+   script
+   var self = this;
+
+   self.elements = [];
+
+   self.on('update', function () {
+   if (self.elements.length  0  self.elements[0].type 
=== 'background') {
+   self.background = self.elements[0];
+   }
+   });
+   /script
 /pl-feature

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b0a86e791e78d8f22f36862ee167cffb9ba1b71
Gerrit-PatchSet: 1
Gerrit-Project: integration/raita
Gerrit-Branch: master
Gerrit-Owner: Dduvall dduv...@wikimedia.org
Gerrit-Reviewer: Dduvall dduv...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Updated test configuration - change (wikidata...rdf)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Updated test configuration
..


Updated test configuration

A couple of testing configuration changes in maven:
1. Correctly output reports for both unit and integration tests.
2. Fork multiple JVMs to run unit tests in parallel. Integration tests
can't because they share resources.
3. Upgrade the junit4 maven plugin. It now provides a progress indicator
that looks like:
[14:40:39.470] Completed [1/2] on J1 in 0.94s, 5 tests

Change-Id: If0acab3ea0d4a1c0373c80268aecff8c1b70c5fd
---
M .gitignore
M pom.xml
2 files changed, 31 insertions(+), 3 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 7e54b9b..1be1555 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 *.iml
 .idea
 **/rules.log
+.execution-hints-*.log
diff --git a/pom.xml b/pom.xml
index 10c2ecf..c94e5c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,7 +132,7 @@
 plugin
   groupIdcom.carrotsearch.randomizedtesting/groupId
   artifactIdjunit4-maven-plugin/artifactId
-  version2.1.2/version
+  version2.1.13/version
   configuration
 heartbeat20/heartbeat
 jvmOutputActionpipe,warn/jvmOutputAction
@@ -140,6 +140,7 @@
 assertions
   enable /
 /assertions
+seed${tests.seed}/seed
 jvmArgs
   param-Xmx512m/param
 /jvmArgs
@@ -158,6 +159,24 @@
 excludes
   exclude**/*IntegrationTest.class/exclude
 /excludes
+!-- Use as many JVMs as the test runner wants to use. --
+parallelismauto/parallelism
+!-- The listeners and balancers elements do three things:
+  1. Control how output is formatted during tests
+  2. Dump the report to the right spot
+  3. Log an execution-hints file that is used to balance the 
load when tests are forked.  --
+listeners
+  report-ant-xml mavenExtensions=true 
dir=${project.build.directory}/surefire-reports /
+  report-text showThrowable=true showStackTraces=true 
showOutput=onerror
+showStatusOk=false showStatusError=true 
showStatusFailure=true showStatusIgnored=true
+showSuiteSummary=true timestamps=true /
+  report-execution-times historyLength=20 
file=${basedir}/.execution-hints-${project.version}.log /
+/listeners
+balancers
+  execution-times
+fileset dir=${basedir} 
includes=${basedir}/.execution-hints-${project.version}.log/
+  /execution-times
+/balancers
   /configuration
 /execution
 execution
@@ -173,6 +192,14 @@
 excludes
   exclude**/*UnitTest.class/exclude
 /excludes
+!-- Use only a single JVM so we don't interfere with 
ourselves. --
+parallelism1/parallelism
+listeners
+  report-ant-xml mavenExtensions=true 
dir=${project.build.directory}/failsafe-reports /
+  report-text showThrowable=true showStackTraces=true 
showOutput=onerror
+showStatusOk=false showStatusError=true 
showStatusFailure=true showStatusIgnored=true
+showSuiteSummary=true timestamps=true /
+/listeners
   /configuration
 /execution
   /executions
@@ -282,13 +309,13 @@
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
-  version4.11/version
+  version4.12/version
   scopetest/scope
 /dependency
 dependency
   groupIdcom.carrotsearch.randomizedtesting/groupId
   artifactIdrandomizedtesting-runner/artifactId
-  version2.1.10/version
+  version2.1.13/version
   scopetest/scope
 /dependency
 dependency

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0acab3ea0d4a1c0373c80268aecff8c1b70c5fd
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Jdouglas jdoug...@wikimedia.org
Gerrit-Reviewer: Smalyshev smalys...@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] Hover on the post action menu instead of clicking on it - change (mediawiki...Flow)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hover on the post action menu instead of clicking on it
..


Hover on the post action menu instead of clicking on it

Bug: T94153
Change-Id: I6d004001af2f37d82169c585f4b23adcca7ad7d7
---
M tests/browser/features/action_menu_permalink.feature
M tests/browser/features/flow_logged_in.feature
M tests/browser/features/lock_unlock_topics.feature
M tests/browser/features/moderation.feature
M tests/browser/features/step_definitions/flow_steps.rb
M tests/browser/features/step_definitions/lock_unlock_topics_steps.rb
6 files changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/tests/browser/features/action_menu_permalink.feature 
b/tests/browser/features/action_menu_permalink.feature
index 00a4085..cdeac63 100644
--- a/tests/browser/features/action_menu_permalink.feature
+++ b/tests/browser/features/action_menu_permalink.feature
@@ -7,7 +7,7 @@
 
   Scenario: Topic Actions menu Permalink
 Given I have created a Flow topic with title Permalinktest
-When I click the Topic Actions link
+When I hover on the Topic Actions link
   And I click Permalink from the Actions menu
   And I am viewing Topic page
 Then I see only one topic on the page
diff --git a/tests/browser/features/flow_logged_in.feature 
b/tests/browser/features/flow_logged_in.feature
index 38580fc..73e9d00 100644
--- a/tests/browser/features/flow_logged_in.feature
+++ b/tests/browser/features/flow_logged_in.feature
@@ -27,7 +27,7 @@
   And I should see a Suppress button
 
   Scenario: Topic Actions
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 Then I should see a Hide topic button
   And I should see a Delete topic button
   And I should see a Suppress topic button
diff --git a/tests/browser/features/lock_unlock_topics.feature 
b/tests/browser/features/lock_unlock_topics.feature
index 062c304..83ab1a4 100644
--- a/tests/browser/features/lock_unlock_topics.feature
+++ b/tests/browser/features/lock_unlock_topics.feature
@@ -17,7 +17,7 @@
   Scenario: Locking a topic and then changing your mind
 Given I am on Flow page
 And I have created a Flow topic
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 And I click the Lock topic button
 And I cancel the lock/unlock topic form
 Then the top post should be an open discussion
@@ -27,7 +27,7 @@
   Scenario: Locking a topic
 Given I am on Flow page
 And I have created a Flow topic
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 And I click the Lock topic button
 And I type This is a bikeshed as the reason
 And I submit the lock/unlock topic form
@@ -40,7 +40,7 @@
 Given I am on Flow page
 And I have created a Flow topic
 And the top post has been locked
-And I click the Topic Actions link
+And I hover on the Topic Actions link
 And I click the Unlock topic button
 When I type Fun discussion as the reason
 And I submit the lock/unlock topic form
diff --git a/tests/browser/features/moderation.feature 
b/tests/browser/features/moderation.feature
index 3fa1441..7718e1a 100644
--- a/tests/browser/features/moderation.feature
+++ b/tests/browser/features/moderation.feature
@@ -9,7 +9,7 @@
 
   Scenario: Deleting a topic
 Given I have created a Flow topic with title Deletemeifyoudare
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 And I click the Delete topic button
 And I see a dialog box
 And I give reason for deletion as being He's a naughty boy
@@ -18,7 +18,7 @@
 
   Scenario: Suppressing a topic
 Given I have created a Flow topic with title Suppressmeifyoudare
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 And I click the Suppress topic button
 And I see a dialog box
 And I give reason for suppression as being Quelling the peasants
@@ -27,7 +27,7 @@
 
   Scenario: Cancelling a dialog without text
 Given I have created a Flow topic with title Testing cancel deletion of 
topic
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 And I click the Delete topic button
 And I see a dialog box
 And I cancel the dialog
@@ -35,7 +35,7 @@
 
   Scenario: Cancelling a dialog with text
 Given I have created a Flow topic with title Testing cancel deletion of 
topic
-When I click the Topic Actions link
+When I hover on the Topic Actions link
 And I click the Delete topic button
 And I see a dialog box
 And I give reason for suppression as being About to change my mind
diff --git 

[MediaWiki-commits] [Gerrit] The title can be null for internal API requests. - change (mediawiki...WikimediaEvents)

2015-04-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: The title can be null for internal API requests.
..

The title can be null for internal API requests.

See also T92875#1233108 re external API requests.

Fixes T97104

Bug: T97104
Bug: T92875
Change-Id: Iea401983ed7e5202cccb4b9c0bc18b2803d1f386
(cherry picked from commit 1c9e4c78d814bf9eeb7306ce54ce3f5e655ff492)
---
M WikimediaEventsHooks.php
1 file changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 5d02356..e777996 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -40,10 +40,12 @@
 */
public static function onXAnalyticsHeader( $out, $headerItems ) {
$title = $out-getTitle();
-   $pageId = $title-getArticleId();
-   if ( is_int( $pageId )  $pageId  0 ) {
-   $headerItems['page_id'] = $pageId;
-   $headerItems['ns'] = $title-getNamespace();
+   if ( $title !== null ) {
+   $pageId = $title-getArticleId();
+   if ( is_int( $pageId )  $pageId  0 ) {
+   $headerItems['page_id'] = $pageId;
+   $headerItems['ns'] = $title-getNamespace();
+   }
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea401983ed7e5202cccb4b9c0bc18b2803d1f386
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Converted FileBackendStore caching to WANObjectCache - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Converted FileBackendStore caching to WANObjectCache
..

Converted FileBackendStore caching to WANObjectCache

Change-Id: I76efb0dc45a697c5fdfc50932e1198a6d663a445
---
M includes/filebackend/FileBackendGroup.php
M includes/filebackend/FileBackendStore.php
M includes/filebackend/SwiftFileBackend.php
M includes/libs/objectcache/WANObjectCache.php
4 files changed, 26 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/206958/1

diff --git a/includes/filebackend/FileBackendGroup.php 
b/includes/filebackend/FileBackendGroup.php
index 1b88db7..e8d8f9e 100644
--- a/includes/filebackend/FileBackendGroup.php
+++ b/includes/filebackend/FileBackendGroup.php
@@ -145,6 +145,8 @@
 * @throws FileBackendException
 */
public function get( $name ) {
+   global $wgMainWANCache;
+
if ( !isset( $this-backends[$name] ) ) {
throw new FileBackendException( No backend defined 
with the name `$name`. );
}
@@ -160,6 +162,8 @@
$config['fileJournal'] = isset( $config['fileJournal'] )
? FileJournal::factory( $config['fileJournal'], 
$name )
: FileJournal::factory( array( 'class' = 
'NullFileJournal' ), $name );
+   $config['wanCache'] = ObjectCache::getWANInstance( 
$wgMainWANCache );
+
$this-backends[$name]['instance'] = new $class( 
$config );
}
 
diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index 25e87d4..9f147f0 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -36,7 +36,7 @@
  * @since 1.19
  */
 abstract class FileBackendStore extends FileBackend {
-   /** @var BagOStuff */
+   /** @var WANObjectCache */
protected $memCache;
/** @var ProcessCacheLRU Map of paths to small (RAM/disk) cache items */
protected $cheapCache;
@@ -58,6 +58,7 @@
/**
 * @see FileBackend::__construct()
 * Additional $config params include:
+*   - wanCache : WANOBjectCache object to use for persistent 
caching.
 *   - mimeCallback : Callback that takes (storage path, content, file 
system path) and
 *returns the MIME type of the file or 
'unknown/unknown'. The file
 *system path parameter should be used if the 
content one is null.
@@ -72,7 +73,7 @@
// @todo handle the case of extension-less 
files using the contents
return StreamFile::contentTypeFromPath( 
$storagePath ) ?: 'unknown/unknown';
};
-   $this-memCache = new EmptyBagOStuff(); // disabled by default
+   $this-memCache = WANObjectCache::newEmpty(); // disabled by 
default
$this-cheapCache = new ProcessCacheLRU( self::CACHE_CHEAP_SIZE 
);
$this-expensiveCache = new ProcessCacheLRU( 
self::CACHE_EXPENSIVE_SIZE );
}
@@ -1592,7 +1593,7 @@
 * @param array $val Information to cache
 */
final protected function setContainerCache( $container, array $val ) {
-   $this-memCache-add( $this-containerCacheKey( $container ), 
$val, 14 * 86400 );
+   $this-memCache-set( $this-containerCacheKey( $container ), 
$val, 14 * 86400 );
}
 
/**
@@ -1602,7 +1603,7 @@
 * @param string $container Resolved container name
 */
final protected function deleteContainerCache( $container ) {
-   if ( !$this-memCache-set( $this-containerCacheKey( 
$container ), 'PURGED', 300 ) ) {
+   if ( !$this-memCache-delete( $this-containerCacheKey( 
$container ), 300 ) ) {
trigger_error( Unable to delete stat cache for 
container $container. );
}
}
@@ -1682,21 +1683,8 @@
$age = time() - wfTimestamp( TS_UNIX, $val['mtime'] );
$ttl = min( 7 * 86400, max( 300, floor( .1 * $age ) ) );
$key = $this-fileCacheKey( $path );
-   // Set the cache unless it is currently salted with the value 
PURGED.
-   // Using add() handles this except it also is a no-op in that 
case where
-   // the current value is not latest but $val is, so use CAS in 
that case.
-   if ( !$this-memCache-add( $key, $val, $ttl )  !empty( 
$val['latest'] ) ) {
-   $this-memCache-merge(
-   $key,
-   function ( BagOStuff $cache, $key, $cValue ) 
use ( $val ) {
-   

[MediaWiki-commits] [Gerrit] The title can be null for internal API requests. - change (mediawiki...WikimediaEvents)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: The title can be null for internal API requests.
..


The title can be null for internal API requests.

See also T92875#1233108 re external API requests.

Fixes T97104

Bug: T97104
Bug: T92875
Change-Id: Iea401983ed7e5202cccb4b9c0bc18b2803d1f386
(cherry picked from commit 1c9e4c78d814bf9eeb7306ce54ce3f5e655ff492)
---
M WikimediaEventsHooks.php
1 file changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 5d02356..e777996 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -40,10 +40,12 @@
 */
public static function onXAnalyticsHeader( $out, $headerItems ) {
$title = $out-getTitle();
-   $pageId = $title-getArticleId();
-   if ( is_int( $pageId )  $pageId  0 ) {
-   $headerItems['page_id'] = $pageId;
-   $headerItems['ns'] = $title-getNamespace();
+   if ( $title !== null ) {
+   $pageId = $title-getArticleId();
+   if ( is_int( $pageId )  $pageId  0 ) {
+   $headerItems['page_id'] = $pageId;
+   $headerItems['ns'] = $title-getNamespace();
+   }
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea401983ed7e5202cccb4b9c0bc18b2803d1f386
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Preferences: Use case-insensitive comparison for skin names - change (mediawiki/core)

2015-04-27 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: Preferences: Use case-insensitive comparison for skin names
..

Preferences: Use case-insensitive comparison for skin names

They are treated case-insensitively everywhere else.

Change-Id: I2561150aca9d88ad67ef359143f06d0ee90ab52e
---
M includes/Preferences.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/206971/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index 74a917d..9b0ada8 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -1098,7 +1098,7 @@
$linkTools = array();
 
# Mark the default skin
-   if ( $skinkey == $defaultSkin ) {
+   if ( strcasecmp( $skinkey, $defaultSkin ) === 0 ) {
$linkTools[] = $context-msg( 'default' 
)-escaped();
$foundDefault = true;
}

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

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

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


[MediaWiki-commits] [Gerrit] Fix when merging overlapping matches - change (search/highlighter)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix when merging overlapping matches
..


Fix when merging overlapping matches

If matches overlap we now extend the original match's end offset to make
sure that it includes the overlapping end offset.

We also add some documentation and tests around long regex matches.

Change-Id: I342d63cdcdcdaf2247dd15a618e6a834ee8e1c8a
---
M README.md
M 
experimental-highlighter-core/src/main/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapper.java
M 
experimental-highlighter-core/src/test/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapperTest.java
M 
experimental-highlighter-elasticsearch-plugin/src/test/java/org/wikimedia/highlighter/experimental/elasticsearch/integration/RegexTest.java
4 files changed, 42 insertions(+), 11 deletions(-)

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



diff --git a/README.md b/README.md
index 770c086..d36cb45 100644
--- a/README.md
+++ b/README.md
@@ -249,6 +249,7 @@
 }
   }
 ```
+If a regex match is wider than the allowed snippet size it won't be returned.
 
 The ```max_determinized_states``` option can be used to limit the complexity
 explosion that comes from compiling Lucene Regular Expressions into DFAs.  It
diff --git 
a/experimental-highlighter-core/src/main/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapper.java
 
b/experimental-highlighter-core/src/main/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapper.java
index d3737a4..981b7f5 100644
--- 
a/experimental-highlighter-core/src/main/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapper.java
+++ 
b/experimental-highlighter-core/src/main/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapper.java
@@ -1,12 +1,13 @@
 package org.wikimedia.search.highlighter.experimental.hit;
 
+import static java.lang.Math.max;
+
 import org.wikimedia.search.highlighter.experimental.HitEnum;
 
 /**
  * HitEnum that merges hits that are on top of one another according to start
- * and end offset. Always takes the maximum weight. Delegate must be in order 
of
- * offsets (startOffset first, endOffset second). Just keeps the first position
- * value.
+ * and end offset. Always takes the maximum weight and end offset. Delegate 
must
+ * be in order of offsets (startOffset first, endOffset second).
  */
 public class OverlapMergingHitEnumWrapper implements HitEnum {
 /**
@@ -54,11 +55,11 @@
 break;
 }
 // Merge overlapping hits
-endOffset = delegate.endOffset();
+endOffset = max(endOffset, delegate.endOffset());
 assert delegate.startOffset() = delegate.endOffset();
 assert startOffset = endOffset;
-queryWeight = Math.max(queryWeight, delegate.queryWeight());
-corpusWeight = Math.max(corpusWeight, delegate.corpusWeight());
+queryWeight = max(queryWeight, delegate.queryWeight());
+corpusWeight = max(corpusWeight, delegate.corpusWeight());
 /*
  * If both hits can't be traced back to the same source we declare
  * that they are from a new source by merging the hashes. This 
might
diff --git 
a/experimental-highlighter-core/src/test/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapperTest.java
 
b/experimental-highlighter-core/src/test/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapperTest.java
index d2e7bea..ac34109 100644
--- 
a/experimental-highlighter-core/src/test/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapperTest.java
+++ 
b/experimental-highlighter-core/src/test/java/org/wikimedia/search/highlighter/experimental/hit/OverlapMergingHitEnumWrapperTest.java
@@ -77,17 +77,17 @@
 }
 
 @Test
-public void overlapPicksMaxWeight() {
+public void overlapPicksMaxWeightAndSize() {
 ReplayingHitEnum replaying = new ReplayingHitEnum();
 // The first overlapping hit has corpus weight of 3
-replaying.record(0, 0, 2, 2, 3, 1);
+replaying.record(0, 0, 5, 2, 3, 1);
 // The second has query weight of 3
 replaying.record(0, 1, 3, 3, 2, 2);
 HitEnum e = new OverlapMergingHitEnumWrapper(replaying);
 assertThat(e, advances());
 assertThat(e, allOf(
 // So together they should have a multiplied weight of 9 (3*3)
-atWeight(9), atPosition(0), atStartOffset(0), atEndOffset(3), 
atSource(33)));
+atWeight(9), atPosition(0), atStartOffset(0), atEndOffset(5), 
atSource(33)));
 assertThat(e, isEmpty());
 }
 }
diff --git 

[MediaWiki-commits] [Gerrit] Change consumer logs to better report batch inserts - change (mediawiki...EventLogging)

2015-04-27 Thread Milimetric (Code Review)
Milimetric has submitted this change and it was merged.

Change subject: Change consumer logs to better report batch inserts
..


Change consumer logs to better report batch inserts

Bug: T96082
Change-Id: I64487f0dd8f7396c18b814ede744147779d8be46
---
M server/eventlogging/handlers.py
1 file changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/server/eventlogging/handlers.py b/server/eventlogging/handlers.py
index 2c40838..1e3a42f 100644
--- a/server/eventlogging/handlers.py
+++ b/server/eventlogging/handlers.py
@@ -112,11 +112,13 @@
 event = (yield)
 events.append(event)
 if len(events) = batchSize and not worker.ready.isSet():
-logger.debug('Queue is large, sending to child thread')
-last_timestamp = str(event.get('timestamp', None))
-logger.debug('Last event timestamp %s', last_timestamp)
+logger.debug('Queue is large (%d), sending to child thread',
+ len(events))
 for i in range(0, batchSize):
-eventsBatch.append(events.popleft())
+event_to_batch = events.popleft()
+eventsBatch.append(event_to_batch)
+last_timestamp = str(event_to_batch.get('timestamp', None))
+logger.debug('Last event timestamp: %s', last_timestamp)
 worker.ready.set()
 except GeneratorExit:
 # Allow the worker to complete any work that is

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64487f0dd8f7396c18b814ede744147779d8be46
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Mforns mfo...@wikimedia.org
Gerrit-Reviewer: Milimetric dandree...@wikimedia.org
Gerrit-Reviewer: Nuria nu...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] RT - Raise HSTS max-age to 1 year - change (operations/puppet)

2015-04-27 Thread Chmarkine (Code Review)
Chmarkine has uploaded a new change for review.

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

Change subject: RT - Raise HSTS max-age to 1 year
..

RT - Raise HSTS max-age to 1 year

I0d4d0afe enabled HSTS, which was merged one
week ago.

Bug: T40516
Change-Id: I120aed9fc9bd9decaa9de5fff90bff0b7cee432c
---
M manifests/role/requesttracker.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/role/requesttracker.pp b/manifests/role/requesttracker.pp
index 7dafbb8..7e7388f 100644
--- a/manifests/role/requesttracker.pp
+++ b/manifests/role/requesttracker.pp
@@ -6,7 +6,7 @@
 
 install_certificate { 'rt.wikimedia.org': }
 
-$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '7')
+$ssl_settings = ssl_ciphersuite('apache-2.2', 'compat', '365')
 
 class { '::requesttracker':
 apache_site = 'rt.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I120aed9fc9bd9decaa9de5fff90bff0b7cee432c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chmarkine chmark...@hotmail.com

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


[MediaWiki-commits] [Gerrit] Create missing board pages - change (mediawiki...Flow)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Create missing board pages
..


Create missing board pages

Bug: T95594
Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
(cherry picked from commit 4dd12e25cb96a651704dc6327df42c73c2daad7e)
---
M maintenance/FlowUpdateWorkflowPageId.php
1 file changed, 26 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/FlowUpdateWorkflowPageId.php 
b/maintenance/FlowUpdateWorkflowPageId.php
index 5056ecd..a4a61ac 100644
--- a/maintenance/FlowUpdateWorkflowPageId.php
+++ b/maintenance/FlowUpdateWorkflowPageId.php
@@ -2,6 +2,7 @@
 
 use Flow\Container;
 use Flow\Model\UUID;
+use Flow\OccupationController;
 
 $IP = getenv( 'MW_INSTALL_PATH' );
 if ( $IP === false ) {
@@ -43,7 +44,6 @@
'workflow_wiki' = wfWikiId(),
'workflow_page_id' = 0,
) );
-
 
$gen = new WorkflowPageIdUpdateGenerator( $wgLang );
$writer = new EchoBatchRowWriter( $dbw, 'flow_workflow', 
$wgFlowCluster );
@@ -87,7 +87,31 @@
) );
}
 
-   if ( $title-getArticleID() !== (int)$row-workflow_page_id ) {
+   // title doesn't exist, so create it
+   if ( $title-getArticleID() === 0 ) {
+   // build workflow object (yes, loading them piecemeal 
is suboptimal, but
+   // this is just a one-time script; considering the 
alternative is
+   // creating a derivative EchoBatchRowIterator that 
returns workflows,
+   // it doesn't really matter)
+   $storage = Container::get( 'storage' );
+   $workflow = $storage-get( 'Workflow', UUID::create( 
$row-workflow_id ) );
+
+   try {
+   /** @var OccupationController 
$occupationController */
+   $occupationController = Container::get( 
'occupation_controller' );
+   $occupationController-allowCreation( $title, 
$occupationController-getTalkpageManager() );
+   $occupationController-ensureFlowRevision( new 
Article( $title ), $workflow );
+
+   // force article id to be refetched from db
+   $title-getArticleID( Title::GAID_FOR_UPDATE );
+   } catch ( \Exception $e ) {
+   // catch all exception to keep going with the 
rest we want to
+   // iterate over, we'll report on the failed 
entries at the end
+   $this-failed[] = $row;
+   }
+   }
+
+   if ( $title-getArticleID() !== (int) $row-workflow_page_id ) {
// This makes the assumption the page has not moved or 
been deleted?
++$this-fixedCount;
return array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@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] Converted LocalRepo to using the WAN cache - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Converted LocalRepo to using the WAN cache
..

Converted LocalRepo to using the WAN cache

Bug: T91815
Change-Id: Ib806721e27cb00751f2fe579639d27076b7497ed
---
M includes/filerepo/LocalRepo.php
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/206968/1

diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index e7e4c75..591d684 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -170,7 +170,7 @@
 * @return bool|Title
 */
function checkRedirect( Title $title ) {
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
 
$title = File::normalizeTitle( $title, 'exception' );
 
@@ -181,7 +181,7 @@
} else {
$expiry = 86400; // has invalidation, 1 day
}
-   $cachedValue = $wgMemc-get( $memcKey );
+   $cachedValue = $cache-get( $memcKey );
if ( $cachedValue === ' ' || $cachedValue === '' ) {
// Does not exist
return false;
@@ -191,7 +191,7 @@
 
$id = $this-getArticleID( $title );
if ( !$id ) {
-   $wgMemc-add( $memcKey,  , $expiry );
+   $cache-set( $memcKey,  , $expiry );
 
return false;
}
@@ -205,11 +205,11 @@
 
if ( $row  $row-rd_namespace == NS_FILE ) {
$targetTitle = Title::makeTitle( $row-rd_namespace, 
$row-rd_title );
-   $wgMemc-add( $memcKey, $targetTitle-getDBkey(), 
$expiry );
+   $cache-set( $memcKey, $targetTitle-getDBkey(), 
$expiry );
 
return $targetTitle;
} else {
-   $wgMemc-add( $memcKey, '', $expiry );
+   $cache-set( $memcKey, '', $expiry );
 
return false;
}
@@ -489,14 +489,15 @@
 * @return void
 */
function invalidateImageRedirect( Title $title ) {
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
+
$memcKey = $this-getSharedCacheKey( 'image_redirect', md5( 
$title-getDBkey() ) );
if ( $memcKey ) {
// Set a temporary value for the cache key, to ensure
// that this value stays purged long enough so that
// it isn't refreshed with a stale value due to a
// lagged slave.
-   $wgMemc-set( $memcKey, ' PURGED', 12 );
+   $cache-delete( $memcKey, 12 );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib806721e27cb00751f2fe579639d27076b7497ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Refactor collection flag button to be an actual view - change (mediawiki...Gather)

2015-04-27 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Refactor collection flag button to be an actual view
..

Refactor collection flag button to be an actual view

Change-Id: I592cd0df9dfcf9bc2c5db4b62e461cbb6ddfe3e0
Dependency: Ib709ada5bd991b74e1c93eb3baa835653dc72dd6
---
M resources/Resources.php
A resources/ext.gather.collection.flag/CollectionFlagButton.js
M resources/ext.gather.special/init.js
M resources/ext.gather.styles/collections.less
4 files changed, 68 insertions(+), 36 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index 92dcb0a..8b9cade 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -322,6 +322,7 @@
),
'scripts' = array(
'ext.gather.collection.flag/CollectionFlagOverlay.js',
+   'ext.gather.collection.flag/CollectionFlagButton.js',
),
),
 
diff --git a/resources/ext.gather.collection.flag/CollectionFlagButton.js 
b/resources/ext.gather.collection.flag/CollectionFlagButton.js
new file mode 100644
index 000..9e25f21
--- /dev/null
+++ b/resources/ext.gather.collection.flag/CollectionFlagButton.js
@@ -0,0 +1,60 @@
+( function ( M ) {
+
+   var CollectionsApi = M.require( 'ext.gather.watchstar/CollectionsApi' ),
+   CollectionFlagOverlay = M.require( 
'ext.gather.flag/CollectionFlagOverlay' ),
+   Button = M.require( 'Button' ),
+   Icon = M.require( 'Icon' ),
+   api = new CollectionsApi(),
+   CollectionFlagButton;
+
+   /**
+* A wrapper for creating a button.
+* @class Button
+* @extends View
+*/
+   CollectionFlagButton = Button.extend( {
+   /** @inheritdoc */
+   defaults: {
+   tagName: 'div',
+   additionalClassNames: new Icon( {
+   name: 'collection-flag',
+   additionalClassNames: 'mw-ui-quiet'
+   } ).getClassName(),
+   title: mw.msg( 'gather-flag-collection-flag-label' )
+   },
+   events: {
+   'click': 'onCollectionFlagButtonClick'
+   },
+   /** @inheritdoc */
+   postRender: function () {
+   Button.prototype.postRender.apply( this, arguments );
+   this.$el.attr( 'title', this.options.title );
+   },
+   onCollectionFlagButtonClick: function ( ev ) {
+   var flagOverlay,
+   $flag = this.$el;
+   ev.stopPropagation();
+   ev.preventDefault();
+
+   if ( !$flag.hasClass( 'disabled' ) ) {
+   // Prevent multiple clicks
+   $flag.addClass( 'disabled' );
+   api.getCollection( this.options.collectionId 
).done( function ( collection ) {
+   flagOverlay = new 
CollectionFlagOverlay( {
+   collection: collection
+   } );
+   flagOverlay.show();
+   flagOverlay.on( 'collection-flagged', 
function () {
+   // After flagging, remove flag 
icon.
+   $flag.detach();
+   } );
+   flagOverlay.on( 'hide', function () {
+   $flag.removeClass( 'disabled' );
+   } );
+   } );
+   }
+   }
+   } );
+   M.define( 'ext.gather.flag/CollectionFlagButton', CollectionFlagButton 
);
+
+}( mw.mobileFrontend ) );
diff --git a/resources/ext.gather.special/init.js 
b/resources/ext.gather.special/init.js
index 2e2de29..1401b4c 100644
--- a/resources/ext.gather.special/init.js
+++ b/resources/ext.gather.special/init.js
@@ -1,45 +1,13 @@
 ( function ( M, $ ) {
 
-   var CollectionsApi = M.require( 'ext.gather.watchstar/CollectionsApi' ),
-   CollectionFlagOverlay = M.require( 
'ext.gather.flag/CollectionFlagOverlay' ),
-   Icon = M.require( 'Icon' ),
-   api = new CollectionsApi();
+   var CollectionFlagButton = M.require( 
'ext.gather.flag/CollectionFlagButton' );
 
$( function () {
-   var flagIcon, $flag,
-   $collection = $( '.collection' );
+   var $collection = $( 

[MediaWiki-commits] [Gerrit] Fix @return documentation in WANObjectCache::prefixCacheKeys() - change (mediawiki/core)

2015-04-27 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Fix @return documentation in WANObjectCache::prefixCacheKeys()
..

Fix @return documentation in WANObjectCache::prefixCacheKeys()

Change-Id: Iff27ad3b034b4702f329437950b69731de29171c
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/206886/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index 6e5cad6..be62d1a 100755
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -572,7 +572,7 @@
/**
 * @param array $keys
 * @param string $prefix
-* @return string
+* @return string[]
 */
protected static function prefixCacheKeys( array $keys, $prefix ) {
$res = array();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff27ad3b034b4702f329437950b69731de29171c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Fixed getLagTimes() locking - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Fixed getLagTimes() locking
..

Fixed getLagTimes() locking

* Previously it deleted the value it just cached due to a missing suffix,
  which would lead to connection spam to get the new lag values.

Change-Id: I1040b2b87d3d4ddd7c368291cab87daf4227c2d0
---
M includes/db/LoadMonitor.php
M includes/libs/objectcache/BagOStuff.php
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/206913/1

diff --git a/includes/db/LoadMonitor.php b/includes/db/LoadMonitor.php
index 91840dd..3d853cb 100644
--- a/includes/db/LoadMonitor.php
+++ b/includes/db/LoadMonitor.php
@@ -115,10 +115,10 @@
}
 
# Cache key missing or expired
-   if ( $cache-add( $memcKey:lock, 1, 10 ) ) {
+   if ( $cache-lock( $memcKey, 0, 10 ) ) {
# Let this process alone update the cache value
$unlocker = new ScopedCallback( function () use ( 
$cache, $memcKey ) {
-   $cache-delete( $memcKey );
+   $cache-unlock( $memcKey );
} );
} elseif ( is_array( $times ) ) {
# Could not acquire lock but an old cache exists, so 
use it
diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 5447ee7..a34b265 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -205,7 +205,7 @@
 
/**
 * @param string $key
-* @param int $timeout Lock wait timeout [optional]
+* @param int $timeout Lock wait timeout; 0 for non-blocking [optional]
 * @param int $expiry Lock expiry [optional]
 * @return bool Success
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1040b2b87d3d4ddd7c368291cab87daf4227c2d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Factor out getConfigPromise() method. - change (mediawiki...parsoid)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Factor out getConfigPromise() method.
..


Factor out getConfigPromise() method.

Use `Promise.method` to ensure that any synchronous exceptions thrown
(either intentionally or by programmer error) get turned into rejected
Promises.  This also lets us use synchronous return/throw in the body for
readability.  Using return/throw also makes the control flow clearer,
ensuring that future maintainers don't have to worry about multiple
assignment.

Change-Id: I4d7bf027b9cc09b24859f6cf9dae3290e6e2530f
---
M lib/mediawiki.parser.environment.js
1 file changed, 35 insertions(+), 34 deletions(-)

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



diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index c41d317..34326c7 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -278,45 +278,46 @@
var nothingToDo = {};  // unique marker value
var parsoid = env.conf.parsoid;
 
-   var getConfigPromise, uri;
-   if (!prefix) {
-   getConfigPromise = Promise.reject(new Error('Wiki prefix not 
provided'));
-   } else {
-   uri = parsoid.interwikiMap.get(prefix);
-   if (!uri) {
-   // SSS: Ugh! Looks like parser tests use a prefix
-   // that is not part of the interwikiMap -- so we
-   // cannot crash with an error.  Hence defaulting
-   // to enwiki api which is quite odd.  Does the
-   // interwikiMap need updating or is this use-case
-   // valid outside of parserTests??
-   env.log('error', 'Did not find api uri for ' +
-   prefix + '; defaulting to enwiki');
-   uri = parsoid.interwikiMap.get('enwiki');
-   }
-   parsoid.apiURI = uri;
-
-   if (env.confCache[prefix]) {
-   env.conf.wiki = env.confCache[prefix];
-   getConfigPromise = Promise.resolve(nothingToDo);
-   } else if (parsoid.fetchConfig) {
-   getConfigPromise = ConfigRequest
-   .promise(uri, env, env.getAPIProxy(prefix));
+   var uri;
+   var getConfigPromise = Promise.method(function() {
+   if (!prefix) {
+   throw new Error('Wiki prefix not provided');
} else {
-   // Load the config from cached config on disk
-   var localConfigFile = './baseconfig/' + prefix + 
'.json';
-   var localConfig = require(localConfigFile);
-   if (localConfig  localConfig.query) {
-   getConfigPromise = 
Promise.resolve(localConfig.query);
+   uri = parsoid.interwikiMap.get(prefix);
+   if (!uri) {
+   // SSS: Ugh! Looks like parser tests use a 
prefix
+   // that is not part of the interwikiMap -- so we
+   // cannot crash with an error.  Hence defaulting
+   // to enwiki api which is quite odd.  Does the
+   // interwikiMap need updating or is this 
use-case
+   // valid outside of parserTests??
+   env.log('error', 'Did not find api uri for ' +
+   prefix + '; defaulting to 
enwiki');
+   uri = parsoid.interwikiMap.get('enwiki');
+   }
+   parsoid.apiURI = uri;
+
+   if (env.confCache[prefix]) {
+   env.conf.wiki = env.confCache[prefix];
+   return nothingToDo;
+   } else if (parsoid.fetchConfig) {
+   return ConfigRequest
+   .promise(uri, env, 
env.getAPIProxy(prefix));
} else {
-   getConfigPromise = Promise.reject(
-   new Error('Could not read valid config 
from file: ' +
-localConfigFile));
+   // Load the config from cached config on disk
+   var localConfigFile = './baseconfig/' + prefix 
+ '.json';
+   var localConfig = require(localConfigFile);
+   if (localConfig  localConfig.query) {
+   return localConfig.query;
+   } else {
+   

[MediaWiki-commits] [Gerrit] Add mobile target for inputbox styles - change (mediawiki...InputBox)

2015-04-27 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Add mobile target for inputbox styles
..

Add mobile target for inputbox styles

It's small and useful (centered inputboxes should be centered in mobile, too).

Change-Id: I614fa4bfa8b0136beafe0ed15cba9931859526b5
---
M InputBox.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InputBox 
refs/changes/54/206954/1

diff --git a/InputBox.php b/InputBox.php
index d722cac..c49825d 100644
--- a/InputBox.php
+++ b/InputBox.php
@@ -57,6 +57,7 @@
 
 $wgResourceModules['ext.inputBox.styles'] = $resourcePaths + array(
'styles' = 'ext.inputBox.styles.css',
+   'targets' = array( 'mobile', 'desktop' ),
 );
 
 $wgResourceModules['ext.inputBox'] = $resourcePaths + array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I614fa4bfa8b0136beafe0ed15cba9931859526b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de

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


[MediaWiki-commits] [Gerrit] Add missing dependencies and update the documentation - change (analytics/limn-mobile-data)

2015-04-27 Thread Milimetric (Code Review)
Milimetric has submitted this change and it was merged.

Change subject: Add missing dependencies and update the documentation
..


Add missing dependencies and update the documentation

Bug: T75431
Bug: T75432
Change-Id: Id49aa922245bde162681407748e603f7fb3c4cd5
---
M README.md
M requirements.txt
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Milimetric: Looks good to me, approved



diff --git a/README.md b/README.md
index ca5dc85..85ca591 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
 be refactored out of here to be a generic thing that everyone doing EL - Limn
 can use
 
+Also see https://wikitech.wikimedia.org/wiki/Mobile_Reportcard
+
 ## Installing dependencies
 
 You will need [Limn](https://github.com/wikimedia/limn) itself.
diff --git a/requirements.txt b/requirements.txt
index 30f9421..7fce3bd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,5 @@
+distribute==0.7.3
+python-dateutil==2.2
 Jinja2==2.6
-MySQL-python==1.2.4
+MySQL-python==1.2.5
 PyYAML==3.10

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id49aa922245bde162681407748e603f7fb3c4cd5
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-mobile-data
Gerrit-Branch: master
Gerrit-Owner: Bmansurov bmansu...@wikimedia.org
Gerrit-Reviewer: Milimetric dandree...@wikimedia.org
Gerrit-Reviewer: Nuria nu...@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] Make it clearer collections are personal opinion - change (mediawiki...Gather)

2015-04-27 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Make it clearer collections are personal opinion
..

Make it clearer collections are personal opinion

Bug: T96931
Change-Id: Ife037b82b3f2fb04c951369388f81752c5ffa8d6
---
M i18n/en.json
M i18n/qqq.json
M includes/views/Collection.php
M resources/ext.gather.styles/collections.less
4 files changed, 11 insertions(+), 4 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 5fc205f..63ca958 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -55,6 +55,7 @@
gather-error-unknown-collection: Cannot find the requested 
collection to edit.,
gather-collection-member: Is member of collection.,
gather-collection-non-member: Is not member of collection.,
+   gather-collection-owner-text: A collection by $1,
gather-anon-cta: Add this page to a collection that you can share 
with the world.,
gather-create-new-button-label: Create,
gather-add-new-placeholder: Enter a new collection name,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 60702d0..1411a02 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -59,6 +59,7 @@
gather-error-unknown-collection: Error message test when you try to 
edit a collection you do not own or that does not exist.,
gather-collection-member: Alternative text displayed next to 
collection name when page is a member.,
gather-collection-non-member: Alternative text displayed next to 
collection name when page is not a member.,
+   gather-collection-owner-text: Informative message about who wrote 
the collection.\nParameters\n * $1 - the user that created the collection. Note 
this parameter is passed as a link with an icon.,
gather-anon-cta: Message that shows to anonymous users when they 
click the add to collection button.,
gather-create-new-button-label: Label for a button that is used to 
create a new collection.\n{{Identical|Create}},
gather-add-new-placeholder: Placeholder text for input field for new 
collection.,
diff --git a/includes/views/Collection.php b/includes/views/Collection.php
index 0f4de6f..cd56709 100644
--- a/includes/views/Collection.php
+++ b/includes/views/Collection.php
@@ -60,9 +60,9 @@
$html .= Html::element( 'div', array( 'class' = 
'collection-privacy' ), $privacyMsg );
}
$html .= Html::closeElement( 'div' ) .
+   $this-getOwnerHtml( $owner ) .
Html::element( 'h1', array( 'id' = 'section_0' ), 
$collection-getTitle() ) .
Html::element( 'div', array( 'class' = 
'collection-description' ), $description ) .
-   $this-getOwnerHtml( $owner ) .
$this-getActionButtonsHtml() .
Html::closeElement( 'div' );
 
@@ -76,15 +76,18 @@
 * @return string Html
 */
private function getOwnerHtml( $owner ) {
-   return Html::openElement( 'a', array(
+   $userIconLink = Html::openElement( 'a', array(
'href' = SpecialPage::getTitleFor( 'Gather' 
)-getSubPage( 'by' )-
-   getSubPage( $owner-getName() 
)-getLocalUrl(),
-   'class' = 'collection-owner',
+   getSubPage( $owner-getName() 
)-getLocalUrl(),
) ) .
Html::element( 'span', array(
'class' = CSS::iconClass( 'collection-owner', 
'before', 'collection-owner-icon' ) ) ) .
$owner-getName() .
Html::closeElement( 'a' );
+
+   return Html::openElement( 'div', array( 'class' = 
'collection-owner' ) )
+   . wfMessage( 'gather-collection-owner-text' 
)-rawParams( $userIconLink )-parse()
+   . Html::closeElement( 'div' );
}
 
/**
diff --git a/resources/ext.gather.styles/collections.less 
b/resources/ext.gather.styles/collections.less
index 5af3653..fbd83f0 100644
--- a/resources/ext.gather.styles/collections.less
+++ b/resources/ext.gather.styles/collections.less
@@ -78,6 +78,8 @@
}
 
.collection-owner {
+   margin-top: 1em;
+
.collection-owner-icon {
display: inline-block;
vertical-align: top;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife037b82b3f2fb04c951369388f81752c5ffa8d6
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Hack more language globals - change (mediawiki...DonationInterface)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hack more language globals
..


Hack more language globals

Also set the interface language, cos there is some
confusion between content language and interface language.

TODO: Stop using the language parameter, see T96621

Followup to @I15ed1b5

Bug: T94604
Change-Id: I26eb979b0e48bdf4a1e7ad0a3bc1a794a42d1c60
---
M gateway_common/GatewayPage.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 8b64ba4..98b046a 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -65,6 +65,8 @@
$language = $this-getRequest()-getVal( 'language' );
if ( $language ) {
RequestContext::getMain()-setLanguage( $language );
+   global $wgLang;
+   $wgLang = RequestContext::getMain()-getLanguage();
}
 
if( $wgContributionTrackingFundraiserMaintenance

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26eb979b0e48bdf4a1e7ad0a3bc1a794a42d1c60
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight awi...@wikimedia.org
Gerrit-Reviewer: AndyRussG andrew.green...@gmail.com
Gerrit-Reviewer: Awight awi...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Katie Horn kh...@wikimedia.org
Gerrit-Reviewer: Ssmith ssm...@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] Document various interesting SPARQL query examples - change (wikidata...rdf)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Document various interesting SPARQL query examples
..


Document various interesting SPARQL query examples

Fixes #T96693
Fixes #T96925

This starts a new document for collecting interesting and
demonstrative query examples.  The final entry is from a thread on
Wikidata[1] that shows the top most populous cities in the world
that currently have female mayors.

1. https://lists.wikimedia.org/pipermail/wikidata-l/2015-April/005852.html

Change-Id: Ie57fcf67ad69bfa6a9636b130e1d429c8d9234db
---
A docs/sparql-query-examples.md
1 file changed, 222 insertions(+), 0 deletions(-)

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



diff --git a/docs/sparql-query-examples.md b/docs/sparql-query-examples.md
new file mode 100644
index 000..74bda69
--- /dev/null
+++ b/docs/sparql-query-examples.md
@@ -0,0 +1,222 @@
+# SPARQL query examples
+
+## Who were Feynman's employers?
+
+* Feynman: [Q39246](https://www.wikidata.org/wiki/Q39246)
+* employer: [P108](https://www.wikidata.org/wiki/Property:P108)
+* Commons category (a.k.a. label): 
[P373](https://www.wikidata.org/wiki/Property:P373)
+
+```sparql
+PREFIX entity: http://www.wikidata.org/entity/
+PREFIX v:  http://www.wikidata.org/entity/value/
+PREFIX rdfs:   http://www.w3.org/2000/01/rdf-schema#
+
+SELECT ?employer WHERE {
+  entity:Q39246 entity:P108/v:P108/rdfs:label ?employer .
+} LIMIT 10
+```
+
+| employer   |
+| -- |
+| Cornell University |
+| California Institute of Technology |
+
+## Who are Feynman's colleagues?
+
+```sparql
+PREFIX entity: http://www.wikidata.org/entity/
+PREFIX v:  http://www.wikidata.org/entity/value/
+PREFIX rdfs:   http://www.w3.org/2000/01/rdf-schema#
+
+SELECT ?employer ?colleague WHERE {
+  entity:Q39246 entity:P108/v:P108 ?employerS .
+  ?colleagueS entity:P108/v:P108 ?employerS .
+  ?employerS rdfs:label ?employer .
+  ?colleagueS rdfs:label ?colleague .
+} LIMIT 10
+```
+
+| employer   | colleague|
+| -- |  |
+| California Institute of Technology | Eric Temple Bell |
+| California Institute of Technology | John Gamble Kirkwood |
+| California Institute of Technology | Joseph Grinnell  |
+| California Institute of Technology | Jesse L. Greenstein  |
+| California Institute of Technology | Charles C. Steidel   |
+| California Institute of Technology | Robert Bacher|
+| California Institute of Technology | Michael Aschbacher   |
+| California Institute of Technology | Gerald J. Wasserburg |
+| California Institute of Technology | H. Richard Crane |
+| California Institute of Technology | Steven E. Koonin |
+
+## What are the fields of Feynman's colleagues?
+
+* field of work: [P101](https://www.wikidata.org/wiki/Property:P101)
+
+```sparql
+PREFIX entity: http://www.wikidata.org/entity/
+PREFIX v:  http://www.wikidata.org/entity/value/
+PREFIX rdfs:   http://www.w3.org/2000/01/rdf-schema#
+
+SELECT ?colleague ?field WHERE {
+  entity:Q39246 entity:P108/v:P108 ?employerS .
+  ?colleagueS entity:P108/v:P108 ?employerS .
+  ?colleagueS entity:P101/v:P101/rdfs:label ?field .
+  ?colleagueS rdfs:label ?colleague .
+} LIMIT 10
+```
+
+| colleague  | field  |
+| -- | -- |
+| Carl Sagan | astrobiology   |
+| Harry Vandiver | number theory  |
+| James Ax   | model theory   |
+| Mark Kac   | probability theory |
+| Michael Aschbacher | group theory   |
+| Eric Temple Bell   | combinatorics  |
+| Sossina M. Haile   | Fuel cell  |
+| Paul Olum  | topology   |
+| Elfriede Abbe  | illustration   |
+| Rick Durrett   | probability theory |
+
+## What are the fields of Feynman's colleagues who are mathematicians?
+physicists?
+
+* occupation: [P106](https://www.wikidata.org/wiki/Property:P106)
+* physicist: [Q169470](https://www.wikidata.org/wiki/Q169470)
+
+```sparql
+PREFIX entity: http://www.wikidata.org/entity/
+PREFIX v:  http://www.wikidata.org/entity/value/
+PREFIX rdfs:   http://www.w3.org/2000/01/rdf-schema#
+
+SELECT ?colleague ?field WHERE {
+  entity:Q39246 entity:P108/v:P108 ?employerS .
+  ?colleagueS entity:P108/v:P108 ?employerS .
+  ?colleagueS entity:P106/v:P106 entity:Q170790 .
+  ?colleagueS entity:P101/v:P101/rdfs:label ?field .
+  ?colleagueS rdfs:label ?colleague .
+} LIMIT 10
+```
+| colleague| field |
+|  | - |
+| Virgil Snyder| algebraic geometry|
+| John H. Hubbard  | mathematical analysis |
+| William Thurston | topology  |
+| Karen Vogtmann   | topology  |
+| Daina Taimina| topology  |
+| Eugene Dynkin| algebra   

[MediaWiki-commits] [Gerrit] Avoid direct DatabaseSqlite constructor use in tests - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Avoid direct DatabaseSqlite constructor use in tests
..

Avoid direct DatabaseSqlite constructor use in tests

Change-Id: Iedbc68347836204cc031db15dfb2453577beaf02
---
M tests/phpunit/includes/db/DatabaseSqliteTest.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/tests/phpunit/includes/db/DatabaseSqliteTest.php 
b/tests/phpunit/includes/db/DatabaseSqliteTest.php
index 645baf1..287a6e9 100644
--- a/tests/phpunit/includes/db/DatabaseSqliteTest.php
+++ b/tests/phpunit/includes/db/DatabaseSqliteTest.php
@@ -1,12 +1,12 @@
 ?php
 
-class MockDatabaseSqlite extends DatabaseSqlite {
+class DatabaseSqliteMock extends DatabaseSqlite {
private $lastQuery;
 
public static function newInstance( array $p = array() ) {
$p['dbFilePath'] = ':memory:';
 
-   return new self( $p );
+   return DatabaseBase::factory( 'SqliteMock', $p );
}
 
function query( $sql, $fname = '', $tempIgnore = false ) {
@@ -29,7 +29,7 @@
  * @group medium
  */
 class DatabaseSqliteTest extends MediaWikiTestCase {
-   /** @var MockDatabaseSqlite */
+   /** @var DatabaseSqliteMock */
protected $db;
 
protected function setUp() {
@@ -38,7 +38,7 @@
if ( !Sqlite::isPresent() ) {
$this-markTestSkipped( 'No SQLite support detected' );
}
-   $this-db = MockDatabaseSqlite::newInstance();
+   $this-db = DatabaseSqliteMock::newInstance();
if ( version_compare( $this-db-getServerVersion(), '3.6.0', 
'' ) ) {
$this-markTestSkipped( SQLite at least 3.6 required, 
{$this-db-getServerVersion()} found );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedbc68347836204cc031db15dfb2453577beaf02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed transaction error while undeleting revdeleted files - change (mediawiki/core)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixed transaction error while undeleting revdeleted files
..


Fixed transaction error while undeleting revdeleted files

Bug: T97222
Change-Id: I16cdf228a517e93ac71ccda243b9e47b68ad7717
---
M includes/filerepo/LocalRepo.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index 926fd0b..e7e4c75 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -90,7 +90,7 @@
foreach ( $storageKeys as $key ) {
$hashPath = $this-getDeletedHashPath( $key );
$path = $root/$hashPath$key;
-   $dbw-begin( __METHOD__ );
+   $dbw-startAtomic( __METHOD__ );
// Check for usage in deleted/hidden files and 
preemptively
// lock the key to avoid any future use until we are 
finished.
$deleted = $this-deletedFileHasKey( $key, 'lock' );
@@ -106,7 +106,7 @@
wfDebug( __METHOD__ . : $key still in use\n );
$status-successCount++;
}
-   $dbw-commit( __METHOD__ );
+   $dbw-endAtomic( __METHOD__ );
}
 
return $status;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16cdf228a517e93ac71ccda243b9e47b68ad7717
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
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] Renamed application to Raita - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Renamed application to Raita
..


Renamed application to Raita

The name Platter sounded silly. Raita sounds slightly less so and goes
great with cucumbers. :)

Change-Id: I4da1d432e1be6da3a6fd7e559c35919d43d0b15f
---
M index.html
M package.json
D src/pl-dashboard.tag
R src/raita.js
R src/rt-build-features.tag
R src/rt-build-filter.tag
R src/rt-build-info.tag
R src/rt-builds.tag
A src/rt-dashboard.tag
R src/rt-element.tag
R src/rt-feature.tag
R src/rt-step.tag
12 files changed, 105 insertions(+), 105 deletions(-)

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



diff --git a/index.html b/index.html
index af07cfc..722bde7 100644
--- a/index.html
+++ b/index.html
@@ -20,8 +20,8 @@
script src=//code.jquery.com/jquery-1.11.2.min.js/script
script 
src=//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js/script
script src=node_modules/riot/riot.js/script
-   script src=src/platter.js/script
+   script src=src/raita.js/script
script src=build/tags.js/script
-   scriptPlatter.dashboard('#dashboard', '/db/builds');/script
+   scriptraita.dashboard('#dashboard', '/db/builds');/script
 /body
 /html
diff --git a/package.json b/package.json
index 9c20ff2..c32c7fd 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  name: platter,
+  name: raita,
   version: 0.0.0,
   description: Dashboard for Cucumber test results,
   scripts: {
diff --git a/src/pl-dashboard.tag b/src/pl-dashboard.tag
deleted file mode 100644
index 2926b5a..000
--- a/src/pl-dashboard.tag
+++ /dev/null
@@ -1,68 +0,0 @@
-pl-dashboard
-   pl-builds/pl-builds
-   pl-build-info/pl-build-info
-   pl-build-filter/pl-build-filter
-   pl-build-features/pl-build-features
-
-   script
-   var self = this,
-   dash = opts,
-   currentBuildId,
-   currentFeatures;
-
-   self.on('mount', function () {
-   dash.loadBuilds();
-
-   self.tags['pl-build-info'].on('pl:status-click', 
function (status) {
-   var filter = [ { status: status } ];
-
-   self.tags['pl-build-filter'].update({ filter: 
filter });
-   });
-
-   self.tags['pl-build-filter'].on('update', function () {
-   if (currentBuildId  
self.tags['pl-build-filter'].filter) {
-   dash.loadFeatures(currentBuildId, 
self.tags['pl-build-filter'].filter);
-   }
-   });
-   });
-
-   dash.subscribe(self, {
-   'load-build': function (id, build) {
-   currentBuildId = id;
-
-   // Updating the filter triggers a reload of 
features
-   // TODO this is confusing
-   self.tags['pl-build-filter'].update({ filter: 
[] });
-
-   self.tags['pl-build-info'].update({ buildId: 
id, buildNumber: build.build_number });
-   self.tags['pl-builds'].update({ currentBuildId: 
id });
-   },
-
-   'load-builds': function (builds) {
-   self.tags['pl-builds'].update({ builds: builds 
});
-   },
-
-   'load-build-features': function (buildId, features) {
-   currentFeatures = features;
-
-   dash.loadElements(
-   features.map(function (f) { return 
f._id; }),
-   self.tags['pl-build-filter'].filter
-   );
-   },
-
-   'load-build-features-elements': function (elements) {
-   for (var fid in elements) {
-   for (var i = 0; i  
currentFeatures.length; i++) {
-   if (currentFeatures[i]._id === 
fid) {
-   
currentFeatures[i].elements = elements[fid];
-   }
-   }
-   }
-
-   self.tags['pl-build-info'].update({ features: 
currentFeatures });
-   self.tags['pl-build-features'].update({ 
features: currentFeatures });
-   },
-   });
-   /script
-/pl-dashboard
diff --git a/src/platter.js b/src/raita.js
similarity index 91%
rename from src/platter.js
rename to src/raita.js
index 

[MediaWiki-commits] [Gerrit] Removed empty cache key from JobQueueDB for simplicity - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Removed empty cache key from JobQueueDB for simplicity
..

Removed empty cache key from JobQueueDB for simplicity

Bug: T88445
Change-Id: I74d3f8257c728f3ec5d223cf8ca5e2f93aceab13
---
M includes/jobqueue/JobQueueDB.php
1 file changed, 1 insertion(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/206953/1

diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index 320b1b1..b1b650b 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -29,7 +29,6 @@
  */
 class JobQueueDB extends JobQueue {
const CACHE_TTL_SHORT = 30; // integer; seconds to cache info without 
re-validating
-   const CACHE_TTL_LONG = 300; // integer; seconds to cache info that is 
kept up to date
const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once 
claimed
const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for 
job_random
const MAX_OFFSET = 255; // integer; maximum number of rows to skip
@@ -71,15 +70,6 @@
 * @return bool
 */
protected function doIsEmpty() {
-   $key = $this-getCacheKey( 'empty' );
-
-   $isEmpty = $this-cache-get( $key );
-   if ( $isEmpty === 'true' ) {
-   return true;
-   } elseif ( $isEmpty === 'false' ) {
-   return false;
-   }
-
$dbr = $this-getSlaveDB();
try {
$found = $dbr-selectField( // unclaimed job
@@ -88,7 +78,6 @@
} catch ( DBError $e ) {
$this-throwDBException( $e );
}
-   $this-cache-add( $key, $found ? 'false' : 'true', 
self::CACHE_TTL_LONG );
 
return !$found;
}
@@ -272,8 +261,6 @@
$dbw-commit( $method );
}
 
-   $this-cache-set( $this-getCacheKey( 'empty' ), 'false', 
JobQueueDB::CACHE_TTL_LONG );
-
return;
}
 
@@ -282,10 +269,6 @@
 * @return Job|bool
 */
protected function doPop() {
-   if ( $this-cache-get( $this-getCacheKey( 'empty' ) ) === 
'true' ) {
-   return false; // queue is empty
-   }
-
$dbw = $this-getMasterDB();
try {
$dbw-commit( __METHOD__, 'flush' ); // flush existing 
transaction
@@ -308,7 +291,6 @@
}
// Check if we found a row to reserve...
if ( !$row ) {
-   $this-cache-set( $this-getCacheKey( 
'empty' ), 'true', self::CACHE_TTL_LONG );
break; // nothing to do
}
JobQueue::incrStats( 'job-pop', $this-type );
@@ -569,7 +551,7 @@
 * @return void
 */
protected function doFlushCaches() {
-   foreach ( array( 'empty', 'size', 'acquiredcount' ) as $type ) {
+   foreach ( array( 'size', 'acquiredcount' ) as $type ) {
$this-cache-delete( $this-getCacheKey( $type ) );
}
}
@@ -680,8 +662,6 @@
$affected = $dbw-affectedRows();
$count += $affected;
JobQueue::incrStats( 'job-recycle', 
$this-type, $affected );
-   // The tasks recycled jobs or release 
delayed jobs into the queue
-   $this-cache-set( $this-getCacheKey( 
'empty' ), 'false', self::CACHE_TTL_LONG );
$this-aggr-notifyQueueNonEmpty( 
$this-wiki, $this-type );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74d3f8257c728f3ec5d223cf8ca5e2f93aceab13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] prevent storing article titles that fail to load in history - change (apps...wikipedia)

2015-04-27 Thread Bgerstle (Code Review)
Bgerstle has uploaded a new change for review.

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

Change subject: prevent storing article titles that fail to load in history
..

prevent storing article titles that fail to load in history

We optimistically store titles in the history list when they're
requested, but fail to remove them if that title fails to load.

Unit tests to follow in another patch (or amendment to this one, you
decide). Bit of a hacky solution, as this might be vulnerable to race
conditions causing the wrong title to be removed from the history list.

Bug: T95585
Change-Id: Icb8ca87023d983ffcafcef9e76600ab5ce37f4df
---
M MediaWikiKit/MediaWikiKit/MWKHistoryList.h
M MediaWikiKit/MediaWikiKit/MWKHistoryList.m
M Wikipedia/View Controllers/WebView/WebViewController.m
3 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/70/206970/1

diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.h 
b/MediaWikiKit/MediaWikiKit/MWKHistoryList.h
index 08b07ac..66a686e 100644
--- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.h
+++ b/MediaWikiKit/MediaWikiKit/MWKHistoryList.h
@@ -16,6 +16,7 @@
 @property (readonly) NSUInteger length;
 @property (readwrite) BOOL dirty;
 
+- (MWKHistoryEntry*)mostRecentEntry;
 - (MWKHistoryEntry*)entryAtIndex:(NSUInteger)index;
 - (MWKHistoryEntry*)entryForTitle:(MWKTitle*)title;
 
diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m 
b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m
index efad6f4..7ac6d68 100644
--- a/MediaWikiKit/MediaWikiKit/MWKHistoryList.m
+++ b/MediaWikiKit/MediaWikiKit/MWKHistoryList.m
@@ -17,6 +17,10 @@
 return [entries count];
 }
 
+- (MWKHistoryEntry*)mostRecentEntry {
+return [entries firstObject];
+}
+
 - (MWKHistoryEntry*)entryAtIndex:(NSUInteger)index {
 return entries[index];
 }
diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m 
b/Wikipedia/View Controllers/WebView/WebViewController.m
index 538e05e..5e8a542 100644
--- a/Wikipedia/View Controllers/WebView/WebViewController.m
+++ b/Wikipedia/View Controllers/WebView/WebViewController.m
@@ -1390,6 +1390,11 @@
 
 case FETCH_FINAL_STATUS_FAILED:
 {
+MWKHistoryEntry* lastEntry = 
session.userDataStore.historyList.mostRecentEntry;
+if ([lastEntry.title.prefixedText 
isEqualToString:article.title.prefixedText]) {
+[session.userDataStore.historyList removeEntry:lastEntry];
+[session.userDataStore save];
+}
 NSString* errorMsg = error.localizedDescription;
 [self showAlert:errorMsg type:ALERT_TYPE_TOP duration:-1];
 
@@ -1400,6 +1405,11 @@
 
 case FETCH_FINAL_STATUS_CANCELLED:
 {
+MWKHistoryEntry* lastEntry = 
session.userDataStore.historyList.mostRecentEntry;
+if ([lastEntry.title.prefixedText 
isEqualToString:article.title.prefixedText]) {
+[session.userDataStore.historyList removeEntry:lastEntry];
+[session.userDataStore save];
+}
 // Reminder: do not clear article data here or cancellation 
would blast last good saved article data!
 }
 break;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb8ca87023d983ffcafcef9e76600ab5ce37f4df
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Bgerstle bgers...@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] Converted sidebar cache to the WAN cache - change (mediawiki/core)

2015-04-27 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Converted sidebar cache to the WAN cache
..

Converted sidebar cache to the WAN cache

Bug: T91815
Change-Id: Id99f886c48501bbfef85cb0e7c5d2e2810a68581
---
M includes/cache/MessageCache.php
M includes/skins/Skin.php
2 files changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/206975/1

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index a55e25a..31ee487 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -554,10 +554,10 @@
$codes = array_keys( Language::fetchLanguageNames() );
}
 
-   global $wgMemc;
+   $cache = ObjectCache::getMainWANInstance();
foreach ( $codes as $code ) {
$sidebarKey = wfMemcKey( 'sidebar', $code );
-   $wgMemc-delete( $sidebarKey );
+   $cache-delete( $sidebarKey, 5 );
}
 
// Update the message in the message blob store
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index 07a2e87..6c5fbcd 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -1234,12 +1234,13 @@
 * @return array
 */
function buildSidebar() {
-   global $wgMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
+   global $wgEnableSidebarCache, $wgSidebarCacheExpiry;
 
+   $cache = ObjectCache::getMainWANInstance();
$key = wfMemcKey( 'sidebar', $this-getLanguage()-getCode() );
 
if ( $wgEnableSidebarCache ) {
-   $cachedsidebar = $wgMemc-get( $key );
+   $cachedsidebar = $cache-get( $key );
if ( $cachedsidebar ) {
Hooks::run( 'SidebarBeforeOutput', array( 
$this, $cachedsidebar ) );
 
@@ -1252,7 +1253,7 @@
 
Hooks::run( 'SkinBuildSidebar', array( $this, $bar ) );
if ( $wgEnableSidebarCache ) {
-   $wgMemc-set( $key, $bar, $wgSidebarCacheExpiry );
+   $cache-set( $key, $bar, $wgSidebarCacheExpiry );
}
 
Hooks::run( 'SidebarBeforeOutput', array( $this, $bar ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id99f886c48501bbfef85cb0e7c5d2e2810a68581
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Provide a vagrant role for the Citoid MediaWiki extension - change (mediawiki/vagrant)

2015-04-27 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Provide a vagrant role for the Citoid MediaWiki extension
..

Provide a vagrant role for the Citoid MediaWiki extension

Doesn't currently build a local Citoid or Zotero services, just uses
WMF's production one.

Change-Id: Ifae1128727a698feb162caf5b70a127c7c56a846
---
A puppet/modules/role/manifests/citoid.pp
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/36/206936/1

diff --git a/puppet/modules/role/manifests/citoid.pp 
b/puppet/modules/role/manifests/citoid.pp
new file mode 100644
index 000..5e005b7
--- /dev/null
+++ b/puppet/modules/role/manifests/citoid.pp
@@ -0,0 +1,13 @@
+# == Class: role::citoid
+# Configures Citoid, a MediaWiki extension which adds an auto-
+# filled citation tool to VisualEditor using the citoid service
+# (not installed by this mainfest).
+class role::citoid {
+   include ::role::visualeditor
+
+   mediawiki::extension { 'Citoid':
+   settings = {
+   wgCitoidServiceUrl = 'http://citoid.wikimedia.org/api'
+   }
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifae1128727a698feb162caf5b70a127c7c56a846
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Reinstall oxygen as Jessie and .eqiad.wmnet - change (operations/puppet)

2015-04-27 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Reinstall oxygen as Jessie and .eqiad.wmnet
..

Reinstall oxygen as Jessie and .eqiad.wmnet

Bug: T96616
Change-Id: I3db243eb5d13dbb401864790e6905411efc0b44c
---
M manifests/site.pp
M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/206950/1

diff --git a/manifests/site.pp b/manifests/site.pp
index b5e1e71..b02b8ce 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2017,8 +2017,8 @@
 include ::standard
 }
 
-# base_analytics_logging_node is defined in role/logging.pp
-node 'oxygen.wikimedia.org'
+
+node 'oxygen.eqiad.wmnet'
 {
 include standard
 }
diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
index 6693611..0888043 100644
--- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5529,7 +5529,9 @@
 
 host oxygen {
hardware ethernet 78:2b:cb:08:a0:e7;
-   fixed-address oxygen.wikimedia.org;
+   fixed-address oxygen.eqiad.wmnet;
+   option pxelinux.pathprefix jessie-installer/;
+   filename jessie-installer/debian-installer/amd64/pxelinux.0;
 }
 
 host palladium {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3db243eb5d13dbb401864790e6905411efc0b44c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow filtering features/scenarios by status or tag - change (integration/raita)

2015-04-27 Thread Dduvall (Code Review)
Dduvall has submitted this change and it was merged.

Change subject: Allow filtering features/scenarios by status or tag
..


Allow filtering features/scenarios by status or tag

Filtering of features is performed by compiling the user provided filter
string to an Elasticsearch bool filter. Filtering of scenarios is
performed client side.

Clicking the new status summary bar triggers a corresponding filter for
the selected status.

Change-Id: If63f0a3174dec1ce728b10e03428b2be64f7fd36
---
A src/pl-build-filter.tag
M src/pl-build-info.tag
M src/pl-dashboard.tag
M src/pl-element.tag
M src/platter.js
5 files changed, 271 insertions(+), 22 deletions(-)

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



diff --git a/src/pl-build-filter.tag b/src/pl-build-filter.tag
new file mode 100644
index 000..542db45
--- /dev/null
+++ b/src/pl-build-filter.tag
@@ -0,0 +1,51 @@
+pl-build-filter
+   form onsubmit={ submit }
+   div class=input-group
+   span class=input-group-addon glyphicon 
glyphicon-filter/span
+   input class=form-control type=text 
name=filterString value={ filterToString() }
+   placeholder=e.g. 'status:failed', 
'status:skipped', '@some-tag-name'
+   span class=input-group-btn
+   button class=btn btn-info 
type=submitUpdate/button
+   /span
+   /div
+   /form
+
+   script
+   var self = this;
+
+   self.filter = [];
+
+   function filterFromString(str) {
+   return str.split(/\s+/).map(function (item) {
+   var m, pair = {};
+
+   if (m = item.match(/^@(.+)$/)) {
+   pair.tag = m[1];
+   } else if (m = item.match(/^(status):(.+)$/)) {
+   pair[m[1]] = m[2];
+   }
+
+   return pair;
+   });
+   }
+
+   self.filterToString = function () {
+   return self.filter.map(function (pair) {
+   for (var k in pair) {
+   switch (k) {
+   case 'tag':
+   return '@' + pair[k];
+   default:
+   return k + ':' + 
pair[k];
+   }
+   }
+   })
+   .join(' ');
+   };
+
+   self.submit = function () {
+   self.filter = filterFromString(self.filterString.value);
+   self.trigger('pl:filter', self.filter);
+   };
+   /script
+/pl-build-filter
diff --git a/src/pl-build-info.tag b/src/pl-build-info.tag
index 34aa186..1159168 100644
--- a/src/pl-build-info.tag
+++ b/src/pl-build-info.tag
@@ -1,4 +1,77 @@
 pl-build-info
h2 if={ !buildId }Loading build.../h2
-   h2 if={ buildId }Build { buildNumber } ({ buildId })/h2
+   h2 if={ buildId }Build { buildNumber }/h2
+   div class=progress
+   a class=progress-bar progress-bar-striped progress-bar-danger
+   style=width: { stats.fail_rate }%
+   onclick={ failedClicked }
+   span class=label label-default if={ stats.failed  0 
}{ stats.failed } failed/span
+   /a
+   a
+   class=progress-bar progress-bar-striped 
progress-bar-warning
+   style=width: { stats.skip_rate }%
+   onclick={ skippedClicked }
+   span class=label label-default if={ stats.skipped  
0 }{ stats.skipped } skipped/span
+   /a
+   a class=progress-bar progress-bar-striped 
progress-bar-success
+   style=width: { stats.pass_rate }%
+   onclick={ passedClicked }
+   span class=label label-default  if={ stats.passed  
0 }{ stats.passed } passed/span
+   /a
+   /div
+
+   style
+   pl-build-info .label {
+   font-size: 100%;
+   background-color: rgba(119, 119, 119, 0.75);
+   }
+
+   pl-build-info a {
+   cursor: pointer;
+   }
+   /style
+
+   script
+   var self = this;
+
+   function recalculate() {
+   self.stats = { failed: 0, skipped: 0, passed: 0, 
fail_rate: 0, skip_rate: 0, passed_rate: 0 };
+
+   if (self.features) {
+ 

[MediaWiki-commits] [Gerrit] Create missing board pages - change (mediawiki...Flow)

2015-04-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Create missing board pages
..

Create missing board pages

Bug: T95594
Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
(cherry picked from commit 4dd12e25cb96a651704dc6327df42c73c2daad7e)
---
M maintenance/FlowUpdateWorkflowPageId.php
1 file changed, 26 insertions(+), 2 deletions(-)


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

diff --git a/maintenance/FlowUpdateWorkflowPageId.php 
b/maintenance/FlowUpdateWorkflowPageId.php
index 5056ecd..a4a61ac 100644
--- a/maintenance/FlowUpdateWorkflowPageId.php
+++ b/maintenance/FlowUpdateWorkflowPageId.php
@@ -2,6 +2,7 @@
 
 use Flow\Container;
 use Flow\Model\UUID;
+use Flow\OccupationController;
 
 $IP = getenv( 'MW_INSTALL_PATH' );
 if ( $IP === false ) {
@@ -43,7 +44,6 @@
'workflow_wiki' = wfWikiId(),
'workflow_page_id' = 0,
) );
-
 
$gen = new WorkflowPageIdUpdateGenerator( $wgLang );
$writer = new EchoBatchRowWriter( $dbw, 'flow_workflow', 
$wgFlowCluster );
@@ -87,7 +87,31 @@
) );
}
 
-   if ( $title-getArticleID() !== (int)$row-workflow_page_id ) {
+   // title doesn't exist, so create it
+   if ( $title-getArticleID() === 0 ) {
+   // build workflow object (yes, loading them piecemeal 
is suboptimal, but
+   // this is just a one-time script; considering the 
alternative is
+   // creating a derivative EchoBatchRowIterator that 
returns workflows,
+   // it doesn't really matter)
+   $storage = Container::get( 'storage' );
+   $workflow = $storage-get( 'Workflow', UUID::create( 
$row-workflow_id ) );
+
+   try {
+   /** @var OccupationController 
$occupationController */
+   $occupationController = Container::get( 
'occupation_controller' );
+   $occupationController-allowCreation( $title, 
$occupationController-getTalkpageManager() );
+   $occupationController-ensureFlowRevision( new 
Article( $title ), $workflow );
+
+   // force article id to be refetched from db
+   $title-getArticleID( Title::GAID_FOR_UPDATE );
+   } catch ( \Exception $e ) {
+   // catch all exception to keep going with the 
rest we want to
+   // iterate over, we'll report on the failed 
entries at the end
+   $this-failed[] = $row;
+   }
+   }
+
+   if ( $title-getArticleID() !== (int) $row-workflow_page_id ) {
// This makes the assumption the page has not moved or 
been deleted?
++$this-fixedCount;
return array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Create missing board pages - change (mediawiki...Flow)

2015-04-27 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Create missing board pages
..

Create missing board pages

Bug: T95594
Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
(cherry picked from commit 4dd12e25cb96a651704dc6327df42c73c2daad7e)
---
M maintenance/FlowUpdateWorkflowPageId.php
1 file changed, 26 insertions(+), 2 deletions(-)


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

diff --git a/maintenance/FlowUpdateWorkflowPageId.php 
b/maintenance/FlowUpdateWorkflowPageId.php
index 5056ecd..a4a61ac 100644
--- a/maintenance/FlowUpdateWorkflowPageId.php
+++ b/maintenance/FlowUpdateWorkflowPageId.php
@@ -2,6 +2,7 @@
 
 use Flow\Container;
 use Flow\Model\UUID;
+use Flow\OccupationController;
 
 $IP = getenv( 'MW_INSTALL_PATH' );
 if ( $IP === false ) {
@@ -43,7 +44,6 @@
'workflow_wiki' = wfWikiId(),
'workflow_page_id' = 0,
) );
-
 
$gen = new WorkflowPageIdUpdateGenerator( $wgLang );
$writer = new EchoBatchRowWriter( $dbw, 'flow_workflow', 
$wgFlowCluster );
@@ -87,7 +87,31 @@
) );
}
 
-   if ( $title-getArticleID() !== (int)$row-workflow_page_id ) {
+   // title doesn't exist, so create it
+   if ( $title-getArticleID() === 0 ) {
+   // build workflow object (yes, loading them piecemeal 
is suboptimal, but
+   // this is just a one-time script; considering the 
alternative is
+   // creating a derivative EchoBatchRowIterator that 
returns workflows,
+   // it doesn't really matter)
+   $storage = Container::get( 'storage' );
+   $workflow = $storage-get( 'Workflow', UUID::create( 
$row-workflow_id ) );
+
+   try {
+   /** @var OccupationController 
$occupationController */
+   $occupationController = Container::get( 
'occupation_controller' );
+   $occupationController-allowCreation( $title, 
$occupationController-getTalkpageManager() );
+   $occupationController-ensureFlowRevision( new 
Article( $title ), $workflow );
+
+   // force article id to be refetched from db
+   $title-getArticleID( Title::GAID_FOR_UPDATE );
+   } catch ( \Exception $e ) {
+   // catch all exception to keep going with the 
rest we want to
+   // iterate over, we'll report on the failed 
entries at the end
+   $this-failed[] = $row;
+   }
+   }
+
+   if ( $title-getArticleID() !== (int) $row-workflow_page_id ) {
// This makes the assumption the page has not moved or 
been deleted?
++$this-fixedCount;
return array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67ac1bc3def5cce143b7b08b5d4301fe741df09b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use block style YAML - change (labs...grrrit)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use block style YAML
..


Use block style YAML

See @I45cb9e963 for discussion and an limited example.  This style
saves on punctuation and is easier to read.

I've confirmed that the document contents are identical after this change.

Change-Id: I5de57f2cdf53bd1678b94be22eb6f5ce130cdbe5
---
M config.yaml
1 file changed, 133 insertions(+), 154 deletions(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/config.yaml b/config.yaml
index 80aaae2..99fb964 100644
--- a/config.yaml
+++ b/config.yaml
@@ -8,89 +8,81 @@
 L10n-bot
 Jenkins-mwext-sync
 channels:
-#mediawiki-i18n: {
-mediawiki/extensions/Babel,
-mediawiki/extensions/CLDR,
-mediawiki/extensions/ContentTranslation,
-mediawiki/extensions/Translate,
-mediawiki/extensions/TranslationNotifications,
-mediawiki/extensions/TwnMainPage,
-mediawiki/extensions/UniversalLanguageSelector,
-mediawiki/services/cxserver,
-mediawiki/services/cxserver/deploy,
-translatewiki.*
-}
-#mediawiki-parsoid: {
-mediawiki/services/parsoid,
-mediawiki/services/parsoid/deploy,
-mediawiki/services/parsoid/node_modules,
-mediawiki/extensions/Parsoid
-}
-#mediawiki-visualeditor: {
-mediawiki/extensions/Citoid,
-mediawiki/extensions/Math,
-mediawiki/extensions/TemplateData,
-mediawiki/extensions/VisualEditor,
-mediawiki/extensions/WikiEditor,
-unicodejs,
-VisualEditor/.*
-}
-#wikimedia-editing: {
-mediawiki/extensions/Cite$,
-mediawiki/extensions/CiteThisPage,
-mediawiki/extensions/CodeEditor,
-mediawiki/extensions/ParserFunctions,
-mediawiki/skins/apex,
-mediawiki/skins/Vector,
-oojs/.*,
+#mediawiki-i18n:
+mediawiki/extensions/Babel:
+mediawiki/extensions/CLDR:
+mediawiki/extensions/ContentTranslation:
+mediawiki/extensions/Translate:
+mediawiki/extensions/TranslationNotifications:
+mediawiki/extensions/TwnMainPage:
+mediawiki/extensions/UniversalLanguageSelector:
+mediawiki/services/cxserver:
+mediawiki/services/cxserver/deploy:
+translatewiki.*:
+#mediawiki-parsoid:
+mediawiki/services/parsoid:
+mediawiki/services/parsoid/deploy:
+mediawiki/services/parsoid/node_modules:
+mediawiki/extensions/Parsoid:
+#mediawiki-visualeditor:
+mediawiki/extensions/Citoid:
+mediawiki/extensions/Math:
+mediawiki/extensions/TemplateData:
+mediawiki/extensions/VisualEditor:
+mediawiki/extensions/WikiEditor:
+unicodejs:
+VisualEditor/.*:
+#wikimedia-editing:
+mediawiki/extensions/Cite$:
+mediawiki/extensions/CiteThisPage:
+mediawiki/extensions/CodeEditor:
+mediawiki/extensions/ParserFunctions:
+mediawiki/skins/apex:
+mediawiki/skins/Vector:
+oojs/.*:
 # Also in #wikimedia-services
-mediawiki/services/citoid,
-mediawiki/services/graphoid,
-mediawiki/services/mathoid
-}
-#pywikibot: {
-pywikipediabot.*,
-pywikibot.*
-}
-#semantic-mediawiki: {
-mediawiki/extensions/Semantic.*,
-mediawiki/extensions/SMW.*,
-mediawiki/extensions/Ask,
-mediawiki/extensions/Validator,
-mediawiki/extensions/Maps,
-mediawiki/extensions/RDFIO,
-mediawiki/extensions/SolrStore
-}
-#wikimedia-analytics: {
-analytics/.*
-}
-#wikimedia-dev: {
+mediawiki/services/citoid:
+mediawiki/services/graphoid:
+mediawiki/services/mathoid:
+#pywikibot:
+pywikipediabot.*:
+pywikibot.*:
+#semantic-mediawiki:
+mediawiki/extensions/Semantic.*:
+mediawiki/extensions/SMW.*:
+mediawiki/extensions/Ask:
+mediawiki/extensions/Validator:
+mediawiki/extensions/Maps:
+mediawiki/extensions/RDFIO:
+mediawiki/extensions/SolrStore:
+#wikimedia-analytics:
+analytics/.*:
+#wikimedia-dev:
 # These are sent to #wikimedia-collaboration too
-mediawiki/extensions/Echo,
-mediawiki/extensions/Flow,
-mediawiki/extensions/PageTriage,
-mediawiki/extensions/Thanks,
+mediawiki/extensions/Echo:
+mediawiki/extensions/Flow:
+mediawiki/extensions/PageTriage:
+mediawiki/extensions/Thanks:
 # These are sent to #wikimedia-multimedia too
-mediawiki/extensions/UploadWizard.*,
-mediawiki/extensions/TimedMediaHandler.*,
-mediawiki/extensions/PronunciationRecording,
+mediawiki/extensions/UploadWizard.*:
+

[MediaWiki-commits] [Gerrit] Extend Exim diamond collector for Tool Labs - change (operations/puppet)

2015-04-27 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Extend Exim diamond collector for Tool Labs
..


Extend Exim diamond collector for Tool Labs

 - forked and extended existing exim collector
 - extended queue information
 - added paniclog information
 - moved sudo configuration to collector manifest
 - updated tool labs mail relay for new collector

Bug: T96898
Change-Id: I1d0517e41d61201e7f6c9b85c116f952658f73a3
---
A modules/diamond/files/collector/extendedexim.py
A modules/diamond/manifests/collector/extendedexim.pp
M modules/toollabs/manifests/mailrelay.pp
3 files changed, 211 insertions(+), 11 deletions(-)

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



diff --git a/modules/diamond/files/collector/extendedexim.py 
b/modules/diamond/files/collector/extendedexim.py
new file mode 100644
index 000..87f63e8
--- /dev/null
+++ b/modules/diamond/files/collector/extendedexim.py
@@ -0,0 +1,173 @@
+# coding=utf-8
+
+
+Exim collector. Collects queue properties and paniclog size.
+
+Queue properties:
+- queue.oldest: age of oldest e-mail in queue (seconds)
+- queue.youngest: age of youngest e-mail in queue (seconds)
+- queue.size: total size of the queue (bytes)
+- queue.length: total number of e-mails in the queue
+- queue.num_frozen: number of frozen e-mails in the queue
+
+Paniclog properties:
+- paniclog.length: number of lines in /var/log/exim4/paniclog
+
+Queue length is retrieved from exim; the paniclog is read directly.
+Both support the use of sudo, so diamond can run as unprivileged user.
+
+ History
+Based on EximCollector bundled with Diamond (collectors/exim/exim.py)
+Extended by Merlijn van Deen valhall...@arctus.nl
+
+ Dependencies
+ * /usr/sbin/exim
+
+
+
+import diamond.collector
+import subprocess
+import os
+from datetime import timedelta
+from collections import namedtuple
+from diamond.collector import str_to_bool
+
+
+class EximCollectorException(Exception):
+pass
+
+
+EximQueueLine = namedtuple('EximQueueLine',
+   ['age', 'size', 'mail_id', 'frozen'])
+
+
+class ExtendedEximCollector(diamond.collector.Collector):
+def get_default_config_help(self):
+config_help = super(ExtendedEximCollector, 
self).get_default_config_help()  # noqa
+config_help.update({
+'bin': 'The path to the exim binary',
+'use_sudo':'Use sudo?',
+'sudo_cmd':'Path to sudo',
+'sudo_user':   'User to sudo as',
+})
+return config_help
+
+def get_default_config(self):
+
+Returns the default collector settings
+
+config = super(ExtendedEximCollector, self).get_default_config()
+config.update({
+'path':'exim',
+'bin':  '/usr/sbin/exim',
+'use_sudo': False,
+'sudo_cmd': '/usr/bin/sudo',
+'sudo_user':'root',
+})
+return config
+
+def _get_file(self, file):
+if not str_to_bool(self.config['use_sudo']):
+return open(file).read()
+else:
+command = [self.config['sudo_cmd'], -u, self.config['sudo_user'],
+   cat, file]
+self.log.debug('Running %s' % (' '.join(command)))
+try:
+return subprocess.check_output(
+command,
+stderr=subprocess.STDOUT
+)
+except subprocess.CalledProcessError as e:
+raise IOError(e)
+
+def _get_queue(self):
+if not os.access(self.config['bin'], os.X_OK):
+raise EximCollectorException('exim not found')
+
+command = [self.config['bin'], '-bpr']
+
+if str_to_bool(self.config['use_sudo']):
+command = [
+self.config['sudo_cmd'],
+'-u',
+self.config['sudo_user']
+] + command
+self.log.debug('Running %s' % (' '.join(command)))
+queue = subprocess.check_output(command)
+
+# remove empty lines
+queue = [l.strip() for l in queue.split(\n)]
+queue = [l for l in queue if l]
+
+# remove indented lines
+queue = [l for l in queue if l[0] !=  ]
+
+return queue
+
+def _parse_age(self, age):
+postfix = age[-1]
+if postfix == m:
+return timedelta(minutes=int(age[:-1]))
+elif postfix == h:
+return timedelta(hours=int(age[:-1]))
+elif postfix == d:
+return timedelta(days=int(age[:-1]))
+elif postfix == w:
+return timedelta(weeks=int(age[:-1]))
+
+def _parse_size(self, size):
+postfix = size[-1]
+if postfix == K:
+return float(size[:-1]) * 1024
+elif postfix == M:
+return float(size[:-1]) * 1024
+ 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: f09d3da..994aace - change (mediawiki/extensions)

2015-04-27 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: f09d3da..994aace
..


Syncronize VisualEditor: f09d3da..994aace

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

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index f09d3da..994aace 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit f09d3da451090ddf0ce72634571d30740bcddea5
+Subproject commit 994aace05b930369e22983f1bd0305d8fa8c8085

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0512ec21080116e59d0d219785c7ca8f17fde7cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: f09d3da..994aace - change (mediawiki/extensions)

2015-04-27 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: f09d3da..994aace
..

Syncronize VisualEditor: f09d3da..994aace

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


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

diff --git a/VisualEditor b/VisualEditor
index f09d3da..994aace 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit f09d3da451090ddf0ce72634571d30740bcddea5
+Subproject commit 994aace05b930369e22983f1bd0305d8fa8c8085

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0512ec21080116e59d0d219785c7ca8f17fde7cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Moved WAN cache and relayer to /libs - change (mediawiki/core)

2015-04-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Moved WAN cache and relayer to /libs
..


Moved WAN cache and relayer to /libs

Change-Id: I9586d22890ce1cda7f74869ff701de73d65eaaef
---
M autoload.php
R includes/libs/eventrelayer/EventRelayer.php
R includes/libs/eventrelayer/EventRelayerMCRD.php
R includes/libs/objectcache/WANObjectCache.php
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 71bc7b2..81ee8b1 100644
--- a/autoload.php
+++ b/autoload.php
@@ -382,9 +382,9 @@
'EnqueueJob' = __DIR__ . '/includes/jobqueue/jobs/EnqueueJob.php',
'EraseArchivedFile' = __DIR__ . '/maintenance/eraseArchivedFile.php',
'ErrorPageError' = __DIR__ . '/includes/exception/ErrorPageError.php',
-   'EventRelayer' = __DIR__ . '/includes/eventrelayer/EventRelayer.php',
-   'EventRelayerMCRD' = __DIR__ . 
'/includes/eventrelayer/EventRelayerMCRD.php',
-   'EventRelayerNull' = __DIR__ . 
'/includes/eventrelayer/EventRelayer.php',
+   'EventRelayer' = __DIR__ . 
'/includes/libs/eventrelayer/EventRelayer.php',
+   'EventRelayerMCRD' = __DIR__ . 
'/includes/libs/eventrelayer/EventRelayerMCRD.php',
+   'EventRelayerNull' = __DIR__ . 
'/includes/libs/eventrelayer/EventRelayer.php',
'Exif' = __DIR__ . '/includes/media/Exif.php',
'ExifBitmapHandler' = __DIR__ . '/includes/media/ExifBitmap.php',
'ExplodeIterator' = __DIR__ . '/includes/libs/ExplodeIterator.php',
@@ -1316,7 +1316,7 @@
'ViewAction' = __DIR__ . '/includes/actions/ViewAction.php',
'VirtualRESTService' = __DIR__ . 
'/includes/libs/virtualrest/VirtualRESTService.php',
'VirtualRESTServiceClient' = __DIR__ . 
'/includes/libs/virtualrest/VirtualRESTServiceClient.php',
-   'WANObjectCache' = __DIR__ . 
'/includes/objectcache/WANObjectCache.php',
+   'WANObjectCache' = __DIR__ . 
'/includes/libs/objectcache/WANObjectCache.php',
'WaitForSlave' = __DIR__ . '/maintenance/waitForSlave.php',
'WantedCategoriesPage' = __DIR__ . 
'/includes/specials/SpecialWantedcategories.php',
'WantedFilesPage' = __DIR__ . 
'/includes/specials/SpecialWantedfiles.php',
diff --git a/includes/eventrelayer/EventRelayer.php 
b/includes/libs/eventrelayer/EventRelayer.php
similarity index 100%
rename from includes/eventrelayer/EventRelayer.php
rename to includes/libs/eventrelayer/EventRelayer.php
diff --git a/includes/eventrelayer/EventRelayerMCRD.php 
b/includes/libs/eventrelayer/EventRelayerMCRD.php
similarity index 100%
rename from includes/eventrelayer/EventRelayerMCRD.php
rename to includes/libs/eventrelayer/EventRelayerMCRD.php
diff --git a/includes/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
similarity index 100%
rename from includes/objectcache/WANObjectCache.php
rename to includes/libs/objectcache/WANObjectCache.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9586d22890ce1cda7f74869ff701de73d65eaaef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
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


  1   2   3   4   >