[MediaWiki-commits] [Gerrit] Clarify the Watchlist-details message - change (mediawiki/core)

2014-04-11 Thread Siebrand (Code Review)
Siebrand has submitted this change and it was merged.

Change subject: Clarify the Watchlist-details message
..


Clarify the Watchlist-details message

Bug: 53098
Change-Id: I74afadb81e15e6a495b784f0a9c95630ae09abd2
---
M languages/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Rillke: Looks good to me, but someone else must approve
  Siebrand: Verified; Looks good to me, approved



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 5379a7c..dc23318 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1835,7 +1835,7 @@
 unwatchthispage: Stop watching,
 notanarticle: Not a content page,
 notvisiblerev: The last revision by a different user has been deleted,
-watchlist-details: {{PLURAL:$1|$1 page|$1 pages}} on your watchlist, 
not counting talk pages.,
+watchlist-details: {{PLURAL:$1|$1 page|$1 pages}} on your watchlist, 
not separately counting talk pages.,
 wlheader-enotif: Email notification is enabled.,
 wlheader-showupdated: Pages that have been changed since you last 
visited them are shown in strongbold/strong.,
 watchmethod-recent: checking recent edits for watched pages,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I74afadb81e15e6a495b784f0a9c95630ae09abd2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ganeshaditya1 ganeshadit...@gmail.com
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Deskana dga...@wikimedia.org
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Rillke ril...@wikipedia.de
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Rename option 'displayBadges' to 'badgeClassNames' - change (mediawiki...Wikibase)

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

Change subject: Rename option 'displayBadges' to 'badgeClassNames'
..


Rename option 'displayBadges' to 'badgeClassNames'

displayBadges sounds like it's a boolean setting. What this setting
really is is a list of ItemIds and (non-optional) CSS class names.

Badges that are not in this array stil get rendered as
class=badge-Q101, for example.

Change-Id: Ic16f0e885f1320331adfa76bc725566bee18e704
---
M client/config/WikibaseClient.default.php
M docs/options.wiki
2 files changed, 4 insertions(+), 7 deletions(-)

Approvals:
  Tobias Gritschacher: Looks good to me, approved
  WikidataJenkins: Verified
  Jeroen De Dauw: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index 754d4fa..47cd3d1 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -39,12 +39,9 @@
'allowDataTransclusion' = true,
'propagateChangesToRepo' = true,
'otherProjectsLinks' = array(),
-   // array of badges that should be displayed
-   // If a sitelink has two or more badges listed here, we will 
use the one that
-   // comes first in the list. The array has to consist of item 
ids pointing to
-   // a class name, like array( 'Q123' = 
'wb-badge-featuredarticle' ) Supported
-   // names are currently wb-badge-goodarticle and 
wb-badge-featuredarticle.
-   'displayBadges' = array(),
+   // List of additional CSS class names for site links that have 
badges, e.g.
+   // array( 'Q101' = 'wb-badge-featuredarticle' ).
+   'badgeClassNames' = array(),
 
/**
 * @todo this is a bit wikimedia-specific and need to find a 
better place for this stuff,
diff --git a/docs/options.wiki b/docs/options.wiki
index 83098cb..4d14689 100644
--- a/docs/options.wiki
+++ b/docs/options.wiki
@@ -95,7 +95,7 @@
 ;allowDataTransclusion: switch to enable data transclusion features like the 
nowiki{{#property}}/nowiki parser function and the ttwikibase/tt 
Scribunto module. Defaults to tttrue/tt.
 ;propagateChangesToRepo: switch to enable or disable the propagation of client 
changes to the repo. Defaults to tttrue/tt.
 ;languageLinkSiteGroup: the ID of the site group to be shown as language 
links. Defaults to ttnull/tt, which means the site's own site group.
-;displayBadges: a list of badges that should be displayed. If a sitelink has 
two or more badges listed here, we will use the one that comes first in the 
list. The array has to consist of item ids pointing to a class name, like 
codearray( 'Q123' = 'wb-badge-featuredarticle' )/code. Supported names are 
currently wb-badge-goodarticle and wb-badge-featuredarticle.
+;badgeClassNames: A list of additional CSS class names for site links that 
have badges. The array has to consist of item ids pointing to a class name, 
like codearray( 'Q101' = 'wb-badge-featuredarticle' )/code. Class names 
that are supported by default are currently wb-badge-goodarticle and 
wb-badge-featuredarticle.
 
 === Expert Settings ===
 ;injectRecentChanges: whether changes on the repository should be injected 
into this wiki's recent changes table, so they show up on watchlists, etc. 
Requires the codedispatchChanges.php/code script to run, and this wiki to 
be listed in the codelocalClientDatabases/code setting on the repository.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic16f0e885f1320331adfa76bc725566bee18e704
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Bene benestar.wikime...@googlemail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Make compatible with MediaWiki 1.22 - change (mediawiki...InviteSignup)

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

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

Change subject: Make compatible with MediaWiki 1.22
..

Make compatible with MediaWiki 1.22

Change-Id: Ieb4a1492cd980c464eef383053342edfec3c5daf
---
M SpecialInviteSignup.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/SpecialInviteSignup.php b/SpecialInviteSignup.php
index 34b3585..011e8b6 100644
--- a/SpecialInviteSignup.php
+++ b/SpecialInviteSignup.php
@@ -20,6 +20,15 @@
$this-groups = $wgISGroups;
}
 
+   // BC for MW = 1.22
+   public function getPageTitle( $subpage = false ) {
+   if ( method_exists( 'SpecialPage', 'getPageTitle' ) ) {
+   return parent::getPageTitle( $subpage );
+   } else {
+   return parent::getTitle( $subpage );
+   }
+   }
+
public function setStore( InviteStore $store ) {
$this-store = $store;
}

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

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

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


[MediaWiki-commits] [Gerrit] Make compatible with MediaWiki 1.22 - change (mediawiki...InviteSignup)

2014-04-11 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Make compatible with MediaWiki 1.22
..


Make compatible with MediaWiki 1.22

Change-Id: Ieb4a1492cd980c464eef383053342edfec3c5daf
---
M SpecialInviteSignup.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/SpecialInviteSignup.php b/SpecialInviteSignup.php
index 34b3585..011e8b6 100644
--- a/SpecialInviteSignup.php
+++ b/SpecialInviteSignup.php
@@ -20,6 +20,15 @@
$this-groups = $wgISGroups;
}
 
+   // BC for MW = 1.22
+   public function getPageTitle( $subpage = false ) {
+   if ( method_exists( 'SpecialPage', 'getPageTitle' ) ) {
+   return parent::getPageTitle( $subpage );
+   } else {
+   return parent::getTitle( $subpage );
+   }
+   }
+
public function setStore( InviteStore $store ) {
$this-store = $store;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb4a1492cd980c464eef383053342edfec3c5daf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InviteSignup
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix deprecated condition in E2E test - change (mediawiki...MultimediaViewer)

2014-04-11 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Fix deprecated condition in E2E test
..

Fix deprecated condition in E2E test

Following the truncatable text field work, the
mw-mmv-source element no longer exists

Change-Id: I6671acdc21c3fb284f9ca1eba10bd0f12f83a9ba
---
M tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb
M tests/browser/features/support/pages/lightbox_demo_page.rb
2 files changed, 0 insertions(+), 3 deletions(-)


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

diff --git 
a/tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb 
b/tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb
index 664f7b0..57c5fa3 100644
--- a/tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb
+++ b/tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb
@@ -80,7 +80,6 @@
 page.mmv_metadata_license_element.when_present.text.should match /CC BY-SA 
3.0/
 # Credit
 page.mmv_metadata_credit_element.when_present.should be_visible
-page.mmv_metadata_source_element.when_present.text.should match /Own work/
 
 # Image metadata
 page.mmv_image_metadata_wrapper_element.when_present.should be_visible
@@ -123,7 +122,6 @@
 page.mmv_metadata_license_element.when_present.text.should match /CC BY-SA 
3.0/
 # Credit
 page.mmv_metadata_credit_element.when_present.should be_visible
-page.mmv_metadata_source_element.when_present.text.should match /Wikimedia 
Foundation/
 
 # Image metadata
 page.mmv_image_metadata_wrapper_element.when_present.should be_visible
diff --git a/tests/browser/features/support/pages/lightbox_demo_page.rb 
b/tests/browser/features/support/pages/lightbox_demo_page.rb
index c0266ea..a1d9f46 100644
--- a/tests/browser/features/support/pages/lightbox_demo_page.rb
+++ b/tests/browser/features/support/pages/lightbox_demo_page.rb
@@ -19,7 +19,6 @@
   span(:mmv_metadata_title, class: mw-mmv-title)
   a(:mmv_metadata_license, class: mw-mmv-license cc-license)
   p(:mmv_metadata_credit, class: mw-mmv-credit)
-  span(:mmv_metadata_source, class: mw-mmv-source)
 
   div(:mmv_image_metadata_wrapper, class: mw-mmv-image-metadata)
   p(:mmv_image_metadata_caption, class: mw-mmv-caption)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6671acdc21c3fb284f9ca1eba10bd0f12f83a9ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use valid hostnames in $wgLBFactoryConf - change (operations/mediawiki-config)

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

Change subject: Use valid hostnames in $wgLBFactoryConf
..


Use valid hostnames in $wgLBFactoryConf

Use 'deployment-db1' instead of 'db1' as the hostname in
$wgLBFactoryConf so that `wfGetLB()-getServerName(0)` will return
a value that can be used by `mysql` to connect via the
/usr/local/bin/sql wrapper script.

Bug: 63803
Change-Id: I081125f48c8118c41526b42c5706f5a3650cf83c
---
M wmf-config/db-labs.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-labs.php b/wmf-config/db-labs.php
index 5472825..8a75d04 100644
--- a/wmf-config/db-labs.php
+++ b/wmf-config/db-labs.php
@@ -19,7 +19,7 @@
# eqiad has a single server
'sectionLoads' = array(
'DEFAULT' = array(
-   'db1' = 0,
+   'deployment-db1' = 0,
),
),
 
@@ -33,7 +33,7 @@
),
 
'hostsByName' = array(
-   'db1'  = '10.68.16.193',   # 
deployment-db1.eqiad.wmflabs
+   'deployment-db1'  = '10.68.16.193',   # 
deployment-db1.eqiad.wmflabs
),
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I081125f48c8118c41526b42c5706f5a3650cf83c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Reedy re...@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] Refactored Sift - change (mediawiki...SemanticSifter)

2014-04-11 Thread Netbrain (Code Review)
Netbrain has uploaded a new change for review.

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

Change subject: Refactored Sift
..

Refactored Sift

Added a debug=true get parameter check, if ?debug=true is set on url on a page 
using sift,
it will display the specific ask query created.

Added additional property parameter structure and a new parameter values which 
overrides
values suggestions found through smw.

Example syntax:
?Property=Text;values=overridden value 1, overridden value2
!Property=Text;values=overridden value 1, overridden value2
?Property;values=overridden value 1, overridden value2
!Property;values=overridden value 1, overridden value2

Change-Id: I90c2d4e8b797bdf4d29d1808e780b7bfabd418fc
---
M src/main/parserfunction/Sift.php
1 file changed, 79 insertions(+), 36 deletions(-)


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

diff --git a/src/main/parserfunction/Sift.php b/src/main/parserfunction/Sift.php
index 2be156d..06264e0 100644
--- a/src/main/parserfunction/Sift.php
+++ b/src/main/parserfunction/Sift.php
@@ -50,6 +50,17 @@
 */
protected $title;
 
+   /**
+* Array of overidden property values to be shown in filtering 
suggestions
+* @var array
+*/
+   protected $propertyValues = array();
+
+
+   /**
+* @var \SMW\Store
+*/
+   protected $smwStore;
 
/**
 * @param $parser \Parser
@@ -65,20 +76,25 @@
$this-parser = $parser;
$this-title = $parser-getTitle();
$this-parseParameters($parameters);
+
+   $this-smwStore = StoreFactory::getStore();
}
 
/**
-* @param \SMW\Store $smwStore
 * @param \SMW\DIProperty $property
-* @return array
 * @throws \Exception
+* @return array
 */
-   private function getPropertyValue($smwStore, $property)
+   private function getPropertyValue($property)
{
-   $wikiPages = $smwStore-getAllPropertySubjects($property);
+   
if(array_key_exists($property-getLabel(),$this-propertyValues)){
+   return $this-propertyValues[$property-getLabel()];
+   }
+
+   $wikiPages = $this-smwStore-getAllPropertySubjects($property);
$v = array();
foreach ($wikiPages as $wp) {
-   foreach ($smwStore-getPropertyValues($wp, $property) 
as $value) {
+   foreach ($this-smwStore-getPropertyValues($wp, 
$property) as $value) {
if ($value instanceof \SMWDataItem) {
switch ($value-getDIType()) {
case 
\SMWDataItem::TYPE_WIKIPAGE:
@@ -135,13 +151,13 @@
$tableFilters = $this-createSMWQueryFilter();
$tableQuery .= {{#ask: 
{$this-parameters['query']-getValue()} $tableFilters;
foreach ($this-properties as $property = $value) {
-   $tableQuery .= '|?' . (is_null($value) ? $property : 
$property=$value);
+   $tableQuery .= \n|? . (is_null($value) ? $property : 
$property=$value);
}
 
foreach ($this-formatParams as $name = $value) {
-   $tableQuery .= |$name=$value;
+   $tableQuery .= \n|$name=$value;
}
-   $tableQuery .= '}}';
+   $tableQuery .= \n}};
 
return $tableQuery;
}
@@ -152,12 +168,12 @@
 */
private function createFilteringComponent()
{
-   $smwStore = StoreFactory::getStore();
+
$output = 'form class=ss-filteringform';
foreach ($this-filterProperties as $p = $v) {
$displayValue = is_null($v) ? $p : $v;
$property = \SMWDIProperty::newFromUserLabel($p);
-   $pValues = $this-getPropertyValue($smwStore, 
$property);
+   $pValues = $this-getPropertyValue($property);
$output .= div class=\ss-propertyfilter\;
$output .= select name=\$p\ 
class=\ss-property-select\ data-placeholder=\$displayValue\ 
title=\$displayValue\ multiple;
foreach ($pValues as $pValue) {
@@ -181,42 +197,53 @@
{
 
foreach ($parameters as $key = $arg) {
+   if($key === 0){
+   continue;
+   }
+
$arg = trim($arg);
+   $arg = explode(';',$arg);
+   $additionalProps = array_slice($arg,1);
+   $arg = $arg[0];
+
+   // parse property = value

[MediaWiki-commits] [Gerrit] Refactored Sift - change (mediawiki...SemanticSifter)

2014-04-11 Thread Netbrain (Code Review)
Netbrain has submitted this change and it was merged.

Change subject: Refactored Sift
..


Refactored Sift

Added a debug=true get parameter check, if ?debug=true is set on url on a page 
using sift,
it will display the specific ask query created.

Added additional property parameter structure and a new parameter values which 
overrides
values suggestions found through smw.

Example syntax:
?Property=Text;values=overridden value 1, overridden value2
!Property=Text;values=overridden value 1, overridden value2
?Property;values=overridden value 1, overridden value2
!Property;values=overridden value 1, overridden value2

Change-Id: I90c2d4e8b797bdf4d29d1808e780b7bfabd418fc
---
M src/main/parserfunction/Sift.php
1 file changed, 79 insertions(+), 36 deletions(-)

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



diff --git a/src/main/parserfunction/Sift.php b/src/main/parserfunction/Sift.php
index 2be156d..06264e0 100644
--- a/src/main/parserfunction/Sift.php
+++ b/src/main/parserfunction/Sift.php
@@ -50,6 +50,17 @@
 */
protected $title;
 
+   /**
+* Array of overidden property values to be shown in filtering 
suggestions
+* @var array
+*/
+   protected $propertyValues = array();
+
+
+   /**
+* @var \SMW\Store
+*/
+   protected $smwStore;
 
/**
 * @param $parser \Parser
@@ -65,20 +76,25 @@
$this-parser = $parser;
$this-title = $parser-getTitle();
$this-parseParameters($parameters);
+
+   $this-smwStore = StoreFactory::getStore();
}
 
/**
-* @param \SMW\Store $smwStore
 * @param \SMW\DIProperty $property
-* @return array
 * @throws \Exception
+* @return array
 */
-   private function getPropertyValue($smwStore, $property)
+   private function getPropertyValue($property)
{
-   $wikiPages = $smwStore-getAllPropertySubjects($property);
+   
if(array_key_exists($property-getLabel(),$this-propertyValues)){
+   return $this-propertyValues[$property-getLabel()];
+   }
+
+   $wikiPages = $this-smwStore-getAllPropertySubjects($property);
$v = array();
foreach ($wikiPages as $wp) {
-   foreach ($smwStore-getPropertyValues($wp, $property) 
as $value) {
+   foreach ($this-smwStore-getPropertyValues($wp, 
$property) as $value) {
if ($value instanceof \SMWDataItem) {
switch ($value-getDIType()) {
case 
\SMWDataItem::TYPE_WIKIPAGE:
@@ -135,13 +151,13 @@
$tableFilters = $this-createSMWQueryFilter();
$tableQuery .= {{#ask: 
{$this-parameters['query']-getValue()} $tableFilters;
foreach ($this-properties as $property = $value) {
-   $tableQuery .= '|?' . (is_null($value) ? $property : 
$property=$value);
+   $tableQuery .= \n|? . (is_null($value) ? $property : 
$property=$value);
}
 
foreach ($this-formatParams as $name = $value) {
-   $tableQuery .= |$name=$value;
+   $tableQuery .= \n|$name=$value;
}
-   $tableQuery .= '}}';
+   $tableQuery .= \n}};
 
return $tableQuery;
}
@@ -152,12 +168,12 @@
 */
private function createFilteringComponent()
{
-   $smwStore = StoreFactory::getStore();
+
$output = 'form class=ss-filteringform';
foreach ($this-filterProperties as $p = $v) {
$displayValue = is_null($v) ? $p : $v;
$property = \SMWDIProperty::newFromUserLabel($p);
-   $pValues = $this-getPropertyValue($smwStore, 
$property);
+   $pValues = $this-getPropertyValue($property);
$output .= div class=\ss-propertyfilter\;
$output .= select name=\$p\ 
class=\ss-property-select\ data-placeholder=\$displayValue\ 
title=\$displayValue\ multiple;
foreach ($pValues as $pValue) {
@@ -181,42 +197,53 @@
{
 
foreach ($parameters as $key = $arg) {
+   if($key === 0){
+   continue;
+   }
+
$arg = trim($arg);
+   $arg = explode(';',$arg);
+   $additionalProps = array_slice($arg,1);
+   $arg = $arg[0];
+
+   // parse property = value
list($property, $value) = array_pad(explode('=', $arg, 
2), 2, null);
 
-

[MediaWiki-commits] [Gerrit] Some clean up to header - change (mediawiki...Flow)

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

Change subject: Some clean up to header
..


Some clean up to header

Change-Id: Ib36ccca19c124a3d0b3dc96a23574d022e2ba5c9
---
M includes/Block/Header.php
M includes/Model/Header.php
2 files changed, 6 insertions(+), 11 deletions(-)

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



diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index 8e542e6..86cae74 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -198,13 +198,12 @@
$output = array();
$output['type'] = 'header';
 
-   $contentFormat = 'wikitext';
-
-   if ( isset( $options['contentFormat'] ) ) {
-   $contentFormat = $options['contentFormat'];
-   }
-
if ( $this-header !== null ) {
+   if ( isset( $options['contentFormat'] ) ) {
+   $contentFormat = $options['contentFormat'];
+   } else {
+   $contentFormat = 
$this-header-getContentFormat();
+   }
$output['*'] = $templating-getContent( $this-header, 
$contentFormat );
$output['format'] = $contentFormat;
$output['header-id'] = 
$this-header-getRevisionId()-getAlphadecimal();
diff --git a/includes/Model/Header.php b/includes/Model/Header.php
index bf73e27..b9e3644 100644
--- a/includes/Model/Header.php
+++ b/includes/Model/Header.php
@@ -23,11 +23,7 @@
$obj = new self;
$obj-revId = UUID::create();
$obj-workflowId = $workflow-getId();
-   $obj-userId = $user-getId();
-   if ( !$user-getId() ) {
-   $obj-userIp = $user-getName();
-   }
-   $obj-userWiki = wfWikiId();
+   list( $obj-userId, $obj-userIp, $obj-userWiki ) = 
self::userFields( $user );
$obj-prevRevision = null; // no prior revision
$obj-setContent( $content, $workflow-getArticleTitle() );
$obj-changeType = $changeType;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib36ccca19c124a3d0b3dc96a23574d022e2ba5c9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu bs...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@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] Don't catch ParseException in order to just rethrow it wrapped - change (mediawiki...Wikibase)

2014-04-11 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Don't catch ParseException in order to just rethrow it wrapped
..

Don't catch ParseException in order to just rethrow it wrapped

Change-Id: I3f1517ab884f1f7fee00de30d6e26753447062c5
---
M lib/includes/parsers/EntityIdValueParser.php
1 file changed, 1 insertion(+), 6 deletions(-)


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

diff --git a/lib/includes/parsers/EntityIdValueParser.php 
b/lib/includes/parsers/EntityIdValueParser.php
index 8228a4b..01b4aa4 100644
--- a/lib/includes/parsers/EntityIdValueParser.php
+++ b/lib/includes/parsers/EntityIdValueParser.php
@@ -44,12 +44,7 @@
 * @throws ParseException
 */
protected function stringParse( $value ) {
-   try {
-   return $this-parser-parse( $value );
-   }
-   catch ( EntityIdParsingException $ex ) {
-   throw new ParseException( $ex-getMessage(), 0, $ex );
-   }
+   return $this-parser-parse( $value );
}
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f1517ab884f1f7fee00de30d6e26753447062c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Use expectedFormat for more specific ParseException localizing - change (mediawiki...Wikibase)

2014-04-11 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Use expectedFormat for more specific ParseException localizing
..

Use expectedFormat for more specific ParseException localizing

Bug: 62824
Change-Id: I24fa0433163086683f45a9b1822099abbd242b51
---
M lib/includes/i18n/WikibaseExceptionLocalizer.php
1 file changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/lib/includes/i18n/WikibaseExceptionLocalizer.php 
b/lib/includes/i18n/WikibaseExceptionLocalizer.php
index 3414434..0fd8b70 100644
--- a/lib/includes/i18n/WikibaseExceptionLocalizer.php
+++ b/lib/includes/i18n/WikibaseExceptionLocalizer.php
@@ -56,8 +56,15 @@
 */
protected function getParseExceptionMessage( ParseException $parseError 
) {
$key = 'wikibase-parse-error';
+   $specificKey = '';
+
+   $expectedFormat = $parseError-getExpectedFormat();
+   if( $expectedFormat ) {
+   $specificKey = $key . '-' . $expectedFormat;
+   }
+
$params = array();
-   $msg = wfMessage( $key )-params( $params );
+   $msg = new Message( array( $specificKey, $key ), $params );
 
return $msg;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24fa0433163086683f45a9b1822099abbd242b51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Bump data-values/time dependency and adjust to new version - change (mediawiki...Wikibase)

2014-04-11 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Bump data-values/time dependency and adjust to new version
..

Bump data-values/time dependency and adjust to new version

Change-Id: I9ab6449253cc72f78f34349fa36117657e5fb140
---
M composer.json
M lib/includes/formatters/MediaWikiNumberLocalizer.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/composer.json b/composer.json
index ec92c66..0e491e5 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,7 @@
data-values/common: ~0.2.0,
data-values/geo: ~0.1.0,
data-values/interfaces: ~0.1.4,
-   data-values/number: ~0.3.0,
+   data-values/number: ~0.4.0,
data-values/time: ~0.5.1,
data-values/validators: ~0.1.0,
data-values/data-types: ~0.2.0,
diff --git a/lib/includes/formatters/MediaWikiNumberLocalizer.php 
b/lib/includes/formatters/MediaWikiNumberLocalizer.php
index 0489c53..c23eeb3 100644
--- a/lib/includes/formatters/MediaWikiNumberLocalizer.php
+++ b/lib/includes/formatters/MediaWikiNumberLocalizer.php
@@ -4,7 +4,7 @@
 
 use InvalidArgumentException;
 use Language;
-use ValueFormatters\Localizer;
+use ValueFormatters\NumberLocalizer;
 
 /**
  * Localizes a numeric string using MediaWiki's Language class.
@@ -14,7 +14,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Kinzler
  */
-class MediaWikiNumberLocalizer implements Localizer {
+class MediaWikiNumberLocalizer implements NumberLocalizer {
 
/**
 * @var Language

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ab6449253cc72f78f34349fa36117657e5fb140
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Pass rawValue and expectedFormat to ParseExceptions - change (mediawiki...Wikibase)

2014-04-11 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Pass rawValue and expectedFormat to ParseExceptions
..

Pass rawValue and expectedFormat to ParseExceptions

Change-Id: I3a66cb05e1aa338fe7c59c486a0a66a0c5e203bf
---
M composer.json
M lib/includes/parsers/DateTimeParser.php
M lib/includes/parsers/EraParser.php
M lib/includes/parsers/MWTimeIsoParser.php
M lib/includes/parsers/TimeParser.php
M lib/includes/parsers/YearMonthTimeParser.php
M lib/includes/parsers/YearTimeParser.php
7 files changed, 27 insertions(+), 9 deletions(-)


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

diff --git a/composer.json b/composer.json
index 25e91dd..ec92c66 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
data-values/data-values: ~0.1.0,
data-values/common: ~0.2.0,
data-values/geo: ~0.1.0,
-   data-values/interfaces: ~0.1.3,
+   data-values/interfaces: ~0.1.4,
data-values/number: ~0.3.0,
data-values/time: ~0.5.1,
data-values/validators: ~0.1.0,
diff --git a/lib/includes/parsers/DateTimeParser.php 
b/lib/includes/parsers/DateTimeParser.php
index 5479f00..e12df91 100644
--- a/lib/includes/parsers/DateTimeParser.php
+++ b/lib/includes/parsers/DateTimeParser.php
@@ -23,6 +23,8 @@
  */
 class DateTimeParser extends StringValueParser {
 
+   const FORMAT_NAME = 'datetime';
+
/**
 * @var MonthNameUnlocalizer
 */
@@ -49,6 +51,8 @@
 * @return TimeValue
 */
protected function stringParse( $value ) {
+   $rawValue = $value;
+
$calendarModelParser = new CalendarModelParser();
$options = $this-getOptions();
 
@@ -88,7 +92,7 @@
return $valueParser-parse( $timeString );
}
catch( Exception $exception ) {
-   throw new ParseException( $exception-getMessage() );
+   throw new ParseException( $exception-getMessage(), 
$rawValue, self::FORMAT_NAME );
}
}
 
diff --git a/lib/includes/parsers/EraParser.php 
b/lib/includes/parsers/EraParser.php
index 91fb221..c6fd6b9 100644
--- a/lib/includes/parsers/EraParser.php
+++ b/lib/includes/parsers/EraParser.php
@@ -15,6 +15,8 @@
  */
 class EraParser extends StringValueParser {
 
+   const FORMAT_NAME = 'era';
+
/**
 * @since 0.5
 */
@@ -54,7 +56,11 @@
}
 
if( isset( $eraFromSign )  isset( $eraFromString ) ) {
-   throw new ParseException( 'Parsed two eras from the 
same string' );
+   throw new ParseException(
+   'Parsed two eras from the same string',
+   $value,
+   self::FORMAT_NAME
+   );
}
 
$cleanValue = $this-cleanValue( $value );
diff --git a/lib/includes/parsers/MWTimeIsoParser.php 
b/lib/includes/parsers/MWTimeIsoParser.php
index 022d288..4532afe 100644
--- a/lib/includes/parsers/MWTimeIsoParser.php
+++ b/lib/includes/parsers/MWTimeIsoParser.php
@@ -25,6 +25,8 @@
  */
 class MWTimeIsoParser extends StringValueParser {
 
+   const FORMAT_NAME = 'mw-time-iso';
+
/**
 * @var array message keys showing the number of 0s that need to be 
appended to years when
 *  parsed with the given message keys
@@ -95,7 +97,7 @@
return $reconverted;
}
 
-   throw new ParseException( 'Failed to parse MwTimeIso' );
+   throw new ParseException( 'Failed to parse', $value, 
self::FORMAT_NAME );
}
 
/**
diff --git a/lib/includes/parsers/TimeParser.php 
b/lib/includes/parsers/TimeParser.php
index 035d0c9..0b08319 100644
--- a/lib/includes/parsers/TimeParser.php
+++ b/lib/includes/parsers/TimeParser.php
@@ -20,6 +20,8 @@
  */
 class TimeParser extends StringValueParser {
 
+   const FORMAT_NAME = 'time';
+
public function __construct( ParserOptions $options = null ) {
if( is_null( $options ) ) {
$options = new ParserOptions();
@@ -45,7 +47,7 @@
}
}
 
-   throw new ParseException( 'The format of the time could not be 
determined. Parsing failed.' );
+   throw new ParseException( 'The format of the time could not be 
determined.', $value, self::FORMAT_NAME );
}
 
/**
diff --git a/lib/includes/parsers/YearMonthTimeParser.php 
b/lib/includes/parsers/YearMonthTimeParser.php
index 9e5f3d8..4a622c1 100644
--- a/lib/includes/parsers/YearMonthTimeParser.php
+++ b/lib/includes/parsers/YearMonthTimeParser.php
@@ -21,6 +21,8 @@
  */
 

[MediaWiki-commits] [Gerrit] Introduce explit data-values/interfaces dependency - change (mediawiki...Wikibase)

2014-04-11 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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

Change subject: Introduce explit data-values/interfaces dependency
..

Introduce explit data-values/interfaces dependency

We are (at least) using ValueParsers\ParseException and
ValueFormatters\FormattingException from that package.

Change-Id: I8dbfd70fd5fc5236c6d1002a92ef7717c3aa8b90
---
M composer.json
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/composer.json b/composer.json
index 3701457..25e91dd 100644
--- a/composer.json
+++ b/composer.json
@@ -27,6 +27,7 @@
data-values/data-values: ~0.1.0,
data-values/common: ~0.2.0,
data-values/geo: ~0.1.0,
+   data-values/interfaces: ~0.1.3,
data-values/number: ~0.3.0,
data-values/time: ~0.5.1,
data-values/validators: ~0.1.0,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dbfd70fd5fc5236c6d1002a92ef7717c3aa8b90
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] fixed small issue - change (mediawiki...SemanticSifter)

2014-04-11 Thread Netbrain (Code Review)
Netbrain has uploaded a new change for review.

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

Change subject: fixed small issue
..

fixed small issue

Change-Id: I2f7a4297a5c5caf25deac583f2bf20272c800efb
---
M src/main/parserfunction/Sift.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticSifter 
refs/changes/82/125382/1

diff --git a/src/main/parserfunction/Sift.php b/src/main/parserfunction/Sift.php
index 06264e0..b8ca4c5 100644
--- a/src/main/parserfunction/Sift.php
+++ b/src/main/parserfunction/Sift.php
@@ -213,7 +213,6 @@
if($flag === '?' || $flag === '!'){
$property = substr($property,1);
if($flag === '!'){
-   $property = substr($property, 1);
//Extract smw property into filter array
$this-filterProperties[$property] = 
$value;
unset($parameters[$key]);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f7a4297a5c5caf25deac583f2bf20272c800efb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticSifter
Gerrit-Branch: master
Gerrit-Owner: Netbrain k...@heldig.org

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


[MediaWiki-commits] [Gerrit] fixed small issue - change (mediawiki...SemanticSifter)

2014-04-11 Thread Netbrain (Code Review)
Netbrain has submitted this change and it was merged.

Change subject: fixed small issue
..


fixed small issue

Change-Id: I2f7a4297a5c5caf25deac583f2bf20272c800efb
---
M src/main/parserfunction/Sift.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/src/main/parserfunction/Sift.php b/src/main/parserfunction/Sift.php
index 06264e0..b8ca4c5 100644
--- a/src/main/parserfunction/Sift.php
+++ b/src/main/parserfunction/Sift.php
@@ -213,7 +213,6 @@
if($flag === '?' || $flag === '!'){
$property = substr($property,1);
if($flag === '!'){
-   $property = substr($property, 1);
//Extract smw property into filter array
$this-filterProperties[$property] = 
$value;
unset($parameters[$key]);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f7a4297a5c5caf25deac583f2bf20272c800efb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticSifter
Gerrit-Branch: master
Gerrit-Owner: Netbrain k...@heldig.org
Gerrit-Reviewer: Netbrain k...@heldig.org

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


[MediaWiki-commits] [Gerrit] Restore article scroll after closing Media Viewer - change (mediawiki...MultimediaViewer)

2014-04-11 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Restore article scroll after closing Media Viewer
..

Restore article scroll after closing Media Viewer

There used to be a CSS trick with the order we added things to the
page and removed them from it, but it doesn't seem possible anymore
with the new order of execution, with the overlay appearing
immediately and being taken care of inside bootstrap.

The main cause of the bug, however, was the hash reset happening
after the interface was closed.

Doing the scroll restore with jQuery.scrollTo is more future-proof
and testable in QUnit.

Additions were also made to the cucumber E2E test because QUnit
alone wouldn't have caught the hash issue.

This also cleans up custom events a little.

Change-Id: I63187383b632a2e8793f05380c18db2713856865
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/439
---
M MultimediaViewer.php
M resources/mmv/mmv.bootstrap.js
M resources/mmv/mmv.js
M resources/mmv/mmv.lightboxinterface.js
M tests/browser/features/basic_mmv_navigation.feature
M tests/browser/features/step_definitions/basic_mmv_navigation_steps.rb
M tests/qunit/mmv/mmv.bootstrap.test.js
7 files changed, 61 insertions(+), 21 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/83/125383/1

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 0af11da..490fd79 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -702,6 +702,7 @@
'mediawiki.Title',
'mmv.logger',
'mmv.HtmlUtils',
+   'jquery.scrollTo',
),
 
'messages' = array(
diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 162843e..bb2b8bc 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -264,7 +264,7 @@
 
/**
 * Handles hash change requests coming from mmv
-* @param {jQuery.Event} e Custom mmv.hash event
+* @param {jQuery.Event} e Custom mmv-hash event
 */
MMVB.internalHashChange = function ( e ) {
// Since we voluntarily changed the hash, we don't want 
MMVB.hash to treat it
@@ -296,9 +296,9 @@
self.hash();
} ).hashchange();
 
-   $( document ).on( 'mmv.hash', function ( e ) {
+   $( document ).on( 'mmv-hash', function ( e ) {
self.internalHashChange( e );
-   } ).on( 'mmv.close', function () {
+   } ).on( 'mmv-cleanup-overlay', function () {
self.cleanupOverlay();
} );
};
@@ -308,17 +308,21 @@
 */
MMVB.cleanupEventHandlers = function () {
$( window ).off( 'hashchange' );
-   $( document ).off( 'mmv.hash' );
+   $( document ).off( 'mmv-hash' );
};
 
/**
 * Sets up the overlay while the viewer loads
 */
MMVB.setupOverlay = function () {
+   var $scrollTo = $.scrollTo();
+
if ( !this.$overlay ) {
this.$overlay = $( 'div' )
.addClass( 'mw-mmv-overlay' );
}
+
+   this.savedScroll = { top : $scrollTo.scrollTop(), left : 
$scrollTo.scrollLeft() };
 
$( document.body ).addClass( 'mw-mmv-lightbox-open' )
.append( this.$overlay );
@@ -333,6 +337,10 @@
if ( this.$overlay ) {
this.$overlay.remove();
}
+
+   if ( this.savedScroll ) {
+   $.scrollTo( this.savedScroll, 0 );
+   }
};
 
MMVB.whenThumbsReady = function () {
diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js
index e003fca..9920474 100755
--- a/resources/mmv/mmv.js
+++ b/resources/mmv/mmv.js
@@ -613,13 +613,14 @@
 * Handles close event coming from the lightbox
 */
MMVP.close = function () {
-   $( document ).trigger( $.Event( 'mmv.close' ) );
-
if ( comingFromHashChange === false ) {
-   $( document ).trigger( $.Event( 'mmv.hash', { hash : 
'#' } ) );
+   $( document ).trigger( $.Event( 'mmv-hash', { hash : 
'#' } ) );
} else {
comingFromHashChange = false;
}
+
+   // This has to happen after the hash reset, because setting the 
hash to # will reset the page scroll
+   $( document ).trigger( $.Event( 'mmv-cleanup-overlay' ) );
 
this.isOpen = false;
};
@@ -634,7 +635,7 @@
if ( linkState[0] === '#mediaviewer' ) {
this.loadImageByTitle( 

[MediaWiki-commits] [Gerrit] Revoke my key, I'm relocating to SF - change (operations/puppet)

2014-04-11 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Revoke my key, I'm relocating to SF
..


Revoke my key, I'm relocating to SF

...and leaving my desktop behind.

Change-Id: I675a590b21f7083b38182b5a77242811f8c1b665
---
M manifests/admins.pp
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/admins.pp b/manifests/admins.pp
index db986b1..601384e 100644
--- a/manifests/admins.pp
+++ b/manifests/admins.pp
@@ -2274,7 +2274,7 @@
 type   = 'ssh-rsa',
 key= 
'B3NzaC1yc2EBIwAAAQEApYlzRyFB5UNUnmCbN6sKPe53ZRd+P3NW64KmCj8MdcTsdBsOxhd00DBL7h1r3VUCYfkqnJuBgBfbqF0xFyv/Wx2fEUtZvneQEZUGIPciSkEwkh12VvNYeuTxWqW05B3eZYSnYzKwcziecf6/uFwRfMv4E5eTT91U22YYUzsgzVLVCDqtZWAESHqcZgfq5zxKoeO+PHIBUYYXNLz64Cs9UJNki8sbDX3sJMnRCebztEUjckUssN9K63KNXaQcXJ2GQJmqMG522+VkGMzbUV5yT4tjY8SCPNsPa3ij8af52HJNAz8IMfOvLak9ILxeDDugZJmSdBTEK2R6uCV2fo+vCw==';
 'maxsem-new':
-ensure = 'present',
+ensure = 'absent',
 user   = $username,
 type   = 'ssh-rsa',
 key= 
'B3NzaC1yc2EBIwAAAQEA1G/hUlOQ7CwPRGYyTWSW9tK/jR0axw64JrRvdJnIZ+JTIpat3TyNPiPNIp5Ak+NfogruPJIwp//+f/Iu+DJW2iAcQhASl5WJPpSqdUUhX/LfaHB3Xr0f75Irn/7C2twvxKojyS4MkiBTo9HWSdh0zP3zgnwOlycwaUHujMVt6G35lkUzPgBx+QVKExK2A6c+CILjIG4GmeWPsqGJRJXbvrJjVK1og+i/x16boMdrO8UInNqH/iLroKT6tzLzJsWhk4NOqK2CX+MmcKJLbc2I0IQ8fJe9J2eaPiaE+CmdX0dc1+GP7IlI/CStk6LldVOgDBP/7Vr8DVd0OQuadhJJhw==';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I675a590b21f7083b38182b5a77242811f8c1b665
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
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] textlib.py: provide zero value for timedelta - change (pywikibot/core)

2014-04-11 Thread Whym (Code Review)
Whym has uploaded a new change for review.

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

Change subject: textlib.py: provide zero value for timedelta
..

textlib.py: provide zero value for timedelta

Change-Id: I40822ea6074e1a4b3a2a0fffd0cbcc3598ef1760
---
M pywikibot/textlib.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/84/125384/1

diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index fdcda92..4e347c2 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1149,7 +1149,7 @@
 return self.__name
 
 def dst(self, dt):
-return ZERO
+return datetime.timedelta(0)
 
 def __repr__(self):
 return %s(%s, %s) % (

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40822ea6074e1a4b3a2a0fffd0cbcc3598ef1760
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Whym w...@whym.org

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


[MediaWiki-commits] [Gerrit] Cucumber should only run tests tagged both @clean and @firef... - change (integration/jenkins-job-builder-config)

2014-04-11 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: Cucumber should only run tests tagged both @clean and @firefox 
or @phantomjs
..

Cucumber should only run tests tagged both @clean and @firefox or @phantomjs

Change-Id: I2ea6ba84f2f55d7cfd12bfc7b82cec1a740142c6
---
M macro.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/macro.yaml b/macro.yaml
index 8342d4c..d84fc14 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -166,6 +166,7 @@
 export SCREENSHOT_FAILURES_PATH=$WORKSPACE/log
 /srv/deployment/integration/slave-scripts/tools/bundler/bundle 
exec cucumber --color \
 --tags @clean \
+--tags @{browser} \
 --format pretty \
 --format junit --out $WORKSPACE/log \
 --format html --out $WORKSPACE/log/report.html

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ea6ba84f2f55d7cfd12bfc7b82cec1a740142c6
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Grid system for mediawiki.ui - change (mediawiki/core)

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

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

Change subject: Grid system for mediawiki.ui
..

Grid system for mediawiki.ui

A set of mixins for the creation of responsive layouts:
- Variables for the screen sizes to support (can be extended).
- Mixins to indicate the width and visibility of elements per brekpoint (or in 
general).
- This also enables the specification of any CSS property for each breackpoint.

This is based on the RfC: 
http://www.mediawiki.org/wiki/Requests_for_comment/Grid_system

More information at: http://pauginer.github.io/agora-grid/

Change-Id: I6b1ceeed5fa6b65e1b04a5bf0721ac66a7de2d9b
---
A resources/src/mediawiki.ui/mixins/grid-core.less
A resources/src/mediawiki.ui/mixins/grid-responsive.less
A resources/src/mediawiki.ui/mixins/grid.less
A resources/src/mediawiki.ui/settings/grid.less
4 files changed, 460 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/125387/1

diff --git a/resources/src/mediawiki.ui/mixins/grid-core.less 
b/resources/src/mediawiki.ui/mixins/grid-core.less
new file mode 100644
index 000..929bcdb
--- /dev/null
+++ b/resources/src/mediawiki.ui/mixins/grid-core.less
@@ -0,0 +1,210 @@
+@import ../settings/grid;
+
+// Grid - core
+//
+// Mixins to indicate that an element should behave as a gid (.mw-ui-grid) or 
a grid item (.mw-ui-item)
+// and a serie of proportional mixins with predefined widths (e.g., 
.mw-ui-tho-thirds) and visibility (.mw-ui-hidden).
+//
+
+.mw-ui-grid() {
+margin-left: auto;
+margin-right: auto;
+overflow: hidden;
+clear: both;
+ }
+
+.mw-ui-item(@gutter:@grid-gutter) {
+   float: left;
+   .mw-ui-gutter(@gutter / 2);
+width: 100%;
+-webkit-box-sizing: border-box;
+-moz-box-sizing: border-box;
+box-sizing: border-box;
+   .mw-ui-right {
+   float: right;
+   }
+}
+
+.mw-ui-gutter(@gutter){
+   padding-left: (@gutter / 2);
+   padding-right: (@gutter / 2);
+}
+
+//Proportions
+.mw-ui-one-whole(){
+   .mw-ui-item;
+   width: 100%;
+}
+.mw-ui-one-half(){
+   .mw-ui-item;
+   width: 50%;
+}
+.mw-ui-one-third(){
+   .mw-ui-item;
+   width: 33.333%;
+}
+.mw-ui-two-thirds(){
+   .mw-ui-item;
+   width: 66.666%;
+}
+.mw-ui-one-quarter(){
+   .mw-ui-item;
+   width: 25%;
+}
+.mw-ui-two-quarters(){
+   .mw-ui-item;
+   width: 50%;
+}
+.mw-ui-three-quarters(){
+   .mw-ui-item;
+   width: 75%;
+}
+.mw-ui-one-fifth(){
+   .mw-ui-item;
+   width: 20%;
+}
+.mw-ui-two-fifths(){
+   .mw-ui-item;
+   width: 40%;
+}
+.mw-ui-three-fifths(){
+   .mw-ui-item;
+   width: 60%;
+}
+.mw-ui-four-fifths(){
+   .mw-ui-item;
+   width: 80%;
+}
+.mw-ui-one-sixth(){
+   .mw-ui-item;
+   width: 16.666%;
+}
+.mw-ui-two-sixths(){
+   .mw-ui-item;
+   width: 33.333%;
+}
+.mw-ui-three-sixths(){
+   .mw-ui-item;
+   width: 50%;
+}
+.mw-ui-four-sixths(){
+   .mw-ui-item;
+   width: 66.666%;
+}
+.mw-ui-five-sixths(){
+   .mw-ui-item;
+   width: 83.333%;
+}
+.mw-ui-one-eighth(){
+   .mw-ui-item;
+   width: 12.5%;
+}
+.mw-ui-two-eighths(){
+   .mw-ui-item;
+   width: 25%;
+}
+.mw-ui-three-eighths(){
+   .mw-ui-item;
+   width: 37.5%;
+}
+.mw-ui-four-eighths(){
+   .mw-ui-item;
+   width: 50%;
+}
+.mw-ui-five-eighths(){
+   .mw-ui-item;
+   width: 62.5%;
+}
+.mw-ui-six-eighths(){
+   .mw-ui-item;
+   width: 75%;
+}
+.mw-ui-seven-eighths(){
+   .mw-ui-item;
+   width: 87.5%;
+}
+.mw-ui-one-tenth(){
+   .mw-ui-item;
+   width: 10%;
+}
+.mw-ui-two-tenths(){
+   .mw-ui-item;
+   width: 20%;
+}
+.mw-ui-three-tenths(){
+   .mw-ui-item;
+   width: 30%;
+}
+.mw-ui-four-tenths(){
+   .mw-ui-item;
+   width: 40%;
+}
+.mw-ui-five-tenths(){
+   .mw-ui-item;
+   width: 50%;
+}
+.mw-ui-six-tenths(){
+   .mw-ui-item;
+   width: 60%;
+}
+.mw-ui-seven-tenths(){
+   .mw-ui-item;
+   width: 70%;
+}
+.mw-ui-eight-tenths(){
+   .mw-ui-item;
+   width: 80%;
+}
+.mw-ui-nine-tenths(){
+   .mw-ui-item;
+   width: 90%;
+}
+.mw-ui-one-twelfth(){
+   .mw-ui-item;
+   width: 8.333%;
+}
+.mw-ui-two-twelfths(){
+   .mw-ui-item;
+   width: 16.666%;
+}
+.mw-ui-three-twelfths(){
+   .mw-ui-item;
+   width: 25%;
+}
+.mw-ui-four-twelfths(){
+   .mw-ui-item;
+   width: 33.333%;
+}
+.mw-ui-five-twelfths(){
+   .mw-ui-item;
+   width: 41.666%;
+}
+.mw-ui-six-twelfths(){
+   .mw-ui-item;
+   width: 50%;
+}
+.mw-ui-seven-twelfths(){
+   .mw-ui-item;
+   width: 58.333%;
+}
+.mw-ui-eight-twelfths(){
+   .mw-ui-item;
+   width: 66.666%;
+}
+.mw-ui-nine-twelfths(){
+   .mw-ui-item;
+   width: 75%;
+}
+.mw-ui-ten-twelfths(){
+   .mw-ui-item;
+   width: 

[MediaWiki-commits] [Gerrit] Changing a message's lang must reset cached text. - change (mediawiki/core)

2014-04-11 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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

Change subject: Changing a message's lang must reset cached text.
..

Changing a message's lang must reset cached text.

Without this patch, it's not possible to get text in different
languages from the same Message object.

Change-Id: I0bb915b0d9205e78ac4599ced5efacacf2cf0240
---
M includes/Message.php
M tests/phpunit/includes/MessageTest.php
2 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/125388/1

diff --git a/includes/Message.php b/includes/Message.php
index d0ce482..263e511 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -545,6 +545,7 @@
. passed a String or Language object; $type 
given
);
}
+   $this-message = null;
$this-interface = false;
return $this;
}
diff --git a/tests/phpunit/includes/MessageTest.php 
b/tests/phpunit/includes/MessageTest.php
index 44ca3d2..c3d1d42 100644
--- a/tests/phpunit/includes/MessageTest.php
+++ b/tests/phpunit/includes/MessageTest.php
@@ -120,8 +120,11 @@
public function testInLanguage() {
$this-assertEquals( 'Main Page', wfMessage( 'mainpage' 
)-inLanguage( 'en' )-text() );
$this-assertEquals( 'Заглавная страница', wfMessage( 
'mainpage' )-inLanguage( 'ru' )-text() );
-   $this-assertEquals( 'Main Page', wfMessage( 'mainpage' 
)-inLanguage( Language::factory( 'en' ) )-text() );
-   $this-assertEquals( 'Заглавная страница', wfMessage( 
'mainpage' )-inLanguage( Language::factory( 'ru' ) )-text() );
+
+   // Try getting different languages from the same Message object
+   $msg = wfMessage( 'mainpage' );
+   $this-assertEquals( 'Main Page', $msg-inLanguage( 
Language::factory( 'en' ) )-text() );
+   $this-assertEquals( 'Заглавная страница', $msg-inLanguage( 
Language::factory( 'ru' ) )-text() );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bb915b0d9205e78ac4599ced5efacacf2cf0240
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Replace deprecated methog usages - change (mediawiki...Translate)

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

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

Change subject: Replace deprecated methog usages
..

Replace deprecated methog usages

Change-Id: I2cbfb2c7fea8253bf9aeb1a5fb4a87dbada7eb71
---
M translationaids/CurrentTranslationAid.php
M utils/TranslationHelpers.php
2 files changed, 7 insertions(+), 6 deletions(-)


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

diff --git a/translationaids/CurrentTranslationAid.php 
b/translationaids/CurrentTranslationAid.php
index 50188e7..43bc084 100644
--- a/translationaids/CurrentTranslationAid.php
+++ b/translationaids/CurrentTranslationAid.php
@@ -26,8 +26,7 @@
);
 
wfRunHooks( 'TranslatePrefillTranslation', array( 
$translation, $this-handle ) );
-   $fuzzy = TranslateEditAddons::hasFuzzyString( $translation );
-   $fuzzy = $fuzzy || TranslateEditAddons::isFuzzy( $title );
+   $fuzzy = MessageHandle::hasFuzzyString( $translation ) || 
$this-handle-isFuzzy();
$translation = str_replace( TRANSLATE_FUZZY, '', $translation );
 
return array(
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index 82e4772..de70a68 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -637,12 +637,13 @@
}
 
$text = TranslateUtils::getMessageContent( $page, 
$mwcode, $ns );
-   if ( $text === null || 
TranslateEditAddons::hasFuzzyString( $text ) ) {
+   if ( $text === null || MessageHandle::hasFuzzyString( 
$text ) ) {
continue;
}
 
$title = Title::makeTitleSafe( $ns, $page/$mwcode );
-   if ( $title  TranslateEditAddons::isFuzzy( $title ) ) 
{
+   $handle = new MessageHandle( $title );
+   if ( $handle-isFuzzy() ) {
continue;
}
 
@@ -738,12 +739,13 @@
 
foreach ( $pairs[$code] as $candidate = $unused ) {
$text = TranslateUtils::getMessageContent( $page, 
$candidate, $ns );
-   if ( $text === null || 
TranslateEditAddons::hasFuzzyString( $text ) ) {
+   if ( $text === null || MessageHandle::hasFuzzyString( 
$text ) ) {
continue;
}
 
$title = Title::makeTitleSafe( $ns, $page/$candidate 
);
-   if ( $title  TranslateEditAddons::isFuzzy( $title ) ) 
{
+   $handle = new MessageHandle( $title );
+   if ( $handle-isFuzzy() ) {
continue;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Replace deprecated methog usages - change (mediawiki...Translate)

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

Change subject: Replace deprecated methog usages
..


Replace deprecated methog usages

Change-Id: I2cbfb2c7fea8253bf9aeb1a5fb4a87dbada7eb71
---
M translationaids/CurrentTranslationAid.php
M utils/TranslationHelpers.php
2 files changed, 7 insertions(+), 6 deletions(-)

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



diff --git a/translationaids/CurrentTranslationAid.php 
b/translationaids/CurrentTranslationAid.php
index 50188e7..43bc084 100644
--- a/translationaids/CurrentTranslationAid.php
+++ b/translationaids/CurrentTranslationAid.php
@@ -26,8 +26,7 @@
);
 
wfRunHooks( 'TranslatePrefillTranslation', array( 
$translation, $this-handle ) );
-   $fuzzy = TranslateEditAddons::hasFuzzyString( $translation );
-   $fuzzy = $fuzzy || TranslateEditAddons::isFuzzy( $title );
+   $fuzzy = MessageHandle::hasFuzzyString( $translation ) || 
$this-handle-isFuzzy();
$translation = str_replace( TRANSLATE_FUZZY, '', $translation );
 
return array(
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index 82e4772..de70a68 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -637,12 +637,13 @@
}
 
$text = TranslateUtils::getMessageContent( $page, 
$mwcode, $ns );
-   if ( $text === null || 
TranslateEditAddons::hasFuzzyString( $text ) ) {
+   if ( $text === null || MessageHandle::hasFuzzyString( 
$text ) ) {
continue;
}
 
$title = Title::makeTitleSafe( $ns, $page/$mwcode );
-   if ( $title  TranslateEditAddons::isFuzzy( $title ) ) 
{
+   $handle = new MessageHandle( $title );
+   if ( $handle-isFuzzy() ) {
continue;
}
 
@@ -738,12 +739,13 @@
 
foreach ( $pairs[$code] as $candidate = $unused ) {
$text = TranslateUtils::getMessageContent( $page, 
$candidate, $ns );
-   if ( $text === null || 
TranslateEditAddons::hasFuzzyString( $text ) ) {
+   if ( $text === null || MessageHandle::hasFuzzyString( 
$text ) ) {
continue;
}
 
$title = Title::makeTitleSafe( $ns, $page/$candidate 
);
-   if ( $title  TranslateEditAddons::isFuzzy( $title ) ) 
{
+   $handle = new MessageHandle( $title );
+   if ( $handle-isFuzzy() ) {
continue;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cbfb2c7fea8253bf9aeb1a5fb4a87dbada7eb71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Ensure parsoid server is killed when exiting roundtrip-test - change (mediawiki...parsoid)

2014-04-11 Thread Marcoil (Code Review)
Marcoil has uploaded a new change for review.

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

Change subject: Ensure parsoid server is killed when exiting roundtrip-test
..

Ensure parsoid server is killed when exiting roundtrip-test

Based on be83d40bdc0a297049f399276ae2c9a82adf1932 by Arlo.

Change-Id: I9e0de294ec8c86363f0f53da7d53363b8e049b0c
---
M tests/roundtrip-test.js
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/tests/roundtrip-test.js b/tests/roundtrip-test.js
index 61ebb81..43d314d 100755
--- a/tests/roundtrip-test.js
+++ b/tests/roundtrip-test.js
@@ -599,6 +599,17 @@
argv.parsoidURL = url;
fetch( title, callback, argv );
} );
+
+   // Make sure we exit (and thus the server is killed too)
+   var stopTests = function () {
+   process.exit(0);
+   };
+   process.on('SIGINT', stopTests);
+   process.on('SIGTERM', stopTests);
+   process.on('uncaughtException', function (e) {
+   console.log(e.stack);
+   stopTests();
+   });
} else {
// make sure parsoidURL ends on /
if (!/\/$/.test(argv.parsoidURL)) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e0de294ec8c86363f0f53da7d53363b8e049b0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil marc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] textlib.py: provide zero value for timedelta - change (pywikibot/core)

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

Change subject: textlib.py: provide zero value for timedelta
..


textlib.py: provide zero value for timedelta

Change-Id: I40822ea6074e1a4b3a2a0fffd0cbcc3598ef1760
---
M pywikibot/textlib.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index fdcda92..4e347c2 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -1149,7 +1149,7 @@
 return self.__name
 
 def dst(self, dt):
-return ZERO
+return datetime.timedelta(0)
 
 def __repr__(self):
 return %s(%s, %s) % (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I40822ea6074e1a4b3a2a0fffd0cbcc3598ef1760
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Whym w...@whym.org
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Mpaa mpaa.w...@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 method to get EnhancedChanges cache grouping key - change (mediawiki/core)

2014-04-11 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Add method to get EnhancedChanges cache grouping key
..

Add method to get EnhancedChanges cache grouping key

Change-Id: Iaf3734baa53b71affca77d5243a579cc70bb522b
---
M includes/changes/EnhancedChangesList.php
1 file changed, 26 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/125391/1

diff --git a/includes/changes/EnhancedChangesList.php 
b/includes/changes/EnhancedChangesList.php
index 6c42601..2d8b5dc 100644
--- a/includes/changes/EnhancedChangesList.php
+++ b/includes/changes/EnhancedChangesList.php
@@ -90,7 +90,6 @@
public function recentChangesLine( $baseRC, $watched = false ) {
wfProfileIn( __METHOD__ );
 
-   # If it's a new day, add the headline and flush the cache
$date = $this-getLanguage()-userDate(
$baseRC-mAttribs['rc_timestamp'],
$this-getUser()
@@ -98,6 +97,7 @@
 
$ret = '';
 
+   # If it's a new day, add the headline and flush the cache
if ( $date != $this-lastdate ) {
# Process current cache
$ret = $this-recentChangesBlock();
@@ -121,28 +121,45 @@
 * @param RCCacheEntry $cacheEntry
 */
protected function addCacheEntry( RCCacheEntry $cacheEntry ) {
+   $cacheGroupingKey = $this-getCacheGroupingKey( $cacheEntry );
+
+   if ( !isset( $this-rc_cache[$cacheGroupingKey] ) ) {
+   $this-rc_cache[$cacheGroupingKey] = array();
+   }
+
+   array_push( $this-rc_cache[$cacheGroupingKey], $cacheEntry );
+   }
+
+   /**
+* Get array key for grouping RCCacheEntry
+*
+* @todo use rc_source to group, if set; fallback to rc_type
+*
+* @param RCCacheEntry $cacheEntry
+*
+* @return string
+*/
+   private function getCacheGroupingKey( RCCacheEntry $cacheEntry ) {
$title = $cacheEntry-getTitle();
-   $secureName = $title-getPrefixedDBkey();
+   $cacheGroupingKey = $title-getPrefixedDBkey();
 
$type = $cacheEntry-mAttribs['rc_type'];
 
+   // @todo remove handling for RC_MOVE and RC_MOVE_OVER_REDIRECT 
(bug 63755)
if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
# Use an @ character to prevent collision with page 
names
-   $this-rc_cache['@@' . ( $this-rcMoveIndex++ )] = 
array( $cacheEntry );
+   $cacheGroupingKey = '@@' . ( $this-rcMoveIndex++ );
} else {
# Logs are grouped by type
if ( $type == RC_LOG ) {
-   $secureName = SpecialPage::getTitleFor(
+   $cacheGroupingKey = SpecialPage::getTitleFor(
'Log',
$cacheEntry-mAttribs['rc_log_type']
)-getPrefixedDBkey();
}
-   if ( !isset( $this-rc_cache[$secureName] ) ) {
-   $this-rc_cache[$secureName] = array();
-   }
-
-   array_push( $this-rc_cache[$secureName], $cacheEntry );
}
+
+   return $cacheGroupingKey;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf3734baa53b71affca77d5243a579cc70bb522b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add checks for WikiForum extension - change (integration/jenkins-job-builder-config)

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

Change subject: Add checks for WikiForum extension
..


Add checks for WikiForum extension

Change-Id: I943d37005c4758994ab9d28f3887ece84b26686a
---
M mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 2ac127c..c7bc900 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -553,6 +553,7 @@
  - WikibaseQueryEngine
  - Wikidata
  - WikiEditor
+ - WikiForum
  - wikihiero
  - WikiLexicalData
  - WikiLove

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

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

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


[MediaWiki-commits] [Gerrit] Replace animiationend with setTimeout - change (mediawiki...Popups)

2014-04-11 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review.

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

Change subject: Replace animiationend with setTimeout
..

Replace animiationend with setTimeout

Bug: 63253
Change-Id: Id4b998ad88bf27da8114f8194464bea8a11a0504
---
M resources/ext.popups.core.js
1 file changed, 9 insertions(+), 10 deletions(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 6edaf5b..b0f759c 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -295,16 +295,15 @@
 
$box
.removeClass( 'mwe-popups-fade-out 
mwe-popups-fade-in' )
-   .addClass( 'mwe-popups-fade-out' )
-   .on( 'webkitAnimationEnd oanimationend 
msAnimationEnd animationend', function () {
-   if ( $( this ).hasClass( 
'mwe-popups-fade-out' ) ) {
-   $( this )
-   .off( 
'webkitAnimationEnd oanimationend msAnimationEnd animationend' )
-   .removeClass( 
'mwe-popups-fade-out' )
-   .attr( 'aria-hidden', 
'true' )
-   .hide();
-   }
-   } );
+   .addClass( 'mwe-popups-fade-out' );
+
+   setTimeout( function () {
+   $box
+   .removeClass( 'mwe-popups-fade-out' )
+   .attr( 'aria-hidden', 'true' )
+   .hide();
+
+   }, 150 ); // 0.15s for the fade out animation
 
if ( closeTimer ) {
clearTimeout( closeTimer );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4b998ad88bf27da8114f8194464bea8a11a0504
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna psax...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add trigger for WikiForum checks - change (integration/zuul-config)

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

Change subject: Add trigger for WikiForum checks
..


Add trigger for WikiForum checks

Change-Id: I01b728df0a692438e1bbb931fe2d85ba2ae1267e
---
M layout.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index 239cecb..b1dd210 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -3044,6 +3044,11 @@
   - name: extension-unittests
 extname: Wikidata
 
+  - name: mediawiki/extensions/WikiForum
+template:
+  - name: extension-checks
+extname: WikiForum
+
   - name: mediawiki/extensions/WikiLexicalData
 template:
   - name: extension-checks

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01b728df0a692438e1bbb931fe2d85ba2ae1267e
Gerrit-PatchSet: 4
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix typo in comment - change (mediawiki/core)

2014-04-11 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged.

Change subject: Fix typo in comment
..


Fix typo in comment

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

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



diff --git a/includes/specials/SpecialProtectedpages.php 
b/includes/specials/SpecialProtectedpages.php
index e505ecb..5b4ccb5 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -465,7 +465,7 @@
break;
 
case 'log_comment':
-   // when timestamp is null, this is a old 
protection row
+   // when timestamp is null, this is an old 
protection row
if ( $row-log_timestamp === null ) {
$formatted = Html::rawElement(
'span',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18447c07a783f7d68b89b08cf74eed6149f88670
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix site links group filtering in ItemView - change (mediawiki...Wikibase)

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

Change subject: Fix site links group filtering in ItemView
..


Fix site links group filtering in ItemView

Change-Id: I91fb11ed1547b903a932ebcf62f7d57888c7d965
---
M repo/includes/ItemView.php
1 file changed, 17 insertions(+), 5 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Adrian Lang: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/ItemView.php b/repo/includes/ItemView.php
index 368c2b8..2cb5efd 100644
--- a/repo/includes/ItemView.php
+++ b/repo/includes/ItemView.php
@@ -98,9 +98,24 @@
 * @return string
 */
public function getHtmlForSiteLinkGroup( Item $item, $group, $editable 
= true ) {
-   $siteLinks = $item-getSiteLinks();
-
+   // @todo inject into constructor
+   $sites = SiteSQLStore::newInstance()-getSites();
$specialGroups = 
WikibaseRepo::getDefaultInstance()-getSettings()-getSetting( 
specialSiteLinkGroups );
+
+   $allSiteLinks = $item-getSiteLinks();
+   $siteLinks = array(); // site links of the currently handled 
site group
+
+   foreach( $allSiteLinks as $siteLink ) {
+   $site = $sites-getSite( $siteLink-getSiteId() );
+
+   if ( $site === null ) {
+   continue;
+   }
+
+   if ( $site-getGroup() === $group ) {
+   $siteLinks[] = $siteLink;
+   }
+   }
 
$html = $thead = $tbody = $tfoot = '';
 
@@ -139,9 +154,6 @@
if ( !$sortOk ) {
$siteLinks = $safetyCopy;
}
-
-   // @todo inject into constructor
-   $sites = SiteSQLStore::newInstance()-getSites();
 
// Link to SpecialPage
$editLink = $this-getEditUrl( 'SetSiteLink', $item, null );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91fb11ed1547b903a932ebcf62f7d57888c7d965
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Trigger unit tests for the Campaigns extension - change (integration/zuul-config)

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

Change subject: Trigger unit tests for the Campaigns extension
..


Trigger unit tests for the Campaigns extension

Change-Id: I43299e425b22c00a6c1c9d27632670f165b35b72
---
M layout.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/layout.yaml b/layout.yaml
index b1dd210..d97ac92 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1490,7 +1490,7 @@
 
   - name: mediawiki/extensions/Campaigns
 template:
-  - name: extension-checks
+  - name: extension-unittests
 extname: Campaigns
 
   - name: mediawiki/extensions/Capiunto

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43299e425b22c00a6c1c9d27632670f165b35b72
Gerrit-PatchSet: 2
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: AndyRussG andrew.green...@gmail.com
Gerrit-Reviewer: Adamw awi...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] (bug 57693) supply id for claim group - change (mediawiki...Wikibase)

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

Change subject: (bug 57693) supply id for claim group
..


(bug 57693) supply id for claim group

Allow fragment urls for jumping to claim groups

Change-Id: I2ec7a4fc5a66c43bbfc3a770c8a38a1fdabee100
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/templates.php
M repo/includes/EntityView.php
3 files changed, 9 insertions(+), 4 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Adrian Lang: Looks good to me, approved
  Addshore: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 9956665..b1b16fa 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -55,7 +55,11 @@
template: 'wb-claimlistview',
templateParams: [
'', // listview widget
-   '' // group name and toolbar
+   '', // group name and toolbar
+   function() {
+   var claims = this.option( 'value' );
+   return claims ? 
claims[0].getMainSnak().getPropertyId() : '';
+   }
],
templateShortCuts: {
'$listview': '.wb-claims'
diff --git a/lib/resources/templates.php b/lib/resources/templates.php
index 4b977b4..0e031d6 100644
--- a/lib/resources/templates.php
+++ b/lib/resources/templates.php
@@ -79,7 +79,7 @@
$templates['wb-claimlistview'] =
 HTML
 div class=wb-claimlistview
-   div class=wb-claims
+   div class=wb-claims id=$3
$1 !-- [0,*] wb-claim|wb-statement --
/div
$2 !-- [0,*] wb-toolbar --
diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index a77c94c..6458234 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -572,7 +572,8 @@
 
$claimsHtml .= wfTemplate( 'wb-claimlistview',
$propertyHtml,
-   wfTemplate( 'wb-claimgrouplistview-groupname', 
$propertyLink ) . $toolbarHtml
+   wfTemplate( 'wb-claimgrouplistview-groupname', 
$propertyLink ) . $toolbarHtml,
+   $propertyId-getSerialization()
);
 
}
@@ -580,7 +581,7 @@
$claimgrouplistviewHtml = wfTemplate( 'wb-claimgrouplistview', 
$claimsHtml, '' );
 
// TODO: Add link to SpecialPage that allows adding a new claim.
-   $html = $html . wfTemplate( 'wb-claimlistview', 
$claimgrouplistviewHtml, '' );
+   $html = $html . wfTemplate( 'wb-claimlistview', 
$claimgrouplistviewHtml, '', '' );
 
wfProfileOut( __METHOD__ );
return $html;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ec7a4fc5a66c43bbfc3a770c8a38a1fdabee100
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Lydia Pintscher lydia.pintsc...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Have travis test variety of setups (client-only, repo-only a... - change (mediawiki...Wikibase)

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

Change subject: Have travis test variety of setups (client-only, repo-only and 
both)
..


Have travis test variety of setups (client-only, repo-only and both)

Change-Id: I6ea2ba605c4a51c0718c88fe4446cc1f17537ed4
---
M .travis.yml
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Adrian Lang: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.travis.yml b/.travis.yml
index b1ec644..4b5207a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,17 +5,17 @@
 
 matrix:
   include:
-- env: DBTYPE=mysql LANG=de; MW=master
+- env: DBTYPE=mysql LANG=de; MW=master WB=client
   php: 5.3
-- env: DBTYPE=sqlite LANG=de; MW=master
+- env: DBTYPE=sqlite LANG=de; MW=master WB=repo
   php: 5.3
-- env: DBTYPE=sqlite LANG=de; MW=master
+- env: DBTYPE=sqlite LANG=de; MW=master WB=both
   php: 5.4
-- env: DBTYPE=sqlite LANG=en; MW=master
+- env: DBTYPE=sqlite LANG=en; MW=master WB=client
   php: 5.5
-- env: DBTYPE=sqlite LANG=en; MW=master
+- env: DBTYPE=sqlite LANG=en; MW=master WB=repo
   php: 5.6
-- env: DBTYPE=sqlite LANG=en; MW=master
+- env: DBTYPE=sqlite LANG=en; MW=master WB=both
   php: hhvm
   allow_failures:
 - php: hhvm

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ea2ba605c4a51c0718c88fe4446cc1f17537ed4
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add tests for formatting dates in different langs - change (mediawiki...Wikibase)

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

Change subject: Add tests for formatting dates in different langs
..


Add tests for formatting dates in different langs

Bug: 63723
Change-Id: I485effae6b1c95a2b3d65d4ba1085e3fb25a9b89
---
M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
1 file changed, 43 insertions(+), 3 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Adrian Lang: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 
b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
index 613db09..3d6ce32 100644
--- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
+++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
@@ -6,6 +6,7 @@
 use ValueFormatters\ValueFormatter;
 use ValueFormatters\FormatterOptions;
 use Wikibase\Lib\MwTimeIsoFormatter;
+use Wikibase\Utils;
 
 /**
  * @covers ValueFormatters\TimeFormatter
@@ -268,7 +269,12 @@
$argLists = array();
 
foreach ( $tests as $expected = $args ) {
-   $argLists[] = array( $expected, $args[0], $args[1] );
+   $argLists[] = array( $expected, $args[0], $args[1], 
'en' );
+   }
+
+   //Different language tests at YEAR precision
+   foreach( Utils::getLanguageCodes() as $languageCode ) {
+   $argLists[] = array( '', 
'+000-01-01T00:00:00Z', TimeValue::PRECISION_YEAR, $languageCode );
}
 
return $argLists;
@@ -280,9 +286,43 @@
 * @param string $expected
 * @param string $extendedIsoString
 * @param integer $precision
+* @param string $langCode
 */
-   public function testFormatDate( $expected, $extendedIsoString, 
$precision ) {
-   $langCode = 'en';
+   public function testFormatDate( $expected, $extendedIsoString, 
$precision, $langCode = 'en' ) {
+   //TODO remove this skip section once $brokenLanguages can be 
empty! BUG 63723
+   $brokenLanguages = array(
+   'ab', 'als', 'anp', 'ar', 'arq', 'arz', 'as', 'av', 
'azb',
+   'ba', 'bar', 'bcc', 'be', 'be-tarask', 'be-x-old', 
'bh', 'bho', 'bn', 'bo', 'bpy', 'bqi', 'bxr',
+   'cdo', 'ce', 'ckb', 'crh', 'crh-latn', 'crh-cyrl', 
'cs', 'cu', 'cv',
+   'da', 'de', 'de-at', 'de-ch', 'de-formal', 'dsb', 'dz',
+   'el', 'eo', 'et',
+   'fa', 'fi', 'fit', 'fiu-vro', 'fo', 'frr', 'fur',
+   'gan', 'gan-hans', 'gan-hant', 'gl', 'glk', 'grc', 
'gsw', 'gu',
+   'he', 'hi', 'hr', 'hrx', 'hsb', 'hu', 'hy',
+   'ii', 'inh', 'is',
+   'ja', 'jut',
+   'kaa', 'kk', 'kk-arab', 'kk-cyrl', 'kk-latn', 'kk-cn', 
'kk-kz', 'kk-tr', 'kl', 'km', 'kn',
+   'ko', 'ko-kp', 'koi', 'krc', 'ks', 'ks-arab', 
'ks-deva', 'ksh', 'ku-arab', 'kv',
+   'la', 'lb', 'lbe', 'lez', 'liv', 'lo', 'lzh',
+   'mai', 'mhr', 'mr', 'mrj', 'mwl', 'my', 'myv', 'mzn',
+   'nan', 'nb', 'nds', 'ne', 'new', 'nn', 'no',
+   'oc', 'or', 'os',
+   'pa', 'pdc', 'pdt', 'pfl', 'pi', 'pnt', 'pt', 'pt-br',
+   'ru', 'rue',
+   'sa', 'sah', 'sk', 'sl', 'sli', 'sr', 'sr-ec', 'sr-el', 
'stq',
+   'tcy', 'tg', 'tg-cyrl', 'th', 'tyv',
+   'udm', 'uk', 'uz',
+   'vep', 'vi', 'vmf', 'vo', 'vot', 'vro',
+   'wuu',
+   'xal',
+   'yi', 'yue',
+   'za', 'za', 'zh', 'zh-classical', 'zh-cn', 'zh-hans', 
'zh-hant', 'zh-hk', 'zh-min-nan', 'zh-mo',
+   'zh-my', 'zh-sg', 'zh-tw', 'zh-yue'
+   );
+   if( in_array( $langCode, $brokenLanguages ) ) {
+   $this-markTestSkipped( Test for lang {$langCode} 
currently broken: Bug 63723 );
+   }
+
$options = new FormatterOptions( array(
ValueFormatter::OPT_LANG = $langCode
) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I485effae6b1c95a2b3d65d4ba1085e3fb25a9b89
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 


[MediaWiki-commits] [Gerrit] Make mwext-InputBox-jslint voting - change (integration/zuul-config)

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

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

Change subject: Make mwext-InputBox-jslint voting
..

Make mwext-InputBox-jslint voting

There is no Javascript in InputBox, though there are now some json files
which are linted using the same job. So make the jslint job to be
voting.

Bug: 61606
Change-Id: Idb1c55658624b676523bddf1270c71fb2c7cd880
---
M layout.yaml
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index d97ac92..043760a 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -410,8 +410,6 @@
 voting: false
   - name: mwext-FlaggedRevs-jslint # bug 63117
 voting: false
-  - name: mwext-InputBox-jslint  # bug 61606
-voting: false
   - name: mwext-JsonData-jslint  # bug 61607
 voting: false
   - name: mwext-LastModified-jslint  # bug 61608

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

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

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


[MediaWiki-commits] [Gerrit] Make mwext-InputBox-jslint voting - change (integration/zuul-config)

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

Change subject: Make mwext-InputBox-jslint voting
..


Make mwext-InputBox-jslint voting

There is no Javascript in InputBox, though there are now some json files
which are linted using the same job. So make the jslint job to be
voting.

Bug: 61606
Change-Id: Idb1c55658624b676523bddf1270c71fb2c7cd880
---
M layout.yaml
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index d97ac92..043760a 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -410,8 +410,6 @@
 voting: false
   - name: mwext-FlaggedRevs-jslint # bug 63117
 voting: false
-  - name: mwext-InputBox-jslint  # bug 61606
-voting: false
   - name: mwext-JsonData-jslint  # bug 61607
 voting: false
   - name: mwext-LastModified-jslint  # bug 61608

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

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

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


[MediaWiki-commits] [Gerrit] send_some improvements - change (mediawiki...CirrusSearch)

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

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

Change subject: send_some improvements
..

send_some improvements

Fix an off by one error that would cause it to replay at twice real time.

Switch from an every nth log to a p% of logs configuration.  This is
more granular when you really want to replay 40%, 50%, 70% or whatever.

Change-Id: I090fcd7e552497f6381989ff237f51e05b50503c
---
M tests/load/send_some.py
1 file changed, 34 insertions(+), 28 deletions(-)


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

diff --git a/tests/load/send_some.py b/tests/load/send_some.py
index aab601a..2cc959b 100644
--- a/tests/load/send_some.py
+++ b/tests/load/send_some.py
@@ -2,6 +2,7 @@
 
 
 import sys
+import random
 import urllib
 import urllib2
 from multiprocessing import Process, Queue
@@ -17,7 +18,17 @@
 print Fetched  + url
 
 
-def send_lines(every, jobs, destination):
+def hostname(wiki):
+wiki = wiki.split(:)[1]
+if wiki == commonswiki:
+return commons.wikimedia.org
+if wiki[2:] == wiki:
+return wiki[0:2] + .wikipedia.org
+# Not perfect but decent
+return wiki[0:2] + . + wiki[2:] + .org
+
+
+def send_lines(percent, jobs, destination):
 queue = Queue(jobs)  # Only allow a backlog of one per job
 
 # Spawn jobs.  Note that we just spawn them as daemon because we don't
@@ -28,8 +39,12 @@
 def work(queue):
 while True:
 try:
-search = queue.get()
-send_line(search, destination)
+(hostname, search) = queue.get()
+if %s in destination:
+resolved_destination = destination % hostname
+else:
+resolved_destination = destination
+send_line(search, resolved_destination)
 except (KeyboardInterrupt, SystemExit):
 break
 except:
@@ -41,52 +56,43 @@
 
 # Got to read stdin line by line even on old pythons
 line = sys.stdin.readline()
-n = 1
-last_time = None
-last_start = time.time()
+target_lag = None
 while line:
-if n != every:
-n += 1
+if random.uniform(0, 100)  percent:
 line = sys.stdin.readline()
 continue
 s = line.strip().split(\t)
 target_time = calendar.timegm(
 time.strptime(s[1][:-1] + UTC, %Y-%m-%dT%H:%M:%S%Z))
-if last_time is None:
-last_time = target_time
-elif last_time  target_time:
-now = time.time()
-time_since_last_time = now - last_start
-wait_time = target_time - last_time - time_since_last_time
-lag = last_start - last_time
-last_time = target_time
-last_start = now
-if wait_time  0:
-print Sleeping %s to stay %s behind the logged time. % \
-(wait_time, lag)
-time.sleep(wait_time)
+lag = time.time() - target_time
+if target_lag is None:
+target_lag = time.time() - target_time
+wait_time = target_lag - lag
+if wait_time = 1:
+print Sleeping %s to stay %s ahead of the logged time. % \
+(wait_time, target_lag)
+time.sleep(wait_time)
 try:
-queue.put(urllib.unquote(s[3]), False)
+queue.put((hostname(s[2]), urllib.unquote(s[3])), False)
 except Full:
 print Couldn't keep up so dropping the request
-# send_line(line, destination)
-n = 1
 line = sys.stdin.readline()
 
 
 if __name__ == __main__:
 from optparse import OptionParser
 parser = OptionParser(usage=usage: %prog [options] destination)
-parser.add_option(-n, dest=every, type=int, default=1, metavar=N,
-  help=send every Nth search)
+parser.add_option(-p, dest=percent, type=int, default=1, metavar=N,
+  help=send this percent of search results)
 parser.add_option(-j, --jobs, type=int, default=1, metavar=JOBS,
   help=number of processes used to send searches)
 parser.add_option(-d, --destination, dest=destination, type=string,
   metavar=DESTINATION,
   default=http://127.0.0.1:8080/wiki/Special:Search;,
-  help=where to send the searches)
+  help=Where to send the searches.  Add %s as hostname  +
+   to send to hostname based the log line.)
 (options, args) = parser.parse_args()
 try:
-send_lines(options.every, options.jobs, options.destination)
+send_lines(options.percent, options.jobs, options.destination)
 except KeyboardInterrupt:
 pass  # This is how we expect to exit anyway

-- 
To 

[MediaWiki-commits] [Gerrit] Prefer title for prefix search match - change (mediawiki...CirrusSearch)

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

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

Change subject: Prefer title for prefix search match
..

Prefer title for prefix search match

If a page has both a title and a redirect match then return the title instead
of the redirect.

Bug: 63627
Change-Id: I078c4767024cd584ab28ec2e1f4dde3e26d774f0
(cherry picked from commit 4da200bc179883fec91f379c6b1ae422482f92eb)
---
M includes/ResultsType.php
M tests/browser/features/prefix_search.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/support/hooks.rb
M tests/browser/features/support/pages/search_page.rb
5 files changed, 34 insertions(+), 16 deletions(-)


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

diff --git a/includes/ResultsType.php b/includes/ResultsType.php
index e3cbecd..686b442 100644
--- a/includes/ResultsType.php
+++ b/includes/ResultsType.php
@@ -95,22 +95,25 @@
// Now we have to use the highlights to figure out 
whether it was the title or the redirect
// that matched.  It is kind of a shame we can't really 
give the highlighting to the client
// though.
-   if ( isset( $highlights[ 
redirect.title.$this-matchedAnalyzer ] ) ) {
-   // The match was against a redirect so we 
should replace the $title with one that
-   // represents the redirect.
-   // The first step is to strip the actual 
highlighting from the title.
-   $redirectTitle = $highlights[ 
redirect.title.$this-matchedAnalyzer ][ 0 ];
-   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_PRE, '', $redirectTitle );
-   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_POST, '', $redirectTitle );
+   if ( !isset( $highlights[ 
title.$this-matchedAnalyzer ] ) ) {
+   // The match wasn't against the title, so it 
better be against a redirect.
+   if ( isset( $highlights[ 
redirect.title.$this-matchedAnalyzer ] ) ) {
+   // The match was against a redirect so 
we should replace the $title with one that
+   // represents the redirect.
+   // The first step is to strip the 
actual highlighting from the title.
+   $redirectTitle = $highlights[ 
redirect.title.$this-matchedAnalyzer ][ 0 ];
+   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_PRE, '', $redirectTitle );
+   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_POST, '', $redirectTitle );
 
-   // Instead of getting the redirect's real 
namespace we're going to just use the namespace
-   // of the title.  This is not great but OK 
given that we can't find cross namespace
-   // redirects properly any way.
-   $title = Title::makeTitle( $r-namespace, 
$redirectTitle );
-   } else if ( !isset( $highlights[ 
title.$this-matchedAnalyzer ] ) ) {
-   // We're not really sure where the match came 
from so lets just pretend it was the title?
-   wfDebugLog( 'CirrusSearch', Title search 
result type hit a match but we can't  .
-   figure out what caused the match:  
$r-namespace:$r-title);
+   // Instead of getting the redirect's 
real namespace we're going to just use the namespace
+   // of the title.  This is not great but 
OK given that we can't find cross namespace
+   // redirects properly any way.
+   $title = Title::makeTitle( 
$r-namespace, $redirectTitle );
+   } else {
+   // We're not really sure where the 
match came from so lets just pretend it was the title.
+   wfDebugLog( 'CirrusSearch', Title 
search result type hit a match but we can't  .
+   figure out what caused the 
match:  $r-namespace:$r-title);
+   }
}
if ( $this-getText ) {
$title = $title-getPrefixedText();
diff --git a/tests/browser/features/prefix_search.feature 
b/tests/browser/features/prefix_search.feature
index 5fbc9b3..99f9d46 100644
--- a/tests/browser/features/prefix_search.feature
+++ 

[MediaWiki-commits] [Gerrit] Add support for the experimental highlighter - change (mediawiki...CirrusSearch)

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

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

Change subject: Add support for the experimental highlighter
..

Add support for the experimental highlighter

This highlighter must be installed as an Elasticsearch plugin before you
can use it.  Once you have you can turn it on and use it without making
any changes to the index.  You can also instruct Cirrus to optimize the
index for the experimental highlighter.  If you do the next time you reindex
highlights will speed up and the index should shrink.  If you turn off
the experimental highlighter now that you've optimized the index for it
searches will crash.  To turn it off you'll have to turn off the optimization,
reindex, and then turn it off.

Got 54411 in the process because it was in the way.

Bug: 60141
Bug: 54411
Bug: 54526

Change-Id: Ie546c1b50e6394b8f100766d3fb7ee1b5a0aaf8e
(cherry picked from commit 9a6a338e90f51b71e77189201072e4f773f575a1)
---
M CirrusSearch.php
M includes/MappingConfigBuilder.php
M includes/ResultsType.php
M maintenance/updateOneSearchIndexConfig.php
M tests/browser/features/highlighting.feature
5 files changed, 156 insertions(+), 59 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 0b223ac..c718839 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -57,6 +57,23 @@
 // don't contain user information.
 $wgCirrusSearchSlowSearch = 10.0;
 
+// Should CirrusSearch attempt to use the experimental highlighter.  It is an
+// Elasticsearch plugin that should produce better snippets for search results.
+// Installation instructions are here:
+// https://github.com/wikimedia/search-highlighter
+// If you have the highlighter installed you can switch this on and off so long
+// as you don't rebuild the index while
+// $wgCirrusSearchOptimizeIndexForExperimentalHighlighter is true.  Setting it
+// to true without the highlighter installed will break search.
+$wgCirrusSearchUseExperimentalHighlighter = false;
+
+// Should CirrusSearch optimize the index for the experimental highlighter.
+// This will speed up indexing, save a ton of space, and speed up highlighting
+// slightly.  This only takes effect if you rebuild the index. The downside is
+// that you can no longer switch $wgCirrusSearchUseExperimentalHighlighter on
+// and off - it has to stay on.
+$wgCirrusSearchOptimizeIndexForExperimentalHighlighter = false;
+
 // By default, Cirrus will organize pages into one of two indexes (general or
 // content) based on whether a page is in a content namespace. This should
 // suffice for most wikis. This setting allows individual namespaces to be
diff --git a/includes/MappingConfigBuilder.php 
b/includes/MappingConfigBuilder.php
index ee9f0d9..8754e6a 100644
--- a/includes/MappingConfigBuilder.php
+++ b/includes/MappingConfigBuilder.php
@@ -25,6 +25,7 @@
const MINIMAL = 0;
const ENABLE_NORMS = 1;
const COPY_TO_SUGGEST = 2;
+   const SPEED_UP_HIGHLIGHTING = 4;
 
/**
 * Version number for the core analysis. Increment the major
@@ -32,7 +33,7 @@
 * and change the minor version when it changes but isn't
 * incompatible
 */
-   const VERSION = 0.4;
+   const VERSION = 1.0;
 
/**
 * Whether to allow prefix searches to match on any word
@@ -47,13 +48,20 @@
private $phraseUseText;
 
/**
+* @var bool should the index be optimized for the experimental 
highlighter?
+*/
+   private $optimizeForExperimentalHighlighter;
+
+   /**
 * Constructor
 * @param bool $anyWord Prefix search on any word
 * @param bool $useText Text uses suggestion analyzer
+* @param bool should the index be optimized for the experimental 
highlighter?
 */
-   public function __construct( $anyWord, $useText ) {
+   public function __construct( $anyWord, $useText, 
$optimizeForExperimentalHighlighter ) {
$this-prefixSearchStartsWithAnyWord = $anyWord;
$this-phraseUseText = $useText;
+   $this-optimizeForExperimentalHighlighter = 
$optimizeForExperimentalHighlighter;
}
 
/**
@@ -79,7 +87,7 @@
}
 
$textExtraAnalyzers = array();
-   $textOptions = MappingConfigBuilder::ENABLE_NORMS;
+   $textOptions = MappingConfigBuilder::ENABLE_NORMS | 
MappingConfigBuilder::SPEED_UP_HIGHLIGHTING;
if ( $this-phraseUseText ) {
$textExtraAnalyzers[] = $suggestExtra;
$textOptions |= MappingConfigBuilder::COPY_TO_SUGGEST;
@@ -111,13 +119,14 @@
'template' = 
$this-buildLowercaseKeywordField(),
'outgoing_link' = $this-buildKeywordField(),

[MediaWiki-commits] [Gerrit] Switch a few test cases back into es5 mode - change (mediawiki/core)

2014-04-11 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Switch a few test cases back into es5 mode
..

Switch a few test cases back into es5 mode

Followup to: I24a0d1677f887097065fab874fea15f3855a4f34
Bug: 63805

Change-Id: I3b62e14493e9ae93d66691901d866b379dcd55da
---
M tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.test.js
3 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/125397/1

diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
index f5fd16d..7841cf7 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
@@ -129,6 +129,7 @@
 
QUnit.module( 'mediawiki.Title', QUnit.newMwEnvironment( { config: 
config } ) );
 
+   /*jshint es3:false */
QUnit.test( 'constructor', cases.invalid.length, function ( assert ) {
var i, title;
for ( i = 0; i  cases.valid.length; i++ ) {
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
index 7a58d38..216be9b 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
@@ -60,6 +60,7 @@
} );
} );
 
+   /*jshint es3:false */
QUnit.test( 'Constructor( String[, Object ] )', 10, function ( assert ) 
{
var uri;
 
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
index f20ce67..468ccf2 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
@@ -781,6 +781,7 @@
mw.loader.load( target );
} );
 
+   /*jshint es3:false */
QUnit.test( 'mw.html', 13, function ( assert ) {
assert.throws( function () {
mw.html.escape();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b62e14493e9ae93d66691901d866b379dcd55da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Handle exceptions in ClaimDifferenceVisualizer - change (mediawiki...Wikibase)

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

Change subject: Handle exceptions in ClaimDifferenceVisualizer
..


Handle exceptions in ClaimDifferenceVisualizer

@note: we'll want a nicer solution that is more consistent
and shares code as how we handle things in SnakHtmlGenerator.

But this is an improvement over outputting '?' in a diff.

Bug: 63710
Change-Id: I683f086b561b2d1d077a1ae919fa6c4f9d507610
---
M repo/includes/ClaimDifferenceVisualizer.php
1 file changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/repo/includes/ClaimDifferenceVisualizer.php 
b/repo/includes/ClaimDifferenceVisualizer.php
index bbe7980..35a59da 100644
--- a/repo/includes/ClaimDifferenceVisualizer.php
+++ b/repo/includes/ClaimDifferenceVisualizer.php
@@ -241,8 +241,15 @@
}
try {
return $this-snakDetailsFormatter-formatSnak( $snak );
-   } catch ( FormattingException $ex ) {
-   return '?'; // XXX: or include the error message?
+   } catch ( \Exception $ex ) {
+   // @fixme maybe there is a way we can render something 
more useful
+   // we are getting multiple types of exceptions and 
should handle
+   // consistent (and shared code) with what we do in 
SnakHtmlGenerator.
+   $messageText = wfMessage( 
'wikibase-snakformat-invalid-value' )
+   -inLanguage( $this-langCode )
+   -parse();
+
+   return $messageText;
}
}
 
@@ -317,7 +324,7 @@
try {
$headerText .= wfMessage( 'colon-separator' 
)-inLanguage( $this-langCode )-escaped()
. $this-snakBreadCrumbFormatter-formatSnak( 
$snak );
-   } catch ( FormattingException $ex ) {
+   } catch ( \Exception $ex ) {
// just ignore it
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I683f086b561b2d1d077a1ae919fa6c4f9d507610
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Normalise digits in time formatter - change (mediawiki...Wikibase)

2014-04-11 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged.

Change subject: Normalise digits in time formatter
..


Normalise digits in time formatter

Fixes formatting of dates when language is set to Arabic
or other such language that has localised digits.

Ideally we should support localised digits, but that needs
to be done together with the parser handling them. (bug 63732)

Bug: 63733
Change-Id: I251b16a4bd6b81811eb561dbf623425db8c09be8
---
M lib/includes/formatters/MwTimeIsoFormatter.php
M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
2 files changed, 40 insertions(+), 18 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Addshore: Checked; Looks good to me, approved



diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php 
b/lib/includes/formatters/MwTimeIsoFormatter.php
index 4e7d8b6..7207fba 100644
--- a/lib/includes/formatters/MwTimeIsoFormatter.php
+++ b/lib/includes/formatters/MwTimeIsoFormatter.php
@@ -89,19 +89,41 @@
$timestamp
);
 
+   // we do not handle parsing arabic, farsi, etc. digits (bug 
63732)
+   $normalisedDate = $this-normaliseDigits( $localisedDate );
+
//If we cant reliably fix the year return the full timestamp,
//  this should never happen as sprintfDate should always 
return a 4 digit year
-   if( substr_count( $localisedDate, $matches[4] ) !== 1 ) {
+   if( !$this-canFormatYear( $normalisedDate, $matches ) ) {
return $extendedIsoTimestamp;
}
 
-   $localisedDate = str_replace(
+   $formattedDate = str_replace(
$matches[4],
$this-formatYear( $matches[2], $precision, $isBCE ),
-   $localisedDate
+   $normalisedDate
);
 
-   return $localisedDate;
+   return $formattedDate;
+   }
+
+   /**
+* @param string $date
+*
+* @return string
+*/
+   private function normaliseDigits( $date ) {
+   return $this-language-parseFormattedNumber( $date );
+   }
+
+   /**
+* @param string $date
+* @param array $matches
+*
+* @return boolean
+*/
+   private function canFormatYear( $date, $matches ) {
+   return substr_count( $date, $matches[4] ) === 1;
}
 
/**
diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 
b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
index 3d6ce32..8c73ff1 100644
--- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
+++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
@@ -291,26 +291,26 @@
public function testFormatDate( $expected, $extendedIsoString, 
$precision, $langCode = 'en' ) {
//TODO remove this skip section once $brokenLanguages can be 
empty! BUG 63723
$brokenLanguages = array(
-   'ab', 'als', 'anp', 'ar', 'arq', 'arz', 'as', 'av', 
'azb',
-   'ba', 'bar', 'bcc', 'be', 'be-tarask', 'be-x-old', 
'bh', 'bho', 'bn', 'bo', 'bpy', 'bqi', 'bxr',
+   'ab', 'als', 'ar', 'arq', 'arz', 'av', 'azb',
+   'ba', 'bar', 'bcc', 'be', 'be-tarask', 'be-x-old', 
'bqi', 'bxr',
'cdo', 'ce', 'ckb', 'crh', 'crh-latn', 'crh-cyrl', 
'cs', 'cu', 'cv',
-   'da', 'de', 'de-at', 'de-ch', 'de-formal', 'dsb', 'dz',
+   'da', 'de', 'de-at', 'de-ch', 'de-formal', 'dsb',
'el', 'eo', 'et',
'fa', 'fi', 'fit', 'fiu-vro', 'fo', 'frr', 'fur',
-   'gan', 'gan-hans', 'gan-hant', 'gl', 'glk', 'grc', 
'gsw', 'gu',
-   'he', 'hi', 'hr', 'hrx', 'hsb', 'hu', 'hy',
+   'gan', 'gan-hans', 'gan-hant', 'gl', 'glk', 'grc', 
'gsw',
+   'he', 'hr', 'hrx', 'hsb', 'hu', 'hy',
'ii', 'inh', 'is',
'ja', 'jut',
-   'kaa', 'kk', 'kk-arab', 'kk-cyrl', 'kk-latn', 'kk-cn', 
'kk-kz', 'kk-tr', 'kl', 'km', 'kn',
-   'ko', 'ko-kp', 'koi', 'krc', 'ks', 'ks-arab', 
'ks-deva', 'ksh', 'ku-arab', 'kv',
-   'la', 'lb', 'lbe', 'lez', 'liv', 'lo', 'lzh',
-   'mai', 'mhr', 'mr', 'mrj', 'mwl', 'my', 'myv', 'mzn',
-   'nan', 'nb', 'nds', 'ne', 'new', 'nn', 'no',
-   'oc', 'or', 'os',
-   'pa', 'pdc', 'pdt', 'pfl', 'pi', 'pnt', 'pt', 'pt-br',
+   'kaa', 'kk', 'kk-arab', 'kk-cyrl', 'kk-latn', 'kk-cn', 
'kk-kz', 'kk-tr', 'kl', 'km',
+   'ko', 'ko-kp', 'koi', 'krc', 'ksh', 'ku-arab', 'kv',
+   'la', 'lb', 'lbe', 'lez', 

[MediaWiki-commits] [Gerrit] Moved Date format user preference to Appearance tab - change (mediawiki/core)

2014-04-11 Thread Code Review
Bartosz Dziewoński has submitted this change and it was merged.

Change subject: Moved Date format user preference to Appearance tab
..


Moved Date format user preference to Appearance tab

This user preference affects the appearance of the site,
so this feels like a natural fit

Bug: 63582
Change-Id: Ib97b1b39723f1835b7f6086ff1418ab5de13a7a1
---
M includes/Preferences.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 5 insertions(+), 7 deletions(-)

Approvals:
  Bartosz Dziewoński: Verified; Looks good to me, approved



diff --git a/includes/Preferences.php b/includes/Preferences.php
index 33d9333..d026b97 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -84,8 +84,8 @@
 
self::profilePreferences( $user, $context, $defaultPreferences 
);
self::skinPreferences( $user, $context, $defaultPreferences );
-   self::filesPreferences( $user, $context, $defaultPreferences );
self::datetimePreferences( $user, $context, $defaultPreferences 
);
+   self::filesPreferences( $user, $context, $defaultPreferences );
self::renderingPreferences( $user, $context, 
$defaultPreferences );
self::editingPreferences( $user, $context, $defaultPreferences 
);
self::rcPreferences( $user, $context, $defaultPreferences );
@@ -648,7 +648,7 @@
'type' = 'radio',
'options' = $dateOptions,
'label' = '#160;',
-   'section' = 'datetime/dateformat',
+   'section' = 'rendering/dateformat',
);
}
 
@@ -665,7 +665,7 @@
'raw' = 1,
'label-message' = 'servertime',
'default' = $nowserver,
-   'section' = 'datetime/timeoffset',
+   'section' = 'rendering/timeoffset',
);
 
$defaultPreferences['nowlocal'] = array(
@@ -673,7 +673,7 @@
'raw' = 1,
'label-message' = 'localtime',
'default' = $nowlocal,
-   'section' = 'datetime/timeoffset',
+   'section' = 'rendering/timeoffset',
);
 
// Grab existing pref.
@@ -703,7 +703,7 @@
'options' = $tzOptions,
'default' = $tzSetting,
'size' = 20,
-   'section' = 'datetime/timeoffset',
+   'section' = 'rendering/timeoffset',
);
}
 
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 00745d8..9fc392f 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -932,7 +932,6 @@
 prefs-skin: Skin,
 skin-preview: Preview,
 datedefault: No preference,
-prefs-datetime: Date and time,
 prefs-labs: Labs features,
 prefs-user-pages: User pages,
 prefs-personal: User profile,
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 61c9c0d..0a37451 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1084,7 +1084,6 @@
 prefs-skin: Used in user preferences.\n{{Identical|Skin}},
 skin-preview: {{doc-actionlink}}\nThe link beside each skin name in 
[[Special:Preferences|your user preferences]], tab 
\skin\.\n{{Identical|Preview}},
 datedefault: Used as checkbox label in 
[[Special:Preferences#mw-prefsection-datetime|user preferences]], 
{{msg-mw|prefs-datetime}} tab.\n\nThis message indicates 
{{msg-mw|prefs-dateformat}} is default (= not specified).,
-prefs-datetime: {{Identical|Date}},
 prefs-labs: Header of a subsection at [[Special:Preferences]], tab 
''{{int:prefs-editing}}'', listing features that are experimental,
 prefs-user-pages: Header of a subsection at [[Special:Preferences]], 
tab ''{{int:prefs-misc}}'', listing features that are related to user pages,
 prefs-personal: Title of a tab in 
[[Special:Preferences]].\n{{Identical|User profile}},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib97b1b39723f1835b7f6086ff1418ab5de13a7a1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 


[MediaWiki-commits] [Gerrit] Add composer-install-extensions builder - change (integration/jenkins-job-builder-config)

2014-04-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Add composer-install-extensions builder
..

Add composer-install-extensions builder

Requires: https://gerrit.wikimedia.org/r/#/c/125041/

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


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/42/125042/3

diff --git a/macro.yaml b/macro.yaml
index 2802b30..654693e 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -392,6 +392,11 @@
 - shell: /srv/deployment/integration/slave-scripts/tools/fetch-mw-ext 
{dependencies}
 
 - builder:
+name: composer-install-extensions
+builders:
+- shell: 
/srv/deployment/integration/slave-scripts/bin/composer-install-extensions.sh 
{dependencies}
+
+- builder:
 name: mw-run-update-script
 builders:
 - shell: 'php $WORKSPACE/maintenance/update.php --quick'
@@ -410,6 +415,8 @@
  - mw-install-sqlite
  - mw-get-extensions:
   dependencies: '{dependencies}'
+ - composer-install-extensions:
+  dependencies: '{dependencies}'
  - mw-apply-settings
  - mw-run-update-script
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I018b3eeca7a963e40835745968f23e6d6297ef06
Gerrit-PatchSet: 3
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add extension composer-install bash script - change (integration/jenkins)

2014-04-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Add extension composer-install bash script
..

Add extension composer-install bash script

Change-Id: Ieef52a65c777dce8a7abde795319a72f58362eb0
---
A bin/composer-install-extensions.sh
1 file changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/41/125041/1

diff --git a/bin/composer-install-extensions.sh 
b/bin/composer-install-extensions.sh
new file mode 100644
index 000..902d954
--- /dev/null
+++ b/bin/composer-install-extensions.sh
@@ -0,0 +1,39 @@
+#!/bin/bash -e
+
+# Helper functions
+function warn()  { echo $@ 12; }
+function fatal() { warn $@; exit 1; }
+
+# Function run composer install on an extension under the job workspace
+# Parameter: extension name (ex: Validator)
+function composer_install {
+   # TODO: make sure that directory exist or die saying the
+   # Gerrit replication failed to replicate this extension.
+   DEST=$WORKSPACE/extensions/$1
+
+   # Do a composer install for the DEST
+   # TODO: only composer install if a composer.json is found
+   echo Composer installing '$DEST'...
+   php /srv/deployment/integration/composer/vendor/bin/composer install -d 
$DEST
+}
+
+# Pre checks
+if [ x$WORKSPACE == x ]; then
+   fatal \$WORKSPACE env variable must be set
+elif [ ! -d $WORKSPACE ]; then
+   fatal $WORKSPACE is not a directory
+fi
+
+# Extract extension names separated by comma
+ARGS=$@
+IFS=,
+mw_exts=($*)
+
+echo Starting composer installs for extensions...
+for mw_ext in ${mw_exts[@]}; do
+   echo
+   echo Composer Installing $mw_ext
+   composer_install $mw_ext
+done;
+echo
+echo Done.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieef52a65c777dce8a7abde795319a72f58362eb0
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Releasing patch version 0.1.2 - change (mediawiki...api)

2014-04-11 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: Releasing patch version 0.1.2
..

Releasing patch version 0.1.2

Change-Id: Ida92a0f19b4eb59d8dcb8435e69df473d2b20d25
---
M lib/mediawiki_api/version.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/ruby/api 
refs/changes/98/125398/1

diff --git a/lib/mediawiki_api/version.rb b/lib/mediawiki_api/version.rb
index 3fbdf0d..8fb0af8 100644
--- a/lib/mediawiki_api/version.rb
+++ b/lib/mediawiki_api/version.rb
@@ -1,3 +1,3 @@
 module MediawikiApi
-  VERSION = 0.1.1
+  VERSION = 0.1.2
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida92a0f19b4eb59d8dcb8435e69df473d2b20d25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Releasing patch version 0.1.2 - change (mediawiki...api)

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

Change subject: Releasing patch version 0.1.2
..


Releasing patch version 0.1.2

Change-Id: Ida92a0f19b4eb59d8dcb8435e69df473d2b20d25
---
M lib/mediawiki_api/version.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/mediawiki_api/version.rb b/lib/mediawiki_api/version.rb
index 3fbdf0d..8fb0af8 100644
--- a/lib/mediawiki_api/version.rb
+++ b/lib/mediawiki_api/version.rb
@@ -1,3 +1,3 @@
 module MediawikiApi
-  VERSION = 0.1.1
+  VERSION = 0.1.2
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida92a0f19b4eb59d8dcb8435e69df473d2b20d25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@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] Stash wgHooks in MwTimeIsoFormatterTest for speed - change (mediawiki...Wikibase)

2014-04-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Stash wgHooks in MwTimeIsoFormatterTest for speed
..

Stash wgHooks in MwTimeIsoFormatterTest for speed

Change-Id: I67ebf3eb95fd1cb872c64aca5019316d9efe178a
---
M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 
b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
index 8c73ff1..adde9d3 100644
--- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
+++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php
@@ -20,7 +20,12 @@
  * @author H. Snater  mediaw...@snater.com 
  * @author Adam Shorland
  */
-class MwTimeIsoFormatterTest extends \PHPUnit_Framework_TestCase {
+class MwTimeIsoFormatterTest extends \MediaWikiTestCase {
+
+   protected function setUp() {
+   parent::setUp();
+   $this-stashMwGlobals( 'wgHooks' );
+   }
 
/**
 * Returns an array of test parameters.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67ebf3eb95fd1cb872c64aca5019316d9efe178a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com

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


[MediaWiki-commits] [Gerrit] Load oojs-ui on demand when use this file is clicked - change (mediawiki...MultimediaViewer)

2014-04-11 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Load oojs-ui on demand when use this file is clicked
..

Load oojs-ui on demand when use this file is clicked

Change-Id: Ia3b6b91c7ff0cb223f5f312eb901726fb6adcf35
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/426
---
M MultimediaViewer.php
M MultimediaViewerHooks.php
M resources/mmv/ui/mmv.ui.reuse.dialog.js
M tests/qunit/mmv/ui/mmv.ui.reuse.dialog.test.js
4 files changed, 99 insertions(+), 33 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/00/125400/1

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 0af11da..4404a14 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -485,10 +485,6 @@
'dependencies' = array(
'mmv.ui',
'oojs',
-   'oojs-ui',
-   'mmv.ui.reuse.share',
-   'mmv.ui.reuse.embed',
-   'mmv.ui.reuse.download',
),
),
 
diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index 82b0b74..e9472e4 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -222,6 +222,10 @@
'dependencies' = array(
'mmv',
'mmv.bootstrap',
+   'oojs-ui',
+   'mmv.ui.reuse.share',
+   'mmv.ui.reuse.embed',
+   'mmv.ui.reuse.download',
),
'localBasePath' = __DIR__,
'remoteExtPath' = 'MultimediaViewer',
diff --git a/resources/mmv/ui/mmv.ui.reuse.dialog.js 
b/resources/mmv/ui/mmv.ui.reuse.dialog.js
index 9d03bec..aac911d 100644
--- a/resources/mmv/ui/mmv.ui.reuse.dialog.js
+++ b/resources/mmv/ui/mmv.ui.reuse.dialog.js
@@ -34,13 +34,6 @@
this.$reuseDialog = $( 'div' )
.addClass( 'mw-mmv-reuse-dialog' );
 
-   this.reuseTabs = new oo.ui.MenuWidget( {
-   classes: [ 'mw-mmv-reuse-tabs' ]
-   } );
-   // MenuWidget has a nasty tendency to hide itself, maybe we're 
not using it right?
-   this.reuseTabs.hide = $.noop;
-   this.reuseTabs.$element.show().appendTo( this.$reuseDialog );
-
this.$downArrow = $( 'div' )
.addClass( 'mw-mmv-reuse-down-arrow' )
.appendTo( this.$reuseDialog );
@@ -54,15 +47,21 @@
 * @property {Object.string, mw.mmv.ui.Element} List of tab 
ui objects.
 */
this.tabs = null;
-
-   this.initTabs();
}
oo.inheritClass( Dialog, mw.mmv.ui.Element );
DP = Dialog.prototype;
 
// FIXME this should happen outside the dialog and the tabs, but we 
need to improve
DP.initTabs = function () {
-   var shareTab, embedTab, downloadTab;
+   var dialog = this, shareTab, embedTab, downloadTab, tab;
+
+   this.reuseTabs = new oo.ui.MenuWidget( {
+   classes: [ 'mw-mmv-reuse-tabs' ]
+   } );
+
+   // MenuWidget has a nasty tendency to hide itself, maybe we're 
not using it right?
+   this.reuseTabs.hide = $.noop;
+   this.reuseTabs.$element.show().appendTo( this.$reuseDialog );
 
this.tabs = {
share: new mw.mmv.ui.reuse.Share( this.$reuseDialog ),
@@ -86,19 +85,48 @@
// Default to 'share' tab
this.selectedTab = 'share';
this.reuseTabs.selectItem( shareTab );
+
+   if ( this.dependenciesNeedToBeAttached ) {
+   this.attachDependencies();
+   }
+
+   if ( this.tabsSetValues ) {
+   // This is a delayed set() for the elements we've just 
created on demand
+   this.tabs.share.set.apply( this.tabs.share, 
this.tabsSetValues.share );
+   this.tabs.download.set.apply( this.tabs.download, 
this.tabsSetValues.download );
+   this.tabs.embed.set.apply( this.tabs.embed, 
this.tabsSetValues.embed );
+   this.tabsSetValues = undefined;
+   }
};
 
/**
 * Handles click on link that opens/closes the dialog.
 */
-DP.handleOpenCloseClick = function() {
+DP.handleOpenCloseClick = function () {
+   var dialog = this,
+   $deferred = $.Deferred();
+
mw.mmv.logger.log( 'use-this-file-link-click' );
 
-   if ( this.isOpen ) {
-   

[MediaWiki-commits] [Gerrit] wfStripIllegalFilenameChars truncates title - change (mediawiki...GWToolset)

2014-04-11 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

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

Change subject: wfStripIllegalFilenameChars truncates title
..

wfStripIllegalFilenameChars truncates title

wfStripIllegalFilenameChars doesn’t just replace /, \,
it removes any part of the string before it. some titles contain these 
characters
as part of the metadata value; e.g., when the value is a URL. we don’t want to
truncate those strings; instead we want to preserve the legal characters.

Bug: 62909
Change-Id: Id48250851d5f540156b03567452972e918ca3b3b
---
M includes/Utils.php
1 file changed, 16 insertions(+), 1 deletion(-)


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

diff --git a/includes/Utils.php b/includes/Utils.php
index fb0b656..318e205 100644
--- a/includes/Utils.php
+++ b/includes/Utils.php
@@ -398,12 +398,27 @@
 * makes sure that the provided title is a valid wiki title
 * @see https://bugzilla.wikimedia.org/show_bug.cgi?id=62909
 *
+* wfStripIllegalFilenameChars doesn’t just replace /, \,
+* it removes any part of the string before it. some titles contain 
these characters
+* as part of the metadata value; e.g., when the value is a URL. we 
don’t want to
+* truncate those strings; instead we want to preserve the legal 
characters.
+*
 * @param {string} $title
+*
+* @param {array}  $options
+* @param {string} $options['replacement']
+* the character used to replace illegal characters; defaults to ‘-’
 *
 * @return {string}
 * the string is not sanitized
 */
-   public static function stripIllegalTitleChars( $title ) {
+   public static function stripIllegalTitleChars( $title, array $options = 
array() ) {
+   $illegal_chars = array( '/', '\\' );
+   $option_defaults = array( 'replacement' = '-' );
+
+   $options = array_merge( $option_defaults, $options );
+
+   $title = str_replace( $illegal_chars, $options['replacement'], 
$title );
$title = Sanitizer::decodeCharReferences( $title );
$title = wfStripIllegalFilenameChars( $title );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id48250851d5f540156b03567452972e918ca3b3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com

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


[MediaWiki-commits] [Gerrit] Load moment.js on demand - change (mediawiki...MultimediaViewer)

2014-04-11 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Load moment.js on demand
..

Load moment.js on demand

Change-Id: I881d38ea201f314fcf364766bb589f56c9e6b057
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/444
---
M MultimediaViewer.php
M MultimediaViewerHooks.php
M resources/mmv/mmv.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
M tests/qunit/mmv/ui/mmv.ui.metadataPanel.test.js
5 files changed, 36 insertions(+), 14 deletions(-)


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

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index 4404a14..dd79e63 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -414,7 +414,6 @@
'mmv.ui.permission',
'mmv.ui.reuse.dialog',
'mmv.ui.truncatableTextField',
-   'moment',
'oojs',
),
 
diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index e9472e4..da9c087 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -226,6 +226,7 @@
'mmv.ui.reuse.share',
'mmv.ui.reuse.embed',
'mmv.ui.reuse.download',
+   'moment',
),
'localBasePath' = __DIR__,
'remoteExtPath' = 'MultimediaViewer',
diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js
index bc8a4d4..aad5900 100755
--- a/resources/mmv/mmv.js
+++ b/resources/mmv/mmv.js
@@ -715,7 +715,7 @@
 * Preloads JS and CSS dependencies that aren't needed to display the 
first image, but could be needed later
 */
MMVP.preloadDependencies = function () {
-   mw.loader.load( [ 'oojs-ui', 'mmv.ui.reuse.share', 
'mmv.ui.reuse.embed', 'mmv.ui.reuse.download' ] );
+   mw.loader.load( [ 'oojs-ui', 'mmv.ui.reuse.share', 
'mmv.ui.reuse.embed', 'mmv.ui.reuse.download', 'moment' ] );
};
 
mw.mmv.MultimediaViewer = MultimediaViewer;
diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 4c12c7a..40b478e 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -15,7 +15,7 @@
  * along with MultimediaViewer.  If not, see http://www.gnu.org/licenses/.
  */
 
-( function ( mw, $, oo, moment ) {
+( function ( mw, $, oo ) {
// Shortcut for prototype later
var MPP;
 
@@ -657,6 +657,7 @@
 */
MPP.setImageInfo = function ( image, imageData, repoData, localUsage, 
globalUsage, user ) {
var msgname,
+   panel = this,
fileTitle = image.filePageTitle;
 
this.setFileTitle( fileTitle.getNameText() );
@@ -664,9 +665,13 @@
this.setFilePageLink( imageData.descriptionUrl );
 
if ( imageData.creationDateTime ) {
-   this.setDateTime( this.formatDate( 
imageData.creationDateTime ), true );
+   this.formatDatePromise( imageData.creationDateTime 
).then( function ( formattedDate ) {
+   panel.setDateTime( formattedDate, true );
+   } );
} else if ( imageData.uploadDateTime ) {
-   this.setDateTime( this.formatDate( 
imageData.uploadDateTime ) );
+   this.formatDatePromise( imageData.uploadDateTime 
).then( function ( formattedDate ) {
+   panel.setDateTime( formattedDate, true );
+   } );
}
 
if ( imageData.source ) {
@@ -726,12 +731,24 @@
 * @param {string} dateString
 * @return {string}
 */
-   MPP.formatDate = function ( dateString ) {
-   var date = moment( dateString );
-   if ( !date.isValid() ) {
-   return dateString;
-   }
-   return date.format( 'LL' );
+   MPP.formatDatePromise = function ( dateString ) {
+   var $deferred = $.Deferred(),
+   date;
+
+   mw.loader.using( 'moment', function () {
+   console.log( 'formatting with moment, yay!' );
+   date = moment( dateString );
+
+   if ( date.isValid() ) {
+   $deferred.resolve( date.format( 'LL' ) );
+   } else {
+   $deferred.resolve( dateString );
+   }
+   }, function ( error ) {
+   $deferred.reject( error );
+   } );
+
+   return $deferred.promise();
};
 
   

[MediaWiki-commits] [Gerrit] Prefer title for prefix search match - change (mediawiki...CirrusSearch)

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

Change subject: Prefer title for prefix search match
..


Prefer title for prefix search match

If a page has both a title and a redirect match then return the title instead
of the redirect.

Bug: 63627
Change-Id: I078c4767024cd584ab28ec2e1f4dde3e26d774f0
(cherry picked from commit 4da200bc179883fec91f379c6b1ae422482f92eb)
---
M includes/ResultsType.php
M tests/browser/features/prefix_search.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/support/hooks.rb
M tests/browser/features/support/pages/search_page.rb
5 files changed, 34 insertions(+), 16 deletions(-)

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



diff --git a/includes/ResultsType.php b/includes/ResultsType.php
index e3cbecd..686b442 100644
--- a/includes/ResultsType.php
+++ b/includes/ResultsType.php
@@ -95,22 +95,25 @@
// Now we have to use the highlights to figure out 
whether it was the title or the redirect
// that matched.  It is kind of a shame we can't really 
give the highlighting to the client
// though.
-   if ( isset( $highlights[ 
redirect.title.$this-matchedAnalyzer ] ) ) {
-   // The match was against a redirect so we 
should replace the $title with one that
-   // represents the redirect.
-   // The first step is to strip the actual 
highlighting from the title.
-   $redirectTitle = $highlights[ 
redirect.title.$this-matchedAnalyzer ][ 0 ];
-   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_PRE, '', $redirectTitle );
-   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_POST, '', $redirectTitle );
+   if ( !isset( $highlights[ 
title.$this-matchedAnalyzer ] ) ) {
+   // The match wasn't against the title, so it 
better be against a redirect.
+   if ( isset( $highlights[ 
redirect.title.$this-matchedAnalyzer ] ) ) {
+   // The match was against a redirect so 
we should replace the $title with one that
+   // represents the redirect.
+   // The first step is to strip the 
actual highlighting from the title.
+   $redirectTitle = $highlights[ 
redirect.title.$this-matchedAnalyzer ][ 0 ];
+   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_PRE, '', $redirectTitle );
+   $redirectTitle = str_replace( 
Searcher::HIGHLIGHT_POST, '', $redirectTitle );
 
-   // Instead of getting the redirect's real 
namespace we're going to just use the namespace
-   // of the title.  This is not great but OK 
given that we can't find cross namespace
-   // redirects properly any way.
-   $title = Title::makeTitle( $r-namespace, 
$redirectTitle );
-   } else if ( !isset( $highlights[ 
title.$this-matchedAnalyzer ] ) ) {
-   // We're not really sure where the match came 
from so lets just pretend it was the title?
-   wfDebugLog( 'CirrusSearch', Title search 
result type hit a match but we can't  .
-   figure out what caused the match:  
$r-namespace:$r-title);
+   // Instead of getting the redirect's 
real namespace we're going to just use the namespace
+   // of the title.  This is not great but 
OK given that we can't find cross namespace
+   // redirects properly any way.
+   $title = Title::makeTitle( 
$r-namespace, $redirectTitle );
+   } else {
+   // We're not really sure where the 
match came from so lets just pretend it was the title.
+   wfDebugLog( 'CirrusSearch', Title 
search result type hit a match but we can't  .
+   figure out what caused the 
match:  $r-namespace:$r-title);
+   }
}
if ( $this-getText ) {
$title = $title-getPrefixedText();
diff --git a/tests/browser/features/prefix_search.feature 
b/tests/browser/features/prefix_search.feature
index 5fbc9b3..99f9d46 100644
--- a/tests/browser/features/prefix_search.feature
+++ b/tests/browser/features/prefix_search.feature
@@ -40,3 +40,10 @@
  

[MediaWiki-commits] [Gerrit] Add support for the experimental highlighter - change (mediawiki...CirrusSearch)

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

Change subject: Add support for the experimental highlighter
..


Add support for the experimental highlighter

This highlighter must be installed as an Elasticsearch plugin before you
can use it.  Once you have you can turn it on and use it without making
any changes to the index.  You can also instruct Cirrus to optimize the
index for the experimental highlighter.  If you do the next time you reindex
highlights will speed up and the index should shrink.  If you turn off
the experimental highlighter now that you've optimized the index for it
searches will crash.  To turn it off you'll have to turn off the optimization,
reindex, and then turn it off.

Got 54411 in the process because it was in the way.

Bug: 60141
Bug: 54411
Bug: 54526

Change-Id: Ie546c1b50e6394b8f100766d3fb7ee1b5a0aaf8e
(cherry picked from commit 9a6a338e90f51b71e77189201072e4f773f575a1)
---
M CirrusSearch.php
M includes/MappingConfigBuilder.php
M includes/ResultsType.php
M maintenance/updateOneSearchIndexConfig.php
M tests/browser/features/highlighting.feature
5 files changed, 156 insertions(+), 59 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 0b223ac..c718839 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -57,6 +57,23 @@
 // don't contain user information.
 $wgCirrusSearchSlowSearch = 10.0;
 
+// Should CirrusSearch attempt to use the experimental highlighter.  It is an
+// Elasticsearch plugin that should produce better snippets for search results.
+// Installation instructions are here:
+// https://github.com/wikimedia/search-highlighter
+// If you have the highlighter installed you can switch this on and off so long
+// as you don't rebuild the index while
+// $wgCirrusSearchOptimizeIndexForExperimentalHighlighter is true.  Setting it
+// to true without the highlighter installed will break search.
+$wgCirrusSearchUseExperimentalHighlighter = false;
+
+// Should CirrusSearch optimize the index for the experimental highlighter.
+// This will speed up indexing, save a ton of space, and speed up highlighting
+// slightly.  This only takes effect if you rebuild the index. The downside is
+// that you can no longer switch $wgCirrusSearchUseExperimentalHighlighter on
+// and off - it has to stay on.
+$wgCirrusSearchOptimizeIndexForExperimentalHighlighter = false;
+
 // By default, Cirrus will organize pages into one of two indexes (general or
 // content) based on whether a page is in a content namespace. This should
 // suffice for most wikis. This setting allows individual namespaces to be
diff --git a/includes/MappingConfigBuilder.php 
b/includes/MappingConfigBuilder.php
index ee9f0d9..8754e6a 100644
--- a/includes/MappingConfigBuilder.php
+++ b/includes/MappingConfigBuilder.php
@@ -25,6 +25,7 @@
const MINIMAL = 0;
const ENABLE_NORMS = 1;
const COPY_TO_SUGGEST = 2;
+   const SPEED_UP_HIGHLIGHTING = 4;
 
/**
 * Version number for the core analysis. Increment the major
@@ -32,7 +33,7 @@
 * and change the minor version when it changes but isn't
 * incompatible
 */
-   const VERSION = 0.4;
+   const VERSION = 1.0;
 
/**
 * Whether to allow prefix searches to match on any word
@@ -47,13 +48,20 @@
private $phraseUseText;
 
/**
+* @var bool should the index be optimized for the experimental 
highlighter?
+*/
+   private $optimizeForExperimentalHighlighter;
+
+   /**
 * Constructor
 * @param bool $anyWord Prefix search on any word
 * @param bool $useText Text uses suggestion analyzer
+* @param bool should the index be optimized for the experimental 
highlighter?
 */
-   public function __construct( $anyWord, $useText ) {
+   public function __construct( $anyWord, $useText, 
$optimizeForExperimentalHighlighter ) {
$this-prefixSearchStartsWithAnyWord = $anyWord;
$this-phraseUseText = $useText;
+   $this-optimizeForExperimentalHighlighter = 
$optimizeForExperimentalHighlighter;
}
 
/**
@@ -79,7 +87,7 @@
}
 
$textExtraAnalyzers = array();
-   $textOptions = MappingConfigBuilder::ENABLE_NORMS;
+   $textOptions = MappingConfigBuilder::ENABLE_NORMS | 
MappingConfigBuilder::SPEED_UP_HIGHLIGHTING;
if ( $this-phraseUseText ) {
$textExtraAnalyzers[] = $suggestExtra;
$textOptions |= MappingConfigBuilder::COPY_TO_SUGGEST;
@@ -111,13 +119,14 @@
'template' = 
$this-buildLowercaseKeywordField(),
'outgoing_link' = $this-buildKeywordField(),
'external_link' = $this-buildKeywordField(),

[MediaWiki-commits] [Gerrit] Faster, more stable browser tests - change (mediawiki...CirrusSearch)

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

Change subject: Faster, more stable browser tests
..


Faster, more stable browser tests

Speed up browser tests by switching from a browser to the api to create pages.
We're not testing that functionality any way.

With the savings we can increase the timeouts on delayed update actions
without feeling like we're taking forvever.  For the most part the whole
thing should be faster even with the increases.

Needs Id0eb49fe3ac1aee3d320e9a1a6a52c7d89f7e2b9 before it'll actually work.

Change-Id: Ic5290e1d811a5634fc4111da3d2b14479dec5d5a
---
M tests/browser/Gemfile
M tests/browser/Gemfile.lock
M tests/browser/features/step_definitions/page_steps.rb
M tests/browser/features/update_general.feature
M tests/browser/features/update_non_existant.feature
M tests/browser/features/update_redirect_loop.feature
M tests/browser/features/update_weight.feature
7 files changed, 99 insertions(+), 96 deletions(-)

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



diff --git a/tests/browser/Gemfile b/tests/browser/Gemfile
index e33d9cc..9dca1c6 100644
--- a/tests/browser/Gemfile
+++ b/tests/browser/Gemfile
@@ -5,3 +5,4 @@
 
 gem mediawiki_selenium, ~ 0.2.0
 gem parallel_tests
+gem mediawiki_api
diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock
index 9dc8559..5d6ed99 100644
--- a/tests/browser/Gemfile.lock
+++ b/tests/browser/Gemfile.lock
@@ -2,27 +2,39 @@
   remote: https://rubygems.org/
   specs:
 builder (3.2.2)
-childprocess (0.5.1)
+childprocess (0.5.2)
   ffi (~ 1.0, = 1.0.11)
-cucumber (1.3.11)
+cucumber (1.3.14)
   builder (= 2.1.2)
   diff-lcs (= 1.1.3)
   gherkin (~ 2.12)
   multi_json (= 1.7.5,  2.0)
-  multi_test (= 0.0.2)
+  multi_test (= 0.1.1)
 data_magic (0.18)
   faker (= 1.1.2)
   yml_reader (= 0.2)
 diff-lcs (1.2.5)
+domain_name (0.5.18)
+  unf (= 0.0.5,  1.0.0)
 faker (1.3.0)
   i18n (~ 0.5)
+faraday (0.9.0)
+  multipart-post (= 1.2,  3)
+faraday-cookie_jar (0.0.6)
+  faraday (= 0.7.4)
+  http-cookie (~ 1.0.0)
 ffi (1.9.3)
 gherkin (2.12.2)
   multi_json (~ 1.3)
 headless (1.0.1)
+http-cookie (1.0.2)
+  domain_name (~ 0.5)
 i18n (0.6.9)
 json (1.8.1)
-mediawiki_selenium (0.2.10)
+mediawiki_api (0.1.2)
+  faraday (~ 0.9, = 0.9.0)
+  faraday-cookie_jar (~ 0.0, = 0.0.6)
+mediawiki_selenium (0.2.17)
   cucumber (~ 1.3, = 1.3.10)
   headless (~ 1.0, = 1.0.1)
   json (~ 1.8, = 1.8.1)
@@ -31,30 +43,34 @@
   rest-client (~ 1.6, = 1.6.7)
   rspec-expectations (~ 2.14, = 2.14.4)
   syntax (~ 1.2, = 1.2.0)
-mime-types (2.1)
-multi_json (1.9.0)
-multi_test (0.0.3)
+mime-types (2.2)
+multi_json (1.9.2)
+multi_test (0.1.1)
+multipart-post (2.0.0)
 net-http-persistent (2.9.4)
-page-object (0.9.7)
+page-object (0.9.8)
   page_navigation (= 0.9)
   selenium-webdriver (= 2.40.0)
   watir-webdriver (= 0.6.8)
 page_navigation (0.9)
   data_magic (= 0.14)
-parallel (0.9.2)
+parallel (1.0.0)
 parallel_tests (0.16.10)
   parallel
 rest-client (1.6.7)
   mime-types (= 1.16)
 rspec-expectations (2.14.5)
   diff-lcs (= 1.1.3,  2.0)
-rubyzip (1.1.0)
-selenium-webdriver (2.40.0)
+rubyzip (1.1.3)
+selenium-webdriver (2.41.0)
   childprocess (= 0.5.0)
   multi_json (~ 1.0)
   rubyzip (~ 1.0)
   websocket (~ 1.0.4)
 syntax (1.2.0)
+unf (0.1.4)
+  unf_ext
+unf_ext (0.0.6)
 watir-webdriver (0.6.8)
   selenium-webdriver (= 2.18.0)
 websocket (1.0.7)
@@ -64,5 +80,6 @@
   ruby
 
 DEPENDENCIES
+  mediawiki_api
   mediawiki_selenium (~ 0.2.0)
   parallel_tests
diff --git a/tests/browser/features/step_definitions/page_steps.rb 
b/tests/browser/features/step_definitions/page_steps.rb
index 0a3dc0c..5ad3c20 100644
--- a/tests/browser/features/step_definitions/page_steps.rb
+++ b/tests/browser/features/step_definitions/page_steps.rb
@@ -11,14 +11,17 @@
 end
 
 Given(/^a page named (.*) doesn't exist$/) do |title|
-  visit(ArticlePage, using_params: {page_name: title}) do |page|
-(page.create_source_link? or page.create_link?).should be_true
-  end
+  step(I delete #{title})
 end
 
 When(/^I delete (?!the second)(.+)$/) do |title|
-  visit(DeletePage, using_params: {page_name: title}) do |page|
-page.delete
+  require mediawiki_api
+  client = MediawikiApi::Client.new(#{ENV['MEDIAWIKI_URL']}../w/api.php, 
false)
+  client.log_in(ENV['MEDIAWIKI_USER'], ENV['MEDIAWIKI_PASSWORD'])
+  result = client.delete_page(title, Testing)
+  result.status.should eq 200
+  if !result.body.include?(missingtitle) then
+result.body.should_not include '{error:{code'
   end
 end
 When(/^I edit (.+) to add (.+)$/) do |title, text|
@@ -46,34 +49,24 @@
   if 

[MediaWiki-commits] [Gerrit] Adding hdfs user to stats group - change (operations/puppet)

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

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

Change subject: Adding hdfs user to stats group
..

Adding hdfs user to stats group

This is so that hdfs user may write to the /var/log/kraken directory.
I am doing this with an exec because I don't want to start
managing the hdfs user in puppet just for this.  It is currently
added by the cdh4 packages.

Change-Id: Ifdf1ce4deb6adcc3a6b67c3a47e3a16e9f3fa121
---
M manifests/role/analytics.pp
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/125403/1

diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index f999bf0..ea284cc 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -94,6 +94,18 @@
 User|title == csalvia| { groups + [ 'stats' ] }
 User|title == nuria|   { groups + [ 'stats' ] }
 
+# If hdfs user exists, then add it to the stats group.
+# I don't want to use puppet types to manage the hdfs
+# user, since it is installed by the cdh4 packages.
+exec { 'hdfs_user_in_stats_group':
+command = '/usr/sbin/usermod hdfs -a -G stats',
+# only run this command if the hdfs user exists
+# and it is not already in the stats group
+# This command returns true if hdfs user does not exist,
+# or if hdfs user does exist and is in the stats group.
+unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
+}
+
 # Diederik and Otto have sudo privileges on Analytics nodes.
 sudo_user { [ 'diederik', 'otto' ]: privileges = ['ALL = (ALL) NOPASSWD: 
ALL'] }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdf1ce4deb6adcc3a6b67c3a47e3a16e9f3fa121
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] Adding hdfs user to stats group - change (operations/puppet)

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

Change subject: Adding hdfs user to stats group
..


Adding hdfs user to stats group

This is so that hdfs user may write to the /var/log/kraken directory.
I am doing this with an exec because I don't want to start
managing the hdfs user in puppet just for this.  It is currently
added by the cdh4 packages.

Change-Id: Ifdf1ce4deb6adcc3a6b67c3a47e3a16e9f3fa121
---
M manifests/role/analytics.pp
1 file changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index f999bf0..b3ba3a8 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -94,6 +94,19 @@
 User|title == csalvia| { groups + [ 'stats' ] }
 User|title == nuria|   { groups + [ 'stats' ] }
 
+# If hdfs user exists, then add it to the stats group.
+# I don't want to use puppet types to manage the hdfs
+# user, since it is installed by the cdh4 packages.
+exec { 'hdfs_user_in_stats_group':
+command = '/usr/sbin/usermod hdfs -a -G stats',
+# only run this command if the hdfs user exists
+# and it is not already in the stats group
+# This command returns true if hdfs user does not exist,
+# or if hdfs user does exist and is in the stats group.
+unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
+require = Group['stats'],
+}
+
 # Diederik and Otto have sudo privileges on Analytics nodes.
 sudo_user { [ 'diederik', 'otto' ]: privileges = ['ALL = (ALL) NOPASSWD: 
ALL'] }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdf1ce4deb6adcc3a6b67c3a47e3a16e9f3fa121
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@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] Need to fully qualify all executables in unless command - change (operations/puppet)

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

Change subject: Need to fully qualify all executables in unless command
..


Need to fully qualify all executables in unless command

Change-Id: I95eadc296b4b2e162f550e93d3e45aba12bf5d06
---
M manifests/role/analytics.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index b3ba3a8..65e2959 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -103,7 +103,7 @@
 # and it is not already in the stats group
 # This command returns true if hdfs user does not exist,
 # or if hdfs user does exist and is in the stats group.
-unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
+unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then /bin/true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
 require = Group['stats'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95eadc296b4b2e162f550e93d3e45aba12bf5d06
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] qa/browsertests Gemfile has been moved - change (integration/jenkins-job-builder-config)

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

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

Change subject: qa/browsertests Gemfile has been moved
..

qa/browsertests Gemfile has been moved

The Gemfile of qa/browsertests has been moved from the root of the
repository down to tests/browser https://gerrit.wikimedia.org/r/111997/

Change directory to tests/browser before running bundle or it will not
find the Gemfile.

Change-Id: Ic0ab3c94cf1a5d9292742168f13e9006647dedbb
---
M qa.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/qa.yaml b/qa.yaml
index b1aa084..9a53f5e 100644
--- a/qa.yaml
+++ b/qa.yaml
@@ -11,8 +11,10 @@
 
  # Prepare some paths lookup
  export GEM_PATH=`pwd`/vendor
- ./vendor/bin/bundle --version
- ./vendor/bin/bundle install --path vendor
+
+ cd tests/browser
+ $WORKSPACE/vendor/bin/bundle --version
+ $WORKSPACE/vendor/bin/bundle install --path vendor
 
  # Later on one can exec tests with:
  # GEM_PATH=`pwd`/bundle:`pwd`vendor ./bundle/bin/bundle  exec cucumber

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

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

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


[MediaWiki-commits] [Gerrit] Using exec path rather than fully qualifying - change (operations/puppet)

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

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

Change subject: Using exec path rather than fully qualifying
..

Using exec path rather than fully qualifying

I'm getting a puppet error on this one

Change-Id: I61174c0dd63813d39398d678c2453e3e0aac58a1
---
M manifests/role/analytics.pp
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/125406/1

diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index 65e2959..beb0486 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -98,12 +98,13 @@
 # I don't want to use puppet types to manage the hdfs
 # user, since it is installed by the cdh4 packages.
 exec { 'hdfs_user_in_stats_group':
-command = '/usr/sbin/usermod hdfs -a -G stats',
+command = 'usermod hdfs -a -G stats',
 # only run this command if the hdfs user exists
 # and it is not already in the stats group
 # This command returns true if hdfs user does not exist,
 # or if hdfs user does exist and is in the stats group.
-unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then /bin/true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
+unless  = 'getent passwd hdfs  /dev/null; if [ $? != 0 ]; then true; 
else groups hdfs | grep -q stats; fi',
+path= '/usr/sbin:/usr/bin:/bin',
 require = Group['stats'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61174c0dd63813d39398d678c2453e3e0aac58a1
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] Using exec path rather than fully qualifying - change (operations/puppet)

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

Change subject: Using exec path rather than fully qualifying
..


Using exec path rather than fully qualifying

I'm getting a puppet error on this one

Change-Id: I61174c0dd63813d39398d678c2453e3e0aac58a1
---
M manifests/role/analytics.pp
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index 65e2959..beb0486 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -98,12 +98,13 @@
 # I don't want to use puppet types to manage the hdfs
 # user, since it is installed by the cdh4 packages.
 exec { 'hdfs_user_in_stats_group':
-command = '/usr/sbin/usermod hdfs -a -G stats',
+command = 'usermod hdfs -a -G stats',
 # only run this command if the hdfs user exists
 # and it is not already in the stats group
 # This command returns true if hdfs user does not exist,
 # or if hdfs user does exist and is in the stats group.
-unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then /bin/true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
+unless  = 'getent passwd hdfs  /dev/null; if [ $? != 0 ]; then true; 
else groups hdfs | grep -q stats; fi',
+path= '/usr/sbin:/usr/bin:/bin',
 require = Group['stats'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61174c0dd63813d39398d678c2453e3e0aac58a1
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] Need to fully qualify all executables in unless command - change (operations/puppet)

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

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

Change subject: Need to fully qualify all executables in unless command
..

Need to fully qualify all executables in unless command

Change-Id: I95eadc296b4b2e162f550e93d3e45aba12bf5d06
---
M manifests/role/analytics.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/125404/1

diff --git a/manifests/role/analytics.pp b/manifests/role/analytics.pp
index b3ba3a8..65e2959 100644
--- a/manifests/role/analytics.pp
+++ b/manifests/role/analytics.pp
@@ -103,7 +103,7 @@
 # and it is not already in the stats group
 # This command returns true if hdfs user does not exist,
 # or if hdfs user does exist and is in the stats group.
-unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
+unless  = '(/usr/bin/getent passwd hdfs  /dev/null; if [ $? != 0 ]; 
then /bin/true; else /usr/bin/groups hdfs | /bin/grep -q stats; fi)',
 require = Group['stats'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95eadc296b4b2e162f550e93d3e45aba12bf5d06
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] Spacing adjustment for repository link - change (mediawiki...MultimediaViewer)

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

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

Change subject: Spacing adjustment for repository link
..

Spacing adjustment for repository link

Spacing of the whole element and the Commons logo has been
adjusted to provide more visual clarity.

Change-Id: I601a1d5c847199dc734911dc9e90c0fe7931bca8
---
M resources/mmv/ui/mmv.ui.metadataPanel.less
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.less 
b/resources/mmv/ui/mmv.ui.metadataPanel.less
index 1119c69..469dc27 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.less
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.less
@@ -146,12 +146,13 @@
.box-round(5px);
padding: @padding;
padding-left: @icon-size + 2 * @padding;
+   margin-top: 10px;
 
/* @embed */
background-image: url(img/repo.svg);
background-repeat: no-repeat;
background-size: auto @icon-size;
-   background-position: @padding center;
+   background-position: (@padding + 4px) center;
background-color: @info-box-color;
 
line-height: 1.3;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I601a1d5c847199dc734911dc9e90c0fe7931bca8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
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] qa/browsertests Gemfile has been moved - change (integration/jenkins-job-builder-config)

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

Change subject: qa/browsertests Gemfile has been moved
..


qa/browsertests Gemfile has been moved

The Gemfile of qa/browsertests has been moved from the root of the
repository down to tests/browser https://gerrit.wikimedia.org/r/111997/

Point bundler to the Gemfile using:

 bundle install --gemfile=tests/browser/Gemfile

Adjust the archiver for the postmerge job, the .bundle path is now under
test/browser as well.

Updates jobs:

qa-browsertests-build
qa-browsertests-postmerge
qa-browsertests-run

Change-Id: Ic0ab3c94cf1a5d9292742168f13e9006647dedbb
---
M qa.yaml
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/qa.yaml b/qa.yaml
index b1aa084..5636229 100644
--- a/qa.yaml
+++ b/qa.yaml
@@ -11,8 +11,9 @@
 
  # Prepare some paths lookup
  export GEM_PATH=`pwd`/vendor
+
  ./vendor/bin/bundle --version
- ./vendor/bin/bundle install --path vendor
+ ./vendor/bin/bundle install --gemfile=tests/browser/Gemfile --path 
vendor
 
  # Later on one can exec tests with:
  # GEM_PATH=`pwd`/bundle:`pwd`vendor ./bundle/bin/bundle  exec cucumber
@@ -32,7 +33,7 @@
  # Make a tarball for archiving
  GIT_COMMIT_SHORT=`git rev-parse --short HEAD`
  TAR_FILE=qa-browsertests-$BUILD_NUMBER-g$GIT_COMMIT_SHORT.tar.gz
- tar -czf $TAR_FILE vendor .bundle
+ tar -czf $TAR_FILE vendor tests/browser/.bundle
 
 publishers:
  - archive:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0ab3c94cf1a5d9292742168f13e9006647dedbb
Gerrit-PatchSet: 4
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update used Diff and DM versions - change (mediawiki...Wikibase)

2014-04-11 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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

Change subject: Update used Diff and DM versions
..

Update used Diff and DM versions

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


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

diff --git a/composer.json b/composer.json
index 3701457..3aaf2e0 100644
--- a/composer.json
+++ b/composer.json
@@ -34,8 +34,8 @@
data-values/serialization: ~1.0,
data-values/javascript: ~0.5.0,
data-values/value-view: ~0.5.0,
-   wikibase/data-model: ~0.7.2,
-   diff/diff: ~0.9.0,
+   wikibase/data-model: ~0.7.3,
+   diff/diff: ~1.0,
wikibase/easyrdf_lite: ~0.8.1
},
autoload: {

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

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

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


[MediaWiki-commits] [Gerrit] Small docs fix - change (mediawiki...CirrusSearch)

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

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

Change subject: Small docs fix
..

Small docs fix

Change-Id: Idcb7501811bf876f623340e019ae214519178602
---
M CirrusSearch.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index f350ac1..ba78d04 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -163,7 +163,7 @@
 $wgCirrusSearchFunctionRescoreWindowSize = 8192;
 
 // If true CirrusSearch asks Elasticsearch to perform searches using a mode 
that should
-// product more accurate results at the cost of performance. See this for more 
info:
+// produce more accurate results at the cost of performance. See this for more 
info:
 // 
http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/
 $wgCirrusSearchMoreAccurateScoringMode = true;
 

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

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

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


[MediaWiki-commits] [Gerrit] Switch Cirrus to a faster query type ` - change (operations/mediawiki-config)

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

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

Change subject: Switch Cirrus to a faster query type `
..

Switch Cirrus to a faster query type
`

Change-Id: I8fb9172cc7d2f638c0a094b7a01dcb2ec2230ced
---
M wmf-config/CirrusSearch-common.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index d435b09..4372d5a 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -35,6 +35,10 @@
 $wgJobTypeConf['cirrusSearchLinksUpdateSecondary'] = array( 'checkDelay' = 
true ) +
$wgJobTypeConf['default'];
 
+# Turn off the more accurate but slower search mode.  It is most helpful when 
you
+# have many small shards.  We don't do that in production and we could use the 
speed.
+$wgCirrusSearchMoreAccurateScoringMode = false;
+
 # Settings customized per index.
 $wgCirrusSearchShardCount = $wmgCirrusSearchShardCount;
 $wgCirrusSearchUseAggressiveSplitting = $wmgCirrusSearchUseAggressiveSplitting;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fb9172cc7d2f638c0a094b7a01dcb2ec2230ced
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] browsertests: bundle install gems in shared dir - change (integration/jenkins-job-builder-config)

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

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

Change subject: browsertests: bundle install gems in shared dir
..

browsertests: bundle install gems in shared dir

Save up time when running `bundle install` by using a shared directory
which is common to all jobs running on a slave.  We did so with change
https://gerrit.wikimedia.org/r/#/c/112682/ for the other browser test
but missed the browsertests-qa-* jobs.

Reference: https://github.com/bundler/bundler/issues/2856

Updates jobs:

qa-browsertests-build
qa-browsertests-postmerge
qa-browsertests-run

Change-Id: If71a91f1c89c5ff57b7ce77d9f87445dae896656
---
M qa.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/qa.yaml b/qa.yaml
index 5636229..200a27b 100644
--- a/qa.yaml
+++ b/qa.yaml
@@ -4,6 +4,10 @@
  # See bug 54384 for some background
 builders:
  - shell: |
+ # Shared cache of gems to avoid hitting rubygems all the time
+ # See https://github.com/bundler/bundler/issues/2856
+ export GEM_HOME=$WORKSPACE/../gems
+
  mkdir vendor
 
  # Fetch bundle from rubygems repo

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

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

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


[MediaWiki-commits] [Gerrit] browsertests: bundle install gems in shared dir - change (integration/jenkins-job-builder-config)

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

Change subject: browsertests: bundle install gems in shared dir
..


browsertests: bundle install gems in shared dir

Save up time when running `bundle install` by using a shared directory
which is common to all jobs running on a slave.  We did so with change
https://gerrit.wikimedia.org/r/#/c/112682/ for the other browser test
but missed the browsertests-qa-* jobs.

Reference: https://github.com/bundler/bundler/issues/2856

Updates jobs:

qa-browsertests-build
qa-browsertests-postmerge
qa-browsertests-run

Change-Id: If71a91f1c89c5ff57b7ce77d9f87445dae896656
---
M qa.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/qa.yaml b/qa.yaml
index 5636229..200a27b 100644
--- a/qa.yaml
+++ b/qa.yaml
@@ -4,6 +4,10 @@
  # See bug 54384 for some background
 builders:
  - shell: |
+ # Shared cache of gems to avoid hitting rubygems all the time
+ # See https://github.com/bundler/bundler/issues/2856
+ export GEM_HOME=$WORKSPACE/../gems
+
  mkdir vendor
 
  # Fetch bundle from rubygems repo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If71a91f1c89c5ff57b7ce77d9f87445dae896656
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix template nesting when end unreachable - change (mediawiki...parsoid)

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

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

Change subject: Fix template nesting when end unreachable
..

Fix template nesting when end unreachable

 * When marking template ranges to determine nesting, sometimes the end
   isn't reachable from the start, in which case it seems safe to assume
   that differing ids is enough to mark an intersection.

 * From a weird scenario when rt'ing enwiki/Suquamish_(motor_vessel)

 * Cleans up a few minor things found when reading the code.

Bug: 63790
Change-Id: Ia29b3bfffea4a619f05e18f0d7933084441014d6
---
M lib/dom.wrapTemplates.js
1 file changed, 6 insertions(+), 5 deletions(-)


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

diff --git a/lib/dom.wrapTemplates.js b/lib/dom.wrapTemplates.js
index 2ee5863..5339098 100644
--- a/lib/dom.wrapTemplates.js
+++ b/lib/dom.wrapTemplates.js
@@ -264,7 +264,7 @@
// Initialize n.data.tmp_tplRanges, if 
necessary.
data = DU.getNodeData( n );
 
-   // Use a _tmp prefix on tplRanges so that it 
doesn't
+   // Use a tmp_ prefix on tplRanges so that it 
doesn't
// get serialized out as a data-attribute by 
utility
// methods on the DOM -- the prefix will be a 
signal
// to the method to not serialize it.  This 
data on the
@@ -281,6 +281,7 @@
 
// Done
if (n === e) {
+   e.reached = true;
break;
}
}
@@ -321,14 +322,15 @@
// this code!
//
// The code below does the above check 
efficiently.
-   var s_tpls = DU.getNodeData( r.start 
).tmp_tplRanges,
+   var s_tpls = data.tmp_tplRanges,
e_tpls = DU.getNodeData( r.end 
).tmp_tplRanges,
s_keys = Object.keys(s_tpls),
-   foundIntersection = false;
+   foundIntersection = false,
+   reached = r.flipped ? n.reached 
: r.end.reached;
 
for (var j = 0; j  s_keys.length; j++) 
{
var other = s_keys[j];
-   if (other !== r.id  
e_tpls[other]) {
+   if (other !== r.id  (!reached 
|| e_tpls[other])) {
foundIntersection = 
true;
// Record the outermost 
range in which 'r' is nested in.
if 
(!nestedRangesMap[r.id]
@@ -793,7 +795,6 @@
}
}
} else {
-   about = elem.getAttribute('about');
tplRanges = 
tplRanges.concat(findWrappableTemplateRanges( doc, env, elem, tpls ));
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia29b3bfffea4a619f05e18f0d7933084441014d6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra abrea...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] APIPage can create pages via API - change (mediawiki/selenium)

2014-04-11 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: APIPage can create pages via API
..

APIPage can create pages via API

Releasing patch version 0.2.19.

Paired with: Chris McMahon
Bug: 63748

Change-Id: I71e27291414fb26ab98fbc31a17baa6aa6c2f771
---
M lib/mediawiki_selenium.rb
A lib/mediawiki_selenium/support/pages/api_page.rb
M lib/mediawiki_selenium/version.rb
3 files changed, 13 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/14/125414/1

diff --git a/lib/mediawiki_selenium.rb b/lib/mediawiki_selenium.rb
index 8b4333c..1ba9bc3 100644
--- a/lib/mediawiki_selenium.rb
+++ b/lib/mediawiki_selenium.rb
@@ -23,6 +23,7 @@
 
 require mediawiki_selenium/support/modules/url_module
 
+require mediawiki_selenium/support/pages/api_page
 require mediawiki_selenium/support/pages/login_page
 require mediawiki_selenium/support/pages/random_page
 require mediawiki_selenium/support/pages/reset_preferences_page
diff --git a/lib/mediawiki_selenium/support/pages/api_page.rb 
b/lib/mediawiki_selenium/support/pages/api_page.rb
new file mode 100644
index 000..49c964a
--- /dev/null
+++ b/lib/mediawiki_selenium/support/pages/api_page.rb
@@ -0,0 +1,11 @@
+class APIPage
+  include PageObject
+
+  def create title, content
+abort Environment variable MEDIAWIKI_API_URL must be set in order to 
create a target page for this test unless ENV[MEDIAWIKI_API_URL]
+
+client = MediawikiApi::Client.new ENV[MEDIAWIKI_API_URL]
+client.log_in ENV[MEDIAWIKI_USER], ENV[MEDIAWIKI_PASSWORD]
+client.create_page @random_string, @random_string
+  end
+end
diff --git a/lib/mediawiki_selenium/version.rb 
b/lib/mediawiki_selenium/version.rb
index cb98527..374dbeb 100644
--- a/lib/mediawiki_selenium/version.rb
+++ b/lib/mediawiki_selenium/version.rb
@@ -10,5 +10,5 @@
 =end
 
 module MediawikiSelenium
-  VERSION = 0.2.18
+  VERSION = 0.2.19
 end

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

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

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


[MediaWiki-commits] [Gerrit] APIPage can create pages via API - change (mediawiki/selenium)

2014-04-11 Thread Cmcmahon (Code Review)
Cmcmahon has submitted this change and it was merged.

Change subject: APIPage can create pages via API
..


APIPage can create pages via API

Releasing patch version 0.2.19.

Paired with: Chris McMahon
Bug: 63748

Change-Id: I71e27291414fb26ab98fbc31a17baa6aa6c2f771
---
M lib/mediawiki_selenium.rb
A lib/mediawiki_selenium/support/pages/api_page.rb
M lib/mediawiki_selenium/version.rb
3 files changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/lib/mediawiki_selenium.rb b/lib/mediawiki_selenium.rb
index 8b4333c..1ba9bc3 100644
--- a/lib/mediawiki_selenium.rb
+++ b/lib/mediawiki_selenium.rb
@@ -23,6 +23,7 @@
 
 require mediawiki_selenium/support/modules/url_module
 
+require mediawiki_selenium/support/pages/api_page
 require mediawiki_selenium/support/pages/login_page
 require mediawiki_selenium/support/pages/random_page
 require mediawiki_selenium/support/pages/reset_preferences_page
diff --git a/lib/mediawiki_selenium/support/pages/api_page.rb 
b/lib/mediawiki_selenium/support/pages/api_page.rb
new file mode 100644
index 000..49c964a
--- /dev/null
+++ b/lib/mediawiki_selenium/support/pages/api_page.rb
@@ -0,0 +1,11 @@
+class APIPage
+  include PageObject
+
+  def create title, content
+abort Environment variable MEDIAWIKI_API_URL must be set in order to 
create a target page for this test unless ENV[MEDIAWIKI_API_URL]
+
+client = MediawikiApi::Client.new ENV[MEDIAWIKI_API_URL]
+client.log_in ENV[MEDIAWIKI_USER], ENV[MEDIAWIKI_PASSWORD]
+client.create_page @random_string, @random_string
+  end
+end
diff --git a/lib/mediawiki_selenium/version.rb 
b/lib/mediawiki_selenium/version.rb
index cb98527..374dbeb 100644
--- a/lib/mediawiki_selenium/version.rb
+++ b/lib/mediawiki_selenium/version.rb
@@ -10,5 +10,5 @@
 =end
 
 module MediawikiSelenium
-  VERSION = 0.2.18
+  VERSION = 0.2.19
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71e27291414fb26ab98fbc31a17baa6aa6c2f771
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@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] APIPage can create pages via API - change (mediawiki...MobileFrontend)

2014-04-11 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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

Change subject: APIPage can create pages via API
..

APIPage can create pages via API

APIPage  is introduced in mediawiki_selenium 0.2.19.

Paired with: Chris McMahon
Bug: 63748

Change-Id: Ie3ebc91b0233f8e74c1cc9a42fb6f6e8abae5cfa
---
M tests/browser/Gemfile.lock
M tests/browser/features/step_definitions/create_page_api_steps.rb
2 files changed, 13 insertions(+), 22 deletions(-)


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

diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock
index c80218a..9f0864e 100644
--- a/tests/browser/Gemfile.lock
+++ b/tests/browser/Gemfile.lock
@@ -32,10 +32,10 @@
   domain_name (~ 0.5)
 i18n (0.6.9)
 json (1.8.1)
-mediawiki_api (0.1.1)
+mediawiki_api (0.1.2)
   faraday (~ 0.9, = 0.9.0)
   faraday-cookie_jar (~ 0.0, = 0.0.6)
-mediawiki_selenium (0.2.17)
+mediawiki_selenium (0.2.19)
   cucumber (~ 1.3, = 1.3.10)
   headless (~ 1.0, = 1.0.1)
   json (~ 1.8, = 1.8.1)
diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb 
b/tests/browser/features/step_definitions/create_page_api_steps.rb
index cafe203..7df6a3e 100644
--- a/tests/browser/features/step_definitions/create_page_api_steps.rb
+++ b/tests/browser/features/step_definitions/create_page_api_steps.rb
@@ -1,45 +1,36 @@
 # export MEDIAWIKI_API_URL = http://en.wikipedia.beta.wmflabs.org/w/api.php
 
 Given(/^I create a random page using the API$/) do
-  abort Environment variable MEDIAWIKI_API_URL must be set in order to create 
a target page for this test if (ENV[MEDIAWIKI_API_URL] == nil)
-  client = MediawikiApi::Client.new(ENV[MEDIAWIKI_API_URL])
-  client.log_in(ENV[MEDIAWIKI_USER], ENV[MEDIAWIKI_PASSWORD])
-  client.create_page(@random_string, @random_string)
+  on(APIPage).create @random_string, @random_string
 end
 
 Given(/^I go to a page that has references$/) do
-  abort Environment variable MEDIAWIKI_API_URL must be set in order to create 
a target page for this test if (ENV[MEDIAWIKI_API_URL] == nil)
-  client = MediawikiApi::Client.new(ENV[MEDIAWIKI_API_URL])
-  client.log_in(ENV[MEDIAWIKI_USER], ENV[MEDIAWIKI_PASSWORD])
-  wikitext = 'MobileFrontend is a MediaWiki 
extension.ref[http://mediawiki.org/wiki/Extension:MobileFrontend 
Extension:MobileFrontend]/ref
+  wikitext = MobileFrontend is a MediaWiki 
extension.ref[http://mediawiki.org/wiki/Extension:MobileFrontend 
Extension:MobileFrontend]/ref
 
 ==References==
-references /'
-  client.create_page('Selenium References test page', wikitext)
+references /
+
+  on(APIPage).create Selenium References test page, wikitext
   step 'I am on the Selenium References test page page'
 end
 
 Given(/^I go to a page that has sections$/) do
-  abort Environment variable MEDIAWIKI_API_URL must be set in order to create 
a target page for this test if (ENV[MEDIAWIKI_API_URL] == nil)
-  client = MediawikiApi::Client.new(ENV[MEDIAWIKI_API_URL])
-  client.log_in(ENV[MEDIAWIKI_USER], ENV[MEDIAWIKI_PASSWORD])
-  wikitext = '==Section 1==
+  wikitext = ==Section 1==
 Hello world
-'
-  client.create_page('Selenium section test page', wikitext)
+
+
+  on(APIPage).create Selenium section test page, wikitext
   step 'I am on the Selenium section test page page'
 end
 
 Given(/^I am on a page which has cleanup templates$/) do
-abort Environment variable MEDIAWIKI_API_URL must be set in order to 
create a target page for this test if (ENV[MEDIAWIKI_API_URL] == nil)
-client = MediawikiApi::Client.new(ENV[MEDIAWIKI_API_URL])
-client.log_in(ENV[MEDIAWIKI_USER], ENV[MEDIAWIKI_PASSWORD])
 wikitext = 'This page is used by Selenium to test MediaWiki functionality.
 
 table class=metadata plainlinks ambox ambox-content ambox-Refimprove 
role=presentation
 trtd class=mbox-image[[File:Question_book-new.svg|thumb]]/td
 td class=mbox-textspan class=mbox-text-spanThis article \'\'\'needs 
additional citations for [[Wikipedia:Verifiability|verification]]\'\'\'. span 
class=hide-when-compactPlease help 
[//en.wikipedia.org/w/index.php?title=Doomsday_deviceamp;action=edit improve 
this article] by [[Help:Introduction_to_referencing/1|adding citations to 
reliable sources]]. Unsourced material may be challenged and removed./span 
smalli(October 2012)/i/small/span/td
 /tr/table'
-client.create_page('Selenium page issues test page', wikitext)
+
+on(APIPage).create Selenium page issues test page, wikitext
 step 'I am on the Selenium page issues test page page'
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3ebc91b0233f8e74c1cc9a42fb6f6e8abae5cfa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: 

[MediaWiki-commits] [Gerrit] Small docs fix - change (mediawiki...CirrusSearch)

2014-04-11 Thread Chad (Code Review)
Chad has submitted this change and it was merged.

Change subject: Small docs fix
..


Small docs fix

Change-Id: Idcb7501811bf876f623340e019ae214519178602
---
M CirrusSearch.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index f350ac1..ba78d04 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -163,7 +163,7 @@
 $wgCirrusSearchFunctionRescoreWindowSize = 8192;
 
 // If true CirrusSearch asks Elasticsearch to perform searches using a mode 
that should
-// product more accurate results at the cost of performance. See this for more 
info:
+// produce more accurate results at the cost of performance. See this for more 
info:
 // 
http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/
 $wgCirrusSearchMoreAccurateScoringMode = true;
 

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

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

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


[MediaWiki-commits] [Gerrit] Strip citation links (like [1], [2], etc) from HTML - change (mediawiki...CirrusSearch)

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

Change subject: Strip citation links (like [1], [2], etc) from HTML
..


Strip citation links (like [1], [2], etc) from HTML

These are most annoying in section headers, but are
generally unuseful text to index. Also trim() headers
while we're at it for consistency.

Bug: 62539
Change-Id: I6dd3a96074a6258f2640826261abf937d887c58d
---
M includes/BuildDocument/PageDataBuilder.php
M includes/BuildDocument/PageTextBuilder.php
M tests/browser/features/highlighting.feature
A tests/browser/features/support/articles/references_highlight_test.txt
M tests/browser/features/support/hooks.rb
M tests/jenkins/Jenkins.php
6 files changed, 47 insertions(+), 2 deletions(-)

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



diff --git a/includes/BuildDocument/PageDataBuilder.php 
b/includes/BuildDocument/PageDataBuilder.php
index bbf44d4..eafc9a1 100644
--- a/includes/BuildDocument/PageDataBuilder.php
+++ b/includes/BuildDocument/PageDataBuilder.php
@@ -106,8 +106,18 @@
$ignoredHeadings = $this-getIgnoredHeadings();
foreach ( $this-parserOutput-getSections() as $heading ) {
$heading = $heading[ 'line' ];
+   // First strip out things that look like references.  
We can't use HTML filtering becase
+   // the references come back as sup tags without a 
class.  To keep from breaking stuff like
+   //  ==Applicability of the strict mass–energy 
equivalence formula, ''E'' = ''mc''sup2/sup==
+   // we don't remove the whole sup tag.  We also don't 
want to strip the sup tag and remove
+   // everything that looks like [2] because, I dunno, 
maybe there is a band named Word [2] Foo
+   // or something.  Whatever.  So we only strip things 
that look like sup tags wrapping a
+   // refence.  And we do it with regexes because 
HtmlFormatter doesn't support css selectors.
+   $heading = preg_replace( '/sup\s*\[\d+\]\s*\/sup/', 
'', $heading );
+
// Strip tags from the heading or else we'll display 
them (escaped) in search results
-   $heading = Sanitizer::stripAllTags( $heading );
+   $heading = trim( Sanitizer::stripAllTags( $heading ) );
+
// Note that we don't take the level of the heading 
into account - all headings are equal.
// Except the ones we ignore.
if ( !in_array( $heading, $ignoredHeadings ) ) {
diff --git a/includes/BuildDocument/PageTextBuilder.php 
b/includes/BuildDocument/PageTextBuilder.php
index 8218b33..745c358 100644
--- a/includes/BuildDocument/PageTextBuilder.php
+++ b/includes/BuildDocument/PageTextBuilder.php
@@ -60,7 +60,10 @@
private function formatWikitext( ParserOutput $parserOutput ) {
$parserOutput-setEditSectionTokens( false );
$formatter = new HtmlFormatter( $parserOutput-getText() );
-   $formatter-remove( array( 'audio', 'video', '#toc', 
'.thumbcaption' ) );
+   $formatter-remove( array( 'audio', 'video', '#toc', 
'.thumbcaption',
+   'sup.reference',// The [1] for references
+   '.mw-cite-backlink',// The ↑ next to refenences in 
the references section
+   ) );
$formatter-filterContent();
return $formatter-getText();
}
diff --git a/tests/browser/features/highlighting.feature 
b/tests/browser/features/highlighting.feature
index 1c5acae..68353bf 100644
--- a/tests/browser/features/highlighting.feature
+++ b/tests/browser/features/highlighting.feature
@@ -90,6 +90,21 @@
 When I search for user_talk:test
 Then User talk:*Test* is the highlighted title of the first search result
 
+  @highlighting @references
+  Scenario: References don't appear in highlighted section titles
+When I search for Reference Section Highlight Test
+And *Reference* *Section* is the highlighted alttitle of the first search 
result
+
+  @highlighting @references
+  Scenario: References don't appear in highlighted text
+When I search for Reference Text Highlight Test
+And *Reference* Section *Reference* *Text* *References*  foo   baz   bar 
is the highlighted text of the first search result
+
+  @highlighting @references
+  Scenario: References are highlighted if you search for them
+When I search for Reference foo bar baz Highlight Test
+And *Reference* Section *Reference* Text *References*  *foo*   *baz*   
*bar* is the highlighted text of the first search result
+
   @programmer_friendly @highlighting
   Scenario: camelCase is highlighted correctly
 When I search for namespace aliases
diff --git 

[MediaWiki-commits] [Gerrit] send_some improvements - change (mediawiki...CirrusSearch)

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

Change subject: send_some improvements
..


send_some improvements

Fix an off by one error that would cause it to replay at twice real time.

Switch from an every nth log to a p% of logs configuration.  This is
more granular when you really want to replay 40%, 50%, 70% or whatever.

Also make it possible to replay the search against the wiki it was against
in the first place.

Change-Id: I090fcd7e552497f6381989ff237f51e05b50503c
---
M tests/load/send_some.py
1 file changed, 34 insertions(+), 28 deletions(-)

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



diff --git a/tests/load/send_some.py b/tests/load/send_some.py
index aab601a..2cc959b 100644
--- a/tests/load/send_some.py
+++ b/tests/load/send_some.py
@@ -2,6 +2,7 @@
 
 
 import sys
+import random
 import urllib
 import urllib2
 from multiprocessing import Process, Queue
@@ -17,7 +18,17 @@
 print Fetched  + url
 
 
-def send_lines(every, jobs, destination):
+def hostname(wiki):
+wiki = wiki.split(:)[1]
+if wiki == commonswiki:
+return commons.wikimedia.org
+if wiki[2:] == wiki:
+return wiki[0:2] + .wikipedia.org
+# Not perfect but decent
+return wiki[0:2] + . + wiki[2:] + .org
+
+
+def send_lines(percent, jobs, destination):
 queue = Queue(jobs)  # Only allow a backlog of one per job
 
 # Spawn jobs.  Note that we just spawn them as daemon because we don't
@@ -28,8 +39,12 @@
 def work(queue):
 while True:
 try:
-search = queue.get()
-send_line(search, destination)
+(hostname, search) = queue.get()
+if %s in destination:
+resolved_destination = destination % hostname
+else:
+resolved_destination = destination
+send_line(search, resolved_destination)
 except (KeyboardInterrupt, SystemExit):
 break
 except:
@@ -41,52 +56,43 @@
 
 # Got to read stdin line by line even on old pythons
 line = sys.stdin.readline()
-n = 1
-last_time = None
-last_start = time.time()
+target_lag = None
 while line:
-if n != every:
-n += 1
+if random.uniform(0, 100)  percent:
 line = sys.stdin.readline()
 continue
 s = line.strip().split(\t)
 target_time = calendar.timegm(
 time.strptime(s[1][:-1] + UTC, %Y-%m-%dT%H:%M:%S%Z))
-if last_time is None:
-last_time = target_time
-elif last_time  target_time:
-now = time.time()
-time_since_last_time = now - last_start
-wait_time = target_time - last_time - time_since_last_time
-lag = last_start - last_time
-last_time = target_time
-last_start = now
-if wait_time  0:
-print Sleeping %s to stay %s behind the logged time. % \
-(wait_time, lag)
-time.sleep(wait_time)
+lag = time.time() - target_time
+if target_lag is None:
+target_lag = time.time() - target_time
+wait_time = target_lag - lag
+if wait_time = 1:
+print Sleeping %s to stay %s ahead of the logged time. % \
+(wait_time, target_lag)
+time.sleep(wait_time)
 try:
-queue.put(urllib.unquote(s[3]), False)
+queue.put((hostname(s[2]), urllib.unquote(s[3])), False)
 except Full:
 print Couldn't keep up so dropping the request
-# send_line(line, destination)
-n = 1
 line = sys.stdin.readline()
 
 
 if __name__ == __main__:
 from optparse import OptionParser
 parser = OptionParser(usage=usage: %prog [options] destination)
-parser.add_option(-n, dest=every, type=int, default=1, metavar=N,
-  help=send every Nth search)
+parser.add_option(-p, dest=percent, type=int, default=1, metavar=N,
+  help=send this percent of search results)
 parser.add_option(-j, --jobs, type=int, default=1, metavar=JOBS,
   help=number of processes used to send searches)
 parser.add_option(-d, --destination, dest=destination, type=string,
   metavar=DESTINATION,
   default=http://127.0.0.1:8080/wiki/Special:Search;,
-  help=where to send the searches)
+  help=Where to send the searches.  Add %s as hostname  +
+   to send to hostname based the log line.)
 (options, args) = parser.parse_args()
 try:
-send_lines(options.every, options.jobs, options.destination)
+send_lines(options.percent, options.jobs, options.destination)
 except KeyboardInterrupt:
 pass  # This is how we 

[MediaWiki-commits] [Gerrit] Final UI for public recurrent - change (analytics/wikimetrics)

2014-04-11 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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

Change subject: Final UI for public recurrent
..

Final UI for public recurrent

Change-Id: I31494aa6bf8f128ad5a7857ad905946219ff014b
---
M wikimetrics/static/css/site.css
M wikimetrics/static/js/reportList.js
M wikimetrics/templates/reports.html
3 files changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/18/125418/1

diff --git a/wikimetrics/static/css/site.css b/wikimetrics/static/css/site.css
index 362a79b..9f267ed 100644
--- a/wikimetrics/static/css/site.css
+++ b/wikimetrics/static/css/site.css
@@ -86,3 +86,4 @@
 height: 16px;
 }
 
+.icon.align-with-btn { margin: 4px 13px; }
diff --git a/wikimetrics/static/js/reportList.js 
b/wikimetrics/static/js/reportList.js
index 47a256d..107524d 100644
--- a/wikimetrics/static/js/reportList.js
+++ b/wikimetrics/static/js/reportList.js
@@ -3,10 +3,6 @@
 reports: ko.observableArray([]),
 
 updatePublic: function(report, event) {
-if (report.recurrent) {
-site.showError('A recurrent report can not be made private.', 
true);
-return false;
-}
 //TODO no csrf token, we need a request engine to wrap our ajax
 // requests
 if (!report.public()) {
diff --git a/wikimetrics/templates/reports.html 
b/wikimetrics/templates/reports.html
index f84d475..4ca2f83 100644
--- a/wikimetrics/templates/reports.html
+++ b/wikimetrics/templates/reports.html
@@ -21,7 +21,7 @@
 !--input type=checkbox data-bind=checked: selected 
class=js-report-delete/--
 !--/td--
 td data-bind=if: success
-div
+div data-bind=ifnot: recurrent
 button type=submit data-bind=click: 
$root.updatePublic, css:{
 'btn-warning': public,
 'btn-success': !public()}
@@ -33,10 +33,13 @@
 data-toggle=tooltip/div
 /button
 /div
+div data-bind=if: recurrent
+div class=icon unlocked align-with-btn title=This 
report is public and recurrent.  It can not be made private. 
data-toggle=tooltip/div
+/div
 /td
 
 td data-bind=if: recurrent
-div class=icon recurrent data-toggle=tooltip title=This 
report executes on a schedule./div
+div class=icon recurrent align-with-btn 
data-toggle=tooltip title=This report executes on a schedule./div
 /td
 td
 div data-bind=if: public
@@ -65,8 +68,10 @@
 span class=caret/span
 /button
 ul class=dropdown-menu
+!-- ko ifnot: recurrent --
 lia target=_blank data-bind=attr:{ href: 
'/reports/result/' + result_key + '.json' }as JSON/a/li
 lia target=_blank data-bind=attr:{ href: 
'/reports/result/' + result_key + '.csv' }as CSV/a/li
+!-- /ko --
 !-- ko if: public --
 lia target=_blank data-bind=attr:{ href: 
publicResult }as Public Link/a/li
 !-- /ko --

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

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

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


[MediaWiki-commits] [Gerrit] [Gingerbread] Disable crashy AutoCompleteTextView in edit su... - change (apps...wikipedia)

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

Change subject: [Gingerbread] Disable crashy AutoCompleteTextView in edit 
summary
..


[Gingerbread] Disable crashy AutoCompleteTextView in edit summary

Leaving it on for ICS and later, just disabling the autocomplete
on Gingerbread by not setting the adapter.

For some reason the autocomplete popup view crashes on
Gingerbread. This seems to be related to styles but I
can't quite figure out why.

This call in AutoCompleteTextView.buildDropDown ends up failing:

mDropDownList.setSelector(mDropDownListHighlight);

because mDropDownListHighlight seems to be null instead
of an expected drawable, and that ends up failing when used.

But the styles *look* ok, and I don't see any missing drawables
related to that style...

Change-Id: I96dfdb3b63adca6ccc4bf043d03c8224905fbf23
---
M 
wikipedia/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
1 file changed, 35 insertions(+), 20 deletions(-)

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



diff --git 
a/wikipedia/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
 
b/wikipedia/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
index 7d2dc77..504164c 100644
--- 
a/wikipedia/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
+++ 
b/wikipedia/src/main/java/org/wikipedia/editing/summaries/EditSummaryHandler.java
@@ -30,28 +30,43 @@
 }
 });
 
-adapter = new EditSummaryAdapter(activity, null, true);
-summaryEdit.setAdapter(adapter);
+if (Build.VERSION.SDK_INT = Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+// For some reason the autocomplete popup view crashes on
+// Gingerbread. This seems to be related to styles but I
+// can't quite figure out why.
+//
+// This call in AutoCompleteTextView.buildDropDown ends up failing:
+//
+// mDropDownList.setSelector(mDropDownListHighlight);
+//
+// because mDropDownListHighlight seems to be null instead
+// of an expected drawable, and that ends up failing when used.
+
+adapter = new EditSummaryAdapter(activity, null, true);
+summaryEdit.setAdapter(adapter);
+
+adapter.setFilterQueryProvider(new FilterQueryProvider() {
+@Override
+public Cursor runQuery(CharSequence charSequence) {
+ContentProviderClient client = 
activity.getContentResolver().acquireContentProviderClient(EditSummary.PERSISTANCE_HELPER.getBaseContentURI());
+try {
+return client.query(
+
EditSummary.PERSISTANCE_HELPER.getBaseContentURI(),
+null,
+summary LIKE ?,
+new String[] {charSequence + %},
+lastUsed DESC);
+} catch (RemoteException e) {
+// This shouldn't really be happening
+throw new RuntimeException(e);
+}
+}
+});
+} else {
+adapter = null;
+}
 
 Utils.setTextDirection(summaryEdit, title.getSite().getLanguage());
-
-adapter.setFilterQueryProvider(new FilterQueryProvider() {
-@Override
-public Cursor runQuery(CharSequence charSequence) {
-ContentProviderClient client = 
activity.getContentResolver().acquireContentProviderClient(EditSummary.PERSISTANCE_HELPER.getBaseContentURI());
-try {
-return client.query(
-EditSummary.PERSISTANCE_HELPER.getBaseContentURI(),
-null,
-summary LIKE ?,
-new String[] {charSequence + %},
-lastUsed DESC);
-} catch (RemoteException e) {
-// This shouldn't really be happening
-throw new RuntimeException(e);
-}
-}
-});
 }
 
 public void show() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96dfdb3b63adca6ccc4bf043d03c8224905fbf23
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update used Diff and DM versions - change (mediawiki...Wikibase)

2014-04-11 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged.

Change subject: Update used Diff and DM versions
..


Update used Diff and DM versions

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

Approvals:
  WikidataJenkins: Verified
  Addshore: Looks good to me, approved
  jenkins-bot: Checked



diff --git a/composer.json b/composer.json
index 3701457..3aaf2e0 100644
--- a/composer.json
+++ b/composer.json
@@ -34,8 +34,8 @@
data-values/serialization: ~1.0,
data-values/javascript: ~0.5.0,
data-values/value-view: ~0.5.0,
-   wikibase/data-model: ~0.7.2,
-   diff/diff: ~0.9.0,
+   wikibase/data-model: ~0.7.3,
+   diff/diff: ~1.0,
wikibase/easyrdf_lite: ~0.8.1
},
autoload: {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b57299e98ae6dacd42ce2c54482e33ee740d538
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add ability to read config parameters from a URL - change (apps...wikipedia)

2014-04-11 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Add ability to read config parameters from a URL
..


Add ability to read config parameters from a URL

- Is refreshed once a day
- Exposed as a JSON Object
- Stored in SharedPreferences

Change-Id: I4fd355fe35b1ad6a0a2146e3811657043a0d0651
---
M wikipedia/res/values/preference_keys.xml
A wikipedia/src/main/java/org/wikipedia/RemoteConfig.java
A wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java
M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java
M wikipedia/src/main/java/org/wikipedia/recurring/RecurringTasksExecutor.java
5 files changed, 107 insertions(+), 2 deletions(-)

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



diff --git a/wikipedia/res/values/preference_keys.xml 
b/wikipedia/res/values/preference_keys.xml
index 4340cdd..2cf734d 100644
--- a/wikipedia/res/values/preference_keys.xml
+++ b/wikipedia/res/values/preference_keys.xml
@@ -7,4 +7,5 @@
 string 
name=preference_edittoken_for_wikiedittoken_for_wiki_%1$s/string
 string 
name=preference_key_zero_interstitialzero_warn_when_leaving/string
 string name=preference_key_zero_devmodezero_dev_option_on/string
+string name=preference_key_remote_configremote_config/string
 /resources
\ No newline at end of file
diff --git a/wikipedia/src/main/java/org/wikipedia/RemoteConfig.java 
b/wikipedia/src/main/java/org/wikipedia/RemoteConfig.java
new file mode 100644
index 000..595deb0
--- /dev/null
+++ b/wikipedia/src/main/java/org/wikipedia/RemoteConfig.java
@@ -0,0 +1,40 @@
+package org.wikipedia;
+
+import android.content.*;
+import org.json.*;
+
+/**
+ * Store for config values that are retreived from a server,
+ * and refreshed periodically.
+ */
+public class RemoteConfig {
+
+private final SharedPreferences prefs;
+
+private JSONObject curConfig;
+
+public RemoteConfig(SharedPreferences prefs) {
+this.prefs = prefs;
+}
+
+public void updateConfig(JSONObject newConfig) {
+prefs.edit()
+.putString(WikipediaApp.PREFERENCE_REMOTE_CONFIG, 
newConfig.toString())
+.commit();
+curConfig = newConfig;
+}
+
+public JSONObject getConfig() {
+if (curConfig == null) {
+try {
+// If there's no pref set, just give back the empty JSON Object
+curConfig = new 
JSONObject(prefs.getString(WikipediaApp.PREFERENCE_REMOTE_CONFIG, {}));
+} catch (JSONException e) {
+// This shouldn't be happening, and if it does I'd like a 
crash report
+throw new RuntimeException(e);
+}
+}
+
+return curConfig;
+}
+}
diff --git a/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java 
b/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java
new file mode 100644
index 000..cbce3ba
--- /dev/null
+++ b/wikipedia/src/main/java/org/wikipedia/RemoteConfigRefreshTask.java
@@ -0,0 +1,52 @@
+package org.wikipedia;
+
+import android.content.*;
+import android.util.*;
+import com.github.kevinsawicki.http.*;
+import org.json.*;
+import org.wikipedia.concurrency.*;
+import org.wikipedia.recurring.*;
+
+import java.util.*;
+
+public class RemoteConfigRefreshTask extends RecurringTask {
+// Switch over to production when it is available
+private static final java.lang.String REMOTE_CONFIG_URL = 
http://bits.beta.wmflabs.org/static-master/extensions/MobileApp/config/android.json;;
+
+// The 'l' suffix is needed because stupid Java overflows constants 
otherwise
+private static final long RUN_INTERVAL_MILLI = 24L * 60L * 60L * 1000L; // 
Once a day!
+
+public RemoteConfigRefreshTask(Context context) {
+super(context);
+}
+
+@Override
+protected boolean shouldRun(Date lastRun) {
+return System.currentTimeMillis() - lastRun.getTime() = 
RUN_INTERVAL_MILLI;
+}
+
+@Override
+protected void run(Date lastRun) {
+new SaneAsyncTaskBoolean(1) {
+@Override
+public Boolean performTask() throws Throwable {
+WikipediaApp app = (WikipediaApp) 
context.getApplicationContext();
+JSONObject config = new 
JSONObject(HttpRequest.get(REMOTE_CONFIG_URL).body());
+app.getRemoteConfig().updateConfig(config);
+Log.d(Wikipedia, config.toString());
+return true;
+}
+
+@Override
+public void onCatch(Throwable caught) {
+// Don't do anything, but do write out a log statement. We 
don't particularly care.
+Log.d(Wikipedia, caught.toString());
+}
+}.execute();
+}
+
+@Override
+protected String getName() {
+return remote-config-refresher;
+}
+}
diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 

[MediaWiki-commits] [Gerrit] Renamed Wikipedia-iOS folder to wikipedia. - change (apps...wikipedia)

2014-04-11 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

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

Change subject: Renamed Wikipedia-iOS folder to wikipedia.
..

Renamed Wikipedia-iOS folder to wikipedia.

For better sync with gruntjs config.

Change-Id: Ifdae97b0d04b4fa09f0453713ee5183557c7701f
---
M .gitignore
M README.md
D Wikipedia-iOS.xcodeproj/project.pbxproj
D Wikipedia-iOS.xcodeproj/xcshareddata/xcschemes/Wikipedia-iOS.xcscheme
D Wikipedia-iOS/AppDelegate.h
D Wikipedia-iOS/AppDelegate.m
D Wikipedia-iOS/Categories/Alerts/AlertLabel.h
D Wikipedia-iOS/Categories/Alerts/AlertLabel.m
D Wikipedia-iOS/Categories/Alerts/AlertWebView.h
D Wikipedia-iOS/Categories/Alerts/AlertWebView.m
D Wikipedia-iOS/Categories/Alerts/UINavigationController+Alert.h
D Wikipedia-iOS/Categories/Alerts/UINavigationController+Alert.m
D Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.h
D Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m
D Wikipedia-iOS/Categories/Article+Convenience.h
D Wikipedia-iOS/Categories/Article+Convenience.m
D Wikipedia-iOS/Categories/Image+Convenience.h
D Wikipedia-iOS/Categories/Image+Convenience.m
D Wikipedia-iOS/Categories/NSHTTPCookieStorage+CloneCookie.h
D Wikipedia-iOS/Categories/NSHTTPCookieStorage+CloneCookie.m
D Wikipedia-iOS/Categories/NSManagedObjectContext+SimpleFetch.h
D Wikipedia-iOS/Categories/NSManagedObjectContext+SimpleFetch.m
D Wikipedia-iOS/Categories/NSObject+Extras.h
D Wikipedia-iOS/Categories/NSObject+Extras.m
D Wikipedia-iOS/Categories/NSString+Extras.h
D Wikipedia-iOS/Categories/NSString+Extras.m
D Wikipedia-iOS/Categories/NSString+FormattedAttributedString.h
D Wikipedia-iOS/Categories/NSString+FormattedAttributedString.m
D Wikipedia-iOS/Categories/NSURLRequest+DictionaryRequest.h
D Wikipedia-iOS/Categories/NSURLRequest+DictionaryRequest.m
D Wikipedia-iOS/Categories/Section+ImageRecords.h
D Wikipedia-iOS/Categories/Section+ImageRecords.m
D Wikipedia-iOS/Categories/TopActionSheet/TopActionSheetLabel.h
D Wikipedia-iOS/Categories/TopActionSheet/TopActionSheetLabel.m
D 
Wikipedia-iOS/Categories/TopActionSheet/UINavigationController+TopActionSheet.h
D 
Wikipedia-iOS/Categories/TopActionSheet/UINavigationController+TopActionSheet.m
D Wikipedia-iOS/Categories/UIButton+ColorMask.h
D Wikipedia-iOS/Categories/UIButton+ColorMask.m
D Wikipedia-iOS/Categories/UIImage+ColorMask.h
D Wikipedia-iOS/Categories/UIImage+ColorMask.m
D Wikipedia-iOS/Categories/UINavigationController+SearchNavStack.h
D Wikipedia-iOS/Categories/UINavigationController+SearchNavStack.m
D Wikipedia-iOS/Categories/UIScrollView+NoHorizontalScrolling.h
D Wikipedia-iOS/Categories/UIScrollView+NoHorizontalScrolling.m
D Wikipedia-iOS/Categories/UIScrollView+ScrollSubviewToLocation.h
D Wikipedia-iOS/Categories/UIScrollView+ScrollSubviewToLocation.m
D Wikipedia-iOS/Categories/UIView+Debugging.h
D Wikipedia-iOS/Categories/UIView+Debugging.m
D Wikipedia-iOS/Categories/UIView+RemoveConstraints.h
D Wikipedia-iOS/Categories/UIView+RemoveConstraints.m
D Wikipedia-iOS/Categories/UIView+SearchSubviews.h
D Wikipedia-iOS/Categories/UIView+SearchSubviews.m
D Wikipedia-iOS/Categories/UIView+TemporaryAnimatedXF.h
D Wikipedia-iOS/Categories/UIView+TemporaryAnimatedXF.m
D Wikipedia-iOS/Categories/UIViewController+HideKeyboard.h
D Wikipedia-iOS/Categories/UIViewController+HideKeyboard.m
D Wikipedia-iOS/Categories/UIViewController+SearchChildViewControllers.h
D Wikipedia-iOS/Categories/UIViewController+SearchChildViewControllers.m
D Wikipedia-iOS/Categories/UIWebView+ElementLocation.h
D Wikipedia-iOS/Categories/UIWebView+ElementLocation.m
D Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.h
D Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.m
D Wikipedia-iOS/Data/ArticleDataContextSingleton.h
D Wikipedia-iOS/Data/ArticleDataContextSingleton.m
D Wikipedia-iOS/Data/Model/Article.h
D Wikipedia-iOS/Data/Model/Article.m
D Wikipedia-iOS/Data/Model/DiscoveryContext.h
D Wikipedia-iOS/Data/Model/DiscoveryContext.m
D Wikipedia-iOS/Data/Model/GalleryImage.h
D Wikipedia-iOS/Data/Model/GalleryImage.m
D Wikipedia-iOS/Data/Model/History.h
D Wikipedia-iOS/Data/Model/History.m
D Wikipedia-iOS/Data/Model/Image.h
D Wikipedia-iOS/Data/Model/Image.m
D Wikipedia-iOS/Data/Model/ImageData.h
D Wikipedia-iOS/Data/Model/ImageData.m
D Wikipedia-iOS/Data/Model/Saved.h
D Wikipedia-iOS/Data/Model/Saved.m
D Wikipedia-iOS/Data/Model/Section.h
D Wikipedia-iOS/Data/Model/Section.m
D Wikipedia-iOS/Data/Model/SectionImage.h
D Wikipedia-iOS/Data/Model/SectionImage.m
D Wikipedia-iOS/Data/Operations/AccountCreationOp.h
D Wikipedia-iOS/Data/Operations/AccountCreationOp.m
D Wikipedia-iOS/Data/Operations/AccountCreationTokenOp.h
D Wikipedia-iOS/Data/Operations/AccountCreationTokenOp.m
D Wikipedia-iOS/Data/Operations/CaptchaResetOp.h
D Wikipedia-iOS/Data/Operations/CaptchaResetOp.m
D Wikipedia-iOS/Data/Operations/DownloadLangLinksOp.h
D Wikipedia-iOS/Data/Operations/DownloadLangLinksOp.m
D 

[MediaWiki-commits] [Gerrit] Support hiding edit button for anon users - change (apps...wikipedia)

2014-04-11 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Support hiding edit button for anon users
..


Support hiding edit button for anon users

Based on remoteConfig - if it is tweaked to be 'true' then
anon users won't be getting edit buttons in a day or so.

Change-Id: I956d77190035742528e432cca14483cf0995aa1a
---
M wikipedia/assets/bundle-test.js
M wikipedia/assets/bundle.js
M wikipedia/assets/styles.css
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
M www/js/main.js
M www/less/ui.less
6 files changed, 28 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Looks good to me, approved



diff --git a/wikipedia/assets/bundle-test.js b/wikipedia/assets/bundle-test.js
index 998db1f..18114f7 100644
--- a/wikipedia/assets/bundle-test.js
+++ b/wikipedia/assets/bundle-test.js
@@ -59,6 +59,10 @@
 bridge.sendMessage( imagesListResponse, { images: imageURLs });
 } );
 
+bridge.registerListener( hideEditButtons, function() {
+document.getElementsByTagName( html )[0].classList.add( no-editing );
+} );
+
 },{./bridge:1}],3:[function(require,module,exports){
 /**
  * MIT LICENSCE
diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js
index 44c8036..40a1a11 100644
--- a/wikipedia/assets/bundle.js
+++ b/wikipedia/assets/bundle.js
@@ -107,6 +107,10 @@
 bridge.sendMessage( imagesListResponse, { images: imageURLs });
 } );
 
+bridge.registerListener( hideEditButtons, function() {
+document.getElementsByTagName( html )[0].classList.add( no-editing );
+} );
+
 },{./bridge:2}],5:[function(require,module,exports){
 var bridge = require(./bridge);
 
diff --git a/wikipedia/assets/styles.css b/wikipedia/assets/styles.css
index 958ffa6..04d850d 100644
--- a/wikipedia/assets/styles.css
+++ b/wikipedia/assets/styles.css
@@ -114,6 +114,9 @@
   float: right;
   display: inline-float;
 }
+.no-editing .edit_section_button {
+  display: none;
+}
 .content-rtl a.edit_section_button {
   float: left;
   /* Flip it! */
diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
index 8734b22..2cdd6f3 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
@@ -132,6 +132,8 @@
 throw new RuntimeException(No PageTitle passed in to constructor 
or in instanceState);
 }
 
+app = (WikipediaApp)getActivity().getApplicationContext();
+
 webView = (ObservableWebView) 
getView().findViewById(R.id.page_web_view);
 loadProgress = (ProgressBar) 
getView().findViewById(R.id.page_load_progress);
 networkError = getView().findViewById(R.id.page_error);
@@ -150,7 +152,6 @@
 Utils.addUtilityMethodsToBridge(getActivity(), bridge);
 Utils.setupDirectionality(title.getSite().getLanguage(), 
Locale.getDefault().getLanguage(), bridge);
 linkHandler = new LinkHandler(getActivity(), bridge, title.getSite());
-app = (WikipediaApp)getActivity().getApplicationContext();
 api = 
((WikipediaApp)getActivity().getApplicationContext()).getAPIForSite(title.getSite());
 
 retryButton.setOnClickListener(new View.OnClickListener() {
@@ -190,6 +191,11 @@
 }
 }
 });
+if (app.getRemoteConfig().getConfig().has(disableAnonEditing)
+ 
app.getRemoteConfig().getConfig().optBoolean(disableAnonEditing)
+ !app.getUserInfoStorage().isLoggedIn()) {
+bridge.sendMessage(hideEditButtons, new JSONObject());
+}
 }
 
 @Override
diff --git a/www/js/main.js b/www/js/main.js
index ceceb75..a8f5464 100644
--- a/www/js/main.js
+++ b/www/js/main.js
@@ -19,3 +19,7 @@
 }
 bridge.sendMessage( imagesListResponse, { images: imageURLs });
 } );
+
+bridge.registerListener( hideEditButtons, function() {
+document.getElementsByTagName( html )[0].classList.add( no-editing );
+} );
diff --git a/www/less/ui.less b/www/less/ui.less
index d6e6ab0..25dcbd7 100644
--- a/www/less/ui.less
+++ b/www/less/ui.less
@@ -7,6 +7,12 @@
 display: inline-float;
 }
 
+.no-editing {
+.edit_section_button {
+display: none;
+}
+}
+
 .content-rtl a.edit_section_button {
 float: left;
 /* Flip it! */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I956d77190035742528e432cca14483cf0995aa1a
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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

[MediaWiki-commits] [Gerrit] Bug 58677: Fetch list of WMF wikis dinamically from SiteMatr... - change (mediawiki...parsoid)

2014-04-11 Thread Marcoil (Code Review)
Marcoil has uploaded a new change for review.

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

Change subject: Bug 58677: Fetch list of WMF wikis dinamically from SiteMatrix 
API
..

Bug 58677: Fetch list of WMF wikis dinamically from SiteMatrix API

Change-Id: Ie5c2abeccf0cc3671d7e99d80c5bb20afaf7b7d7
---
M lib/mediawiki.ApiRequest.js
M lib/mediawiki.WikiConfig.js
M lib/mediawiki.parser.environment.js
3 files changed, 122 insertions(+), 2 deletions(-)


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

diff --git a/lib/mediawiki.ApiRequest.js b/lib/mediawiki.ApiRequest.js
index 9f1edce..82465f3 100644
--- a/lib/mediawiki.ApiRequest.js
+++ b/lib/mediawiki.ApiRequest.js
@@ -719,6 +719,78 @@
 /**
  * @class
  * @extends ApiRequest
+ *
+ * A request for the wiki's site matrix.
+ *
+ * @constructor
+ * @param {string} apiURI The API URI to use for fetching
+ * @param {MWParserEnvironment} env
+ * @param {string} apiProxyURI (optional) The proxy URI to use for the
+ * ConfigRequest
+ */
+var SiteMatrixRequest = function ( apiURI, env, apiProxyURI ) {
+   ApiRequest.call( this, env, null );
+   this.queueKey = apiURI;
+
+   var apiargs = {
+   format: 'json',
+   action: 'sitematrix'
+   };
+
+   if ( !apiURI ) {
+   this._requestCB( new Error( 'There was no base URI for the API 
we tried to use.' ) );
+   return;
+   }
+
+   this.requestOptions = {
+   method: 'GET',
+   followRedirect: true,
+   uri: apiURI + '?' + qs.stringify( apiargs ),
+   timeout: 40 * 1000,
+   proxy: apiProxyURI,
+   headers: {
+   'User-Agent': userAgent,
+   'Connection': 'close'
+   }
+   };
+
+   if (env.cookie) {
+   // Forward the cookie if set
+   this.requestOptions.headers.Cookie = env.cookie;
+   }
+
+
+   this.request( this.requestOptions, this._requestCB.bind( this ) );
+};
+
+util.inherits( SiteMatrixRequest, ApiRequest );
+
+/**
+ * @inheritdoc ApiRequest#_handleJSON
+ */
+SiteMatrixRequest.prototype._handleJSON = function ( error, data ) {
+   if ( error ) {
+   this._processListeners( error, {} );
+   return;
+   }
+
+   if ( data  data.sitematrix ) {
+   this._processListeners( null, data.sitematrix );
+   } else if ( data  data.error ) {
+   if ( data.error.code === 'readapidenied' ) {
+   error = new AccessDeniedError();
+   } else {
+   error = new Error( 'Something happened on the API side. 
Message: ' + data.error.code + ': ' + data.error.info );
+   }
+   this._processListeners( error, {} );
+   } else {
+   this._processListeners( null, {} );
+   }
+};
+
+/**
+ * @class
+ * @extends ApiRequest
  * @constructor
  * @param {MWParserEnvironment} env
  * @param {string} filename
@@ -839,6 +911,7 @@
 
 if (typeof module === object) {
module.exports.ConfigRequest = ConfigRequest;
+   module.exports.SiteMatrixRequest = SiteMatrixRequest;
module.exports.TemplateRequest = TemplateRequest;
module.exports.PreprocessorRequest= PreprocessorRequest;
module.exports.PHPParseRequest = PHPParseRequest;
diff --git a/lib/mediawiki.WikiConfig.js b/lib/mediawiki.WikiConfig.js
index 62199c0..6c493de 100644
--- a/lib/mediawiki.WikiConfig.js
+++ b/lib/mediawiki.WikiConfig.js
@@ -153,6 +153,36 @@
}
}
 
+   // Get the interwiki map entries from the SiteMatrix extension if 
present
+   if (resultConf.sitematrix  resultConf.sitematrix.length) {
+   var sitematrix = resultConf.sitematrix;
+   for (var smi in sitematrix) {
+   if (isFinite(smi)) {
+   var sitegroup = sitematrix[smi];
+   for (var sitei = 0; sitei  
sitegroup.site.length; sitei++) {
+   var site = sitegroup.site[sitei];
+   if (!this.interwikiMap[site.dbname]) {
+   this.interwikiMap[site.dbname] 
= {
+   prefix: site.dbname,
+   url: site.url + 
'/wiki/$1',
+   language: 
sitegroup.localname
+   };
+   }
+   }
+   }
+   }
+   // And the specials
+   for (var speciali = 0; speciali  sitematrix.specials.length; 
speciali++) {
+   var special = 

[MediaWiki-commits] [Gerrit] Fix JS error when opening VE on redirect page - change (mediawiki...VisualEditor)

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

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

Change subject: Fix JS error when opening VE on redirect page
..

Fix JS error when opening VE on redirect page

Change-Id: I95dd2dc2c52ffa3d420a579592e84001bd2b10e8
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 02aa7b4..07de9fa 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -1520,7 +1520,10 @@
}
 
if ( this.surface.getModel().metaList.getItemsInGroup( 'mwRedirect' 
).length ) {
-   this.surface.getDialogs().getWindow( 'meta' ).open( { 'page': 
'settings' } );
+   this.surface.getDialogs().getWindow( 'meta' ).open(
+   this.surface.getModel().getFragment(),
+   { 'page': 'settings' }
+   );
}
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95dd2dc2c52ffa3d420a579592e84001bd2b10e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/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] pom.xml GPL-2 to Apache-2 - change (analytics/kraken)

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

Change subject: pom.xml GPL-2 to Apache-2
..


pom.xml GPL-2 to Apache-2

Missed this one in the previous commit

Change-Id: I82de83aeb1a3566e15e87462556325190c086bfa
---
M pom.xml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/pom.xml b/pom.xml
index 520e9fd..79a6040 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,8 +33,8 @@
 
 licenses
 license
-nameGPL2/name
-urlhttp://www.gnu.org/licenses/gpl-2.0.txt/url
+nameApache License 2.0/name
+urlhttp://www.apache.org/licenses/LICENSE-2.0.html/url
 /license
 /licenses
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82de83aeb1a3566e15e87462556325190c086bfa
Gerrit-PatchSet: 1
Gerrit-Project: analytics/kraken
Gerrit-Branch: master
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] pom.xml GPL-2 to Apache-2 - change (analytics/kraken)

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

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

Change subject: pom.xml GPL-2 to Apache-2
..

pom.xml GPL-2 to Apache-2

Missed this one in the previous commit

Change-Id: I82de83aeb1a3566e15e87462556325190c086bfa
---
M pom.xml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/kraken 
refs/changes/23/125423/1

diff --git a/pom.xml b/pom.xml
index 520e9fd..79a6040 100644
--- a/pom.xml
+++ b/pom.xml
@@ -33,8 +33,8 @@
 
 licenses
 license
-nameGPL2/name
-urlhttp://www.gnu.org/licenses/gpl-2.0.txt/url
+nameApache License 2.0/name
+urlhttp://www.apache.org/licenses/LICENSE-2.0.html/url
 /license
 /licenses
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I82de83aeb1a3566e15e87462556325190c086bfa
Gerrit-PatchSet: 1
Gerrit-Project: analytics/kraken
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] Fix JS error when opening VE on redirect page - change (mediawiki...VisualEditor)

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

Change subject: Fix JS error when opening VE on redirect page
..


Fix JS error when opening VE on redirect page

Change-Id: I95dd2dc2c52ffa3d420a579592e84001bd2b10e8
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 02aa7b4..07de9fa 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -1520,7 +1520,10 @@
}
 
if ( this.surface.getModel().metaList.getItemsInGroup( 'mwRedirect' 
).length ) {
-   this.surface.getDialogs().getWindow( 'meta' ).open( { 'page': 
'settings' } );
+   this.surface.getDialogs().getWindow( 'meta' ).open(
+   this.surface.getModel().getFragment(),
+   { 'page': 'settings' }
+   );
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95dd2dc2c52ffa3d420a579592e84001bd2b10e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Esanders esand...@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] Syncronize VisualEditor: 49ce630..989fd62 - change (mediawiki/extensions)

2014-04-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 49ce630..989fd62
..

Syncronize VisualEditor: 49ce630..989fd62

Change-Id: I26a9dc1bce452ce3b8e5f8c2b87a94e92c259fba
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor b/VisualEditor
index 49ce630..989fd62 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 49ce63020c2443f67df222106658d61c331e393e
+Subproject commit 989fd6214cf851e86bb4155f0fea6da008fcfab8

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26a9dc1bce452ce3b8e5f8c2b87a94e92c259fba
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] Enabling base::firewall on stat1003 - change (operations/puppet)

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

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

Change subject: Enabling base::firewall on stat1003
..

Enabling base::firewall on stat1003

Change-Id: Ic734b51a3f1071cbbebb442caa1fb88f956f6399
---
M manifests/site.pp
1 file changed, 2 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/125425/1

diff --git a/manifests/site.pp b/manifests/site.pp
index b338c4d..7dcccd9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2500,19 +2500,14 @@
 node 'stat1003.wikimedia.org' {
 include standard
 include admins::roots
+
 # stat1003 has a public IP and should be pretty
 # well firewalled off.  If it needs a specific
 # service opened up, this will be done in
 # statistics classes.
 # NOTE: This will be moved to another class
 # someday, probably standard.
-
-# This firewall is absent until we work out
-# bastion access for all users of stat1003.
-# This should be done within a couple of weeks.
-# I'll be generous and say that this will be
-# turned back on by 2014-04-18. -otto
-class { 'base::firewall': ensure = 'absent' }
+class { 'base::firewall': }
 
 include role::statistics::cruncher
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic734b51a3f1071cbbebb442caa1fb88f956f6399
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] Syncronize VisualEditor: 49ce630..989fd62 - change (mediawiki/extensions)

2014-04-11 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 49ce630..989fd62
..


Syncronize VisualEditor: 49ce630..989fd62

Change-Id: I26a9dc1bce452ce3b8e5f8c2b87a94e92c259fba
---
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 49ce630..989fd62 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 49ce63020c2443f67df222106658d61c331e393e
+Subproject commit 989fd6214cf851e86bb4155f0fea6da008fcfab8

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26a9dc1bce452ce3b8e5f8c2b87a94e92c259fba
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] Enabling base::firewall on stat1003 - change (operations/puppet)

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

Change subject: Enabling base::firewall on stat1003
..


Enabling base::firewall on stat1003

Change-Id: Ic734b51a3f1071cbbebb442caa1fb88f956f6399
---
M manifests/site.pp
1 file changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index b338c4d..7dcccd9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2500,19 +2500,14 @@
 node 'stat1003.wikimedia.org' {
 include standard
 include admins::roots
+
 # stat1003 has a public IP and should be pretty
 # well firewalled off.  If it needs a specific
 # service opened up, this will be done in
 # statistics classes.
 # NOTE: This will be moved to another class
 # someday, probably standard.
-
-# This firewall is absent until we work out
-# bastion access for all users of stat1003.
-# This should be done within a couple of weeks.
-# I'll be generous and say that this will be
-# turned back on by 2014-04-18. -otto
-class { 'base::firewall': ensure = 'absent' }
+class { 'base::firewall': }
 
 include role::statistics::cruncher
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic734b51a3f1071cbbebb442caa1fb88f956f6399
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@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] Add jquery.accessKeyLabel javascript module - change (mediawiki/core)

2014-04-11 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Add jquery.accessKeyLabel javascript module
..

Add jquery.accessKeyLabel javascript module

Extracted the accessKey logic from mediawiki.util and moved it to it's
own module. Added dependency from the new module to mediawiki.util,
moved the jquery.client dependency to the new module.

Now the accesskey is also set, when no placeholder like '[x]' is set on
the title or when there is no title at all.

Also implements support for the browsers accessKeyLabel function,
which will give a localised accessKey string, if supported (at
the moment FireFox 8+ only)

Bug: 37239
Bug: 48505
Change-Id: I211593629ca23540dcd5a93b11834155f4f04883
---
M resources/Resources.php
A resources/src/jquery/jquery.accessKeyLabel.js
M resources/src/mediawiki/mediawiki.util.js
M tests/qunit/QUnitTestResources.php
A tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
6 files changed, 265 insertions(+), 99 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/125426/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 642897c..a28432a 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -184,6 +184,12 @@
 
/* jQuery Plugins */
 
+   'jquery.accessKeyLabel' = array(
+   'scripts' = 'resources/src/jquery/jquery.accessKeyLabel.js',
+   'dependencies' = array(
+   'jquery.client',
+   ),
+   ),
'jquery.appear' = array(
'scripts' = 'resources/lib/jquery/jquery.appear.js',
),
@@ -898,7 +904,7 @@
'mediawiki.util' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.util.js',
'dependencies' = array(
-   'jquery.client',
+   'jquery.accessKeyLabel',
'jquery.mwExtension',
'mediawiki.notify',
'mediawiki.toc',
diff --git a/resources/src/jquery/jquery.accessKeyLabel.js 
b/resources/src/jquery/jquery.accessKeyLabel.js
new file mode 100644
index 000..54c177e
--- /dev/null
+++ b/resources/src/jquery/jquery.accessKeyLabel.js
@@ -0,0 +1,148 @@
+/**
+ * jQuery plugin to update the tooltip to show the correct access key
+ *
+ * Call $().updateTooltipAccessKeys() on the elements where you want to update 
the tooltip.
+ * $.fn.updateTooltipAccessKeys.getAccessKeyPrefix() and
+ * $.fn.updateTooltipAccessKeys.setTestMode() can be used in unit tests.
+ */
+( function ( $ ) {
+
+/**
+ * @var {string} cachedAccessKeyPrefix Cached access key prefix for used 
browser
+ */
+var cachedAccessKeyPrefix,
+
+/**
+ * @var {boolean} useTestPrefix Wether to use 'test-' instead of correct 
prefix (used for testing)
+ */
+   useTestPrefix = false;
+
+/**
+ * Get the prefix for the access key.
+ * Will only give correct prefix for browsers not implementing the 
accessKeyLabel property.
+ * These browsers currently are:
+ * Firefox 8+
+ *
+ * Exposed for testing.
+ *
+ * @param {Object} ua An object with atleast a 'userAgent' and 'platform' key.
+ * Defaults to the global Navigator object.
+ * @return {string} Access key prefix
+ */
+function getAccessKeyPrefix ( ua ) {
+   //use cached prefix if possible
+   if ( !ua  cachedAccessKeyPrefix ) {
+   return cachedAccessKeyPrefix;
+   }
+
+   var profile = $.client.profile( ua ), accessKeyPrefix = 'alt-';
+
+   // Opera on any platform
+   if ( profile.name === 'opera' ) {
+   accessKeyPrefix = 'shift-esc-';
+
+   // Chrome on any platform
+   } else if ( profile.name === 'chrome' ) {
+   accessKeyPrefix = (
+   profile.platform === 'mac'
+   // Chrome on Mac
+   ? 'ctrl-option-'
+   // Chrome on Windows or Linux
+   // (both alt- and alt-shift work, but alt with 
E, D, F etc does not
+   // work since they are browser shortcuts)
+   : 'alt-shift-'
+   );
+
+   // Non-Windows Safari with webkit_version  526
+   } else if ( profile.platform !== 'win'
+profile.name === 'safari'
+profile.layoutVersion  526
+   ) {
+   accessKeyPrefix = 'ctrl-alt-';
+
+   // Safari/Konqueror on any platform, or any browser on Mac
+   // (but not Safari on Windows)
+   } else if ( !( profile.platform === 'win'  profile.name === 'safari' )
+( profile.name === 'safari'
+   || profile.platform === 'mac'
+   || profile.name === 'konqueror' )
+   ) {
+   accessKeyPrefix = 'ctrl-';
+
+

[MediaWiki-commits] [Gerrit] Fix a FIXME - change (mediawiki...MobileFrontend)

2014-04-11 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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

Change subject: Fix a FIXME
..

Fix a FIXME

Change-Id: I73916a980e8bf817a7fe32bb59efed52cd5ac305
---
M less/common/mainmenu.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index a396115..b790807 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -217,7 +217,7 @@
 
 .beta, .alpha {
#mw-mf-page-left {
-   // FIXME: This causes bug 63313
+   // FIXME: Move this rule when new typography in stable
font-size: 90%;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73916a980e8bf817a7fe32bb59efed52cd5ac305
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Small validation fixes to scalable - change (VisualEditor/VisualEditor)

2014-04-11 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: Small validation fixes to scalable
..

Small validation fixes to scalable

There was an issue where scalable dimensions may have been set as
{ width: undefined } which made the tests in most 'set' methods
pass probperly, because this wasn't an empty object. However,
practically speaking this is an empty dimensions object, and it
should be considered as if it isn't valid.

This wrecked havoc on the calculations done with the aspect ratio,
and affected 'default dimensions' most of all.

Changes made:
* Added a 'isDimensionsObjectValid' method to ve.dm.Scalable that
  tests dimension objects specifically to see if they are valid
  before update is done to any of the stored dimension values.
* Added originalSizeChange event to ve.dm.Scalable and a listener
  in ve.ui.MediaSizeWidget to make sure that the 'full size'
  button is only enabled when original dimensions are acquired,
  even if the API response is slow or was completed after the
  widget is already loaded.
* Fixed small typos in setDefaultDimensions in ve.dm.Scalable

Change-Id: I1242e8dadca4f2cf2737c366034a77edc5ce308e
---
M modules/ve/dm/ve.dm.Scalable.js
M modules/ve/ui/widgets/ve.ui.MediaSizeWidget.js
2 files changed, 81 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/28/125428/1

diff --git a/modules/ve/dm/ve.dm.Scalable.js b/modules/ve/dm/ve.dm.Scalable.js
index ca4b145..51035ac 100644
--- a/modules/ve/dm/ve.dm.Scalable.js
+++ b/modules/ve/dm/ve.dm.Scalable.js
@@ -76,6 +76,13 @@
  */
 
 /**
+ * Original size changed
+ *
+ * @event originalSizeChange
+ * @param {Object} Original dimensions width and height
+ */
+
+/**
  * Min size changed
  *
  * @event minSizeChange
@@ -111,7 +118,7 @@
  * @param {Object} dimensions Dimensions object with width  height
  */
 ve.dm.Scalable.prototype.setCurrentDimensions = function ( dimensions ) {
-   if ( dimensions ) {
+   if ( this.isDimensionsObjectValid( dimensions ) ) {
this.currentDimensions = ve.copy( dimensions );
// Only use current dimensions for ratio if it isn't set
if ( this.fixedRatio  !this.ratio ) {
@@ -127,14 +134,24 @@
  * Also resets the aspect ratio if in fixed ratio mode.
  *
  * @param {Object} dimensions Dimensions object with width  height
+ * @fires originalSizeChange
  */
 ve.dm.Scalable.prototype.setOriginalDimensions = function ( dimensions ) {
-   this.originalDimensions = ve.copy( dimensions );
-   // Always overwrite ratio
-   if ( this.fixedRatio ) {
-   this.setRatioFromDimensions( this.getOriginalDimensions() );
+   if (
+   !this.originalDimensions ||
+   (
+   this.isDimensionsObjectValid( dimensions ) 
+   !ve.compare( this.originalDimensions, dimensions )
+   )
+   ) {
+   this.originalDimensions = ve.copy( dimensions );
+   // Always overwrite ratio
+   if ( this.fixedRatio ) {
+   this.setRatioFromDimensions( 
this.getOriginalDimensions() );
+   }
+   this.valid = null;
+   this.emit( 'originalSizeChange', this.getOriginalDimensions() );
}
-   this.valid = null;
 };
 
 /**
@@ -144,7 +161,13 @@
  * @fires defaultSizeChange
  */
 ve.dm.Scalable.prototype.setDefaultDimensions = function ( dimensions ) {
-   if ( !this.dimensions || !ve.compare( this.dimensions, dimensions ) ) {
+   if (
+   !this.defaultDimensions ||
+   (
+   this.isDimensionsObjectValid( dimensions ) 
+   !ve.compare( this.defaultDimensions, dimensions )
+   )
+   ) {
this.defaultDimensions = ve.copy( dimensions );
this.valid = null;
this.emit( 'defaultSizeChange', this.isDefault() );
@@ -179,7 +202,13 @@
  * @fires minSizeChange
  */
 ve.dm.Scalable.prototype.setMinDimensions = function ( dimensions ) {
-   if ( !this.minDimensions || !ve.compare( this.minDimensions, dimensions 
) ) {
+   if (
+   !this.minDimensions ||
+   (
+   this.isDimensionsObjectValid( dimensions ) 
+   !ve.compare( this.minDimensions, dimensions )
+   )
+   ) {
this.minDimensions = ve.copy( dimensions );
this.valid = null;
this.emit( 'minSizeChange', dimensions );
@@ -193,7 +222,13 @@
  * @fires maxSizeChange
  */
 ve.dm.Scalable.prototype.setMaxDimensions = function ( dimensions ) {
-   if ( !this.maxDimensions || !ve.compare( this.maxDimensions, dimensions 
) ) {
+   if (
+   !this.maxDimensions ||
+   (
+   

[MediaWiki-commits] [Gerrit] Fix JS error when opening VE on redirect page - change (mediawiki...VisualEditor)

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

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

Change subject: Fix JS error when opening VE on redirect page
..

Fix JS error when opening VE on redirect page

Change-Id: I95dd2dc2c52ffa3d420a579592e84001bd2b10e8
(cherry picked from commit 989fd6214cf851e86bb4155f0fea6da008fcfab8)
---
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 02aa7b4..07de9fa 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -1520,7 +1520,10 @@
}
 
if ( this.surface.getModel().metaList.getItemsInGroup( 'mwRedirect' 
).length ) {
-   this.surface.getDialogs().getWindow( 'meta' ).open( { 'page': 
'settings' } );
+   this.surface.getDialogs().getWindow( 'meta' ).open(
+   this.surface.getModel().getFragment(),
+   { 'page': 'settings' }
+   );
}
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95dd2dc2c52ffa3d420a579592e84001bd2b10e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.23wmf22
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] Add method to ensure parsoid and mock servers are killed whe... - change (mediawiki...parsoid)

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

Change subject: Add method to ensure parsoid and mock servers are killed when 
exiting
..


Add method to ensure parsoid and mock servers are killed when exiting

Based on be83d40bdc0a297049f399276ae2c9a82adf1932 by Arlo.

Change-Id: I9e0de294ec8c86363f0f53da7d53363b8e049b0c
---
M tests/apiServer.js
M tests/client/client.js
M tests/parserTests.js
M tests/roundtrip-test.js
4 files changed, 20 insertions(+), 12 deletions(-)

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



diff --git a/tests/apiServer.js b/tests/apiServer.js
index edc920a..acdd5e1 100644
--- a/tests/apiServer.js
+++ b/tests/apiServer.js
@@ -20,6 +20,21 @@
 };
 
 /**
+ * Make sure the server is killed if the process exits.
+ */
+var exitOnProcessTerm = function (res) {
+   var stopAndExit = function () {
+   process.exit(res || 0);
+   };
+   process.on('SIGINT', stopAndExit);
+   process.on('SIGTERM', stopAndExit);
+   process.on('uncaughtException', function (e) {
+   console.log(e.stack);
+   stopAndExit();
+   });
+};
+
+/**
  * Starts a server on passed port or a random port if none passed.
  * The callback will get the URL of the started server.
  */
@@ -125,5 +140,6 @@
startServer: startServer,
stopServer: stopServer,
startParsoidServer: startParsoidServer,
-   startMockAPIServer: startMockAPIServer
+   startMockAPIServer: startMockAPIServer,
+   exitOnProcessTerm: exitOnProcessTerm
 };
diff --git a/tests/client/client.js b/tests/client/client.js
index 0e170e3..267fbaa 100755
--- a/tests/client/client.js
+++ b/tests/client/client.js
@@ -238,6 +238,7 @@
parsoidURL = url;
getGitCommit( getGitCommitCb );
} );
+   apiServer.exitOnProcessTerm();
} else {
getGitCommit( getGitCommitCb );
}
diff --git a/tests/parserTests.js b/tests/parserTests.js
index 5b47922..f8d8a8e 100755
--- a/tests/parserTests.js
+++ b/tests/parserTests.js
@@ -2113,14 +2113,4 @@
mockAPIServer = server;
ptests.main(popts.argv, popts);
 });
-
-function stopTests() {
-   process.exit(0);
-}
-
-process.on('SIGINT', stopTests);
-process.on('SIGTERM', stopTests);
-process.on('uncaughtException', function (e) {
-   console.log(e.stack);
-   stopTests();
-});
+apiServer.exitOnProcessTerm();
diff --git a/tests/roundtrip-test.js b/tests/roundtrip-test.js
index 61ebb81..04d81a0 100755
--- a/tests/roundtrip-test.js
+++ b/tests/roundtrip-test.js
@@ -599,6 +599,7 @@
argv.parsoidURL = url;
fetch( title, callback, argv );
} );
+   apiServer.exitOnProcessTerm();
} else {
// make sure parsoidURL ends on /
if (!/\/$/.test(argv.parsoidURL)) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e0de294ec8c86363f0f53da7d53363b8e049b0c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil marc...@wikimedia.org
Gerrit-Reviewer: Arlolra abrea...@wikimedia.org
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] Put CommandHelpDialog keyboard shortcuts in kbd not div elem... - change (VisualEditor/VisualEditor)

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

Change subject: Put CommandHelpDialog keyboard shortcuts in kbd not div elements
..


Put CommandHelpDialog keyboard shortcuts in kbd not div elements

Because they are.

Bug: 63767
Change-Id: I50494add8906d16cb8dbfd29c35d66f3d01f07a1
---
M modules/ve/ui/dialogs/ve.ui.CommandHelpDialog.js
M modules/ve/ui/styles/ve.ui.CommandHelpDialog.css
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/ui/dialogs/ve.ui.CommandHelpDialog.js 
b/modules/ve/ui/dialogs/ve.ui.CommandHelpDialog.js
index 0bf0b13..be1669f 100644
--- a/modules/ve/ui/dialogs/ve.ui.CommandHelpDialog.js
+++ b/modules/ve/ui/dialogs/ve.ui.CommandHelpDialog.js
@@ -76,7 +76,7 @@
}
$shortcut = this.$( 'dt' );
for ( k = 0, kLen = triggerList.length; k  kLen; k++ ) 
{
-   $shortcut.append( this.$( 'div' ).text(
+   $shortcut.append( this.$( 'kbd' ).text(
triggerList[k].getMessage().replace( 
/\+/g, ' + ' )
) );
}
diff --git a/modules/ve/ui/styles/ve.ui.CommandHelpDialog.css 
b/modules/ve/ui/styles/ve.ui.CommandHelpDialog.css
index 209a8a4..e29fb1e 100644
--- a/modules/ve/ui/styles/ve.ui.CommandHelpDialog.css
+++ b/modules/ve/ui/styles/ve.ui.CommandHelpDialog.css
@@ -51,6 +51,11 @@
font-weight: bold;
 }
 
+.ve-ui-commandHelpDialog-list dt kbd {
+   display: block;
+   clear: right;
+}
+
 .ve-ui-commandHelpDialog-list dd,
 .ve-ui-commandHelpDialog-list dt {
line-height: 110%;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50494add8906d16cb8dbfd29c35d66f3d01f07a1
Gerrit-PatchSet: 5
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@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] Elasticsearch config to better spread shards - change (operations/puppet)

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

Change subject: Elasticsearch config to better spread shards
..


Elasticsearch config to better spread shards

The default Elasticsearch configuration was putting too many of enwiki's
shards on one matchine.  This makes sure they are more even.

Change-Id: I02d15cab1678c9a56a7b9e92854d9235af93b2ce
---
M modules/elasticsearch/templates/elasticsearch.yml.erb
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb 
b/modules/elasticsearch/templates/elasticsearch.yml.erb
index 6997997..fb0e5bb 100644
--- a/modules/elasticsearch/templates/elasticsearch.yml.erb
+++ b/modules/elasticsearch/templates/elasticsearch.yml.erb
@@ -407,3 +407,14 @@
 % if @awareness_attributes %cluster.routing.allocation.awareness.attributes: 
%= @awareness_attributes %% end %
 % if @row  %node.row: %=  @row  %% end %
 % if @rack %node.rack: %= @rack %% end %
+
+
+##
+# Elasticsearch cluster balance configuration
+##
+# This puts much more weight on distributing the shards per index then the 
defaults.  This will make sure that,
+# for example, each live node gets a copy of enwiki.
+cluster.routing.allocation.balance:
+shard: 0.195
+index: 0.8
+primary: 0.005

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I02d15cab1678c9a56a7b9e92854d9235af93b2ce
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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] Renamed Wikipedia-iOS folder to wikipedia. - change (apps...wikipedia)

2014-04-11 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Renamed Wikipedia-iOS folder to wikipedia.
..


Renamed Wikipedia-iOS folder to wikipedia.

For better sync with gruntjs config.

Change-Id: Ifdae97b0d04b4fa09f0453713ee5183557c7701f
---
M .gitignore
M README.md
D Wikipedia-iOS.xcodeproj/project.pbxproj
D Wikipedia-iOS.xcodeproj/xcshareddata/xcschemes/Wikipedia-iOS.xcscheme
D Wikipedia-iOS/AppDelegate.h
D Wikipedia-iOS/AppDelegate.m
D Wikipedia-iOS/Categories/Alerts/AlertLabel.h
D Wikipedia-iOS/Categories/Alerts/AlertLabel.m
D Wikipedia-iOS/Categories/Alerts/AlertWebView.h
D Wikipedia-iOS/Categories/Alerts/AlertWebView.m
D Wikipedia-iOS/Categories/Alerts/UINavigationController+Alert.h
D Wikipedia-iOS/Categories/Alerts/UINavigationController+Alert.m
D Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.h
D Wikipedia-iOS/Categories/Alerts/UIViewController+Alert.m
D Wikipedia-iOS/Categories/Article+Convenience.h
D Wikipedia-iOS/Categories/Article+Convenience.m
D Wikipedia-iOS/Categories/Image+Convenience.h
D Wikipedia-iOS/Categories/Image+Convenience.m
D Wikipedia-iOS/Categories/NSHTTPCookieStorage+CloneCookie.h
D Wikipedia-iOS/Categories/NSHTTPCookieStorage+CloneCookie.m
D Wikipedia-iOS/Categories/NSManagedObjectContext+SimpleFetch.h
D Wikipedia-iOS/Categories/NSManagedObjectContext+SimpleFetch.m
D Wikipedia-iOS/Categories/NSObject+Extras.h
D Wikipedia-iOS/Categories/NSObject+Extras.m
D Wikipedia-iOS/Categories/NSString+Extras.h
D Wikipedia-iOS/Categories/NSString+Extras.m
D Wikipedia-iOS/Categories/NSString+FormattedAttributedString.h
D Wikipedia-iOS/Categories/NSString+FormattedAttributedString.m
D Wikipedia-iOS/Categories/NSURLRequest+DictionaryRequest.h
D Wikipedia-iOS/Categories/NSURLRequest+DictionaryRequest.m
D Wikipedia-iOS/Categories/Section+ImageRecords.h
D Wikipedia-iOS/Categories/Section+ImageRecords.m
D Wikipedia-iOS/Categories/TopActionSheet/TopActionSheetLabel.h
D Wikipedia-iOS/Categories/TopActionSheet/TopActionSheetLabel.m
D 
Wikipedia-iOS/Categories/TopActionSheet/UINavigationController+TopActionSheet.h
D 
Wikipedia-iOS/Categories/TopActionSheet/UINavigationController+TopActionSheet.m
D Wikipedia-iOS/Categories/UIButton+ColorMask.h
D Wikipedia-iOS/Categories/UIButton+ColorMask.m
D Wikipedia-iOS/Categories/UIImage+ColorMask.h
D Wikipedia-iOS/Categories/UIImage+ColorMask.m
D Wikipedia-iOS/Categories/UINavigationController+SearchNavStack.h
D Wikipedia-iOS/Categories/UINavigationController+SearchNavStack.m
D Wikipedia-iOS/Categories/UIScrollView+NoHorizontalScrolling.h
D Wikipedia-iOS/Categories/UIScrollView+NoHorizontalScrolling.m
D Wikipedia-iOS/Categories/UIScrollView+ScrollSubviewToLocation.h
D Wikipedia-iOS/Categories/UIScrollView+ScrollSubviewToLocation.m
D Wikipedia-iOS/Categories/UIView+Debugging.h
D Wikipedia-iOS/Categories/UIView+Debugging.m
D Wikipedia-iOS/Categories/UIView+RemoveConstraints.h
D Wikipedia-iOS/Categories/UIView+RemoveConstraints.m
D Wikipedia-iOS/Categories/UIView+SearchSubviews.h
D Wikipedia-iOS/Categories/UIView+SearchSubviews.m
D Wikipedia-iOS/Categories/UIView+TemporaryAnimatedXF.h
D Wikipedia-iOS/Categories/UIView+TemporaryAnimatedXF.m
D Wikipedia-iOS/Categories/UIViewController+HideKeyboard.h
D Wikipedia-iOS/Categories/UIViewController+HideKeyboard.m
D Wikipedia-iOS/Categories/UIViewController+SearchChildViewControllers.h
D Wikipedia-iOS/Categories/UIViewController+SearchChildViewControllers.m
D Wikipedia-iOS/Categories/UIWebView+ElementLocation.h
D Wikipedia-iOS/Categories/UIWebView+ElementLocation.m
D Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.h
D Wikipedia-iOS/Categories/UIWebView+HideScrollGradient.m
D Wikipedia-iOS/Data/ArticleDataContextSingleton.h
D Wikipedia-iOS/Data/ArticleDataContextSingleton.m
D Wikipedia-iOS/Data/Model/Article.h
D Wikipedia-iOS/Data/Model/Article.m
D Wikipedia-iOS/Data/Model/DiscoveryContext.h
D Wikipedia-iOS/Data/Model/DiscoveryContext.m
D Wikipedia-iOS/Data/Model/GalleryImage.h
D Wikipedia-iOS/Data/Model/GalleryImage.m
D Wikipedia-iOS/Data/Model/History.h
D Wikipedia-iOS/Data/Model/History.m
D Wikipedia-iOS/Data/Model/Image.h
D Wikipedia-iOS/Data/Model/Image.m
D Wikipedia-iOS/Data/Model/ImageData.h
D Wikipedia-iOS/Data/Model/ImageData.m
D Wikipedia-iOS/Data/Model/Saved.h
D Wikipedia-iOS/Data/Model/Saved.m
D Wikipedia-iOS/Data/Model/Section.h
D Wikipedia-iOS/Data/Model/Section.m
D Wikipedia-iOS/Data/Model/SectionImage.h
D Wikipedia-iOS/Data/Model/SectionImage.m
D Wikipedia-iOS/Data/Operations/AccountCreationOp.h
D Wikipedia-iOS/Data/Operations/AccountCreationOp.m
D Wikipedia-iOS/Data/Operations/AccountCreationTokenOp.h
D Wikipedia-iOS/Data/Operations/AccountCreationTokenOp.m
D Wikipedia-iOS/Data/Operations/CaptchaResetOp.h
D Wikipedia-iOS/Data/Operations/CaptchaResetOp.m
D Wikipedia-iOS/Data/Operations/DownloadLangLinksOp.h
D Wikipedia-iOS/Data/Operations/DownloadLangLinksOp.m
D 

  1   2   3   >