[MediaWiki-commits] [Gerrit] Translations for French - change (wikimedia/TransparencyReport)

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

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

Change subject: Translations for French
..

Translations for French

1. New locale file
2. HTML/CSS changes where necessary

TODO:
* Check all links
* Check that all links keep you in the same lang
* Check that all the strings are covered
* Add links to FAQ

Missing:
* menu.wiki_version
* privacy.summary
* privacy.total_requests
* privacy.information_was_produced
* privacy.bubble_graph_fineprint
* privacy.show_all
* content.title

Change-Id: I21100d04e5824c7dcdb2d21087313cf8ee451f94
---
M config.rb
A locales/fr.yml
M source/localizable/index.html.erb
M source/stylesheets/master.css.scss
4 files changed, 157 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/TransparencyReport 
refs/changes/99/156499/1

diff --git a/config.rb b/config.rb
index 76ddfc6..30bfee0 100644
--- a/config.rb
+++ b/config.rb
@@ -49,7 +49,7 @@
 # end
 
 activate :directory_indexes
-activate :i18n
+activate :i18n, :langs = [:en, :fr]
 
 set :css_dir, 'stylesheets'
 set :js_dir, 'javascripts'
diff --git a/locales/fr.yml b/locales/fr.yml
new file mode 100644
index 000..27257a4
--- /dev/null
+++ b/locales/fr.yml
@@ -0,0 +1,153 @@
+---
+fr:
+
+  yn:
+yess: Oui
+noo: Non
+
+  menu:
+title: Rapport de Transparence de la Wikimedia Foundation
+privacy: Données Utilisateur
+content: Contenu
+faq: FAQ
+download_data: Téléchargements
+privacy_policy: Politique de Confidentialité
+data_retention_guidelines: Directives sur la Conservation des Données
+tou: Conditions d’Utilisation
+about_us: Qui Sommes Nous?
+blog: Blog
+wiki_version: Wiki Version
+
+  home:
+title: Rapport de Transparence de la
+title_two: Wikimedia Foundation
+lead: a target='_blank' 
href='//wikimediafoundation.org/wiki/Vision'Notre mission/a est de fournir 
un accès libre à l’ensemble des savoirs humains. Nous croyons que la protection 
de la vie privée des utilisateurs et la protection contre la censure sont 
déterminantes pour mener à bien cette mission. Chaque année, nous recevons des 
requêtes de la part d’États, d’individus, d’organisations pour divulguer des 
informations sur nos utilisateurs ou pour supprimer ou modifier des éléments de 
contenu dans nos projets. Certaines de ces requêtes sont légitimes. D’autres ne 
le sont pas.brbrLe but de ce rapport de transparence est de mettre en 
lumière les requêtes que nous recevons et la façon dont nous y répondons.
+privacy: Requêtes relatives auxbrDonnées Utilisateurs
+content: Requêtes pour desbrModifications et Suppressions
+faq: Foire AuxbrQuestions
+quote: On dit que la lumière du jour est le meilleur des désinfectants.
+cite: a href='//fr.wikipedia.org/wiki/Louis_Brandeis'Louis 
Brandeis/asmallAncien a 
href='//fr.wikipedia.org/wiki/Juge_assesseur_de_la_Cour_supr%C3%AAme_des_%C3%89tats-Unis'Jugea
 assesseur/a de la bra 
href='//fr.wikipedia.org/wiki/Cour_supr%C3%AAme_des_%C3%89tats-Unis'Cour 
Suprême des États-Unis (1914)/a/small
+
+  privacy:
+title: Requêtes relatives auxbrDonnées Utilisateurs
+total_number_of_requests: Nombre total de requêtes
+percentage_of_times_information_produced: Informations fournies pour
+lead: a 
href='//meta.wikimedia.org/wiki/Wikimedia_Foundation_Guiding_Principles/fr#Libert.C3.A9_d.E2.80.99expression'La
 liberté d’expression est essentielle/a pour le mouvement Wikimedia—nos 
projets ne peuvent s’épanouir dans un environnement où il n’est pas permis aux 
individus de s’exprimer librement. Nos utilisateurs comptent sur nous pour 
protéger leur identité contre une divulgation illicite et nous prenons cette 
responsabilité au sérieux.
+intro: pNéanmoins, chaque année, des États, des individus et des 
entreprises nous demandent de divulguer des données utilisateurs. Souvent, nous 
n’avons pas d’informations non publiques à divulguer car nous a 
href='//meta.wikimedia.org/wiki/Privacy_policy/fr#Utilisation_des_informations'collectons
 peu d’informations non publiques/a sur les utilisateurs et nous de 
conservons ces informations que sur une a 
href='//meta.wikimedia.org/wiki/Data_retention_guidelines/fr'courte durée/a. 
Mais lorsque nous avons des données, nous évaluons chaque requête avec 
attention avant d’envisager une divulgation. Si les requêtes ne sont pas 
conformes à nos critères— si elles sont trop larges, peu claires, ou non 
pertinentes—nous les refusons au nom de nos utilisateurs./ppSi nous devons 
fournir des informations en raison d’une requête valable sur le plan juridique, 
nous en informons l’utilisateur concerné avant de divulguer les informations, 
si nous sommes en droit de le faire et si nous en avons les moyens. Dans 
certains cas, nous pouvons  aider nos utilisateurs à trouver de l’aide pour 
lutter contre une requête non valable./ppCi-dessous, vous trouverez 
davantage 

[MediaWiki-commits] [Gerrit] PHP Notice: Undefined index: contributors - change (mediawiki...GWToolset)

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

Change subject: PHP Notice: Undefined index: contributors
..


PHP Notice: Undefined index: contributors

Bug: 70024
Change-Id: I2d9fd59ea6855d43da5467bcfbe532ae7f70bb1b
---
M includes/Handlers/UploadHandler.php
1 file changed, 13 insertions(+), 6 deletions(-)

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



diff --git a/includes/Handlers/UploadHandler.php 
b/includes/Handlers/UploadHandler.php
index 62a95d5..4787658 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -545,26 +545,33 @@
$api_result = $Api-getResultData();
$api_result = Utils::objectToArray( $api_result );
 
-   if ( isset( $api_result['query']['pages'] )
+   if (
+   isset( $api_result['query']['pages'] )
 count( $api_result['query']['pages'] ) === 1
) {
+   if ( key( $api_result['query']['pages'] ) === -1 ) {
+   $this-otherContributors = false;
+   return $this-otherContributors;
+   }
+
$api_result = array_shift( 
$api_result['query']['pages'] );
 
-   if ( !isset( $api_result['anoncontributors'] )
+   if (
+   !isset( $api_result['anoncontributors'] )
+isset( $api_result['contributors'] )
 count( $api_result['contributors'] ) == 1
) {
-   if ( $api_result['contributors'][0]['name']
-   == $this-_User-getName()
+   if (
+   $api_result['contributors'][0]['name']
+   === $this-_User-getName()
) {
$this-otherContributors = false;
-
return $this-otherContributors;
}
}
}
 
$this-otherContributors = true;
-
return $this-otherContributors;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d9fd59ea6855d43da5467bcfbe532ae7f70bb1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix retrieval of query modules - change (mediawiki...ApiSandbox)

2014-08-27 Thread Wctaiwan (Code Review)
Wctaiwan has uploaded a new change for review.

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

Change subject: Fix retrieval of query modules
..

Fix retrieval of query modules

Bug: 69872
Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
---
M SpecialApiSandbox.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/SpecialApiSandbox.php b/SpecialApiSandbox.php
index d25d3f8..f091f32 100644
--- a/SpecialApiSandbox.php
+++ b/SpecialApiSandbox.php
@@ -129,9 +129,9 @@
 */
private function getQueryModules( $type ) {
$options = array();
-   $params = $this-apiQuery-getAllowedParams();
-   sort( $params[$type][ApiBase::PARAM_TYPE] );
-   foreach ( $params[$type][ApiBase::PARAM_TYPE] as $module ) {
+   $modules = $this-apiQuery-getModuleManager()-getNames( $type 
);
+   sort( $modules );
+   foreach ( $modules as $module ) {
$options[$type=$module] = $type=$module;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiSandbox
Gerrit-Branch: master
Gerrit-Owner: Wctaiwan wctai...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove more unused code in mw.UploadWizard.js - change (mediawiki...UploadWizard)

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

Change subject: Remove more unused code in mw.UploadWizard.js
..


Remove more unused code in mw.UploadWizard.js

Change-Id: Iec8d594b1e6e2e1e6a8bf3ff6843c5e9b86998b7
---
M resources/mw.UploadWizard.js
M resources/uploadWizard.css
2 files changed, 0 insertions(+), 116 deletions(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 3987fc3..b379e44 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -1110,22 +1110,7 @@
}
);
 
-   },
-
-   /**
-*
-*/
-   pause: function() {
-
-   },
-
-   /**
-*
-*/
-   stop: function() {
-
}
-
 };
 
 /**
@@ -1222,16 +1207,6 @@
return v === undefined || v === null || v === '';
 };
 
-   $.fn.enableNextButton = function() {
-   return this.find( '.mwe-upwiz-button-next' )
-   .prop( 'disabled', false );
-   };
-
-   $.fn.disableNextButton = function() {
-   return this.find( '.mwe-upwiz-button-next' )
-   .prop( 'disabled', true );
-   };
-
$.fn.readonly = function() {
return this.attr( 'readonly', 'readonly' ).addClass( 
'mwe-readonly' );
};
@@ -1313,87 +1288,6 @@
 
this.keyup( resizeIfNeeded );
this.change( resizeIfNeeded );
-
-
-   return this;
-   };
-
-   // XXX this is highly specific to the details page now, not really 
jQuery function
-   jQuery.fn.mask = function() {
-   var profile = $.client.profile();
-
-   // intercept clicks...
-   // Note: the size of the div must be obtainable. Hence, this 
cannot be a div without layout (e.g. display:none).
-   // some of this is borrowed from 
http://code.google.com/p/jquery-loadmask/ , but simplified
-   $.each( this, function( i, el ) {
-
-   if ( ! $( el ).data( 'mask' ) ) {
-
-
-   //fix for z-index bug with selects in IE6
-   if ( profile.name === 'msie'  
profile.versionNumber === 6 ) {
-   $( el ).find( 'select' ).addClass( 
'masked-hidden' );
-   }
-
-   var mask = $( 'div 
class=mwe-upwiz-mask/div' )
-   .css( {
-   'backgroundColor' : 
'white',
-   'width': 
el.offsetWidth + 'px',
-   'height'   : 
el.offsetHeight + 'px',
-   'z-index'  : 90
-   } ),
-
-   $statusDiv = $( 'div/div' ).css( {
-   'width'  : el.offsetWidth + 
'px',
-   'height' : el.offsetHeight 
+ 'px',
-   'z-index': 91,
-   'text-align' : 'center',
-   'position'   : 'absolute',
-   'top': '0px',
-   'left'   : '0px'
-   } ),
-
-   $indicatorDiv = $( 'div 
class=mwe-upwiz-status/div' )
-   .css( {
-   'width': 32,
-   'height'   : 32,
-   'z-index'  : 91,
-   'margin'   : '0 auto 0 
auto'
-   } ),
-   $statusLineDiv = $( 'div/div' )
-   .css( {
-   'z-index'  : 91
-   } ),
-   $statusIndicatorLineDiv = $( 
'div/div' )
-   .css( { 'margin-top': '6em' } )
-   .append( $indicatorDiv, 
$statusLineDiv );
-
-   $statusDiv.append( $statusIndicatorLineDiv );
-
-   $( el ).css( { 'position' : 'relative' } )
-   .append( mask.fadeTo( 'fast', 0.6 ) )
-   .append( 

[MediaWiki-commits] [Gerrit] Add other-projects beta feature to whitelist - change (operations/mediawiki-config)

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

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

Change subject: Add other-projects beta feature to whitelist
..

Add other-projects beta feature to whitelist

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 621a904..7a39af6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10897,6 +10897,7 @@
'popups',   // 2014-09-18 – 
Hovercards
'betafeatures-vector-compact-personal-bar', // 2014-11-01 – 
Compact personal bar
'visualeditor-enable-language', // 2014-11-01 — VE 
language editor
+   'wikibase-otherprojects',   // 2015-02-27 — 
Other projects sidebar (wikidata)
),
 ),
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d5d7645890e5d6910b54f3dbb904b85a232daba
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Fix retrieval of query modules - change (mediawiki...ApiSandbox)

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

Change subject: Fix retrieval of query modules
..


Fix retrieval of query modules

Bug: 69872
Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
---
M SpecialApiSandbox.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/SpecialApiSandbox.php b/SpecialApiSandbox.php
index d25d3f8..f091f32 100644
--- a/SpecialApiSandbox.php
+++ b/SpecialApiSandbox.php
@@ -129,9 +129,9 @@
 */
private function getQueryModules( $type ) {
$options = array();
-   $params = $this-apiQuery-getAllowedParams();
-   sort( $params[$type][ApiBase::PARAM_TYPE] );
-   foreach ( $params[$type][ApiBase::PARAM_TYPE] as $module ) {
+   $modules = $this-apiQuery-getModuleManager()-getNames( $type 
);
+   sort( $modules );
+   foreach ( $modules as $module ) {
$options[$type=$module] = $type=$module;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiSandbox
Gerrit-Branch: master
Gerrit-Owner: Wctaiwan wctai...@gmail.com
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.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] Fix retrieval of query modules - change (mediawiki...ApiSandbox)

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

Change subject: Fix retrieval of query modules
..


Fix retrieval of query modules

Bug: 69872
Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
(cherry picked from commit 0a238ce1a06ff49c50d62e12ec252221a0d688d6)
---
M SpecialApiSandbox.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/SpecialApiSandbox.php b/SpecialApiSandbox.php
index d25d3f8..f091f32 100644
--- a/SpecialApiSandbox.php
+++ b/SpecialApiSandbox.php
@@ -129,9 +129,9 @@
 */
private function getQueryModules( $type ) {
$options = array();
-   $params = $this-apiQuery-getAllowedParams();
-   sort( $params[$type][ApiBase::PARAM_TYPE] );
-   foreach ( $params[$type][ApiBase::PARAM_TYPE] as $module ) {
+   $modules = $this-apiQuery-getModuleManager()-getNames( $type 
);
+   sort( $modules );
+   foreach ( $modules as $module ) {
$options[$type=$module] = $type=$module;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiSandbox
Gerrit-Branch: wmf/1.24wmf18
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Wctaiwan wctai...@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 retrieval of query modules - change (mediawiki...ApiSandbox)

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

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

Change subject: Fix retrieval of query modules
..

Fix retrieval of query modules

Bug: 69872
Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
(cherry picked from commit 0a238ce1a06ff49c50d62e12ec252221a0d688d6)
---
M SpecialApiSandbox.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/SpecialApiSandbox.php b/SpecialApiSandbox.php
index d25d3f8..f091f32 100644
--- a/SpecialApiSandbox.php
+++ b/SpecialApiSandbox.php
@@ -129,9 +129,9 @@
 */
private function getQueryModules( $type ) {
$options = array();
-   $params = $this-apiQuery-getAllowedParams();
-   sort( $params[$type][ApiBase::PARAM_TYPE] );
-   foreach ( $params[$type][ApiBase::PARAM_TYPE] as $module ) {
+   $modules = $this-apiQuery-getModuleManager()-getNames( $type 
);
+   sort( $modules );
+   foreach ( $modules as $module ) {
$options[$type=$module] = $type=$module;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79bd2901c92c2afd3b294aa3c52f4cc35a6cf4d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiSandbox
Gerrit-Branch: wmf/1.24wmf18
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Wctaiwan wctai...@gmail.com

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


[MediaWiki-commits] [Gerrit] ApiSandbox: pick https://gerrit.wikimedia.org/r/#/c/156500/ - change (mediawiki/core)

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

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

Change subject: ApiSandbox: pick https://gerrit.wikimedia.org/r/#/c/156500/
..

ApiSandbox: pick https://gerrit.wikimedia.org/r/#/c/156500/

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


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

diff --git a/extensions/ApiSandbox b/extensions/ApiSandbox
index 263e3f6..174e2bd 16
--- a/extensions/ApiSandbox
+++ b/extensions/ApiSandbox
-Subproject commit 263e3f67a7a0e8e5ef377c8174fbd62f9fc63242
+Subproject commit 174e2bd5391c6737decd3a516608ca9bf989c0c0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5899869bbde3ac7ef000c8f201b557ab18e3be89
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf18
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] i18n: fix message key - change (mediawiki...BlueSpiceExtensions)

2014-08-27 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: i18n: fix message key
..


i18n: fix message key

- bs-formattinghelp-desc

Follow-up To: I78725f006b57ccab601ac14d832630c8a372f13e

Change-Id: I80cb812873c73df75f3e20c626c31c072f380ef9
---
M FormattingHelp/FormattingHelp.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/FormattingHelp/FormattingHelp.class.php 
b/FormattingHelp/FormattingHelp.class.php
index b8cab62..ae766d5 100644
--- a/FormattingHelp/FormattingHelp.class.php
+++ b/FormattingHelp/FormattingHelp.class.php
@@ -57,7 +57,7 @@
$this-mExtensionType = EXTTYPE::VARIABLE;
$this-mInfo = array(
EXTINFO::NAME= 'FormattingHelp',
-   EXTINFO::DESCRIPTION = wfMessage( 
'bs-formattinghelp-extension-description' )-plain(),
+   EXTINFO::DESCRIPTION = wfMessage( 
'bs-formattinghelp-desc' )-plain(),
EXTINFO::AUTHOR  = 'Markus Glaser',
EXTINFO::VERSION = 'default',
EXTINFO::STATUS  = 'default',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80cb812873c73df75f3e20c626c31c072f380ef9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

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


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

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

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

Change subject: [PhpTagsSMW] Register extension
..

[PhpTagsSMW] Register extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/04/156504/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index e906f8e..74235ef 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1528,6 +1528,8 @@
 
 Php Tags Functions
 
+Php Tags SMW
+
 Php Tags Wiki
 
 Poem

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

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

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


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

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

Change subject: [PhpTagsSMW] Register extension
..


[PhpTagsSMW] Register extension

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

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index e906f8e..74235ef 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1528,6 +1528,8 @@
 
 Php Tags Functions
 
+Php Tags SMW
+
 Php Tags Wiki
 
 Poem

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb608314ef9260747ef3f70eb8eb248f686895c1
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix preference DB values - change (mediawiki...MultimediaViewer)

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

Change subject: Fix preference DB values
..


Fix preference DB values

Ensure that changing the preference via the quick link and
Special:Preferences is stored identically in the DB.

Change-Id: Ia37da1c6bfbb3edf0eba56f01105e4a5f3a5e4ba
---
M MultimediaViewerHooks.php
M resources/mmv/mmv.Config.js
M tests/qunit/mmv/mmv.Config.test.js
3 files changed, 21 insertions(+), 4 deletions(-)

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



diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index 6ac204a..9d40dee 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -164,8 +164,12 @@
 * @param OutputPage $out
 */
public static function makeGlobalVariablesScript( $vars, OutputPage 
$out ) {
+   global $wgDefaultUserOptions;
+
$user = $out-getUser();
$vars['wgMediaViewerOnClick'] = self::shouldHandleClicks( $user 
);
+   // needed because of bug 69942; could be different for anon and 
logged-in
+   $vars['wgMediaViewerEnabledByDefault'] = !empty( 
$wgDefaultUserOptions['multimediaviewer-enable'] );
}
 
/**
diff --git a/resources/mmv/mmv.Config.js b/resources/mmv/mmv.Config.js
index 341cdeb..e7f47db 100644
--- a/resources/mmv/mmv.Config.js
+++ b/resources/mmv/mmv.Config.js
@@ -140,7 +140,9 @@
 * @return {jQuery.Promise} a deferred which resolves/rejects on 
success/failure respectively
 */
CP.setMediaViewerEnabledOnClick = function ( enabled ) {
-   var config = this,
+   var newPrefValue,
+   defaultPrefValue = this.mwConfig.get( 
'wgMediaViewerEnabledByDefault' ),
+   config = this,
success = true;
 
if ( this.mwUser.isAnon() ) {
@@ -150,14 +152,25 @@
success = this.removeFromLocalStorage( 
'wgMediaViewerOnClick' );
}
if ( success ) {
+   // make the change work without a reload
config.mwConfig.set( 'wgMediaViewerOnClick', 
enabled );
return $.Deferred().resolve();
} else {
return $.Deferred().reject();
}
} else {
-   return this.setUserPreference( 
'multimediaviewer-enable', enabled ? true : '').then( function () {  // wow our 
prefs API sucks
-   // make the change work without a reload
+   // Simulate changing the option in Special:Preferences. 
Turns out this is quite hard (bug 69942):
+   // we need to delete the user_properties row if the new 
setting is the same as the default,
+   // otherwise set '1' for enabled, '' for disabled. In 
theory the pref API will delete the row
+   // if the new value equals the default, but this does 
not always work.
+   if ( defaultPrefValue === true ) {
+   newPrefValue = enabled ? '1' : '';
+   } else {
+   // undefined will cause the API call to omit 
the optionvalue parameter
+   // which in turn will cause the options API to 
delete the row and revert the pref to default
+   newPrefValue = enabled ? '1' : undefined;
+   }
+   return this.setUserPreference( 
'multimediaviewer-enable', newPrefValue ).then( function () {
config.mwConfig.set( 'wgMediaViewerOnClick', 
enabled );
} );
}
diff --git a/tests/qunit/mmv/mmv.Config.test.js 
b/tests/qunit/mmv/mmv.Config.test.js
index 8f0d226..f1214d9 100644
--- a/tests/qunit/mmv/mmv.Config.test.js
+++ b/tests/qunit/mmv/mmv.Config.test.js
@@ -136,7 +136,7 @@
QUnit.test( 'setMediaViewerEnabledOnClick sanity check', 3, function ( 
assert ) {
var localStorage = { setItem: this.sandbox.stub(), removeItem: 
this.sandbox.stub() },
mwUser = { isAnon: this.sandbox.stub() },
-   mwConfig = { set: this.sandbox.stub() },
+   mwConfig = new mw.Map( { wgMediaViewerEnabledByDefault: 
false } ),
api = { postWithToken: this.sandbox.stub() },
config = new mw.mmv.Config( {}, mwConfig, mwUser, api, 
localStorage );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia37da1c6bfbb3edf0eba56f01105e4a5f3a5e4ba
Gerrit-PatchSet: 4
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Make ungrouped output the default for getentities - change (mediawiki...Wikibase)

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

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

Change subject: Make ungrouped output the default for getentities
..

Make ungrouped output the default for getentities

Bug: 70081
Change-Id: I709fea53a5e4fd68f1c3256a424fdc1c7b88bafe
---
M repo/includes/api/GetEntities.php
1 file changed, 18 insertions(+), 7 deletions(-)


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

diff --git a/repo/includes/api/GetEntities.php 
b/repo/includes/api/GetEntities.php
index 0f114de..83498b5 100644
--- a/repo/includes/api/GetEntities.php
+++ b/repo/includes/api/GetEntities.php
@@ -274,12 +274,18 @@
} else {
$languages = $params['languages'];
}
-   if( $params['ungroupedlist'] ) {
-   $options-setOption(
-   
SerializationOptions::OPT_GROUP_BY_PROPERTIES,
-   array()
-   );
+
+   if( $params['groupedlist'] ) {
+   $groupedLists = array( 'claims', 'qualifiers', 
'references' );
+   } else {
+   $groupedLists = array();
}
+
+   $options-setOption(
+   SerializationOptions::OPT_GROUP_BY_PROPERTIES,
+   $groupedLists
+   );
+
$options-setLanguages( $languages );
$options-setOption( EntitySerializer::OPT_SORT_ORDER, 
EntitySerializer::SORT_ASC );
$options-setOption( EntitySerializer::OPT_PARTS, $props );
@@ -329,7 +335,11 @@
ApiBase::PARAM_TYPE = 'boolean',
ApiBase::PARAM_DFLT = false
),
-   'ungroupedlist' = array(
+   'ungroupedlist' = array( // legacy, ignored.
+   ApiBase::PARAM_TYPE = 'boolean',
+   ApiBase::PARAM_DFLT = false,
+   ),
+   'groupedlist' = array(
ApiBase::PARAM_TYPE = 'boolean',
ApiBase::PARAM_DFLT = false,
),
@@ -368,7 +378,8 @@
'normalize' = array( 'Try to normalize the page title 
against the client site.',
'This only works if exactly one site and one 
page have been given.'
),
-   'ungroupedlist' = array( 'Do not group snaks by 
property id.' ),
+   'ungroupedlist' = array( 'Ignored, use groupedlist 
instead' ),
+   'groupedlist' = array( 'Group snaks by property id.' ),
'sitefilter' = array( 'Filter sitelinks in entities to 
those with these siteids.' ),
) );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I709fea53a5e4fd68f1c3256a424fdc1c7b88bafe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] [CodeMirror] Register extension - change (translatewiki)

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

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

Change subject: [CodeMirror] Register extension
..

[CodeMirror] Register extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/06/156506/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 74235ef..680d735 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -541,6 +541,8 @@
 
 Code Editor
 
+Code Mirror
+
 Code Review
 aliasfile = CodeReview/CodeReview.alias.php
 ignored = code-rev-comment-preview-accesskey, code-rev-submit-accesskey, 
code-rev-submit-next-accesskey

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

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

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


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

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

Change subject: [CodeMirror] Register extension
..


[CodeMirror] Register extension

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

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 74235ef..680d735 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -541,6 +541,8 @@
 
 Code Editor
 
+Code Mirror
+
 Code Review
 aliasfile = CodeReview/CodeReview.alias.php
 ignored = code-rev-comment-preview-accesskey, code-rev-submit-accesskey, 
code-rev-submit-next-accesskey

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied243daab071999a3054d0c1fe59537dbc20fb99
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Unit tests for template adaptation - change (mediawiki...ContentTranslation)

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

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

Change subject: Unit tests for template adaptation
..

Unit tests for template adaptation

Change-Id: Iae81eefd668ba4cd0a241f5791cfe901113d75d8
---
M ContentTranslation.hooks.php
M ContentTranslation.php
M modules/tools/ext.cx.tools.template.js
A tests/qunit/data/template-lang-ml.html
A tests/qunit/ext.cx.tools.template.test.js
5 files changed, 123 insertions(+), 3 deletions(-)


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

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 953ed97..077d8b3 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -90,4 +90,28 @@
$vars['wgContentTranslationExperimentalFeatures'] = 
$wgContentTranslationExperimentalFeatures;
return true;
}
+
+   /**
+* @param $testModules array of javascript testing modules. 'qunit' is 
fed
+* using tests/qunit/QUnitTestResources.php.
+* @param ResourceLoader $resourceLoader
+* @return bool
+* Hook: ResourceLoaderTestModules
+*/
+   public static function addTestModules( array $testModules, 
ResourceLoader $resourceLoader ) {
+   $testModules['qunit']['ext.cx.tests'] = array(
+   'dependencies' = array( 'ext.cx.tools.tests',),
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'UniversalLanguageSelector',
+   );
+
+   $testModules['qunit']['ext.cx.tools.tests'] = array(
+   'scripts' = array( 
'tests/qunit/ext.cx.tools.template.test.js' ),
+   'dependencies' = array( 'ext.cx.model', 
'ext.cx.tools.template' ),
+   'localBasePath' = __DIR__,
+   'remoteExtPath' = 'ContentTranslation',
+   );
+
+   return true;
+   }
 }
diff --git a/ContentTranslation.php b/ContentTranslation.php
index 007067c..98dcdf9 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -67,6 +67,8 @@
 $GLOBALS['wgHooks']['BeforePageDisplay'][] = 
'ContentTranslationHooks::addModules';
 $GLOBALS['wgHooks']['GetBetaFeaturePreferences'][] = 
'ContentTranslationHooks::getPreferences';
 $GLOBALS['wgHooks']['ResourceLoaderGetConfigVars'][] = 
'ContentTranslationHooks::addConfig';
+$GLOBALS['wgHooks']['ResourceLoaderTestModules'][] =
+   'ContentTranslationHooks::addTestModules';
 
 $GLOBALS['wgExtensionFunctions'][] = function () {
global $wgResourceModules, $wgContentTranslationEventLogging;
diff --git a/modules/tools/ext.cx.tools.template.js 
b/modules/tools/ext.cx.tools.template.js
index 9e5da5a..c87870c 100644
--- a/modules/tools/ext.cx.tools.template.js
+++ b/modules/tools/ext.cx.tools.template.js
@@ -125,8 +125,8 @@
 * Process the template. Figure out what we can do.
 */
TemplateTool.prototype.process = function () {
-   var templateTool = this;
-
+   var templateTool = this,
+   deferred = $.Deferred();
this.getTemplateData();
this.getTemplateMapping();
if ( !this.templateData ) {
@@ -144,8 +144,14 @@
} else {
templateTool.adaptTitle( 
targetTitleData.pages[ pageId ].title );
}
+   deferred.resolve();
} )
-   .fail( $.proxy( this.deconstruct, this ) );
+   .fail( function () {
+   templateTool.deconstruct();
+   deferred.resolve();
+   } );
+
+   return deferred.promise();
};
 
/**
@@ -194,6 +200,11 @@
} );
}
 
+   if ( typeof QUnit !== undefined ) {
+   // Expose this module for unit testing
+   mw.cx.TemplateTool = TemplateTool;
+   }
+
$( function () {
mw.hook( 'mw.cx.translation.postMT' ).add( processTemplates );
} );
diff --git a/tests/qunit/data/template-lang-ml.html 
b/tests/qunit/data/template-lang-ml.html
new file mode 100644
index 000..11d0d0d
--- /dev/null
+++ b/tests/qunit/data/template-lang-ml.html
@@ -0,0 +1,22 @@
+p data-parsoid={quot;dsrquot;:[1304,2270,0,0]} id=110 class=
+   span class=cx-segment data-segmentid=111
+   b data-parsoid={quot;dsrquot;:[1304,1333,3,3]}Sreekumari 
Ramachandran/b (
+   a about=#mwt10 class=cx-link data-linkid=112 

[MediaWiki-commits] [Gerrit] DonationInterface passes jslint now - change (integration/zuul-config)

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

Change subject: DonationInterface passes jslint now
..


DonationInterface passes jslint now

Thanks to JForrester!

Change-Id: I37dc326e2c7bf725f46f5981a230fccf4f0bad52
---
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 0f74d95..5b73007 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -442,8 +442,6 @@
 voting: false
   - name: mwext-DismissableSiteNotice-jslint # bug 61602
 voting: false
-  - name: mwext-DonationInterface-jslint
-voting: false
   - name: mwext-Drafts-jslint # bug 61603
 voting: false
   - name: mwext-DumpHTML-jslint # bug 61604

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37dc326e2c7bf725f46f5981a230fccf4f0bad52
Gerrit-PatchSet: 3
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Awight awi...@wikimedia.org
Gerrit-Reviewer: Awight awi...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Katie Horn kh...@wikimedia.org
Gerrit-Reviewer: Mwalker mwal...@khaosdev.com
Gerrit-Reviewer: Ssmith ssm...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Refactor GadgetRepo inheritance and construction - change (mediawiki...Gadgets)

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

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

Change subject: Refactor GadgetRepo inheritance and construction
..

Refactor GadgetRepo inheritance and construction

The biggest issue this fixes is that GadgetRepo::getAllRepos()
did not cache the constructed GadgetRepo objects, meaning that
any instance caching done would be lost. The new GadgetRepoFactory
now handles now that.

Since the static functions of GadgetRepo were moved to GadgetRepoFactory,
the one non-abstract function was moved to CachedGadgetRepo so
GadgetRepo could turn into an interface.

Change-Id: Ib2e1155332f0de6605331843337a3a80cc6784bf
---
M Gadgets.hooks.php
M Gadgets.php
M backend/CachedGadgetRepo.php
M backend/ForeignAPIGadgetRepo.php
M backend/GadgetRepo.php
A backend/GadgetRepoFactory.php
M backend/LocalGadgetRepo.php
7 files changed, 142 insertions(+), 85 deletions(-)


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

diff --git a/Gadgets.hooks.php b/Gadgets.hooks.php
index 5308376..bf802fe 100644
--- a/Gadgets.hooks.php
+++ b/Gadgets.hooks.php
@@ -211,7 +211,7 @@
// (HTMLForm will barf on anything that's not a valid HTML ID, 
section IDs will
// get confused when dashes or slashes are added), we encode 
these things as hex
// so we know for sure they don't contain weird characters and 
are easy to decode
-   $repos = GadgetRepo::getAllRepos();
+   $repos = GadgetRepoFactory::getDefaultInstance()-getAllRepos();
foreach ( $repos as $repo ) {
$encRepoSource = bin2hex( $repo-getSource() );
$byCategory = $repo-getGadgetsByCategory();
@@ -305,7 +305,7 @@
 * @return bool
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
$resourceLoader ) {
-   $gadgets = GadgetRepo::getAllGadgets();
+   $gadgets = 
GadgetRepoFactory::getDefaultInstance()-getAllGadgets();
foreach ( $gadgets as $gadget ) {
$resourceLoader-register(
$gadget-getModuleName(),
@@ -327,7 +327,7 @@
wfProfileIn( __METHOD__ );
 
$user = $out-getUser();
-   $gadgets = GadgetRepo::getAllGadgets();
+   $gadgets = 
GadgetRepoFactory::getDefaultInstance()-getAllGadgets();
foreach ( $gadgets as $gadget ) {
if ( $gadget-isEnabledForUser( $user ) 
$gadget-isAllowed( $user ) 
@@ -362,7 +362,7 @@
global $wgGadgetEnableSharing;
 
// Pass the source data for each source that is used by 
a repository
-   $repos = GadgetRepo::getAllRepos();
+   $repos = 
GadgetRepoFactory::getDefaultInstance()-getAllRepos();
$sources = $out-getResourceLoader()-getSources();
$repoData = array();
foreach ( $repos as $repo ) {
diff --git a/Gadgets.php b/Gadgets.php
index 8b27929..f66bda0 100644
--- a/Gadgets.php
+++ b/Gadgets.php
@@ -54,6 +54,7 @@
  * $wgGadgetRepositories[] = array(
  * 'class' = 'ForeignAPIGadgetRepo',
  * 'source' = 'mediawikiwiki',
+ * 'apiUrl' = 'https://www.mediawiki.org/w/api.php',
  * 'cacheTimeout' = 600, // Expiry for locally cached data, in seconds 
(optional; default is 600)
  * );
  */
@@ -137,6 +138,7 @@
 $wgAutoloadClasses['GadgetsHooks'] = $dir . 'Gadgets.hooks.php';
 $wgAutoloadClasses['GadgetPageList'] = $dir . 'backend/GadgetPageList.php';
 $wgAutoloadClasses['GadgetRepo'] = $dir . 'backend/GadgetRepo.php';
+$wgAutoloadClasses['GadgetRepoFactory'] = $dir . 
'backend/GadgetRepoFactory.php';
 $wgAutoloadClasses['GadgetResourceLoaderModule'] = $dir . 
'backend/GadgetResourceLoaderModule.php';
 $wgAutoloadClasses['LocalGadgetRepo'] = $dir . 'backend/LocalGadgetRepo.php';
 $wgAutoloadClasses['MigrateGadgets'] = $dir . 'migrateGadgets.php';
diff --git a/backend/CachedGadgetRepo.php b/backend/CachedGadgetRepo.php
index 2a0a43d..759bf2e 100644
--- a/backend/CachedGadgetRepo.php
+++ b/backend/CachedGadgetRepo.php
@@ -4,7 +4,7 @@
  * repos that obtain gadget data from a database or a REST API. Currently, all
  * repos use this.
  */
-abstract class CachedGadgetRepo extends GadgetRepo {
+abstract class CachedGadgetRepo implements GadgetRepo {
/*** Protected members ***/

/** Cache for EXISTING gadgets. Nonexistent gadgets must not be cached 
here,
@@ -24,18 +24,21 @@
/** If true, $data is assumed to contain all existing gadget IDs.
 */
protected $idsLoaded = false;
+
+   public function __construct( array $options ) {
+   }

/*** Abstract methods ***/

/**
 * 

[MediaWiki-commits] [Gerrit] Add mediawiki::packages::php5 - change (operations/puppet)

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

Change subject: Add mediawiki::packages::php5
..


Add mediawiki::packages::php5

When it's safe to remove PHP5 packages from the Trusty app servers, we'll
include this class conditionally, based on the distro version.

Change-Id: Ie9cb163d96520de637b9cd94a8f7a42be2219e08
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M modules/mediawiki/manifests/packages.pp
A modules/mediawiki/manifests/packages/php5.pp
2 files changed, 58 insertions(+), 42 deletions(-)

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



diff --git a/modules/mediawiki/manifests/packages.pp 
b/modules/mediawiki/manifests/packages.pp
index 38dc123..eb83e34 100644
--- a/modules/mediawiki/manifests/packages.pp
+++ b/modules/mediawiki/manifests/packages.pp
@@ -1,40 +1,17 @@
 class mediawiki::packages {
+include mediawiki::packages::php5
+
 package { [
 'imagemagick',
 'python-imaging',
-'libmemcached10',   # XXX still needed?
-'php-apc',
+'libmemcached10', # TODO: remove this?
+]:
+ensure = present,
+}
+
+# Pear
+package { [
 'php-pear',
-'php5-cli',
-'php5-common',
-]:
-ensure = present,
-}
-
-# Standard PHP extensions
-package { [
-'php5-curl',
-'php5-geoip',
-'php5-intl',
-'php5-memcached',
-'php5-mysql',
-'php5-redis',
-'php5-xmlrpc',
-]:
-ensure = present,
-}
-
-# Wikimedia-specific PHP extensions
-package { [
-'php-luasandbox',
-'php-wikidiff2',
-'php5-fss',
-]:
-ensure = present,
-}
-
-# Pear modules
-package { [
 'php-mail',
 'php-mail-mime',
 ]:
@@ -96,15 +73,5 @@
 'tidy',
 ]:
 ensure = present,
-}
-
-if ubuntu_version('precise') {
-package { [
-'libmemcached11',  # formerly a dependency for php5-memcached
-'php5-igbinary',   # no longer in use
-'php5-wmerrors',   # functionality built-in to HHVM
-]:
-ensure = present,
-}
 }
 }
diff --git a/modules/mediawiki/manifests/packages/php5.pp 
b/modules/mediawiki/manifests/packages/php5.pp
new file mode 100644
index 000..a6c0385
--- /dev/null
+++ b/modules/mediawiki/manifests/packages/php5.pp
@@ -0,0 +1,49 @@
+# == Class: mediawiki::packages::php5
+#
+# This class declares packages that make up Wikimedia's PHP5-based
+# MediaWiki deployment stack. As of August 2014, this is the most common
+# configuration in production, but new installs are configured for HHVM
+# instead.
+#
+class mediawiki::packages::php5 {
+# Run-time
+package { [
+'php5-common',
+'php5-cli',
+'php-apc',
+]:
+ensure = present,
+}
+
+# Wikimedia PHP extensions
+package { [
+'php-luasandbox',
+'php-wikidiff2',
+'php5-fss',
+]:
+ensure = present,
+}
+
+# Third-party PHP extensions
+package { [
+'php5-curl',
+'php5-geoip',
+'php5-intl',
+'php5-memcached',
+'php5-mysql',
+'php5-redis',
+'php5-xmlrpc',
+]:
+ensure = present,
+}
+
+if ubuntu_version('precise') {
+package { [
+'libmemcached11',  # Formerly a dependency for php5-memcached
+'php5-igbinary',   # No longer in use
+'php5-wmerrors',   # Not packaged for Trusty
+]:
+ensure = present,
+}
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9cb163d96520de637b9cd94a8f7a42be2219e08
Gerrit-PatchSet: 8
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
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] Fix Parsoid API variable for ContentTranslation - change (operations/puppet)

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

Change subject: Fix Parsoid API variable for ContentTranslation
..


Fix Parsoid API variable for ContentTranslation

Content Tranlation has flatten config file.

Change-Id: I59d19f23476ae7b28b197f1f3b18036fea83bf10
---
M modules/cxserver/templates/config.erb
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/modules/cxserver/templates/config.erb 
b/modules/cxserver/templates/config.erb
index 23d41cd..2f91f67 100644
--- a/modules/cxserver/templates/config.erb
+++ b/modules/cxserver/templates/config.erb
@@ -7,7 +7,5 @@
 module.exports = {
port: %= @port %,
logDir: '%= @log_dir %',
-   parsoid: {
-   api: '%= @parsoid %'
-   }
+   'parsoid.api': '%= @parsoid %'
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59d19f23476ae7b28b197f1f3b18036fea83bf10
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] The first GettingStarted test - change (mediawiki/selenium)

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

Change subject: The first GettingStarted test
..


The first GettingStarted test

The extension has browser tests since
https://gerrit.wikimedia.org/r/#/c/123873/

Bug: 52246
Change-Id: I4bdca41907a74736206dc31e895858110057653c
---
M README.md
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
index 7b0da38..c6259ee 100644
--- a/README.md
+++ b/README.md
@@ -113,6 +113,7 @@
 1. CirrusSearch: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/CirrusSearch),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-CirrusSearch), 
[Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-CirrusSearch)
 1. ContentTranslation: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/ContentTranslation),
 
[GitHub](https://github.com/wikimedia/mediawiki-extensions-ContentTranslation), 
[Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-ContentTranslation)
 1. Flow: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Flow),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-Flow), [Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-Flow)
+1. GettingStarted: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/GettingStarted),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-GettingStarted), 
[Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-GettingStarted)
 1. Math: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Math),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-Math), [Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-Math)
 1. mediawiki/core: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/core), 
[GitHub](https://github.com/wikimedia/mediawiki-core), [Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-core)
 1. MobileFrontend: 
[Gerrit](https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/MobileFrontend),
 [GitHub](https://github.com/wikimedia/mediawiki-extensions-MobileFrontend), 
[Code 
Climate](https://codeclimate.com/github/wikimedia/mediawiki-extensions-MobileFrontend)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bdca41907a74736206dc31e895858110057653c
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Swalling swall...@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] Enable browser tests for the GettingStarted extension - change (integration/jenkins-job-builder-config)

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

Change subject: Enable browser tests for the GettingStarted extension
..


Enable browser tests for the GettingStarted extension

See also commits in:

mediawiki/selenium
 https://gerrit.wikimedia.org/r/#/c/144978/

zuul-config
 https://gerrit.wikimedia.org/r/#/c/152795/

Change-Id: I2b90c3628b0f7277adb29d567996a108f35bae37
Depends-On: I79d9468e56bc7941c7c5bb27a77d1622bc7d3836
---
M jobs.yaml
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/jobs.yaml b/jobs.yaml
index a4f0466..8d0aafd 100644
--- a/jobs.yaml
+++ b/jobs.yaml
@@ -16,6 +16,8 @@
 qa-ale...@lists.wikimedia.org aahar...@wikimedia.org 
cmcma...@wikimedia.org kmis...@wikimedia.org nlaxst...@wikimedia.org 
sthottin...@wikimedia.org
  - VisualEditor: emails-VisualEditor
 qa-ale...@lists.wikimedia.org cmcma...@wikimedia.org 
jforres...@wikimedia.org
+ - Growth: emails-growth
+qa-ale...@lists.wikimedia.org mflasc...@wikimedia.org 
rm...@wikimedia.org samsm...@wikimedia.org
 
 # CirrusSearch
 - project:
@@ -148,6 +150,22 @@
  - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce':
 browser: firefox
 
+# GettingStarted
+- project:
+name: GettingStarted
+browser: firefox
+folder: tests
+headless: 'false'
+mediawiki_password_variable: MEDIAWIKI_PASSWORD_SELENIUM_USER_WMFLABS_ORG
+mediawiki_url: en.wikipedia.beta.wmflabs.org
+mediawiki_user: Selenium_user
+platform: linux
+recipients: *emails-growth
+repository: mediawiki/extensions/GettingStarted
+
+jobs:
+ - 'browsertests-{name}-{mediawiki_url}-{platform}-{browser}-sauce'
+
 # MobileFrontend
 - project:
 name: MobileFrontend

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b90c3628b0f7277adb29d567996a108f35bae37
Gerrit-PatchSet: 12
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: cloudbees
Gerrit-Owner: Phuedx g...@samsmith.io
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Swalling swall...@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] Remove ALL the trailing whitespace! - change (mediawiki...Gadgets)

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

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

Change subject: Remove ALL the trailing whitespace!
..

Remove ALL the trailing whitespace!

Change-Id: I45c62f7a0af4fa801681034f9a92141e840ac44d
---
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgetPages.php
M api/ApiQueryGadgets.php
M backend/CachedGadgetRepo.php
M backend/ForeignAPIGadgetRepo.php
M backend/ForeignDBGadgetRepo.php
M backend/GadgetPageList.php
M backend/GadgetRepo.php
M backend/GadgetResourceLoaderModule.php
M backend/LocalGadgetRepo.php
M i18n/en.json
M migrateGadgets.php
M modules/ext.gadgets.specialgadgets.tabs.js
M modules/jquery.createPropCloud.js
M populateGadgetPageList.php
M tests/GadgetsTest.php
M tests/old/GadgetsTest.php
17 files changed, 189 insertions(+), 189 deletions(-)


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

diff --git a/api/ApiQueryGadgetCategories.php b/api/ApiQueryGadgetCategories.php
index b1db5d3..8cf7aef 100644
--- a/api/ApiQueryGadgetCategories.php
+++ b/api/ApiQueryGadgetCategories.php
@@ -45,7 +45,7 @@
$data = array();
$result = $this-getResult();
$repo = LocalGadgetRepo::singleton();
-   
+
$gadgetsByCategory = $repo-getGadgetsByCategory();
if ( $gadgetsByCategory ) {
foreach ( $gadgetsByCategory as $category = $gadgets ) 
{
diff --git a/api/ApiQueryGadgetPages.php b/api/ApiQueryGadgetPages.php
index 242f770..78293e1 100644
--- a/api/ApiQueryGadgetPages.php
+++ b/api/ApiQueryGadgetPages.php
@@ -47,7 +47,7 @@
private function run( $resultPageSet = null ) {
$params = $this-extractRequestParams();
$db = $this-getDB();
-   
+
$this-addTables( 'gadgetpagelist' );
$this-addFields( array( 'gpl_namespace', 'gpl_title' ) );
$this-addWhereFld( 'gpl_extension', $params['extension'] );
@@ -60,7 +60,7 @@
$dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
$from = $params['from'] !== null ? $this-titlePartToKey( 
$params['from'] ) : null;
$this-addWhereRange( 'gpl_title', $dir, $from, null );
-   
+
$res = $this-select( __METHOD__ );
 
$count = 0;
@@ -72,7 +72,7 @@
$this-setContinueEnumParameter( 'from', 
$this-keyToTitle( $row-gpl_title ) );
break;
}
-   
+
$title = Title::makeTitle( $row-gpl_namespace, 
$row-gpl_title );
if ( is_null( $resultPageSet ) ) {
$vals = array( 'pagename' = $title-getText() 
);
diff --git a/api/ApiQueryGadgets.php b/api/ApiQueryGadgets.php
index e6c2582..bf3fa63 100644
--- a/api/ApiQueryGadgets.php
+++ b/api/ApiQueryGadgets.php
@@ -58,7 +58,7 @@
private function getList() {
$repo = LocalGadgetRepo::singleton();
$result = array();
-   
+
if ( $this-neededIds !== false ) {
// Get all requested gadgets by id
$ids = $this-neededIds;
@@ -66,14 +66,14 @@
// Get them all
$ids = $repo-getGadgetIds();
}
-   
+
foreach ( $ids as $id ) {
$gadget = $repo-getGadget( $id );
if ( $gadget  $this-isNeeded( $gadget ) ) {
$result[$id] = $gadget;
}
}
-   
+
return $result;
}
 
diff --git a/backend/CachedGadgetRepo.php b/backend/CachedGadgetRepo.php
index 2a0a43d..f101956 100644
--- a/backend/CachedGadgetRepo.php
+++ b/backend/CachedGadgetRepo.php
@@ -6,40 +6,40 @@
  */
 abstract class CachedGadgetRepo extends GadgetRepo {
/*** Protected members ***/
-   
+
/** Cache for EXISTING gadgets. Nonexistent gadgets must not be cached 
here,
 * use $missCache instead. Values may be null, in which case only the 
gadget's
 * existence is cached and the data must still be retrieved from memc 
or the DB.
-* 
+*
 * array( id = null|array( 'json' = JSON string, 'timestamp' = 
timestamp ) )
 */
protected $data = array();
-   
+
/** Cache for gadget IDs that have been queried and found to be 
nonexistent.
-* 
+*
 * array( id = ignored )
 */
protected $missCache = array();
-   
+
/** If true, $data is assumed to contain all existing gadget IDs.
 */
protected $idsLoaded = false;
-   
+
/*** Abstract methods ***/
-   
+
/**
 * 

[MediaWiki-commits] [Gerrit] Ruby linter for GettingStarted - change (integration/jenkins-job-builder-config)

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

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

Change subject: Ruby linter for GettingStarted
..

Ruby linter for GettingStarted

Creates  mwext-GettingStarted-ruby1.9.3lint

Bug: 52246
Change-Id: I94bc8dd6b569a6f6353b66429e2aa1118db3b995
---
M mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index a2808cf..4b6de7d 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -1200,6 +1200,11 @@
  - '{name}-ruby1.9.3lint'
 
 - project:
+name: 'mwext-GettingStarted'
+jobs:
+ - '{name}-ruby1.9.3lint'
+
+- project:
 name: 'mwext-Interwiki'
 jobs:
  - '{name}-phpcs-strict-HEAD'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94bc8dd6b569a6f6353b66429e2aa1118db3b995
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] Running Ruby linter for GettingStarted - change (integration/zuul-config)

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

Change subject: Running Ruby linter for GettingStarted
..


Running Ruby linter for GettingStarted

GettingStarted has browser tests since
https://gerrit.wikimedia.org/r/#/c/123873

Job added in jenkins-job-builder-config by:
https://gerrit.wikimedia.org/r/156510

Bug: 52246
Change-Id: I94bc8dd6b569a6f6353b66429e2aa1118db3b995
---
M layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index 5b73007..676b0b8 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -3070,6 +3070,7 @@
 template:
   - name: extension-unittests
   - name: extension-qunit
+  - name: extension-rubylint
 
   - name: mediawiki/extensions/GeoCrumbs
 template:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94bc8dd6b569a6f6353b66429e2aa1118db3b995
Gerrit-PatchSet: 7
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Phuedx g...@samsmith.io
Gerrit-Reviewer: Robmoen rm...@wikimedia.org
Gerrit-Reviewer: Swalling swall...@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] Ruby linter for GettingStarted - change (integration/jenkins-job-builder-config)

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

Change subject: Ruby linter for GettingStarted
..


Ruby linter for GettingStarted

Creates  mwext-GettingStarted-ruby1.9.3lint

Bug: 52246
Change-Id: I94bc8dd6b569a6f6353b66429e2aa1118db3b995
---
M mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index a2808cf..4b6de7d 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -1200,6 +1200,11 @@
  - '{name}-ruby1.9.3lint'
 
 - project:
+name: 'mwext-GettingStarted'
+jobs:
+ - '{name}-ruby1.9.3lint'
+
+- project:
 name: 'mwext-Interwiki'
 jobs:
  - '{name}-phpcs-strict-HEAD'

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

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

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


[MediaWiki-commits] [Gerrit] i18n: add Special:MyLanguage - change (mediawiki...PhpTagsSMW)

2014-08-27 Thread Shirayuki (Code Review)
Shirayuki has uploaded a new change for review.

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

Change subject: i18n: add Special:MyLanguage
..

i18n: add Special:MyLanguage

- phptagssmw-ext-arrays-not-installed

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsSMW 
refs/changes/11/156511/1

diff --git a/i18n/en.json b/i18n/en.json
index 8ab7f9f..251d3b4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,6 +5,6 @@
]
},
phptagssmw-desc: Objects for 
[https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki Semantic 
MediaWiki]-related data access,
-   phptagssmw-ext-arrays-not-installed: Requires the 
[https://www.mediawiki.org/wiki/Extension:Arrays Arrays] extension, but it's 
not installed.,
+   phptagssmw-ext-arrays-not-installed: Requires the 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Arrays Arrays] 
extension, but it's not installed.,
phptagssmw-ext-sqi-not-installed: Requires the 
[https://www.mediawiki.org/wiki/User:Vedmaka/Semantic_Query_Interface Semantic 
Query Interface] extension, but it's not installed.
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c3eb22cae499e3a57cece75d7cb39f4d4633a44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsSMW
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Check API Page Index for Missing - change (mediawiki...GWToolset)

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

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

Change subject: Check API Page Index for Missing
..

Check API Page Index for Missing

Added a check when the API returns a negative page index to make sure
the page status is missing, not invalid.

Follow-up on I2d9fd59e

Change-Id: Ice4b4b95c13e76a7c5ba6a069edfc6a8f43153fc
---
M includes/Handlers/UploadHandler.php
1 file changed, 7 insertions(+), 4 deletions(-)


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

diff --git a/includes/Handlers/UploadHandler.php 
b/includes/Handlers/UploadHandler.php
index 4787658..2ae873d 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -247,7 +247,7 @@
$msg =
wfMessage( 
'gwtoolset-mediafile-other-contributors' )
-params( 
$warnings['exists']['file']-getTitle() )
-   -escaped();
+   -text();
 
$status = Status::newFatal( $msg );
 
@@ -259,7 +259,7 @@
$msg =
wfMessage( 
'gwtoolset-mediafile-duplicate-same-title' )
-params( 
$warnings['exists']['file']-getTitle() )
-   -escaped();
+   -text();
 
$status = Status::newFatal( $msg );
}
@@ -275,7 +275,7 @@
$msg =
wfMessage( 
'gwtoolset-mediafile-duplicate-another-title' )
-params( 
$warnings['duplicate'][0]-getTitle() )
-   -escaped();
+   -text();
 
$status = Status::newFatal( $msg );
}
@@ -549,7 +549,10 @@
isset( $api_result['query']['pages'] )
 count( $api_result['query']['pages'] ) === 1
) {
-   if ( key( $api_result['query']['pages'] ) === -1 ) {
+   if (
+   key( $api_result['query']['pages'] ) === -1
+isset( 
$api_result['query']['pages'][-1]['missing'] )
+   ) {
$this-otherContributors = false;
return $this-otherContributors;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice4b4b95c13e76a7c5ba6a069edfc6a8f43153fc
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] Store $wgMemc as an instance variable in CachedGadgetRepo - change (mediawiki...Gadgets)

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

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

Change subject: Store $wgMemc as an instance variable in CachedGadgetRepo
..

Store $wgMemc as an instance variable in CachedGadgetRepo

Change-Id: Ibb0963097b01132f1db8854b0cd199bad578a113
---
M backend/CachedGadgetRepo.php
M backend/LocalGadgetRepo.php
2 files changed, 22 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/13/156513/1

diff --git a/backend/CachedGadgetRepo.php b/backend/CachedGadgetRepo.php
index 1bbb6fa..c730a1c 100644
--- a/backend/CachedGadgetRepo.php
+++ b/backend/CachedGadgetRepo.php
@@ -25,7 +25,19 @@
 */
protected $idsLoaded = false;
 
+   /**
+* @var BagOStuff
+*/
+   protected $cache;
+
+   /**
+* Subclasses should always call the parent constructor
+*
+* @param array $options
+*/
public function __construct( array $options ) {
+   global $wgMemc;
+   $this-cache = $wgMemc;
}
 
/*** Abstract methods ***/
@@ -67,7 +79,6 @@
 * @param array $data array( 'json' = JSON string, 'timestamp' = 
timestamp ) if added or modified, or null if deleted
 */
protected function updateCache( $id, $data ) {
-   global $wgMemc;
$toCache = $data;
if ( $data !== null ) {
// Added or modified
@@ -86,9 +97,9 @@
}
 
// Write to memc
-   $wgMemc-set( $this-getCacheKey( $id ), $toCache, 
$this-getCacheExpiry( $id ) );
+   $this-cache-set( $this-getCacheKey( $id ), $toCache, 
$this-getCacheExpiry( $id ) );
// Clear the gadget names array in memc so it'll be regenerated 
later
-   $wgMemc-delete( $this-getCacheKey( null ) );
+   $this-cache-delete( $this-getCacheKey( null ) );
}
 
/*** Public methods inherited from GadgetRepo ***/
@@ -114,14 +125,13 @@
 * @return array Array of gadget IDs
 */
private function maybeLoadIDs() {
-   global $wgMemc;
if ( $this-idsLoaded ) {
return array_keys( $this-data );
}
 
// Try memc
$key = $this-getCacheKey( null );
-   $cached = $wgMemc-get( $key );
+   $cached = $this-cache-get( $key );
if ( is_array( $cached ) ) {
// Yay, data is in cache
// Add to $this-data , but let things already in 
$this-data take precedence
@@ -139,11 +149,11 @@
// array_fill() and array_combine() don't like empty 
arrays
$toCache = array();
}
-   $wgMemc-set( $key, $toCache, $this-getCacheExpiry( null ) );
+   $this-cache-set( $key, $toCache, $this-getCacheExpiry( null 
) );
 
// Now that we have the data for every gadget, let's refresh 
those cache entries too
foreach ( $this-data as $id = $gadgetData ) {
-   $wgMemc-set( $this-getCacheKey( $id ), $gadgetData, 
$this-getCacheExpiry( $id ) );
+   $this-cache-set( $this-getCacheKey( $id ), 
$gadgetData, $this-getCacheExpiry( $id ) );
}
 
$this-idsLoaded = true;
@@ -156,7 +166,6 @@
 * @return array array( 'json' = JSON string, 'timestamp' = timestamp 
) or empty array if the gadget doesn't exist.
 */
private function maybeLoadDataFor( $id ) {
-   global $wgMemc;
if ( isset( $this-data[$id] )  is_array( $this-data[$id] ) 
) {
// Already loaded, nothing to do here.
return $this-data[$id];
@@ -175,7 +184,7 @@
 
// Try cache
$key = $this-getCacheKey( $id );
-   $cached = $wgMemc-get( $key );
+   $cached = $this-cache-get( $key );
if ( is_array( $cached ) ) {
// Yay, data is in cache
if ( count( $cached ) ) {
@@ -191,7 +200,7 @@
$data = $this-loadDataFor( $id );
if ( !$data ) {
// Gadget doesn't exist
-   // Use empty array to prevent confusion with 
$wgMemc-get() return values for missing keys
+   // Use empty array to prevent confusion with 
$this-cache-get() return values for missing keys
$data = array();
// DO NOT store $data in $this-data, because it's 
supposed to contain existing gadgets only
$this-missCache[$id] = true;
@@ -200,7 +209,7 @@
$this-data[$id] = $data;
}
// 

[MediaWiki-commits] [Gerrit] add addon active line and set size as textarea (v 1.7.1) - change (mediawiki...CodeMirror)

2014-08-27 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: add addon active line and set size as textarea (v 1.7.1)
..

add addon active line and set size as textarea (v 1.7.1)

Change-Id: Iecbce4695e2a31447741d1d64dd8b575fd8c3865
---
M CodeMirror.php
M resources/ext.CodeMirror.js
A resources/lib/codemirror/addon/selection/active-line.js
M resources/lib/codemirror/lib/codemirror.css
4 files changed, 77 insertions(+), 3 deletions(-)


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

diff --git a/CodeMirror.php b/CodeMirror.php
index 1aeb958..4a51cd0 100644
--- a/CodeMirror.php
+++ b/CodeMirror.php
@@ -15,7 +15,7 @@
die( 'This file is an extension to MediaWiki and thus not a valid entry 
point.' );
 }
 
-const EXT_CODEMIRROR_VERSION = '1.7.0';
+const EXT_CODEMIRROR_VERSION = '1.7.1';
 
 // Register this extension on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
@@ -49,6 +49,7 @@
'group' = 'ext.CodeMirror.lib',
'scripts' = array(
'lib/codemirror/lib/codemirror.js',
+   'lib/codemirror/addon/selection/active-line.js',
//'lib/codemirror/edit/matchbrackets.js',
//'lib/codemirror/edit/closebrackets.js',
'mode/mediawiki/mediawiki.js',
diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index 8997638..d7f3161 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -1,6 +1,7 @@
 /*global CodeMirror*/
 jQuery( document ).ready( function ( $ ) {
-   CodeMirror.fromTextArea( $( '#wpTextbox1' )[0], {
+   var textbox1 = $( '#wpTextbox1' );
+   var codeMirror = CodeMirror.fromTextArea( textbox1[0], {
styleActiveLine: true,
//lineNumbers: true,
lineWrapping: true,
@@ -10,4 +11,5 @@
//autoCloseBrackets: true,
mode: 'text/mediawiki'
} );
+   codeMirror.setSize( null, textbox1.height() );
 } );
diff --git a/resources/lib/codemirror/addon/selection/active-line.js 
b/resources/lib/codemirror/addon/selection/active-line.js
new file mode 100644
index 000..22da2e0
--- /dev/null
+++ b/resources/lib/codemirror/addon/selection/active-line.js
@@ -0,0 +1,71 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+// Because sometimes you need to style the cursor's line.
+//
+// Adds an option 'styleActiveLine' which, when enabled, gives the
+// active line's wrapping div the CSS class CodeMirror-activeline,
+// and gives its background div the class CodeMirror-activeline-background.
+
+(function(mod) {
+  if (typeof exports == object  typeof module == object) // CommonJS
+mod(require(../../lib/codemirror));
+  else if (typeof define == function  define.amd) // AMD
+define([../../lib/codemirror], mod);
+  else // Plain browser env
+mod(CodeMirror);
+})(function(CodeMirror) {
+  use strict;
+  var WRAP_CLASS = CodeMirror-activeline;
+  var BACK_CLASS = CodeMirror-activeline-background;
+
+  CodeMirror.defineOption(styleActiveLine, false, function(cm, val, old) {
+var prev = old  old != CodeMirror.Init;
+if (val  !prev) {
+  cm.state.activeLines = [];
+  updateActiveLines(cm, cm.listSelections());
+  cm.on(beforeSelectionChange, selectionChange);
+} else if (!val  prev) {
+  cm.off(beforeSelectionChange, selectionChange);
+  clearActiveLines(cm);
+  delete cm.state.activeLines;
+}
+  });
+
+  function clearActiveLines(cm) {
+for (var i = 0; i  cm.state.activeLines.length; i++) {
+  cm.removeLineClass(cm.state.activeLines[i], wrap, WRAP_CLASS);
+  cm.removeLineClass(cm.state.activeLines[i], background, BACK_CLASS);
+}
+  }
+
+  function sameArray(a, b) {
+if (a.length != b.length) return false;
+for (var i = 0; i  a.length; i++)
+  if (a[i] != b[i]) return false;
+return true;
+  }
+
+  function updateActiveLines(cm, ranges) {
+var active = [];
+for (var i = 0; i  ranges.length; i++) {
+  var range = ranges[i];
+  if (!range.empty()) continue;
+  var line = cm.getLineHandleVisualStart(range.head.line);
+  if (active[active.length - 1] != line) active.push(line);
+}
+if (sameArray(cm.state.activeLines, active)) return;
+cm.operation(function() {
+  clearActiveLines(cm);
+  for (var i = 0; i  active.length; i++) {
+cm.addLineClass(active[i], wrap, WRAP_CLASS);
+cm.addLineClass(active[i], background, BACK_CLASS);
+  }
+  cm.state.activeLines = active;
+});
+  }
+
+  function selectionChange(cm, sel) {
+updateActiveLines(cm, sel.ranges);
+  }
+});
diff --git a/resources/lib/codemirror/lib/codemirror.css 

[MediaWiki-commits] [Gerrit] add addon active line and set size as textarea (v 1.7.1) - change (mediawiki...CodeMirror)

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

Change subject: add addon active line and set size as textarea (v 1.7.1)
..


add addon active line and set size as textarea (v 1.7.1)

Change-Id: Iecbce4695e2a31447741d1d64dd8b575fd8c3865
---
M CodeMirror.php
M resources/ext.CodeMirror.js
A resources/lib/codemirror/addon/selection/active-line.js
M resources/lib/codemirror/lib/codemirror.css
4 files changed, 77 insertions(+), 3 deletions(-)

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



diff --git a/CodeMirror.php b/CodeMirror.php
index 1aeb958..4a51cd0 100644
--- a/CodeMirror.php
+++ b/CodeMirror.php
@@ -15,7 +15,7 @@
die( 'This file is an extension to MediaWiki and thus not a valid entry 
point.' );
 }
 
-const EXT_CODEMIRROR_VERSION = '1.7.0';
+const EXT_CODEMIRROR_VERSION = '1.7.1';
 
 // Register this extension on Special:Version
 $wgExtensionCredits['parserhook'][] = array(
@@ -49,6 +49,7 @@
'group' = 'ext.CodeMirror.lib',
'scripts' = array(
'lib/codemirror/lib/codemirror.js',
+   'lib/codemirror/addon/selection/active-line.js',
//'lib/codemirror/edit/matchbrackets.js',
//'lib/codemirror/edit/closebrackets.js',
'mode/mediawiki/mediawiki.js',
diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index 8997638..d7f3161 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -1,6 +1,7 @@
 /*global CodeMirror*/
 jQuery( document ).ready( function ( $ ) {
-   CodeMirror.fromTextArea( $( '#wpTextbox1' )[0], {
+   var textbox1 = $( '#wpTextbox1' );
+   var codeMirror = CodeMirror.fromTextArea( textbox1[0], {
styleActiveLine: true,
//lineNumbers: true,
lineWrapping: true,
@@ -10,4 +11,5 @@
//autoCloseBrackets: true,
mode: 'text/mediawiki'
} );
+   codeMirror.setSize( null, textbox1.height() );
 } );
diff --git a/resources/lib/codemirror/addon/selection/active-line.js 
b/resources/lib/codemirror/addon/selection/active-line.js
new file mode 100644
index 000..22da2e0
--- /dev/null
+++ b/resources/lib/codemirror/addon/selection/active-line.js
@@ -0,0 +1,71 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+// Because sometimes you need to style the cursor's line.
+//
+// Adds an option 'styleActiveLine' which, when enabled, gives the
+// active line's wrapping div the CSS class CodeMirror-activeline,
+// and gives its background div the class CodeMirror-activeline-background.
+
+(function(mod) {
+  if (typeof exports == object  typeof module == object) // CommonJS
+mod(require(../../lib/codemirror));
+  else if (typeof define == function  define.amd) // AMD
+define([../../lib/codemirror], mod);
+  else // Plain browser env
+mod(CodeMirror);
+})(function(CodeMirror) {
+  use strict;
+  var WRAP_CLASS = CodeMirror-activeline;
+  var BACK_CLASS = CodeMirror-activeline-background;
+
+  CodeMirror.defineOption(styleActiveLine, false, function(cm, val, old) {
+var prev = old  old != CodeMirror.Init;
+if (val  !prev) {
+  cm.state.activeLines = [];
+  updateActiveLines(cm, cm.listSelections());
+  cm.on(beforeSelectionChange, selectionChange);
+} else if (!val  prev) {
+  cm.off(beforeSelectionChange, selectionChange);
+  clearActiveLines(cm);
+  delete cm.state.activeLines;
+}
+  });
+
+  function clearActiveLines(cm) {
+for (var i = 0; i  cm.state.activeLines.length; i++) {
+  cm.removeLineClass(cm.state.activeLines[i], wrap, WRAP_CLASS);
+  cm.removeLineClass(cm.state.activeLines[i], background, BACK_CLASS);
+}
+  }
+
+  function sameArray(a, b) {
+if (a.length != b.length) return false;
+for (var i = 0; i  a.length; i++)
+  if (a[i] != b[i]) return false;
+return true;
+  }
+
+  function updateActiveLines(cm, ranges) {
+var active = [];
+for (var i = 0; i  ranges.length; i++) {
+  var range = ranges[i];
+  if (!range.empty()) continue;
+  var line = cm.getLineHandleVisualStart(range.head.line);
+  if (active[active.length - 1] != line) active.push(line);
+}
+if (sameArray(cm.state.activeLines, active)) return;
+cm.operation(function() {
+  clearActiveLines(cm);
+  for (var i = 0; i  active.length; i++) {
+cm.addLineClass(active[i], wrap, WRAP_CLASS);
+cm.addLineClass(active[i], background, BACK_CLASS);
+  }
+  cm.state.activeLines = active;
+});
+  }
+
+  function selectionChange(cm, sel) {
+updateActiveLines(cm, sel.ranges);
+  }
+});
diff --git a/resources/lib/codemirror/lib/codemirror.css 
b/resources/lib/codemirror/lib/codemirror.css
index eacec55..beaad4b 100644
--- 

[MediaWiki-commits] [Gerrit] Attempt to fix bug 70041 - change (mediawiki...Wikibase)

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

Change subject: Attempt to fix bug 70041
..


Attempt to fix bug 70041

Change-Id: Ib997a2bb6ffd10e4b51cc1b7ce5e793b83a0c93d
---
M repo/tests/phpunit/includes/api/RemoveClaimsTest.php
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/tests/phpunit/includes/api/RemoveClaimsTest.php 
b/repo/tests/phpunit/includes/api/RemoveClaimsTest.php
index a109771..f1a5227 100644
--- a/repo/tests/phpunit/includes/api/RemoveClaimsTest.php
+++ b/repo/tests/phpunit/includes/api/RemoveClaimsTest.php
@@ -89,6 +89,8 @@
 * @param Entity $entity
 */
public function doTestValidRequestSingle( Entity $entity ) {
+   $obtainedClaims = null;
+
/**
 * @var Claim[] $claims
 */
@@ -106,7 +108,7 @@
$this-assertTrue( $obtainedClaims-getHash() === 
$currentClaims-getHash() );
}
 
-   $this-assertTrue( $obtainedClaims-isEmpty() );
+   $this-assertTrue( $obtainedClaims === null || 
$obtainedClaims-isEmpty() );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib997a2bb6ffd10e4b51cc1b7ce5e793b83a0c93d
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: Jeroen De Dauw jeroended...@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] i18n: add Special:MyLanguage - change (mediawiki...PhpTagsSMW)

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

Change subject: i18n: add Special:MyLanguage
..


i18n: add Special:MyLanguage

- phptagssmw-ext-arrays-not-installed

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 8ab7f9f..251d3b4 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,6 +5,6 @@
]
},
phptagssmw-desc: Objects for 
[https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki Semantic 
MediaWiki]-related data access,
-   phptagssmw-ext-arrays-not-installed: Requires the 
[https://www.mediawiki.org/wiki/Extension:Arrays Arrays] extension, but it's 
not installed.,
+   phptagssmw-ext-arrays-not-installed: Requires the 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:Arrays Arrays] 
extension, but it's not installed.,
phptagssmw-ext-sqi-not-installed: Requires the 
[https://www.mediawiki.org/wiki/User:Vedmaka/Semantic_Query_Interface Semantic 
Query Interface] extension, but it's not installed.
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c3eb22cae499e3a57cece75d7cb39f4d4633a44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsSMW
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@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] Remove ALL the trailing whitespace! - change (mediawiki...Gadgets)

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

Change subject: Remove ALL the trailing whitespace!
..


Remove ALL the trailing whitespace!

Change-Id: I45c62f7a0af4fa801681034f9a92141e840ac44d
---
M api/ApiQueryGadgetCategories.php
M api/ApiQueryGadgetPages.php
M api/ApiQueryGadgets.php
M backend/CachedGadgetRepo.php
M backend/ForeignAPIGadgetRepo.php
M backend/ForeignDBGadgetRepo.php
M backend/GadgetPageList.php
M backend/GadgetRepo.php
M backend/GadgetResourceLoaderModule.php
M backend/LocalGadgetRepo.php
M i18n/en.json
M migrateGadgets.php
M modules/ext.gadgets.specialgadgets.tabs.js
M modules/jquery.createPropCloud.js
M populateGadgetPageList.php
M tests/GadgetsTest.php
M tests/old/GadgetsTest.php
17 files changed, 189 insertions(+), 189 deletions(-)

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



diff --git a/api/ApiQueryGadgetCategories.php b/api/ApiQueryGadgetCategories.php
index b1db5d3..8cf7aef 100644
--- a/api/ApiQueryGadgetCategories.php
+++ b/api/ApiQueryGadgetCategories.php
@@ -45,7 +45,7 @@
$data = array();
$result = $this-getResult();
$repo = LocalGadgetRepo::singleton();
-   
+
$gadgetsByCategory = $repo-getGadgetsByCategory();
if ( $gadgetsByCategory ) {
foreach ( $gadgetsByCategory as $category = $gadgets ) 
{
diff --git a/api/ApiQueryGadgetPages.php b/api/ApiQueryGadgetPages.php
index 242f770..78293e1 100644
--- a/api/ApiQueryGadgetPages.php
+++ b/api/ApiQueryGadgetPages.php
@@ -47,7 +47,7 @@
private function run( $resultPageSet = null ) {
$params = $this-extractRequestParams();
$db = $this-getDB();
-   
+
$this-addTables( 'gadgetpagelist' );
$this-addFields( array( 'gpl_namespace', 'gpl_title' ) );
$this-addWhereFld( 'gpl_extension', $params['extension'] );
@@ -60,7 +60,7 @@
$dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' );
$from = $params['from'] !== null ? $this-titlePartToKey( 
$params['from'] ) : null;
$this-addWhereRange( 'gpl_title', $dir, $from, null );
-   
+
$res = $this-select( __METHOD__ );
 
$count = 0;
@@ -72,7 +72,7 @@
$this-setContinueEnumParameter( 'from', 
$this-keyToTitle( $row-gpl_title ) );
break;
}
-   
+
$title = Title::makeTitle( $row-gpl_namespace, 
$row-gpl_title );
if ( is_null( $resultPageSet ) ) {
$vals = array( 'pagename' = $title-getText() 
);
diff --git a/api/ApiQueryGadgets.php b/api/ApiQueryGadgets.php
index e6c2582..bf3fa63 100644
--- a/api/ApiQueryGadgets.php
+++ b/api/ApiQueryGadgets.php
@@ -58,7 +58,7 @@
private function getList() {
$repo = LocalGadgetRepo::singleton();
$result = array();
-   
+
if ( $this-neededIds !== false ) {
// Get all requested gadgets by id
$ids = $this-neededIds;
@@ -66,14 +66,14 @@
// Get them all
$ids = $repo-getGadgetIds();
}
-   
+
foreach ( $ids as $id ) {
$gadget = $repo-getGadget( $id );
if ( $gadget  $this-isNeeded( $gadget ) ) {
$result[$id] = $gadget;
}
}
-   
+
return $result;
}
 
diff --git a/backend/CachedGadgetRepo.php b/backend/CachedGadgetRepo.php
index 2a0a43d..f101956 100644
--- a/backend/CachedGadgetRepo.php
+++ b/backend/CachedGadgetRepo.php
@@ -6,40 +6,40 @@
  */
 abstract class CachedGadgetRepo extends GadgetRepo {
/*** Protected members ***/
-   
+
/** Cache for EXISTING gadgets. Nonexistent gadgets must not be cached 
here,
 * use $missCache instead. Values may be null, in which case only the 
gadget's
 * existence is cached and the data must still be retrieved from memc 
or the DB.
-* 
+*
 * array( id = null|array( 'json' = JSON string, 'timestamp' = 
timestamp ) )
 */
protected $data = array();
-   
+
/** Cache for gadget IDs that have been queried and found to be 
nonexistent.
-* 
+*
 * array( id = ignored )
 */
protected $missCache = array();
-   
+
/** If true, $data is assumed to contain all existing gadget IDs.
 */
protected $idsLoaded = false;
-   
+
/*** Abstract methods ***/
-   
+
/**
 * Load the full data for all gadgets.
 * @return array( id = 

[MediaWiki-commits] [Gerrit] Fix auto-comment parameter when creating redirects - change (mediawiki...Wikibase)

2014-08-27 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has submitted this change and it was merged.

Change subject: Fix auto-comment parameter when creating redirects
..


Fix auto-comment parameter when creating redirects

Bug: 69750
Change-Id: Idcc27f1602f1293b7a27e1f4d069626f8cc3152a
---
M repo/includes/Interactors/RedirectCreationInteractor.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/includes/Interactors/RedirectCreationInteractor.php 
b/repo/includes/Interactors/RedirectCreationInteractor.php
index 54244fc..23e356b 100644
--- a/repo/includes/Interactors/RedirectCreationInteractor.php
+++ b/repo/includes/Interactors/RedirectCreationInteractor.php
@@ -94,7 +94,7 @@
$this-checkEmpty( $fromId );
 
$summary = new Summary( 'wbcreateredirect' );
-   $summary-addAutoSummaryArgs( $fromId, $toId );
+   $summary-addAutoCommentArgs( $fromId, $toId );
 
$redirect = new EntityRedirect( $fromId, $toId );
$this-saveRedirect( $redirect, $summary );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idcc27f1602f1293b7a27e1f4d069626f8cc3152a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@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] Fix the newline bunny-hop bug harder - change (VisualEditor/VisualEditor)

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

Change subject: Fix the newline bunny-hop bug harder
..


Fix the newline bunny-hop bug harder

In I4375f4c07, I fixed a bug where  meta\nfoo would dirty-diff
to \n metafoo in wrapper paragraphs. It turns out this was
still broken in the case where the newline was followed by an
inline node rather than text:  meta\nspan was still being
dirty-diffed to \n metaspan.

This was caused by a special case for when a content node is inserted
into a wrapper, in which case wrappedWhitespace is cleared. That's fine
and necessary, but in addition to that, we also need to output any
buffered meta items and their whitespace, and clear nextWhitespace
so we don't later record the previous value of wrappedWhitespace as
outer whitespace in the content node's .internal.whitespace array.

Bug: 69861
Change-Id: Ie80a98512b350311832a8674fac892b378738df0
---
M src/dm/ve.dm.Converter.js
M tests/dm/ve.dm.example.js
2 files changed, 33 insertions(+), 2 deletions(-)

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



diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index a5f19b4..dec875d 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -762,10 +762,13 @@
}
}
 
-   // If we're inserting content into a 
wrapper, any wrappedWhitespace
-   // up to this point can be considered 
dealt with
+   // If we're inserting content into a 
wrapper, any wrapped whitespace and meta
+   // items up until this point are here 
to stay
if ( context.inWrapper  
childIsContent ) {
+   outputWrappedMetaItems( 
'restore' );
wrappedWhitespace = '';
+   // Don't record the wrapped 
whitespace as the child node's outer whitespace
+   nextWhitespace = '';
}
 
// Annotate child
diff --git a/tests/dm/ve.dm.example.js b/tests/dm/ve.dm.example.js
index 8200da8..8de75c8 100644
--- a/tests/dm/ve.dm.example.js
+++ b/tests/dm/ve.dm.example.js
@@ -2364,6 +2364,34 @@
{ type: '/internalList' }
]
},
+   'whitespace surrounding metadata in a wrapper followed by inline node': 
{
+   body: 'bFoo/b meta /\nspan rel=ve:Alien/span',
+   data: [
+   { type: 'paragraph', internal: { generated: 'wrapper' } 
},
+   [ 'F', [ ve.dm.example.bold ] ],
+   [ 'o', [ ve.dm.example.bold ] ],
+   [ 'o', [ ve.dm.example.bold ] ],
+   ' ',
+   {
+   type: 'alienMeta',
+   attributes: {
+   domElements: $( 'meta /' ).toArray()
+   }
+   },
+   { type: '/alienMeta' },
+   '\n',
+   {
+   type: 'alienInline',
+   attributes: {
+   domElements: $( 'span 
rel=ve:Alien/span' ).toArray()
+   }
+   },
+   { type: '/alienInline' },
+   { type: '/paragraph' },
+   { type: 'internalList' },
+   { type: '/internalList' }
+   ]
+   },
'whitespace preservation in empty branch node': {
body: 'table\n\n/table',
data: [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie80a98512b350311832a8674fac892b378738df0
Gerrit-PatchSet: 4
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@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] New Wikidata Build - 27/08/2014 10:00 - change (mediawiki...Wikidata)

2014-08-27 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 27/08/2014 10:00
..

New Wikidata Build - 27/08/2014 10:00

Change-Id: Ida5a3a945ba87114b2b1adeb260d19a02b883e82
---
M composer.lock
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/i18n/fi.json
M extensions/Wikibase/client/i18n/id.json
M extensions/Wikibase/client/i18n/pl.json
A extensions/Wikibase/client/i18n/tet.json
M extensions/Wikibase/lib/includes/formatters/EntityIdHtmlLinkFormatter.php
M extensions/Wikibase/lib/includes/formatters/EntityIdTitleFormatter.php
M extensions/Wikibase/lib/includes/formatters/WikibaseValueFormatterBuilders.php
M extensions/Wikibase/lib/includes/store/EntityTitleLookup.php
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.aliasesview.js
M extensions/Wikibase/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
M 
extensions/Wikibase/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
M extensions/Wikibase/lib/tests/phpunit/formatters/EntityIdLinkFormatterTest.php
M 
extensions/Wikibase/lib/tests/phpunit/formatters/EntityIdTitleFormatterTest.php
M 
extensions/Wikibase/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
M 
extensions/Wikibase/lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata.tests.js
M extensions/Wikibase/repo/i18n/ca.json
M extensions/Wikibase/repo/i18n/ce.json
M extensions/Wikibase/repo/i18n/fa.json
M extensions/Wikibase/repo/i18n/hu.json
M extensions/Wikibase/repo/i18n/nb.json
M extensions/Wikibase/repo/includes/ClaimHtmlGenerator.php
M extensions/Wikibase/repo/includes/DiffView.php
M extensions/Wikibase/repo/includes/EditEntity.php
M extensions/Wikibase/repo/includes/EntityDiffVisualizer.php
M extensions/Wikibase/repo/includes/EntityView.php
M extensions/Wikibase/repo/includes/Hook/MakeGlobalVariablesScriptHandler.php
M extensions/Wikibase/repo/includes/Interactors/RedirectCreationInteractor.php
M extensions/Wikibase/repo/includes/LinkedData/EntityDataRequestHandler.php
M 
extensions/Wikibase/repo/includes/LinkedData/EntityDataSerializationService.php
M extensions/Wikibase/repo/includes/LinkedData/EntityDataUriManager.php
M extensions/Wikibase/repo/includes/Localizer/MessageParameterFormatter.php
M extensions/Wikibase/repo/includes/ParserOutputJsConfigBuilder.php
M extensions/Wikibase/repo/includes/UpdateRepoOnMoveJob.php
M extensions/Wikibase/repo/includes/View/ClaimsView.php
M extensions/Wikibase/repo/includes/View/SnakHtmlGenerator.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
M extensions/Wikibase/repo/includes/actions/ViewEntityAction.php
A extensions/Wikibase/repo/includes/api/ApiHelperFactory.php
M extensions/Wikibase/repo/includes/api/ApiWikibase.php
M extensions/Wikibase/repo/includes/api/CreateRedirectModule.php
M extensions/Wikibase/repo/includes/api/ResultBuilder.php
M extensions/Wikibase/repo/includes/api/SearchEntities.php
M extensions/Wikibase/repo/includes/content/EntityContent.php
M extensions/Wikibase/repo/includes/content/EntityContentFactory.php
M extensions/Wikibase/repo/includes/content/EntityHandler.php
M extensions/Wikibase/repo/includes/content/ItemContent.php
M extensions/Wikibase/repo/includes/content/PropertyContent.php
M extensions/Wikibase/repo/includes/serializers/EntityRevisionSerializer.php
M extensions/Wikibase/repo/includes/specials/SpecialItemByTitle.php
M extensions/Wikibase/repo/includes/specials/SpecialItemDisambiguation.php
M extensions/Wikibase/repo/includes/specials/SpecialWikibaseRepoPage.php
M extensions/Wikibase/repo/includes/store/EntityPermissionChecker.php
M extensions/Wikibase/repo/includes/store/sql/EntityPerPageBuilder.php
M extensions/Wikibase/repo/includes/store/sql/WikiPageEntityStore.php
M extensions/Wikibase/repo/tests/phpunit/includes/ClaimHtmlGeneratorTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/EditEntityTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/EntityViewTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/LinkedData/EntityDataUriManagerTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/Localizer/MessageParameterFormatterTest.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/View/ClaimsViewTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php
M 

[MediaWiki-commits] [Gerrit] Split mw-run-update-script from mw-setup-extension - change (integration/jenkins-job-builder-config)

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

Change subject: Split mw-run-update-script from mw-setup-extension
..


Split mw-run-update-script from mw-setup-extension

Change is a noop.

Change-Id: I4d13a3c1e3ca80950c8a3a17121b3141b9f6aaea
---
M macro.yaml
M mediawiki-extensions.yaml
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/macro.yaml b/macro.yaml
index ee11ba8..c123f17 100644
--- a/macro.yaml
+++ b/macro.yaml
@@ -397,7 +397,6 @@
  - mw-get-extensions:
   dependencies: '{dependencies}'
  - mw-apply-settings
- - mw-run-update-script
 
 - builder:
 name: mw-phpunit
diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 4b6de7d..cbdf8d4 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -69,6 +69,8 @@
 mwbranch: 'master'
 dependencies: '{dependencies}'
 
+ - mw-run-update-script
+
  - browsertests:
  tests-path: 'extensions/{ext-name}/tests/browser'
  browser: '{browser}'
@@ -105,6 +107,7 @@
  - mw-setup-extension:
 mwbranch: 'master'
 dependencies: '{dependencies}'
+ - mw-run-update-script
  - qunit
 publishers:
  - archive-log-dir
@@ -121,6 +124,7 @@
  - mw-setup-extension:
 mwbranch: 'master'
 dependencies: '{dependencies}'
+ - mw-run-update-script
  - qunit-mobile
 publishers:
  - archive-log-dir
@@ -136,6 +140,7 @@
  - mw-setup-extension:
 mwbranch: '{mwbranch}'
 dependencies: '{dependencies}'
+ - mw-run-update-script
  - mw-run-phpunit-allexts
 # TODO, find ways to additionaly run tests for core but
 # without extensions tests
@@ -264,6 +269,7 @@
  - mw-setup-extension:
 mwbranch: 'master'
 dependencies: '{dependencies}'
+ - mw-run-update-script
  - mw-run-phpunit-allexts
 publishers:
  - archive-log-dir

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d13a3c1e3ca80950c8a3a17121b3141b9f6aaea
Gerrit-PatchSet: 3
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] Syncronize VisualEditor: 5d482e1..323fb9e - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 5d482e1..323fb9e
..

Syncronize VisualEditor: 5d482e1..323fb9e

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


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

diff --git a/VisualEditor b/VisualEditor
index 5d482e1..323fb9e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 5d482e16af2c95d27c00177a18d76c3b48dfe747
+Subproject commit 323fb9e712ff967738cf9c7423b8401607eb594b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8392b4386df5443d88dffed2a9edd0e9495a8943
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] Remove delete button from required parameters in template di... - change (mediawiki...VisualEditor)

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

Change subject: Remove delete button from required parameters in template dialog
..


Remove delete button from required parameters in template dialog

Bug: 60358
Change-Id: I5d03f466475bfafd4569480431969f5001365eb8
---
M modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
M modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
2 files changed, 5 insertions(+), 1 deletion(-)

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

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
index 196e001..6cec102 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTransclusionDialog.js
@@ -151,6 +151,9 @@
this.addParameterButton.setDisabled(
!( page instanceof ve.ui.MWTemplatePage || page instanceof 
ve.ui.MWParameterPage )
);
+   if ( page instanceof ve.ui.MWParameterPage ) {
+   this.bookletLayout.getOutlineControls().removeButton.toggle( 
!page.parameter.isRequired() );
+   }
 };
 
 /**
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
index 433e84d..e3e9ceb 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js
@@ -57,7 +57,8 @@
title: ve.msg( 'visualeditor-dialog-transclusion-remove-param' 
),
classes: [ 've-ui-mwParameterPage-removeButton' ]
} )
-   .connect( this, { click: 'onRemoveButtonClick' } );
+   .connect( this, { click: 'onRemoveButtonClick' } )
+   .toggle( !this.parameter.isRequired() );
 
this.infoButton = new OO.ui.PopupButtonWidget( {
$: this.$,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d03f466475bfafd4569480431969f5001365eb8
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@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: 5d482e1..323fb9e - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 5d482e1..323fb9e
..


Syncronize VisualEditor: 5d482e1..323fb9e

Change-Id: I8392b4386df5443d88dffed2a9edd0e9495a8943
---
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 5d482e1..323fb9e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 5d482e16af2c95d27c00177a18d76c3b48dfe747
+Subproject commit 323fb9e712ff967738cf9c7423b8401607eb594b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8392b4386df5443d88dffed2a9edd0e9495a8943
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] Add tests for GadgetDefinitionContent - change (mediawiki...Gadgets)

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

Change subject: Add tests for GadgetDefinitionContent
..


Add tests for GadgetDefinitionContent

Change-Id: I6f5ee2168948ddfee5464e0042373eed5ad64ffb
---
A tests/content/GadgetDefinitionContentTest.php
1 file changed, 176 insertions(+), 0 deletions(-)

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



diff --git a/tests/content/GadgetDefinitionContentTest.php 
b/tests/content/GadgetDefinitionContentTest.php
new file mode 100644
index 000..c6f05a9
--- /dev/null
+++ b/tests/content/GadgetDefinitionContentTest.php
@@ -0,0 +1,176 @@
+?php
+
+class GadgetDefinitionContentTest extends MediaWikiLangTestCase {
+
+   /**
+* @covers GadgetDefinitionContent::__construct
+* @dataProvider provideConstructor
+*/
+   public function testConstructor( $text, $desc ) {
+   $content = new GadgetDefinitionContent( $text );
+   $this-assertInstanceOf( 'GadgetDefinitionContent', $content, 
$desc );
+   }
+
+   public static function provideConstructor() {
+   return array(
+   array( '{}', 'Valid JSON' ),
+   array( 'totally not valid JSON', 'Invalid JSON' ),
+   array( '', 'Empty string' )
+   );
+   }
+
+   /**
+* @covers GadgetDefinitionContent::isValid
+* @covers Gadget::validatePropertiesArray
+* @dataProvider provideIsValid
+*/
+   public function testIsValid( $text, $result, $desc ) {
+   $content = new GadgetDefinitionContent( $text );
+   $this-assertEquals( $result, $content-isValid(), $desc );
+   }
+
+   /**
+* @todo add tests for module.* properties
+*/
+   public static function provideIsValid() {
+   return array(
+   array( '', false, 'Empty string' ),
+   array( '{}', true, 'Empty JSON object' ),
+   array( 'some random text', false, 'Plain string' ),
+   array( '{settings: {}}', true, 'settings set to an 
object' ),
+   array( '{settings: []}', true, 'settings set to an 
array' ),
+   array( '{settings: {rights: [block, delete]}}', 
true, 'setting.rights set to an array' ),
+   array( '{settings: {rights: block}}', false, 
'settings.rights set to a string' ),
+   array( '{settings: {rights: [[block, 
delete]]}}', false, 'settings.rights set to a nested array' ),
+   array( '{settings: {default: true}}', true, 
'settings.default set to true' ),
+   array( '{settings: {default: false}}', true, 
'settings.default set to false' ),
+   array( '{settings: {default: {}}}', false, 
'settings.default set to an object' ),
+   array( '{settings: {hidden: true}}', true, 
'settings.hidden set to true' ),
+   array( '{settings: {hidden: false}}', true, 
'settings.hidden set to false' ),
+   array( '{settings: {hidden: {}}}', false, 
'settings.hidden set to an object' ),
+   array( '{settings: {shared: true}}', true, 
'settings.shared set to true' ),
+   array( '{settings: {shared: false}}', true, 
'settings.shared set to false' ),
+   array( '{settings: {shared: {}}}', false, 
'settings.shared set to an object' ),
+   array( '{settings: {skins: true}}', true, 
'settings.skins set to true' ),
+   array( '{settings: {skins: false}}', false, 
'settings.skins set to false' ),
+   array( '{settings: {skins: [vector, 
monobook]}}', true, 'settings.skins set to an array' ),
+   array( '{settings: {skins: string}}', false, 
'settings.skins set to a string' ),
+   array( '{settings: {category: Some string}}', 
true, 'settings.category set to a string' ),
+   array( '{settings: {category: []}}', false, 
'settings.category set to an array' ),
+   );
+   }
+
+   /**
+* @covers GadgetDefinitionContent::preSaveTransform
+* @dataProvider providePreSaveTransform
+*/
+   public function testPreSaveTransform( $input, $expected, $desc ) {
+   $title = Title::newMainPage();
+   $user = $this-getMock( 'User' );
+   $parserOptions = $this-getMock( 'ParserOptions' );
+   $content = new GadgetDefinitionContent( $input );
+   $expectedContent = new GadgetDefinitionContent( $expected );
+   // Use getNativeData to compare the raw text
+   $this-assertEquals(
+   $expectedContent-getNativeData(),
+   

[MediaWiki-commits] [Gerrit] Rename $result -- $expected since that's what it is - change (mediawiki...Gadgets)

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

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

Change subject: Rename $result -- $expected since that's what it is
..

Rename $result -- $expected since that's what it is

Change-Id: Ie41766c43f6faa11daa7366dfc3ad0aff0225207
---
M tests/content/GadgetDefinitionContentTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/tests/content/GadgetDefinitionContentTest.php 
b/tests/content/GadgetDefinitionContentTest.php
index c6f05a9..ad464bc 100644
--- a/tests/content/GadgetDefinitionContentTest.php
+++ b/tests/content/GadgetDefinitionContentTest.php
@@ -24,9 +24,9 @@
 * @covers Gadget::validatePropertiesArray
 * @dataProvider provideIsValid
 */
-   public function testIsValid( $text, $result, $desc ) {
+   public function testIsValid( $text, $expected, $desc ) {
$content = new GadgetDefinitionContent( $text );
-   $this-assertEquals( $result, $content-isValid(), $desc );
+   $this-assertEquals( $expected, $content-isValid(), $desc );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie41766c43f6faa11daa7366dfc3ad0aff0225207
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: RL2
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] translateAnnotations with partial mapping - change (mediawiki...cxserver)

2014-08-27 Thread Divec (Code Review)
Divec has uploaded a new change for review.

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

Change subject: translateAnnotations with partial mapping
..

translateAnnotations with partial mapping

LinearDoc:
* Allow partial rangeMappings for translateAnnotations
* Fallback to plaintext where range info is incomplete
* Fallback to segment end placement for references
* Inline span['data-mw'] (like img) if it only contains whitespace

LinearDoc.test.js, translate.test.json
* Test translateAnnotations with plaintext translation and range mapping

Change-Id: I960dbe6155a5ea859b716e4a8748002a513618a6
---
M lineardoc/LinearDoc.js
M tests/lineardoc/LinearDoc.test.js
A tests/lineardoc/translate.test.json
3 files changed, 278 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/18/156518/1

diff --git a/lineardoc/LinearDoc.js b/lineardoc/LinearDoc.js
index eeba4cb..c4cf80e 100644
--- a/lineardoc/LinearDoc.js
+++ b/lineardoc/LinearDoc.js
@@ -215,7 +215,7 @@
  * @param {number[]} boundaries Boundary offsets
  * @param chunks Chunks to which the boundaries apply
  * @param {Function} getLength Function returning the length of a chunk
- * @returns {Object} Array of {chunk: ch, boundaries: [...]}
+ * @returns {Object[]} Array of {chunk: ch, boundaries: [...]}
  */
 function getChunkBoundaryGroups( boundaries, chunks, getLength ) {
var i, len, groupBoundaries, chunk, chunkLength, boundary,
@@ -265,12 +265,12 @@
  * @constructor
  * @param {string} text Plaintext in the chunk (can be '')
  * @param {Object[]} array of SAX open tag objects, for the applicable tags
- * @param {Doc|object} [inlineElement] tag or sub-doc
+ * @param {Doc|object} [inlineContent] tag or sub-doc
  */
-function TextChunk( text, tags, inlineElement ) {
+function TextChunk( text, tags, inlineContent ) {
this.text = text;
this.tags = tags;
-   this.inlineElement = inlineElement;
+   this.inlineContent = inlineContent;
 }
 
 /**
@@ -293,14 +293,14 @@
 /**
  * Get the (last) text chunk at a given char offset
  * @method
- * @param {number} charOffset the char offset of the TextChunk
+ * @param {number} charOffset The char offset of the TextChunk
  * @return {TextChunk} The text chunk
  */
 TextBlock.prototype.getTextChunkAt = function ( charOffset ) {
-   // TODO: bisecting instead of quadratic
+   // TODO: bisecting instead of linear search
var i, len;
for ( i = 0, len = this.textChunks.length - 1; i  len; i++ ) {
-   if ( this.startOffsets[i + 1]  charOffset ) {
+   if ( this.startOffsets[ i + 1 ]  charOffset ) {
break;
}
}
@@ -316,22 +316,140 @@
  * @returns {TextBlock} Translated textblock with annotations applied
  */
 TextBlock.prototype.translateAnnotations = function ( targetText, 
rangeMappings ) {
-   var i, len, rangeMapping, oldTextChunk, newText,
-   newTextChunks = [];
-   for ( i = 0, len = rangeMappings.length; i  len; i++ ) {
+   var i, iLen, j, jLen, rangeMapping, sourceTextChunk, text, pos, 
textChunk, offset,
+   sourceRangeEnd, targetRangeEnd, tail, tailSpace,
+   // map of { offset: x, textChunks: [...] }
+   emptyTextChunks = {},
+   emptyTextChunkOffsets = [],
+   // list of { start: x, length: x, textChunk: x }
+   textChunks = [];
+
+   // Create map of empty text chunks, by offset
+   for ( i = 0, iLen = this.textChunks.length; i  iLen; i++ ) {
+   textChunk = this.textChunks[ i ];
+   offset = this.startOffsets[ i ];
+   if ( textChunk.text.length  0 ) {
+   continue;
+   } 
+   if ( !emptyTextChunks[ offset ] ) {
+   emptyTextChunks[ offset ] = [];
+   }
+   emptyTextChunks[ offset ].push( textChunk );
+   }
+   for ( offset in emptyTextChunks ) {
+   emptyTextChunkOffsets.push( offset );
+   }
+   emptyTextChunkOffsets.sort( function ( a, b ) { return a - b; } );
+
+   for ( i = 0, iLen = rangeMappings.length; i  iLen; i++ ) {
+   // Copy annotations from source text start offset
rangeMapping = rangeMappings[i];
-   oldTextChunk = this.getTextChunkAt( rangeMapping.source.start );
-   newText = targetText.substr(
+   sourceRangeEnd = rangeMapping.source.start + 
rangeMapping.source.length;
+   targetRangeEnd = rangeMapping.target.start + 
rangeMapping.target.length;
+   sourceTextChunk = this.getTextChunkAt( 
rangeMapping.source.start );
+   text = targetText.substr(
rangeMapping.target.start,
rangeMapping.target.length
);
-   

[MediaWiki-commits] [Gerrit] Rename $result -- $expected since that's what it is - change (mediawiki...Gadgets)

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

Change subject: Rename $result -- $expected since that's what it is
..


Rename $result -- $expected since that's what it is

Change-Id: Ie41766c43f6faa11daa7366dfc3ad0aff0225207
---
M tests/content/GadgetDefinitionContentTest.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/content/GadgetDefinitionContentTest.php 
b/tests/content/GadgetDefinitionContentTest.php
index c6f05a9..ad464bc 100644
--- a/tests/content/GadgetDefinitionContentTest.php
+++ b/tests/content/GadgetDefinitionContentTest.php
@@ -24,9 +24,9 @@
 * @covers Gadget::validatePropertiesArray
 * @dataProvider provideIsValid
 */
-   public function testIsValid( $text, $result, $desc ) {
+   public function testIsValid( $text, $expected, $desc ) {
$content = new GadgetDefinitionContent( $text );
-   $this-assertEquals( $result, $content-isValid(), $desc );
+   $this-assertEquals( $expected, $content-isValid(), $desc );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie41766c43f6faa11daa7366dfc3ad0aff0225207
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: RL2
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@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 jobs for wikibase - change (integration/jenkins-job-builder-config)

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

Change subject: Add jobs for wikibase
..


Add jobs for wikibase

Will be triggered by Wikimedia Jenkins on an instance managed
by the Wikidata team.

Created jobs:
* mwext-Wikibase-repo-api-tests
* mwext-Wikibase-repo-getentities-api-tests
* mwext-Wikibase-client-tests

Updated job:
* mwext-Wikibase-repo-tests

Change-Id: Ifa58a060c3e792ed9efdac04e3737a129cc72451
---
M mediawiki-extensions.yaml
A wdjenkins.yaml
2 files changed, 76 insertions(+), 49 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index cbdf8d4..69472d0 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -256,26 +256,6 @@
  - shell: /srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve.sh
  - shell: sudo -u jenkins 
/srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve-push.sh
 
-# Job specific to Wikibase, let us switch between client
-# and server configurations.
-- job-template:
-name: 'mwext-Wikibase-{kind}-tests'
-node: hasSlaveScripts  UbuntuPrecise
-defaults: use-zuul-for-mw-ext
-ext-name: 'Wikibase'
-triggers:
- - zuul
-builders:
- - mw-setup-extension:
-mwbranch: 'master'
-dependencies: '{dependencies}'
- - mw-run-update-script
- - mw-run-phpunit-allexts
-publishers:
- - archive-log-dir
- - junit:
-results: 'log/junit*.xml'
-
 # These are jobs we create for all of the extensions
 # listed below. If a job should only be created
 # for a select number of extensions or if it needs
@@ -929,12 +909,7 @@
  - WhoIsWatching
  - Widgets
  - WikiArticleFeeds
- - Wikibase
- - WikibaseClient
- - WikibaseLib
  - WikibaseMobile
- - WikibaseQuery
- - WikibaseRepo
  - WikibaseSolr
  - WikiCategoryTagCloud
  - Wikidata
@@ -983,30 +958,6 @@
 
 jobs:
  - mwext-check-jobs
-
- # Wikibase related
- - '{name}-{ext-name}-testextensions-{mwbranch}':
-name: mwext
-ext-name: Wikibase
-dependencies: 'Diff,DataValues,DataTypes,WikibaseDataModel,Scribunto'
- - 'mwext-Wikibase-{kind}-tests':
-ext-name: Wikibase
-dependencies: 'Diff,DataValues,DataTypes,WikibaseDataModel,Scribunto'
-kind: 'client'
- - 'mwext-Wikibase-{kind}-tests':
-ext-name: Wikibase
-dependencies: 'Diff,DataValues,DataTypes,WikibaseDataModel'
-kind: 'repo'
- - 'mwext-Wikibase-{kind}-tests':
-ext-name: Wikibase
-dependencies: 'Diff,DataValues,DataTypes,WikibaseDataModel'
-kind: 'repoapi'
- - '{name}-{ext-name}-qunit':
-ext-name: Wikibase
-dependencies: 'Diff,DataValues,DataTypes,WikibaseDataModel,Scribunto'
- - '{name}-{ext-name}-testextensions-{mwbranch}':
-ext-name: WikibaseDataModel
-dependencies: 'Diff,DataValues'
 
  # qunit jobs for MediaWiki extensions
 
diff --git a/wdjenkins.yaml b/wdjenkins.yaml
new file mode 100644
index 000..fc48d56
--- /dev/null
+++ b/wdjenkins.yaml
@@ -0,0 +1,76 @@
+- builder:
+name: wdj-mw-composer-install-ext
+builders:
+- shell: 'cd $WORKSPACE/extensions/{extension} 
+timeout 300 /usr/local/bin/composer install --prefer-source -vvv'
+
+- builder:
+name: wdj-wb-apply-settings
+builders:
+ - shell: 
$WORKSPACE/extensions/Wikibase/build/jenkins/mw-apply-wb-settings.sh -r 
{repoorclient} -e {experimental} -b {isbuild}
+
+- builder:
+name: wdj-runtests
+builders:
+- shell: |
+cd $WORKSPACE/tests/phpunit
+php phpunit.php \
+   --log-junit $WORKSPACE/log/junit-wikidata.xml \
+   --with-phpunitdir 
/srv/deployment/integration/phpunit/vendor/phpunit/phpunit \
+   {params}
+
+- job-template:
+name: 'mwext-Wikibase-{kind}-tests'
+node: Wikidata
+defaults: use-zuul-for-mw-ext
+triggers:
+ - zuul
+builders:
+ - mw-setup-extension:
+mwbranch: 'master'
+dependencies: '{dependencies}'
+ - wdj-mw-composer-install-ext:
+  extension: '{ext-name}'
+ - wdj-wb-apply-settings:
+  repoorclient: '{repoorclient}'
+  experimental: 'true'
+  isbuild: 'false'
+ - mw-run-update-script
+ - wdj-runtests:
+  params: '{phpunit-params}'
+publishers:
+ - archive-log-dir
+ - junit:
+results: 'log/junit*.xml'
+
+- project:
+name: wikidata
+ext-name: 'Wikibase'
+# By default we do not need any other extensions:
+dependencies: 
+
+wrappers:
+  - timeout:
+  timeout: 30
+  fail: true
+  - timestamps
+  - ansicolor
+
+jobs:
+ - 'mwext-Wikibase-{kind}-tests':
+kind: repo
+repoorclient: 'repo'
+phpunit-params: '--group Wikibase 

[MediaWiki-commits] [Gerrit] SpecialRunJobs: Use Config instead of global - change (mediawiki/core)

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

Change subject: SpecialRunJobs: Use Config instead of global
..


SpecialRunJobs: Use Config instead of global

Remove use of global and use Config object submitted as a new second
paremeter to SpecialRunJobs::getQuerySignature.

Bug: 69187
Change-Id: Idfd48e36275651c8ee1d926355fc32a7ba84883a
---
M includes/MediaWiki.php
M includes/specials/SpecialRunJobs.php
2 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index da4af2f..0424633 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -682,7 +682,8 @@
 
$query = array( 'title' = 'Special:RunJobs',
'tasks' = 'jobs', 'maxjobs' = $n, 'sigexpiry' = 
time() + 5 );
-   $query['signature'] = SpecialRunJobs::getQuerySignature( $query 
);
+   $query['signature'] = SpecialRunJobs::getQuerySignature(
+   $query, $this-config-get( 'SecretKey' ) );
 
$errno = $errstr = null;
$info = wfParseUrl( $this-config-get( 'Server' ) );
diff --git a/includes/specials/SpecialRunJobs.php 
b/includes/specials/SpecialRunJobs.php
index 54f224a..d4a06eb 100644
--- a/includes/specials/SpecialRunJobs.php
+++ b/includes/specials/SpecialRunJobs.php
@@ -61,7 +61,7 @@
 
$squery = $params;
unset( $squery['signature'] );
-   $cSig = self::getQuerySignature( $squery ); // correct signature
+   $cSig = self::getQuerySignature( $squery, 
$this-getConfig()-get( 'SecretKey' ) ); // correct signature
$rSig = $params['signature']; // provided signature
 
$verified = is_string( $rSig )  hash_equals( $cSig, $rSig );
@@ -102,12 +102,11 @@
 
/**
 * @param array $query
+* @param string $secretKey
 * @return string
 */
-   public static function getQuerySignature( array $query ) {
-   global $wgSecretKey;
-
+   public static function getQuerySignature( array $query, $secretKey ) {
ksort( $query ); // stable order
-   return hash_hmac( 'sha1', wfArrayToCgi( $query ), $wgSecretKey 
);
+   return hash_hmac( 'sha1', wfArrayToCgi( $query ), $secretKey );
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfd48e36275651c8ee1d926355fc32a7ba84883a
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Florianschmidtwelzow florian.schmidt.wel...@t-online.de
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix EntityTitleLookup namespace in ApiHelperFactoryTest - change (mediawiki...Wikibase)

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

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

Change subject: Fix EntityTitleLookup namespace in ApiHelperFactoryTest
..

Fix EntityTitleLookup namespace in ApiHelperFactoryTest

Change-Id: Ifd9131dd68e1da350c3c574acab0b5abb867612a
---
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php 
b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
index 545a233..335f90f 100644
--- a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
+++ b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
@@ -14,7 +14,7 @@
 class ApiHelperFactoryTest extends \PHPUnit_Framework_TestCase {
 
private function newApiHelperFactory() {
-   $titleLookup = $this-getMock( '\Wikibase\EntityTitleLookup' );
+   $titleLookup = $this-getMock( 
'\Wikibase\Lib\Store\EntityTitleLookup' );
$exceptionLocalizer = $this-getMock( 
'\Wikibase\Lib\Localizer\ExceptionLocalizer' );
$dataTypeLookup = $this-getMock( 
'\Wikibase\Lib\PropertyDataTypeLookup' );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd9131dd68e1da350c3c574acab0b5abb867612a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] added black to friday as a test. - change (mediawiki...examples)

2014-08-27 Thread Mazzax6 (Code Review)
Mazzax6 has uploaded a new change for review.

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

Change subject: added black to friday as a test.
..

added black to friday as a test.

Change-Id: Iec645ac3298a8be4401efb29ff6137d18047aea8

changed from netherlands to france as a test.ok heres squash.

Change-Id: Iea0684e035139a61820d08ec44cbd84ac29d6236
---
M Example/Example.i18n.alias.php
M Example/Example.php
2 files changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/examples 
refs/changes/20/156520/1

diff --git a/Example/Example.i18n.alias.php b/Example/Example.i18n.alias.php
index a8facd4..c89d97b 100644
--- a/Example/Example.i18n.alias.php
+++ b/Example/Example.i18n.alias.php
@@ -5,6 +5,7 @@
  * @file
  * @ingroup Extensions
  */
+//edited from Netherlands to france as a test
 
 $specialPageAliases = array();
 
@@ -13,7 +14,7 @@
'HelloWorld' = array( 'HelloWorld' ),
 );
 
-/** Dutch (Nederlands) */
-$specialPageAliases['nl'] = array(
-   'HelloWorld' = array( 'HalloWereld' ),
+/** French (french) */
+$specialPageAliases['fr'] = array(
+   'HelloWorld' = array( 'bonjourmonde' ),
 );
diff --git a/Example/Example.php b/Example/Example.php
index c38c270..04936db 100644
--- a/Example/Example.php
+++ b/Example/Example.php
@@ -148,13 +148,14 @@
 
 // Color map for the Welcome feature
 $wgExampleWelcomeColorDefault = '#eee';
-// Days not defined here fall back to the default
+// Days not defined here fall back to the default.
+// I added black just to test if it works.
 $wgExampleWelcomeColorDays = array(
'Monday' = 'orange',
'Tuesday' = 'blue',
'Wednesday' = 'green',
'Thursday' = 'red',
-   'Friday' = 'yellow',
+   'Friday' = 'black',
 );
 
 // Value of {{MYWORD}} constant

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea0684e035139a61820d08ec44cbd84ac29d6236
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Mazzax6 muzzy...@yahoo.co.uk

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


[MediaWiki-commits] [Gerrit] Use descriptive key for array of in a Special:EditWatchlist... - change (mediawiki/core)

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

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

Change subject: Use descriptive key for array of  in a Special:EditWatchlist 
line
..

Use descriptive key for array of  in a Special:EditWatchlist line

WatchlistEditorBuildRemoveLine allows subscribers to modify $tools array.
However, it's hard to know exactly which link is which: $tools is just an array
of HTML links.
By adding a descriptive key, it'd be easier to unset or modify a specific link.

AFAICT, there currently are no subscribers to this hook in WMF extensions (Flow
will be coming up with one soon), so this change should be safe.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/22/156522/1

diff --git a/includes/specials/SpecialEditWatchlist.php 
b/includes/specials/SpecialEditWatchlist.php
index 73438d9..aba5665 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -620,10 +620,10 @@
private function buildRemoveLine( $title ) {
$link = Linker::link( $title );
 
-   $tools[] = Linker::link( $title-getTalkPage(), $this-msg( 
'talkpagelinktext' )-escaped() );
+   $tools['talk'] = Linker::link( $title-getTalkPage(), 
$this-msg( 'talkpagelinktext' )-escaped() );
 
if ( $title-exists() ) {
-   $tools[] = Linker::linkKnown(
+   $tools['history'] = Linker::linkKnown(
$title,
$this-msg( 'history_short' )-escaped(),
array(),
@@ -632,7 +632,7 @@
}
 
if ( $title-getNamespace() == NS_USER  !$title-isSubpage() 
) {
-   $tools[] = Linker::linkKnown(
+   $tools['contributions'] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Contributions', 
$title-getText() ),
$this-msg( 'contributions' )-escaped()
);

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

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

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


[MediaWiki-commits] [Gerrit] Implemented jQuery.wikibase.fingerprintlistview - change (mediawiki...Wikibase)

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

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

Change subject: Implemented jQuery.wikibase.fingerprintlistview
..

Implemented jQuery.wikibase.fingerprintlistview

Change-Id: I1c2d46f0e16d272051d124f98223493272155ac7
---
M lib/resources/Resources.php
A lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/resources.php
A 
lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css
M lib/resources/templates.php
A lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintlistview.tests.js
M lib/tests/qunit/jquery.wikibase/resources.php
M repo/includes/View/TermBoxView.php
M repo/resources/Resources.php
10 files changed, 225 insertions(+), 9 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index b23e852..9cba3e3 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -52,6 +52,7 @@
'wikibase.css',

'jquery.wikibase/themes/default/jquery.wikibase.aliasesview.css',

'jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css',
+   
'jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css',

'jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css',

'jquery.wikibase/themes/default/jquery.wikibase.labelview.css',

'jquery.wikibase/themes/default/jquery.wikibase.sitelinklistview.css',
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
new file mode 100644
index 000..e0f2691
--- /dev/null
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintlistview.js
@@ -0,0 +1,96 @@
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ */
+( function( mw, wb, $ ) {
+   'use strict';
+
+   var PARENT = $.ui.TemplatedWidget;
+
+/**
+ * Displays multiple fingerprints (see jQuery.wikibase.fingerprintview).
+ * @since 0.5
+ * @extends jQuery.ui.TemplatedWidget
+ *
+ * @option {Object[]} value
+ * Object representing the widget's value.
+ * Structure: [
+ *   { language: {string], label: {string|null}, description: 
{string|null} } [, ...]
+ * ]
+ *
+ * @options {string} entityId
+ *
+ * @option {wikibase.RepoApi} api
+ */
+$.widget( 'wikibase.fingerprintlistview', PARENT, {
+   options: {
+   template: 'wikibase-fingerprintlistview',
+   templateParams: [
+   '' // tbodys
+   ],
+   templateShortCuts: {},
+   value: [],
+   entityId: null,
+   api: null
+   },
+
+   /**
+* @see jQuery.ui.TemplatedWidget._create
+*/
+   _create: function() {
+   if( !$.isArray( this.options.value ) || !this.options.entityId 
|| !this.options.api ) {
+   throw new Error( 'Required option(s) missing' );
+   }
+
+   PARENT.prototype._create.call( this );
+
+   this._createListView();
+
+   this.element.addClass( 'wikibase-fingerprintlistview' );
+   },
+
+   /**
+* @see jQuery.ui.TemplatedWidget.destroy
+*/
+   destroy: function() {
+   // When destroying a widget not initialized properly, listview 
will not have been created.
+   var listview = this.element.data( 'listview' );
+
+   if( listview ) {
+   listview.destroy();
+   }
+
+   this.element.removeClass( 'wikibase-fingerprintlistview' );
+   PARENT.prototype.destroy.call( this );
+   },
+
+   /**
+* Creates the listview widget managing the fingerprintview widgets
+*/
+   _createListView: function() {
+   var self = this;
+
+   this.element
+   .listview( {
+   listItemAdapter: new 
$.wikibase.listview.ListItemAdapter( {
+   listItemWidget: $.wikibase.fingerprintview,
+   listItemWidgetValueAccessor: 'value',
+   newItemOptionsFn: function( value ) {
+   return {
+   value: value,
+   entityId: self.options.entityId,
+   api: self.options.api,
+   helpMessage: 

[MediaWiki-commits] [Gerrit] Disable mobile uploads - change (operations/mediawiki-config)

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

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

Change subject: Disable mobile uploads
..

Disable mobile uploads

This effectively disables mobile uploads, removing links to upload tool.
Highly experienced users with more than 1000 edits can still upload, but
they'll have to type in Special:Uploads manually.

Bug: 62598
Change-Id: I54cf3081138e624bc096c66205426742592834c5
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6bc1a6a..2cfcafe 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11872,12 +11872,11 @@
'wiktionary' = false,
 ),
 'wmgMFRemovePageActions' = array(
-   'default' = array(),
+   'default' = array( 'upload' ),
'wikisource' = array( 'upload' ), # 
https://bugzilla.wikimedia.org/show_bug.cgi?id=66958
 ),
 'wmgMFUploadMinEdits' = array(
-   'default' = 10,
-   'commonswiki' = 75, // 
https://bugzilla.wikimedia.org/show_bug.cgi?id=62598
+   'default' = 1000, // 
https://bugzilla.wikimedia.org/show_bug.cgi?id=62598
 ),
 
 'wgExtraGenderNamespaces' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54cf3081138e624bc096c66205426742592834c5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.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] Make ChangeOpClaimTest compatible with DM 1.0 - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Make ChangeOpClaimTest compatible with DM 1.0
..

Make ChangeOpClaimTest compatible with DM 1.0

Change-Id: Ifae7772d3ee2ef280092728ce201bbe0b6ce71b8
---
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
1 file changed, 85 insertions(+), 88 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
index 0e983bb..9ba00df 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
@@ -6,7 +6,6 @@
 use DataValues\StringValue;
 use InvalidArgumentException;
 use Wikibase\ChangeOp\ChangeOpClaim;
-use Wikibase\DataModel\Claim\Claim;
 use Wikibase\DataModel\Claim\ClaimGuidParser;
 use Wikibase\DataModel\Claim\Claims;
 use Wikibase\DataModel\Claim\Statement;
@@ -82,61 +81,61 @@
public function provideTestApply() {
$itemEmpty = Item::newEmpty();
$itemEmpty-setId( new ItemId( 'q888' ) );
-   $item777 = self::makeNewItemWithClaim( 'Q777', new 
PropertyNoValueSnak( 45 ) );
-   $item666 = self::makeNewItemWithClaim( 'Q666', new 
PropertySomeValueSnak( 44 ) );
+   $item777 = self::makeNewItemWithStatement( 'Q777', new 
PropertyNoValueSnak( 45 ) );
+   $item666 = self::makeNewItemWithStatement( 'Q666', new 
PropertySomeValueSnak( 44 ) );
 
-   $item777Claims = $item777-getClaims();
-   $item666Claims = $item666-getClaims();
+   $item777Statements = $item777-getClaims();
+   $item666Statements = $item666-getClaims();
 
-   $claim777 = reset( $item777Claims );
-   $claim666 = reset( $item666Claims );
+   $statement777 = reset( $item777Statements );
+   $statement666 = reset( $item666Statements );
 
//claims that exist on the given entities
-   $claims[0] = new Claim( new PropertyNoValueSnak( 43 ) );
-   $claims[777] = clone $claim777;
-   $claims[666] = clone $claim666;
+   $statements[0] = new Statement( new PropertyNoValueSnak( 43 ) );
+   $statements[777] = clone $statement777;
+   $statements[666] = clone $statement666;
//claims with a null guid
-   $claims[7770] = clone $claim777;
-   $claims[7770]-setGuid( null );
-   $claims[6660] = clone $claim666;
-   $claims[6660]-setGuid( null );
+   $statements[7770] = clone $statement777;
+   $statements[7770]-setGuid( null );
+   $statements[6660] = clone $statement666;
+   $statements[6660]-setGuid( null );
//new claims not yet on the entity
-   $claims[] = clone $claim777;
-   $claims[]-setGuid( 
'Q777$D8404CDA-25E4-4334-AF13-A3290BC7' );
-   $claims[] = clone $claim666;
-   $claims[]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC6' );
+   $statements[] = clone $statement777;
+   $statements[]-setGuid( 
'Q777$D8404CDA-25E4-4334-AF13-A3290BC7' );
+   $statements[] = clone $statement666;
+   $statements[]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC6' );
 
-   $claims[11] = new Claim( new PropertyNoValueSnak( 1 ) );
-   $claims[11]-setGuid( null );
-   $claims[12] = new Claim( new PropertySomeValueSnak( 1 ) );
-   $claims[12]-setGuid( null );
-   $claims[13] = clone $claims[12];
-   $claims[13]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC66613' );
+   $statements[11] = new Statement( new PropertyNoValueSnak( 1 ) );
+   $statements[11]-setGuid( null );
+   $statements[12] = new Statement( new PropertySomeValueSnak( 1 ) 
);
+   $statements[12]-setGuid( null );
+   $statements[13] = clone $statements[12];
+   $statements[13]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC66613' );
 
$args = array();
//test adding claims with guids from other items(these 
shouldn't be added)
-   $args[] = array( $itemEmpty, $claims[666], false );
-   $args[] = array( $itemEmpty, $claims[777], false );
-   $args[] = array( $item666, $claims[777], false );
-   $args[] = array( $item777, $claims[666], false );
+   $args[] = array( $itemEmpty, $statements[666], false );
+   $args[] = array( $itemEmpty, $statements[777], false );
+   $args[] = 

[MediaWiki-commits] [Gerrit] Experiment extensions with Zuul cloner - change (integration/zuul-config)

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

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

Change subject: Experiment extensions with Zuul cloner
..

Experiment extensions with Zuul cloner

A new kind of jobs mwext-Foobar-testextension are using the Zuul cloner
to clone:
- MediaWiki core
- MediaWiki vendor
- extension
- extension dependencies as defined in JJB

For each repository, it attempts to checkout the branch of the
triggering patch then run the tests.

Culprits:
- tests are most probably broken on wmf and REL branches
- REL branches ends up using vendor@master though they should not depend
  on it.
- all repos are a full clone which eat a ton of disk space

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


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

diff --git a/layout.yaml b/layout.yaml
index 676b0b8..0fe21e7 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1682,6 +1682,8 @@
- 'mwext-{name}-testextensions-master'
 experimental:
   - mediawiki-core-extensions-integration
+  # Extensions tests with core+vendor
+  - 'mwext-{name}-testextension'
 
   # Template for MediaWiki extensions.
   # Triggers qunit jobs

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a4fb20f96f895ea771ac3901a341d02c9aca410
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] Experiment extensions with Zuul cloner - change (integration/zuul-config)

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

Change subject: Experiment extensions with Zuul cloner
..


Experiment extensions with Zuul cloner

A new kind of jobs mwext-Foobar-testextension are using the Zuul cloner
to clone:
- MediaWiki core
- MediaWiki vendor
- extension
- extension dependencies as defined in JJB

For each repository, it attempts to checkout the branch of the
triggering patch then run the tests.

Culprits:
- tests are most probably broken on wmf and REL branches
- REL branches ends up using vendor@master though they should not depend
  on it.
- all repos are a full clone which eat a ton of disk space

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

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



diff --git a/layout.yaml b/layout.yaml
index 676b0b8..0fe21e7 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1682,6 +1682,8 @@
- 'mwext-{name}-testextensions-master'
 experimental:
   - mediawiki-core-extensions-integration
+  # Extensions tests with core+vendor
+  - 'mwext-{name}-testextension'
 
   # Template for MediaWiki extensions.
   # Triggers qunit jobs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a4fb20f96f895ea771ac3901a341d02c9aca410
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] Make tests compatible with DataModel 1.0 - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Make tests compatible with DataModel 1.0
..

Make tests compatible with DataModel 1.0

Change-Id: I7a4aaf0c0da0077bfac3d55f4c4225ee3cb96b9a
Basically: Do not add Claim objects to Items. Use Statement objects.
---
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
M repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php
M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
4 files changed, 98 insertions(+), 101 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
index 0e983bb..9a0f78f 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
@@ -6,10 +6,8 @@
 use DataValues\StringValue;
 use InvalidArgumentException;
 use Wikibase\ChangeOp\ChangeOpClaim;
-use Wikibase\DataModel\Claim\Claim;
 use Wikibase\DataModel\Claim\ClaimGuidParser;
 use Wikibase\DataModel\Claim\Claims;
-use Wikibase\DataModel\Claim\Statement;
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
@@ -22,6 +20,7 @@
 use Wikibase\DataModel\Snak\PropertySomeValueSnak;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\DataModel\Snak\SnakList;
+use Wikibase\DataModel\Statement\Statement;
 use Wikibase\Lib\ClaimGuidGenerator;
 use Wikibase\Lib\ClaimGuidValidator;
 
@@ -82,61 +81,61 @@
public function provideTestApply() {
$itemEmpty = Item::newEmpty();
$itemEmpty-setId( new ItemId( 'q888' ) );
-   $item777 = self::makeNewItemWithClaim( 'Q777', new 
PropertyNoValueSnak( 45 ) );
-   $item666 = self::makeNewItemWithClaim( 'Q666', new 
PropertySomeValueSnak( 44 ) );
+   $item777 = self::makeNewItemWithStatement( 'Q777', new 
PropertyNoValueSnak( 45 ) );
+   $item666 = self::makeNewItemWithStatement( 'Q666', new 
PropertySomeValueSnak( 44 ) );
 
-   $item777Claims = $item777-getClaims();
-   $item666Claims = $item666-getClaims();
+   $item777Statements = $item777-getClaims();
+   $item666Statements = $item666-getClaims();
 
-   $claim777 = reset( $item777Claims );
-   $claim666 = reset( $item666Claims );
+   $statement777 = reset( $item777Statements );
+   $statement666 = reset( $item666Statements );
 
//claims that exist on the given entities
-   $claims[0] = new Claim( new PropertyNoValueSnak( 43 ) );
-   $claims[777] = clone $claim777;
-   $claims[666] = clone $claim666;
+   $statements[0] = new Statement( new PropertyNoValueSnak( 43 ) );
+   $statements[777] = clone $statement777;
+   $statements[666] = clone $statement666;
//claims with a null guid
-   $claims[7770] = clone $claim777;
-   $claims[7770]-setGuid( null );
-   $claims[6660] = clone $claim666;
-   $claims[6660]-setGuid( null );
+   $statements[7770] = clone $statement777;
+   $statements[7770]-setGuid( null );
+   $statements[6660] = clone $statement666;
+   $statements[6660]-setGuid( null );
//new claims not yet on the entity
-   $claims[] = clone $claim777;
-   $claims[]-setGuid( 
'Q777$D8404CDA-25E4-4334-AF13-A3290BC7' );
-   $claims[] = clone $claim666;
-   $claims[]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC6' );
+   $statements[] = clone $statement777;
+   $statements[]-setGuid( 
'Q777$D8404CDA-25E4-4334-AF13-A3290BC7' );
+   $statements[] = clone $statement666;
+   $statements[]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC6' );
 
-   $claims[11] = new Claim( new PropertyNoValueSnak( 1 ) );
-   $claims[11]-setGuid( null );
-   $claims[12] = new Claim( new PropertySomeValueSnak( 1 ) );
-   $claims[12]-setGuid( null );
-   $claims[13] = clone $claims[12];
-   $claims[13]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC66613' );
+   $statements[11] = new Statement( new PropertyNoValueSnak( 1 ) );
+   $statements[11]-setGuid( null );
+   $statements[12] = new Statement( new PropertySomeValueSnak( 1 ) 
);
+   $statements[12]-setGuid( null );
+   $statements[13] = clone 

[MediaWiki-commits] [Gerrit] Make ChangeOpClaimTest compatible with DM 1.0 - change (mediawiki...Wikibase)

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

Change subject: Make ChangeOpClaimTest compatible with DM 1.0
..


Make ChangeOpClaimTest compatible with DM 1.0

Change-Id: Ifae7772d3ee2ef280092728ce201bbe0b6ce71b8
---
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
1 file changed, 85 insertions(+), 88 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php 
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
index 0e983bb..9ba00df 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
@@ -6,7 +6,6 @@
 use DataValues\StringValue;
 use InvalidArgumentException;
 use Wikibase\ChangeOp\ChangeOpClaim;
-use Wikibase\DataModel\Claim\Claim;
 use Wikibase\DataModel\Claim\ClaimGuidParser;
 use Wikibase\DataModel\Claim\Claims;
 use Wikibase\DataModel\Claim\Statement;
@@ -82,61 +81,61 @@
public function provideTestApply() {
$itemEmpty = Item::newEmpty();
$itemEmpty-setId( new ItemId( 'q888' ) );
-   $item777 = self::makeNewItemWithClaim( 'Q777', new 
PropertyNoValueSnak( 45 ) );
-   $item666 = self::makeNewItemWithClaim( 'Q666', new 
PropertySomeValueSnak( 44 ) );
+   $item777 = self::makeNewItemWithStatement( 'Q777', new 
PropertyNoValueSnak( 45 ) );
+   $item666 = self::makeNewItemWithStatement( 'Q666', new 
PropertySomeValueSnak( 44 ) );
 
-   $item777Claims = $item777-getClaims();
-   $item666Claims = $item666-getClaims();
+   $item777Statements = $item777-getClaims();
+   $item666Statements = $item666-getClaims();
 
-   $claim777 = reset( $item777Claims );
-   $claim666 = reset( $item666Claims );
+   $statement777 = reset( $item777Statements );
+   $statement666 = reset( $item666Statements );
 
//claims that exist on the given entities
-   $claims[0] = new Claim( new PropertyNoValueSnak( 43 ) );
-   $claims[777] = clone $claim777;
-   $claims[666] = clone $claim666;
+   $statements[0] = new Statement( new PropertyNoValueSnak( 43 ) );
+   $statements[777] = clone $statement777;
+   $statements[666] = clone $statement666;
//claims with a null guid
-   $claims[7770] = clone $claim777;
-   $claims[7770]-setGuid( null );
-   $claims[6660] = clone $claim666;
-   $claims[6660]-setGuid( null );
+   $statements[7770] = clone $statement777;
+   $statements[7770]-setGuid( null );
+   $statements[6660] = clone $statement666;
+   $statements[6660]-setGuid( null );
//new claims not yet on the entity
-   $claims[] = clone $claim777;
-   $claims[]-setGuid( 
'Q777$D8404CDA-25E4-4334-AF13-A3290BC7' );
-   $claims[] = clone $claim666;
-   $claims[]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC6' );
+   $statements[] = clone $statement777;
+   $statements[]-setGuid( 
'Q777$D8404CDA-25E4-4334-AF13-A3290BC7' );
+   $statements[] = clone $statement666;
+   $statements[]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC6' );
 
-   $claims[11] = new Claim( new PropertyNoValueSnak( 1 ) );
-   $claims[11]-setGuid( null );
-   $claims[12] = new Claim( new PropertySomeValueSnak( 1 ) );
-   $claims[12]-setGuid( null );
-   $claims[13] = clone $claims[12];
-   $claims[13]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC66613' );
+   $statements[11] = new Statement( new PropertyNoValueSnak( 1 ) );
+   $statements[11]-setGuid( null );
+   $statements[12] = new Statement( new PropertySomeValueSnak( 1 ) 
);
+   $statements[12]-setGuid( null );
+   $statements[13] = clone $statements[12];
+   $statements[13]-setGuid( 
'Q666$D8404CDA-25E4-4334-AF13-A3290BC66613' );
 
$args = array();
//test adding claims with guids from other items(these 
shouldn't be added)
-   $args[] = array( $itemEmpty, $claims[666], false );
-   $args[] = array( $itemEmpty, $claims[777], false );
-   $args[] = array( $item666, $claims[777], false );
-   $args[] = array( $item777, $claims[666], false );
+   $args[] = array( $itemEmpty, $statements[666], false );
+   $args[] = array( $itemEmpty, $statements[777], false );
+   $args[] = array( $item666, $statements[777], 

[MediaWiki-commits] [Gerrit] Implemented jQuery.wikibase.fingerprintgroupview - change (mediawiki...Wikibase)

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

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

Change subject: Implemented jQuery.wikibase.fingerprintgroupview
..

Implemented jQuery.wikibase.fingerprintgroupview

Change-Id: I962ba1a96b1017d16f8f89acc37a21ac22f2edf3
---
M lib/resources/Resources.php
A lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
M lib/resources/jquery.wikibase/resources.php
A 
lib/resources/jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css
M lib/resources/templates.php
A lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintgroupview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.fingerprintlistview.tests.js
M lib/tests/qunit/jquery.wikibase/resources.php
M repo/includes/View/TermBoxView.php
M repo/resources/Resources.php
M repo/resources/wikibase.initTermBox.js
11 files changed, 282 insertions(+), 94 deletions(-)


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

diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 9cba3e3..1b8bdfe 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -52,6 +52,7 @@
'wikibase.css',

'jquery.wikibase/themes/default/jquery.wikibase.aliasesview.css',

'jquery.wikibase/themes/default/jquery.wikibase.descriptionview.css',
+   
'jquery.wikibase/themes/default/jquery.wikibase.fingerprintgroupview.css',

'jquery.wikibase/themes/default/jquery.wikibase.fingerprintlistview.css',

'jquery.wikibase/themes/default/jquery.wikibase.fingerprintview.css',

'jquery.wikibase/themes/default/jquery.wikibase.labelview.css',
diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
new file mode 100644
index 000..1d0b3d5
--- /dev/null
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.fingerprintgroupview.js
@@ -0,0 +1,100 @@
+/**
+ * @licence GNU GPL v2+
+ * @author H. Snater  mediaw...@snater.com 
+ */
+( function( mw, $ ) {
+   'use strict';
+
+   var PARENT = $.ui.TemplatedWidget;
+
+/**
+ * Encapsulates a fingerprintlistview widget.
+ * @since 0.5
+ * @extends jQuery.ui.TemplatedWidget
+ *
+ * @option {Object[]} value
+ * Object representing the widget's value.
+ * Structure: [
+ *   { language: {string], label: {string|null}, description: 
{string|null} } [, ...]
+ * ]
+ *
+ * @options {string} entityId
+ *
+ * @option {wikibase.RepoApi} api
+ */
+$.widget( 'wikibase.fingerprintgroupview', PARENT, {
+   options: {
+   template: 'wikibase-fingerprintgroupview',
+   templateParams: [
+   function() {
+   return mw.msg( 'wikibase-terms' );
+   },
+   '' // fingerprintlistview
+   ],
+   templateShortCuts: {
+   $h: 'h2'
+   },
+   value: [],
+   entityId: null,
+   api: null
+   },
+
+   /**
+* @type {jQuery}
+*/
+   $fingerprintlistview: null,
+
+   /**
+* @see jQuery.ui.TemplatedWidget._create
+*/
+   _create: function() {
+   if( !$.isArray( this.options.value ) || !this.options.entityId 
|| !this.options.api ) {
+   throw new Error( 'Required option(s) missing' );
+   }
+
+   PARENT.prototype._create.call( this );
+
+   this.element.addClass( 'wikibase-fingerprintgroupview' );
+
+   this.$fingerprintlistview = this.element.find( 
'.wikibase-fingerprintlistview' );
+
+   if( !this.$fingerprintlistview.length ) {
+   this.$fingerprintlistview = $( 'table/' ).appendTo( 
this.element );
+   }
+
+   this._createFingerprintlistview();
+   },
+
+   /**
+* @see jQuery.ui.TemplatedWidget.destroy
+*/
+   destroy: function() {
+   // When destroying a widget not initialized properly, 
fingerprintlistview will not have been
+   // created.
+   if( this.$fingerprintlistview ) {
+   var fingerprintlistview = 
this.$fingerprintlistview.data( 'fingerprintlistview' );
+
+   if( fingerprintlistview ) {
+   fingerprintlistview.destroy();
+   }
+
+   this.$fingerprintlistview.remove();
+   }
+
+   this.element.removeClass( 'wikibase-fingerprintgroupview' );
+   PARENT.prototype.destroy.call( this );
+   },
+

[MediaWiki-commits] [Gerrit] ClaimDifferenceVisualizer code cleanup - change (mediawiki...Wikibase)

2014-08-27 Thread Aude (Code Review)
Aude has submitted this change and it was merged.

Change subject: ClaimDifferenceVisualizer code cleanup
..


ClaimDifferenceVisualizer code cleanup

I wanted to highlight the actual changes in the snak details but
gave up for now and added a TODO instead.

The CSS change removes a misplaced padding from the diff view.

Change-Id: Ib5c20d2c86b7b8b9cf51d860aa5577e84f92916a
---
M lib/resources/wikibase.css
M repo/includes/ClaimDifferenceVisualizer.php
2 files changed, 49 insertions(+), 36 deletions(-)

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



diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css
index 8b76efb..01f83cd 100644
--- a/lib/resources/wikibase.css
+++ b/lib/resources/wikibase.css
@@ -868,6 +868,10 @@
 /** /PROPERTY PAGE **/
 
 /* DIFF VIEW */
+table.diff h4.wb-details {
+   padding: 0;
+}
+
 table.diff table.wb-details {
margin-left: 2em;
line-height: 1em;
diff --git a/repo/includes/ClaimDifferenceVisualizer.php 
b/repo/includes/ClaimDifferenceVisualizer.php
index 27d3b41..47d01f1 100644
--- a/repo/includes/ClaimDifferenceVisualizer.php
+++ b/repo/includes/ClaimDifferenceVisualizer.php
@@ -7,6 +7,7 @@
 use Diff\DiffOpChange;
 use Diff\DiffOpRemove;
 use Diff\ListDiffer;
+use Exception;
 use InvalidArgumentException;
 use Message;
 use RuntimeException;
@@ -54,7 +55,7 @@
 *
 * @var string
 */
-   private $langCode;
+   private $languageCode;
 
/**
 * Constructor.
@@ -64,24 +65,27 @@
 * @param ValueFormatter $propertyIdFormatter Formatter for IDs, must 
generate HTML.
 * @param SnakFormatter $snakDetailsFormatter detailed Formatter for 
Snaks, must generate HTML.
 * @param SnakFormatter $snakBreadCrumbFormatter terse Formatter for 
Snaks, must generate HTML.
-* @param $langCode
+* @param string $languageCode
 *
 * @throws InvalidArgumentException
 */
-   public function __construct( ValueFormatter $propertyIdFormatter,
-   SnakFormatter $snakDetailsFormatter, SnakFormatter 
$snakBreadCrumbFormatter, $langCode
+   public function __construct(
+   ValueFormatter $propertyIdFormatter,
+   SnakFormatter $snakDetailsFormatter,
+   SnakFormatter $snakBreadCrumbFormatter,
+   $languageCode
) {
if ( $snakDetailsFormatter-getFormat() !== 
SnakFormatter::FORMAT_HTML
-$snakDetailsFormatter-getFormat() !== 
SnakFormatter::FORMAT_HTML_DIFF ) {
-
+$snakDetailsFormatter-getFormat() !== 
SnakFormatter::FORMAT_HTML_DIFF
+   ) {
throw new InvalidArgumentException(
'Expected $snakDetailsFormatter to generate 
html, not '
. $snakDetailsFormatter-getFormat() );
}
 
if ( $snakBreadCrumbFormatter-getFormat() !== 
SnakFormatter::FORMAT_HTML
-$snakBreadCrumbFormatter-getFormat() !== 
SnakFormatter::FORMAT_HTML_DIFF ) {
-
+$snakBreadCrumbFormatter-getFormat() !== 
SnakFormatter::FORMAT_HTML_DIFF
+   ) {
throw new InvalidArgumentException(
'Expected $snakBreadCrumbFormatter to generate 
html, not '
. $snakBreadCrumbFormatter-getFormat() );
@@ -90,8 +94,7 @@
$this-propertyIdFormatter = $propertyIdFormatter;
$this-snakDetailsFormatter = $snakDetailsFormatter;
$this-snakBreadCrumbFormatter = $snakBreadCrumbFormatter;
-
-   $this-langCode = $langCode;
+   $this-languageCode = $languageCode;
}
 
/**
@@ -125,7 +128,7 @@
$html .= $this-visualizeSnakListChanges(
$claimDifference-getReferenceChanges(),
$baseClaim,
-   wfMessage( 'wikibase-diffview-reference' 
)-inLanguage( $this-langCode )
+   wfMessage( 'wikibase-diffview-reference' 
)-inLanguage( $this-languageCode )
);
}
 
@@ -172,17 +175,21 @@
 * @return string
 */
protected function visualizeMainSnakChange( DiffOpChange 
$mainSnakChange ) {
-   if( $mainSnakChange-getNewValue() === null ){
-   $headerHtml = $this-getSnakLabelHeader( 
$mainSnakChange-getOldValue() );
+   $oldSnak = $mainSnakChange-getOldValue();
+   $newSnak = $mainSnakChange-getNewValue();
+
+   if ( $newSnak === null ) {
+   $headerHtml = $this-getSnakLabelHeader( $oldSnak );
} else {
-   

[MediaWiki-commits] [Gerrit] Make CreateClaimTest compatible with DataModel 1.0 - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Make CreateClaimTest compatible with DataModel 1.0
..

Make CreateClaimTest compatible with DataModel 1.0

I give up. Please help finding the issue. The API request does not
increment the revision ID any more. It works fine with DataModel 0.x
but fails with 1.0.

Change-Id: I86dfb285430dcb930a2b8bdb2e4f51fb4baa051c
---
M composer.json
M repo/tests/phpunit/includes/api/CreateClaimTest.php
2 files changed, 31 insertions(+), 26 deletions(-)


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

diff --git a/composer.json b/composer.json
index 93a2d19..16a0c82 100644
--- a/composer.json
+++ b/composer.json
@@ -71,5 +71,11 @@
psr-4: {
Wikibase\\Repo\\View\\: repo/includes/View
}
-   }
+   },
+   repositories: [
+   {
+   type: vcs,
+   url: https://github.com/wmde/WikibaseDataModel.git;
+   }
+   ]
 }
diff --git a/repo/tests/phpunit/includes/api/CreateClaimTest.php 
b/repo/tests/phpunit/includes/api/CreateClaimTest.php
index 51dfba5..9c0d091 100644
--- a/repo/tests/phpunit/includes/api/CreateClaimTest.php
+++ b/repo/tests/phpunit/includes/api/CreateClaimTest.php
@@ -4,7 +4,6 @@
 
 use UsageException;
 use Wikibase\DataModel\Claim\Claims;
-use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\Property;
 use Wikibase\Repo\WikibaseRepo;
@@ -26,16 +25,16 @@
  */
 class CreateClaimTest extends WikibaseApiTestCase {
 
-   protected static function getNewEntityAndProperty() {
+   protected static function getNewItemAndProperty() {
$store = WikibaseRepo::getDefaultInstance()-getEntityStore();
 
-   $entity = Item::newEmpty();
-   $store-saveEntity( $entity, 'test', $GLOBALS['wgUser'], 
EDIT_NEW );
+   $item = Item::newEmpty();
+   $store-saveEntity( $item, 'test', $GLOBALS['wgUser'], EDIT_NEW 
);
 
$property = Property::newFromType( 'commonsMedia' );
$store-saveEntity( $property, 'test', $GLOBALS['wgUser'], 
EDIT_NEW );
 
-   return array( $entity, $property );
+   return array( $item, $property );
}
 
protected function assertRequestValidity( $resultArray ) {
@@ -50,14 +49,14 @@
 
public function testValidRequest() {
/**
-* @var Entity $entity
+* @var Item $item
 * @var Property $property
 */
-   list( $entity, $property ) = self::getNewEntityAndProperty();
+   list( $item, $property ) = self::getNewItemAndProperty();
 
$params = array(
'action' = 'wbcreateclaim',
-   'entity' = $entity-getId()-getSerialization(),
+   'entity' = $item-getId()-getSerialization(),
'snaktype' = 'value',
'property' = $property-getId()-getSerialization(),
'value' = 'Foo.png',
@@ -73,13 +72,13 @@
$this-assertArrayHasKey( $requiredKey, $claim, 'claim 
has a ' . $requiredKey . ' key' );
}
 
-   $this-assertStringStartsWith( 
$entity-getId()-getSerialization() , $claim['id'] );
+   $this-assertStringStartsWith( 
$item-getId()-getSerialization() , $claim['id'] );
 
$this-assertEquals( 'value', $claim['mainsnak']['snaktype'] );
 
-   $entity = 
WikibaseRepo::getDefaultInstance()-getEntityLookup()-getEntity( 
$entity-getId() );
+   $item = 
WikibaseRepo::getDefaultInstance()-getEntityLookup()-getEntity( 
$item-getId() );
 
-   $claims = new Claims( $entity-getClaims() );
+   $claims = new Claims( $item-getClaims() );
 
$this-assertTrue( $claims-hasClaimWithGuid( $claim['id'] ) );
}
@@ -193,11 +192,11 @@
return $argLists;
}
 
-   public static function getEntityAndPropertyForInvalid() {
+   public static function getItemAndPropertyForInvalid() {
static $array = null;
 
if ( $array === null ) {
-   $array = self::getNewEntityAndProperty();
+   $array = self::getNewItemAndProperty();
}
 
return $array;
@@ -211,13 +210,13 @@
 */
public function testInvalidRequest( $errorCode, array $params ) {
/**
-* @var Entity $entity
+* @var Item $item
 * @var Property $property
 */
-   list( $entity, $property ) = 
self::getEntityAndPropertyForInvalid();
+  

[MediaWiki-commits] [Gerrit] Jenkins job validation REL1_23 (DO NOT SUBMIT) - change (mediawiki...MobileFrontend)

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

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

Change subject: Jenkins job validation REL1_23 (DO NOT SUBMIT)
..

Jenkins job validation REL1_23 (DO NOT SUBMIT)

Change-Id: Iededecd858dcedb5a096cc5cbb24ded43663fea0
---
A JENKINS
A jenkins.js
A jenkins.php
3 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/JENKINS b/JENKINS
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/JENKINS
diff --git a/jenkins.js b/jenkins.js
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.js
diff --git a/jenkins.php b/jenkins.php
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iededecd858dcedb5a096cc5cbb24ded43663fea0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: REL1_23
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] Handle redirects gracefully on special pages. - change (mediawiki...Wikibase)

2014-08-27 Thread Aude (Code Review)
Aude has submitted this change and it was merged.

Change subject: Handle redirects gracefully on special pages.
..


Handle redirects gracefully on special pages.

Bug: 70034
Change-Id: Ic84b5268a6b17fa3817d1e797b8e7804daf2a121
---
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/specials/SpecialWikibaseRepoPage.php
M repo/tests/phpunit/includes/specials/SpecialSetSitelinkTest.php
4 files changed, 42 insertions(+), 4 deletions(-)

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



diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index 606e834..11563d0 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -104,6 +104,8 @@
wikibase-wikibaserepopage-not-itemid: \$1\ is not a valid item 
id.,
wikibase-wikibaserepopage-invalid-langcode: The language code \$1\ 
is unknown. Please use a language code known to the system, such as \en\.,
wikibase-wikibaserepopage-invalid-id: The id \$1\ is unknown to 
the system. Please use a valid entity id.,
+   wikibase-wikibaserepopage-unresolved-redirect: $1 is a redirect.,
+   wikibase-wikibaserepopage-storage-exception: An error occurred while 
trying to load $1: $2.,
special-itembytitle: Item by title,
wikibase-itembytitle-lookup-fieldset: Search for items by site and 
title,
wikibase-itembytitle-lookup-site: Site:,
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index fa3e5ff..07822a4 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -127,6 +127,8 @@
wikibase-wikibaserepopage-not-itemid: Error message when an entity 
id, other than item id, is entered. The message advises users that the id is 
invalid.\n\nParameters:\n* $1 - the invalid id,
wikibase-wikibaserepopage-invalid-langcode: Response informing that 
the language code is not valid. Could give an example of a valid language 
code.\n\nParameters:\n* $1 - the invalid code\n\n\language identifier\ is the 
same as \language code\.,
wikibase-wikibaserepopage-invalid-id: Response informing that the 
selected entity ID is not valid.\n\nParameters:\n* $1 - the invalid ID,
+   wikibase-wikibaserepopage-unresolved-redirect: Error message shown 
when the user supplied an entity ID that refers to a redirect.\nParameters:\n* 
$1 - the entity ID,
+   wikibase-wikibaserepopage-storage-exception: Error message shown 
when an entity could not be loaded due to a storage layer 
exception.\nParameters:\n* $1 - the entity ID\n* $2 - the (unlocalized and 
possibly technical) error message.,
special-itembytitle: {{doc-special|ItemByTitle}}\nThe item is 
identified through use of the site and title, but the lookup failed and further 
qualification must be done. See also Wikidata's glossary for 
[[d:Wikidata:Glossary#languageattribute-label|label]] and 
[[d:Wikidata:Glossary#Items|items]].,
wikibase-itembytitle-lookup-fieldset: This is the title for the 
fieldset on the special page for further refining the search. This is the 
search by site and title.,
wikibase-itembytitle-lookup-site: Label for the textfield holding 
the site id. See also Wikidata's glossary for 
[[d:Wikidata:Glossary#sitelinks|site links]].\n{{Identical|Site}},
diff --git a/repo/includes/specials/SpecialWikibaseRepoPage.php 
b/repo/includes/specials/SpecialWikibaseRepoPage.php
index 50f8260..bc9940f 100644
--- a/repo/includes/specials/SpecialWikibaseRepoPage.php
+++ b/repo/includes/specials/SpecialWikibaseRepoPage.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Repo\Specials;
 
+use MessageException;
 use MWException;
 use RuntimeException;
 use SiteStore;
@@ -16,6 +17,8 @@
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Lib\Store\EntityStore;
 use Wikibase\Lib\Store\EntityTitleLookup;
+use Wikibase\Lib\Store\StorageException;
+use Wikibase\Lib\Store\UnresolvedRedirectException;
 use Wikibase\Repo\Store\EntityPermissionChecker;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Summary;
@@ -138,13 +141,27 @@
 * @throws UserInputException
 */
protected function loadEntity( EntityId $id ) {
-   $entity = $this-entityRevisionLookup-getEntityRevision( $id );
+   try {
+   $entity = 
$this-entityRevisionLookup-getEntityRevision( $id );
 
-   if ( $entity === null ) {
+   if ( $entity === null ) {
+   throw new UserInputException(
+   'wikibase-wikibaserepopage-invalid-id',
+   array( $id-getSerialization() ),
+   'Entity id is unknown'
+   );
+   }
+   } catch ( UnresolvedRedirectException $ex ) {
throw new UserInputException(
-   'wikibase-wikibaserepopage-invalid-id',
+  

[MediaWiki-commits] [Gerrit] Fix EntityTitleLookup namespace in ApiHelperFactoryTest - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Fix EntityTitleLookup namespace in ApiHelperFactoryTest
..


Fix EntityTitleLookup namespace in ApiHelperFactoryTest

Change-Id: Ifd9131dd68e1da350c3c574acab0b5abb867612a
---
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Checked



diff --git a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php 
b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
index 545a233..335f90f 100644
--- a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
+++ b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
@@ -14,7 +14,7 @@
 class ApiHelperFactoryTest extends \PHPUnit_Framework_TestCase {
 
private function newApiHelperFactory() {
-   $titleLookup = $this-getMock( '\Wikibase\EntityTitleLookup' );
+   $titleLookup = $this-getMock( 
'\Wikibase\Lib\Store\EntityTitleLookup' );
$exceptionLocalizer = $this-getMock( 
'\Wikibase\Lib\Localizer\ExceptionLocalizer' );
$dataTypeLookup = $this-getMock( 
'\Wikibase\Lib\PropertyDataTypeLookup' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd9131dd68e1da350c3c574acab0b5abb867612a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@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] Hygiene: Standardise on time i10n parameter - change (mediawiki...Flow)

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

Change subject: Hygiene: Standardise on time i10n parameter
..


Hygiene: Standardise on time i10n parameter

Change-Id: I6a5376ea131aea7cdcdefcdb71af4d8e415f9347
---
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_post_meta_actions.handlebars
M handlebars/flow_topic_titlebar_content.handlebars
M i18n/en.json
M includes/TemplateHelper.php
M modules/new/flow-handlebars.js
M tests/qunit/new/test_flow-handlebars.js
8 files changed, 37 insertions(+), 71 deletions(-)

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



diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php 
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 5ba0fe6..7872202 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -184,9 +184,9 @@
'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-comments',((is_array($in)  isset($in['reply_count'])) 
? $in['reply_count'] : null)),Array()), 'encq').' bull;
 
'.((LCRun3::ifvar($cx, ((is_array($in)  isset($in['last_updated'])) ? 
$in['last_updated'] : null))) ? '
-   !--span class=wikiglyph wikiglyph-speech-bubbles/span-- 
'.LCRun3::ch($cx, 'timestamp', Array(Array(((is_array($in)  
isset($in['last_updated'])) ? $in['last_updated'] : 
null),'active_ago'),Array()), 'encq').'
+   !--span class=wikiglyph wikiglyph-speech-bubbles/span-- 
'.LCRun3::ch($cx, 'timestamp', Array(Array(((is_array($in)  
isset($in['last_updated'])) ? $in['last_updated'] : 
null),'flow-active-ago'),Array()), 'encq').'
' : '
-   !--span class=wikiglyph wikiglyph-speech-bubble/span-- 
'.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in)  
isset($in['postId'])) ? $in['postId'] : null),'started_ago'),Array()), 'encq').'
+   !--span class=wikiglyph wikiglyph-speech-bubble/span-- 
'.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in)  
isset($in['postId'])) ? $in['postId'] : null),'flow-started-ago'),Array()), 
'encq').'
').'
 /div
 span class=flow-reply-countspan class=wikiglyph 
wikiglyph-speech-bubble/spanspan 
class=flow-reply-count-number'.htmlentities(((is_array($in)  
isset($in['reply_count'])) ? $in['reply_count'] : null), ENT_QUOTES, 
'UTF-8').'/span/span
@@ -516,4 +516,4 @@
 /div
 ';
 }
-?
+?
\ No newline at end of file
diff --git a/handlebars/compiled/flow_post.handlebars.php 
b/handlebars/compiled/flow_post.handlebars.php
index e5b51bb..b270234 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -118,13 +118,13 @@
class=mw-ui-progressive mw-ui-quiet

title='.htmlentities(((is_array($in['links']['diff-prev'])  
isset($in['links']['diff-prev']['title'])) ? $in['links']['diff-prev']['title'] 
: null), ENT_QUOTES, 'UTF-8').'
' : '').'
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((is_array($in)  isset($in['revisionId'])) ? $in['revisionId'] : 
null),'edited_ago'),Array()), 'encq').'
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((is_array($in)  isset($in['revisionId'])) ? $in['revisionId'] : 
null),'flow-edited-ago'),Array()), 'encq').'
'.((LCRun3::ifvar($cx, ((is_array($in['links'])  
isset($in['links']['diff-prev'])) ? $in['links']['diff-prev'] : null))) ? '
/a
' : '').'
#8226;
' : '').'
-   '.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in)  
isset($in['postId'])) ? $in['postId'] : null),'time_ago'),Array()), 'encq').'
+   '.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in)  
isset($in['postId'])) ? $in['postId'] : null),'flow-time-ago'),Array()), 
'encq').'
 /div
 
div class=flow-menu
diff --git a/handlebars/flow_post_meta_actions.handlebars 
b/handlebars/flow_post_meta_actions.handlebars
index 5186539..00d6f67 100644
--- a/handlebars/flow_post_meta_actions.handlebars
+++ b/handlebars/flow_post_meta_actions.handlebars
@@ -38,11 +38,11 @@
class=mw-ui-progressive mw-ui-quiet
title={{links.diff-prev.title}}
{{/if}}
-   {{uuidTimestamp revisionId edited_ago}}
+   {{uuidTimestamp revisionId flow-edited-ago}}
{{#if links.diff-prev}}
/a
{{/if}}
#8226;
{{/if}}
-   {{uuidTimestamp postId time_ago}}
+   {{uuidTimestamp postId flow-time-ago}}
 /div
diff --git a/handlebars/flow_topic_titlebar_content.handlebars 

[MediaWiki-commits] [Gerrit] i18n: Allow translation of participants - change (mediawiki...Flow)

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

Change subject: i18n: Allow translation of participants
..


i18n: Allow translation of participants

Switch to using more generic i10n function
Use simpler message for plural handling - only used last author
and creator to avoid having to deal with edge cases where creator and
last 2 authors were the same person.

Dependency: I15c167f245ba0842fc77fb4e03e380c40784ee1b
Change-Id: Ia45427ddf74bb7b74c7dd5e341507b3cff065097
---
M Resources.php
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/flow_topic_titlebar_content.handlebars
M i18n/en.json
M i18n/qqq.json
M includes/Formatter/TopicFormatter.php
M includes/Formatter/TopicListFormatter.php
M includes/TemplateHelper.php
M modules/new/flow-handlebars.js
12 files changed, 32 insertions(+), 34 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 07dbf77..608e6e2 100644
--- a/Resources.php
+++ b/Resources.php
@@ -108,6 +108,7 @@
'flow-toggle-small-topics',
'flow-toggle-topics',
'flow-toggle-topics-posts',
+   'flow-topic-participants',
'flow-topic-action-hide-topic',
'flow-topic-action-close-topic',
'flow-topic-action-delete-topic',
diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index 64d3ae3..5604d18 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -48,7 +48,9 @@
class=wikiglyph '.LCRun3::hbch($cx, 'ifEquals', 
Array(Array(((is_array($in)  isset($in['moderateState'])) ? 
$in['moderateState'] : null),'close'),Array()), $in, function($cx, $in) {return 
'wikiglyph-stop';}).''.LCRun3::hbch($cx, 'ifEquals', 
Array(Array(((is_array($in)  isset($in['moderateState'])) ? 
$in['moderateState'] : null),'hide'),Array()), $in, function($cx, $in) {return 
'wikiglyph-flag';}).''.LCRun3::hbch($cx, 'ifEquals', 
Array(Array(((is_array($in)  isset($in['moderateState'])) ? 
$in['moderateState'] : null),'delete'),Array()), $in, function($cx, $in) 
{return 'wikiglyph-trash';}).'/span
'.LCRun3::ch($cx, 'l10n', 
Array(Array('post_moderation_state',((is_array($in)  
isset($in['moderateState'])) ? $in['moderateState'] : null),((is_array($in)  
isset($in['replyToId'])) ? $in['replyToId'] : 
null),((is_array($in['moderator'])  isset($in['moderator']['name'])) ? 
$in['moderator']['name'] : null)),Array()), 'encq').'/div
 ' : '').'
-span class=flow-author'.LCRun3::ch($cx, 'l10n', 
Array(Array('started_with_participants',$in),Array()), 'encq').'/span
+span class=flow-author
+   '.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-participants',((is_array($in)  
isset($in['author_count'])) ? $in['author_count'] : null),((is_array($in)  
isset($in['unnamed_author_count'])) ? $in['unnamed_author_count'] : 
null),((is_array($in['creator'])  isset($in['creator']['name'])) ? 
$in['creator']['name'] : null),((is_array($in)  
isset($in['last_author_name'])) ? $in['last_author_name'] : null)),Array()), 
'encq').'
+/span
 div class=flow-topic-meta
'.((LCRun3::ifvar($cx, ((is_array($in['actions'])  
isset($in['actions']['reply'])) ? $in['actions']['reply'] : null))) ? '
a href=#flow-post-'.htmlentities(((is_array($in)  
isset($in['postId'])) ? $in['postId'] : null), ENT_QUOTES, 
'UTF-8').'-form-content
@@ -61,9 +63,9 @@
'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-comments',((is_array($in)  isset($in['reply_count'])) 
? $in['reply_count'] : null)),Array()), 'encq').' bull;
 
'.((LCRun3::ifvar($cx, ((is_array($in)  isset($in['last_updated'])) ? 
$in['last_updated'] : null))) ? '
-   !--span class=wikiglyph wikiglyph-speech-bubbles/span-- 
'.LCRun3::ch($cx, 'timestamp', Array(Array(((is_array($in)  
isset($in['last_updated'])) ? $in['last_updated'] : 
null),'active_ago'),Array()), 'encq').'
+   !--span class=wikiglyph wikiglyph-speech-bubbles/span-- 
'.LCRun3::ch($cx, 'timestamp', Array(Array(((is_array($in)  
isset($in['last_updated'])) ? $in['last_updated'] : 
null),'flow-active-ago'),Array()), 'encq').'
' : '
-   !--span class=wikiglyph wikiglyph-speech-bubble/span-- 
'.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in)  
isset($in['postId'])) ? $in['postId'] : null),'started_ago'),Array()), 'encq').'
+   !--span class=wikiglyph wikiglyph-speech-bubble/span-- 
'.LCRun3::ch($cx, 'uuidTimestamp', Array(Array(((is_array($in)  

[MediaWiki-commits] [Gerrit] Merge Fix EntityTitleLookup namespace in ApiHelperFactoryTest - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Merge Fix EntityTitleLookup namespace in ApiHelperFactoryTest
..

Merge Fix EntityTitleLookup namespace in ApiHelperFactoryTest

Change-Id: I69481e55c3e051985220bde547236369d579da01
---
M repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php
M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
3 files changed, 12 insertions(+), 12 deletions(-)


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

diff --git 
a/repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php 
b/repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php
index 95d0dfb..5e08bab 100644
--- a/repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php
+++ b/repo/tests/phpunit/includes/Hook/MakeGlobalVariablesScriptHandlerTest.php
@@ -6,7 +6,7 @@
 use DataValues\StringValue;
 use RequestContext;
 use Title;
-use Wikibase\DataModel\Claim\Claim;
+use Wikibase\DataModel\Claim\Statement;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
@@ -172,10 +172,10 @@
 
$snak = new PropertyValueSnak( new PropertyId( 'P794' ), new 
StringValue( 'a' ) );
 
-   $claim = new Claim( $snak );
-   $claim-setGuid( 'P794$muahahaha' );
+   $statement = new Statement( $snak );
+   $statement-setGuid( 'P794$muahahaha' );
 
-   $item-addClaim( $claim );
+   $item-addClaim( $statement );
 
$entityContent = ItemContent::newFromItem( $item );
return $entityContent;
diff --git a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php 
b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
index fe205ff..a7dd9bd 100644
--- a/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
+++ b/repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
@@ -4,7 +4,7 @@
 
 use Language;
 use Title;
-use Wikibase\DataModel\Claim\Claim;
+use Wikibase\DataModel\Claim\Statement;
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
@@ -144,10 +144,10 @@
new EntityIdValue( $redirect-getEntityId() )
);
 
-   $claim = new Claim( $snak );
-   $claim-setGuid( 'P794$muahahaha' );
+   $statement = new Statement( $snak );
+   $statement-setGuid( 'P794$muahahaha' );
 
-   $item-addClaim( $claim );
+   $item-addClaim( $statement );
 
return $item;
}
diff --git a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php 
b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
index 335f90f..1fcac96 100644
--- a/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
+++ b/repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace Wikibase\Test\Api;
+
 use Language;
 use Wikibase\Api\ApiHelperFactory;
 use Wikibase\EntityFactory;
@@ -14,9 +15,9 @@
 class ApiHelperFactoryTest extends \PHPUnit_Framework_TestCase {
 
private function newApiHelperFactory() {
-   $titleLookup = $this-getMock( 
'\Wikibase\Lib\Store\EntityTitleLookup' );
-   $exceptionLocalizer = $this-getMock( 
'\Wikibase\Lib\Localizer\ExceptionLocalizer' );
-   $dataTypeLookup = $this-getMock( 
'\Wikibase\Lib\PropertyDataTypeLookup' );
+   $titleLookup = $this-getMock( 
'Wikibase\Lib\Store\EntityTitleLookup' );
+   $exceptionLocalizer = $this-getMock( 
'Wikibase\Lib\Localizer\ExceptionLocalizer' );
+   $dataTypeLookup = $this-getMock( 
'Wikibase\Lib\PropertyDataTypeLookup' );
 
return new ApiHelperFactory(
$titleLookup,
@@ -76,4 +77,3 @@
}
 
 }
- 
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69481e55c3e051985220bde547236369d579da01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Fix up php syntax that accidentally became part of a string ... - change (mediawiki/core)

2014-08-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Fix up php syntax that accidentally became part of a string 
literal
..

Fix up php syntax that accidentally became part of a string literal

Follows-up d15f1cc5e1d6db78.

Previous output:
 474 pages in the MediaWiki namespace ' .
   'override messages.
 4 pages are equal to the default message ' .
   '(+ 0 talk pages).

Change-Id: I6104f716f7dc32d638a2f5a7c37c3a507efad7dd
---
M maintenance/deleteEqualMessages.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/156531/1

diff --git a/maintenance/deleteEqualMessages.php 
b/maintenance/deleteEqualMessages.php
index bd99845..dbe9698 100644
--- a/maintenance/deleteEqualMessages.php
+++ b/maintenance/deleteEqualMessages.php
@@ -30,8 +30,8 @@
 class DeleteEqualMessages extends Maintenance {
public function __construct() {
parent::__construct();
-   $this-mDescription = Deletes all pages in the MediaWiki 
namespace that are equal to '
-   . 'the default message;
+   $this-mDescription = 'Deletes all pages in the MediaWiki 
namespace that are equal to '
+   . 'the default message';
$this-addOption( 'delete', 'Actually delete the pages 
(default: dry run)' );
$this-addOption( 'delete-talk', 'Don\'t leave orphaned talk 
pages behind during deletion' );
$this-addOption( 'lang-code', 'Check for subpages of this 
language code (default: root '
@@ -138,10 +138,10 @@
return;
}
 
-   $this-output( \n{$messageInfo['relevantPages']} pages in the 
MediaWiki namespace ' .
-   'override messages. );
-   $this-output( \n{$messageInfo['equalPages']} pages are equal 
to the default message ' .
-   '(+ {$messageInfo['equalPagesTalks']} talk pages).\n );
+   $this-output( \n{$messageInfo['relevantPages']} pages in the 
MediaWiki namespace 
+   . override messages. );
+   $this-output( \n{$messageInfo['equalPages']} pages are equal 
to the default message 
+   . (+ {$messageInfo['equalPagesTalks']} talk pages).\n 
);
 
if ( !$doDelete ) {
$list = '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6104f716f7dc32d638a2f5a7c37c3a507efad7dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixed jQuery.wikibase.aliasesview QUnit tests - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Fixed jQuery.wikibase.aliasesview QUnit tests
..


Fixed jQuery.wikibase.aliasesview QUnit tests

isValid() tests are not needed anymore, since the stub function just returns 
true.

Change-Id: I5632a0e02cc56d9016126c07ca0243e8dda16c8c
---
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
1 file changed, 3 insertions(+), 21 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Checked



diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
index 125d1e5..0bbe4db 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.aliasesview.tests.js
@@ -71,7 +71,7 @@
);
 } );
 
-QUnit.test( 'startEditing()  stopEditing()', 5, function( assert ) {
+QUnit.test( 'startEditing()  stopEditing()', 7, function( assert ) {
var $aliasesview = createAliasesview(),
aliasesview = $aliasesview.data( 'aliasesview' );
 
@@ -105,31 +105,13 @@
 
aliasesview.$list.data( 'tagadata' ).getTags().first().find( 'input' 
).val( 'b' );
 
-   aliasesview.stopEditing(); // should not trigger event
+   aliasesview.stopEditing();
+   aliasesview.startEditing();
 
aliasesview.$list.data( 'tagadata' ).getTags().first().removeClass( 
'tagadata-choice-equal' )
.find( 'input' ).val( 'd' );
 
aliasesview.stopEditing();
-} );
-
-QUnit.test( 'isValid()', function( assert ) {
-   var $aliasesview = createAliasesview(),
-   aliasesview = $aliasesview.data( 'aliasesview' );
-
-   aliasesview.startEditing();
-
-   assert.ok(
-   aliasesview.isValid(),
-   'Verified isValid() returning true.'
-   );
-
-   aliasesview.$list.data( 'tagadata' ).getTags().first().find( 'input' 
).val( 'b' );
-
-   assert.ok(
-   !aliasesview.isValid(),
-   'Verified isValid() returning false.'
-   );
 } );
 
 QUnit.test( 'isInitialValue()', function( assert ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5632a0e02cc56d9016126c07ca0243e8dda16c8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@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] The static declaration must come after the visibility declar... - change (mediawiki/core)

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

Change subject: The static declaration must come after the visibility 
declaration
..


The static declaration must come after the visibility declaration

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

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



diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php
index d9a1e80..488932c 100644
--- a/includes/WatchedItem.php
+++ b/includes/WatchedItem.php
@@ -274,7 +274,7 @@
 * @param WatchedItem[] $items
 * @return bool
 */
-   static public function batchAddWatch( array $items ) {
+   public static function batchAddWatch( array $items ) {
$section = new ProfileSection( __METHOD__ );
 
if ( wfReadOnly() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50b7f39d527f5590373192a684ec07949988ec23
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.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] Check API Page Index for Missing - change (mediawiki...GWToolset)

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

Change subject: Check API Page Index for Missing
..


Check API Page Index for Missing

Added a check when the API returns a negative page index to make sure
the page status is missing, not invalid. Also changed the error
message output from escaped() to text() because we don’t want
logged text to be escaped.

Follow-up on I2d9fd59e

Change-Id: Ice4b4b95c13e76a7c5ba6a069edfc6a8f43153fc
---
M includes/Handlers/UploadHandler.php
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/includes/Handlers/UploadHandler.php 
b/includes/Handlers/UploadHandler.php
index 4787658..2ae873d 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -247,7 +247,7 @@
$msg =
wfMessage( 
'gwtoolset-mediafile-other-contributors' )
-params( 
$warnings['exists']['file']-getTitle() )
-   -escaped();
+   -text();
 
$status = Status::newFatal( $msg );
 
@@ -259,7 +259,7 @@
$msg =
wfMessage( 
'gwtoolset-mediafile-duplicate-same-title' )
-params( 
$warnings['exists']['file']-getTitle() )
-   -escaped();
+   -text();
 
$status = Status::newFatal( $msg );
}
@@ -275,7 +275,7 @@
$msg =
wfMessage( 
'gwtoolset-mediafile-duplicate-another-title' )
-params( 
$warnings['duplicate'][0]-getTitle() )
-   -escaped();
+   -text();
 
$status = Status::newFatal( $msg );
}
@@ -549,7 +549,10 @@
isset( $api_result['query']['pages'] )
 count( $api_result['query']['pages'] ) === 1
) {
-   if ( key( $api_result['query']['pages'] ) === -1 ) {
+   if (
+   key( $api_result['query']['pages'] ) === -1
+isset( 
$api_result['query']['pages'][-1]['missing'] )
+   ) {
$this-otherContributors = false;
return $this-otherContributors;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice4b4b95c13e76a7c5ba6a069edfc6a8f43153fc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl d_ent...@yahoo.com
Gerrit-Reviewer: Brian Wolff bawolff...@gmail.com
Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Changed $.fn.applyTemplate mechanics - change (mediawiki...Wikibase)

2014-08-27 Thread WMDE
Thiemo Mättig (WMDE) has submitted this change and it was merged.

Change subject: Changed $.fn.applyTemplate mechanics
..


Changed $.fn.applyTemplate mechanics

applyTemplate() expects a template to have a single root node. Appending the 
root node to the single
node applied to the function creates a unnecessarily nested structure. In 
addition, this removes
the possibility to add nested DOM nodes, like a table content structure, to a 
table/ node.
With the change, instead of the whole template, only the template root node's 
children are appended
to the element the template is applied to. Consequently, now, a template 
definition may have a DOM
structure that completely represents an HTML segment.

Change-Id: Idfa84a66b4d3b6c0305bb89ebba26b16388fe56d
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/templates.js
M lib/resources/templates.php
3 files changed, 31 insertions(+), 21 deletions(-)

Approvals:
  WikidataJenkins: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Checked



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index d367f16..7caea2b 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -37,14 +37,18 @@
],
templateShortCuts: {
'$h': 'h2',
-   '$counter': '.wikibase-sitelinkgroupview-counter',
-   '$sitelinklistview': 
'.wikibase-sitelinkgroupview-sitelinklistview'
+   '$counter': '.wikibase-sitelinkgroupview-counter'
},
value: null,
entityId: null,
api: null,
entityStore: null
},
+
+   /**
+* @type {jQuery}
+*/
+   $sitelinklistview: null,
 
/**
 * @see jQuery.ui.TemplatedWidget._create
@@ -63,6 +67,12 @@
// TODO: Remove scraping
this.__headingText = this.$h.text();
 
+   this.$sitelinklistview = this.element.find( 
'.wikibase-sitelinklistview' );
+
+   if( !this.$sitelinklistview.length ) {
+   this.$sitelinklistview = $( 'table/' ).appendTo( 
this.element );
+   }
+
this.$sitelinklistview.sitelinklistview( {
value: this._getSiteLinksOfGroup(),
allowedSiteIds: this.options.value
diff --git a/lib/resources/templates.js b/lib/resources/templates.js
index cf42343..c06d19b 100644
--- a/lib/resources/templates.js
+++ b/lib/resources/templates.js
@@ -151,7 +151,7 @@
this.prop( 'dir', $template.prop( 'dir' ) );
}
 
-   $template.children().appendTo( this.empty() );
+   this.empty().append( $template.children() );
 
return this;
};
diff --git a/lib/resources/templates.php b/lib/resources/templates.php
index 2dbc89b..33b4b89 100644
--- a/lib/resources/templates.php
+++ b/lib/resources/templates.php
@@ -269,29 +269,29 @@
h2 class=wb-section-heading wikibase-sitelinkgroupview-heading 
dir=auto id=$1
$2span class=wikibase-sitelinkgroupview-counter$3/span
/h2
-   table class=wikibase-sitelinkgroupview-sitelinklistview
-   !-- wikibase-sitelinklistview --$4
-   /table
+   !-- wikibase-sitelinklistview --$4
 /div
 HTML;
 
$templates['wikibase-sitelinklistview'] =
 HTML
-colgroup
-   col class=wikibase-sitelinklistview-sitename /
-   col class=wikibase-sitelinklistview-siteid /
-   col class=wikibase-sitelinklistview-link /
-   col class=wb-editsection /
-/colgroup
-thead
-   $1 !-- wikibase-sitelinklist-thead --
-/thead
-tbody
-   $2 !-- [0,*] wikibase-sitelinkview --
-/tbody
-tfoot
-   $3 !-- wikibase-sitelinklistview-tfoot --
-/tfoot
+table class=wikibase-sitelinklistview
+   colgroup
+   col class=wikibase-sitelinklistview-sitename /
+   col class=wikibase-sitelinklistview-siteid /
+   col class=wikibase-sitelinklistview-link /
+   col class=wb-editsection /
+   /colgroup
+   thead
+   !-- wikibase-sitelinklist-thead --$1
+   /thead
+   tbody
+   !-- [0,*] wikibase-sitelinkview --$2
+   /tbody
+   tfoot
+   !-- wikibase-sitelinklistview-tfoot --$3
+   /tfoot
+/table
 HTML;
 
$templates['wikibase-sitelinklistview-thead'] =

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfa84a66b4d3b6c0305bb89ebba26b16388fe56d
Gerrit-PatchSet: 2
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Fix spelling making config not properly apply - change (operations/mediawiki-config)

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

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

Change subject: Fix spelling making config not properly apply
..

Fix spelling making config not properly apply

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6bc1a6a..53e97e6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13626,7 +13626,7 @@
'testwiki' = array( 'build' = true, 'use' = true ),
'test2wiki' = array( 'build' = true, 'use' = true ),
'testwikidatawiki' = array( 'build' = true, 'use' = true ),
-   'mediwikiwiki' = array( 'build' = true, 'use' = true ),
+   'mediawikiwiki' = array( 'build' = true, 'use' = true ),
# 'wiki' means wikipedias
'wiki' = array( 'build' = true, 'use' = false ),
 ),

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

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

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


[MediaWiki-commits] [Gerrit] Add a script to delete manual user global.js/css pages - change (mediawiki...GlobalCssJs)

2014-08-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Add a script to delete manual user global.js/css pages
..

Add a script to delete manual user global.js/css pages

On Wikimedia wikis, users have created local common.js/css
pages that load their global.js/css pages from Meta-Wiki.
This script will check if those pages match a conservative
regex, and only have one revision. If so, it deletes them.

Bug: 68933
Change-Id: I4b3218ccbbc7754a89846f5fec4d288d86ed46bf
(cherry picked from commit dbdcceb182da5efbc3fe4013c26503ea721d4ea1)
---
M i18n/core/en.json
M i18n/core/qqq.json
A removeOldManualUserPages.php
A tests/RemoveOldManualUserPagesTest.php
4 files changed, 309 insertions(+), 2 deletions(-)


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

diff --git a/i18n/core/en.json b/i18n/core/en.json
index ea9749c..f4537c9 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -10,5 +10,7 @@
globalcssjs-warning-css: Any CSS added to this page will be loaded 
on all wikis where you have an account.,
globalcssjs-custom-css-js: Shared CSS/JavaScript for all wikis:,
globalcssjs-custom-js: Custom JavaScript,
-   globalcssjs-custom-css: Custom CSS
+   globalcssjs-custom-css: Custom CSS,
+   globalcssjs-delete-css: Deleting CSS page on user request due to 
deployment of [[mw:Help:Extension:GlobalCssJs]],
+   globalcssjs-delete-js: Deleting JavaScript page on user request due 
to deployment of [[mw:Help:Extension:GlobalCssJs]]
 }
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 41457e2..1dde05f 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -10,5 +10,7 @@
globalcssjs-warning-css: Notice on top of edit window,
globalcssjs-custom-css-js: Help message next to links to a user's 
global.js/global.css pages,
globalcssjs-custom-js: Link text for link to a user's global.js 
page.\n{{Identical|Custom JavaScript}},
-   globalcssjs-custom-css: Link text for a link to a user's global.css 
page.\n{{Identical|Custom CSS}}
+   globalcssjs-custom-css: Link text for a link to a user's global.css 
page.\n{{Identical|Custom CSS}},
+   globalcssjs-delete-css: Used as a deletion summary when deleting a 
user's CSS page,
+   globalcssjs-delete-js: Used as a deletion summary when deleting a 
user's JavaScript page
 }
diff --git a/removeOldManualUserPages.php b/removeOldManualUserPages.php
new file mode 100644
index 000..9f11ef4
--- /dev/null
+++ b/removeOldManualUserPages.php
@@ -0,0 +1,169 @@
+?php
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+if ( $IP === false ) {
+   $IP = __DIR__ . '/../../..';
+}
+require_once $IP/maintenance/Maintenance.php;
+
+/**
+ * Script to remove manually created user .js and .css pages
+ * by users. You should run this script on every wiki where the user
+ * has an account.
+ */
+class RemoveOldManualUserPages extends Maintenance {
+
+   public function execute() {
+   $userName = $this-getOption( 'user' );
+   $user = User::newFromName( $userName );
+   if ( !class_exists( 'GlobalCssJsHooks' ) ) {
+   $this-error( 'The GlobalCssJs extension is not enabled 
on this wiki.', 1 );
+   }
+
+   if ( !$user-getId() || !GlobalCssJsHooks::loadForUser( $user ) 
) {
+   $this-output( $userName does not load global modules 
on this wiki.\n );
+   return;
+   }
+
+   $skins = array_keys( Skin::getAllowedSkins() );
+   $skins[] = 'common';
+
+   // Batch look up the existence of pages
+   $lb = new LinkBatch();
+   foreach ( $skins as $name ) {
+   $lb-addObj( $user-getUserPage()-getSubpage( 
$name.js ) );
+   $lb-addObj( $user-getUserPage()-getSubpage( 
$name.css ) );
+   }
+   $lb-execute();
+
+   foreach ( $skins as $name ) {
+   $this-removeJS( $user, $name );
+   $this-removeCSS( $user, $name );
+   }
+   }
+
+   /**
+* Generic checks to see if we should work on a title.
+*
+* @param Title $title
+* @return Revision|bool
+*/
+   private function checkTitle( Title $title ) {
+   if ( !$title-exists() ) {
+   $this-output( {$title-getPrefixedText()} does not 
exist on this wiki.\n );
+   return false;
+   }
+
+
+   $rev = Revision::newFromTitle( $title );
+   if ( $title-getPreviousRevisionID( $rev-getId() ) !== false ) 
{
+   $this-output( {$title-getPrefixedText()} has more 
than one revision, skipping.\n );
+   return false;
+   }
+
+  

[MediaWiki-commits] [Gerrit] Add a script to delete manual user global.js/css pages - change (mediawiki...GlobalCssJs)

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

Change subject: Add a script to delete manual user global.js/css pages
..


Add a script to delete manual user global.js/css pages

On Wikimedia wikis, users have created local common.js/css
pages that load their global.js/css pages from Meta-Wiki.
This script will check if those pages match a conservative
regex, and only have one revision. If so, it deletes them.

Bug: 68933
Change-Id: I4b3218ccbbc7754a89846f5fec4d288d86ed46bf
(cherry picked from commit dbdcceb182da5efbc3fe4013c26503ea721d4ea1)
---
M i18n/core/en.json
M i18n/core/qqq.json
A removeOldManualUserPages.php
A tests/RemoveOldManualUserPagesTest.php
4 files changed, 309 insertions(+), 2 deletions(-)

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



diff --git a/i18n/core/en.json b/i18n/core/en.json
index ea9749c..f4537c9 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -10,5 +10,7 @@
globalcssjs-warning-css: Any CSS added to this page will be loaded 
on all wikis where you have an account.,
globalcssjs-custom-css-js: Shared CSS/JavaScript for all wikis:,
globalcssjs-custom-js: Custom JavaScript,
-   globalcssjs-custom-css: Custom CSS
+   globalcssjs-custom-css: Custom CSS,
+   globalcssjs-delete-css: Deleting CSS page on user request due to 
deployment of [[mw:Help:Extension:GlobalCssJs]],
+   globalcssjs-delete-js: Deleting JavaScript page on user request due 
to deployment of [[mw:Help:Extension:GlobalCssJs]]
 }
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 41457e2..1dde05f 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -10,5 +10,7 @@
globalcssjs-warning-css: Notice on top of edit window,
globalcssjs-custom-css-js: Help message next to links to a user's 
global.js/global.css pages,
globalcssjs-custom-js: Link text for link to a user's global.js 
page.\n{{Identical|Custom JavaScript}},
-   globalcssjs-custom-css: Link text for a link to a user's global.css 
page.\n{{Identical|Custom CSS}}
+   globalcssjs-custom-css: Link text for a link to a user's global.css 
page.\n{{Identical|Custom CSS}},
+   globalcssjs-delete-css: Used as a deletion summary when deleting a 
user's CSS page,
+   globalcssjs-delete-js: Used as a deletion summary when deleting a 
user's JavaScript page
 }
diff --git a/removeOldManualUserPages.php b/removeOldManualUserPages.php
new file mode 100644
index 000..9f11ef4
--- /dev/null
+++ b/removeOldManualUserPages.php
@@ -0,0 +1,169 @@
+?php
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+if ( $IP === false ) {
+   $IP = __DIR__ . '/../../..';
+}
+require_once $IP/maintenance/Maintenance.php;
+
+/**
+ * Script to remove manually created user .js and .css pages
+ * by users. You should run this script on every wiki where the user
+ * has an account.
+ */
+class RemoveOldManualUserPages extends Maintenance {
+
+   public function execute() {
+   $userName = $this-getOption( 'user' );
+   $user = User::newFromName( $userName );
+   if ( !class_exists( 'GlobalCssJsHooks' ) ) {
+   $this-error( 'The GlobalCssJs extension is not enabled 
on this wiki.', 1 );
+   }
+
+   if ( !$user-getId() || !GlobalCssJsHooks::loadForUser( $user ) 
) {
+   $this-output( $userName does not load global modules 
on this wiki.\n );
+   return;
+   }
+
+   $skins = array_keys( Skin::getAllowedSkins() );
+   $skins[] = 'common';
+
+   // Batch look up the existence of pages
+   $lb = new LinkBatch();
+   foreach ( $skins as $name ) {
+   $lb-addObj( $user-getUserPage()-getSubpage( 
$name.js ) );
+   $lb-addObj( $user-getUserPage()-getSubpage( 
$name.css ) );
+   }
+   $lb-execute();
+
+   foreach ( $skins as $name ) {
+   $this-removeJS( $user, $name );
+   $this-removeCSS( $user, $name );
+   }
+   }
+
+   /**
+* Generic checks to see if we should work on a title.
+*
+* @param Title $title
+* @return Revision|bool
+*/
+   private function checkTitle( Title $title ) {
+   if ( !$title-exists() ) {
+   $this-output( {$title-getPrefixedText()} does not 
exist on this wiki.\n );
+   return false;
+   }
+
+
+   $rev = Revision::newFromTitle( $title );
+   if ( $title-getPreviousRevisionID( $rev-getId() ) !== false ) 
{
+   $this-output( {$title-getPrefixedText()} has more 
than one revision, skipping.\n );
+   return false;
+   }
+
+   return $rev;
+   }
+
+   /**
+   

[MediaWiki-commits] [Gerrit] Better support usernames with spaces in them - change (mediawiki...GlobalCssJs)

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

Change subject: Better support usernames with spaces in them
..


Better support usernames with spaces in them

Change-Id: I0b9e077789e560a7ca4822f80cfe206f41579662
(cherry picked from commit b968eeb43e87f7d35397187a31c1c237d925c137)
---
M removeOldManualUserPages.php
M tests/RemoveOldManualUserPagesTest.php
2 files changed, 87 insertions(+), 5 deletions(-)

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



diff --git a/removeOldManualUserPages.php b/removeOldManualUserPages.php
index 9f11ef4..8dfd040 100644
--- a/removeOldManualUserPages.php
+++ b/removeOldManualUserPages.php
@@ -88,8 +88,22 @@
$this-output( {$title-getPrefixedText()} was deleted.\n );
}
 
-   public function checkCss( $text, $domain, $userName ) {
+   /**
+* Given a username, normalize and escape it to be
+* safely used in regex
+*
+* @param string $userName
+* @return string
+*/
+   public function normalizeUserName( $userName ) {
$userName = preg_quote( $userName );
+   // Spaces can be represented as space, underscore, plus, or %20.
+   $userName = str_replace( ' ', '( |_|\+|%20)', $userName );
+   return $userName;
+   }
+
+   public function checkCss( $text, $domain, $userName ) {
+   $userName = $this-normalizeUserName( $userName );
preg_match( /@import 
url\('(https?:)?\/\/$domain\/w\/index\.php\?title=User:$userName\/global\.cssaction=rawctype=text\/css'\);/,
 $text, $matches );
return isset( $matches[0] ) ? $matches[0] === $text : false;
}
@@ -137,8 +151,8 @@
 
public function checkJs( $text, $domain, $userName ) {
$text = $this-stripComments( $text );
-   $userName = preg_quote( $userName );
-   preg_match( 
/(mw\.loader\.load|importScriptURI)\s*\(\s*'(https?:)?\/\/$domain\/w\/index\.php\?title=User:$userName\/global\.jsaction=rawctype=text\/javascript(smaxage=\d*?)?(maxage=\d*?)?'\s*\)\s*;?/,
 $text, $matches );
+   $userName = $this-normalizeUserName( $userName );
+   preg_match( 
/(mw\.loader\.load|importScriptURI)\s*\(\s*('|\)(https?:)?\/\/$domain\/w\/index\.php\?title=User:$userName\/global\.jsaction=rawctype=text\/javascript(smaxage=\d*?)?(maxage=\d*?)?('|\)\s*\)\s*;?/,
 $text, $matches );
return isset( $matches[0] ) ? $matches[0] === $text : false;
}
 
diff --git a/tests/RemoveOldManualUserPagesTest.php 
b/tests/RemoveOldManualUserPagesTest.php
index 0573366..577f77b 100644
--- a/tests/RemoveOldManualUserPagesTest.php
+++ b/tests/RemoveOldManualUserPagesTest.php
@@ -14,62 +14,110 @@
array(

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
true,
+   'UserName',
'mw.loader.load with a proto-rel link',
+   ),
+   array(
+   
'mw.loader.load(//meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript);',
+   true,
+   'UserName',
+   'double quotes',
),
array(

importScriptURI('//meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
true,
+   'UserName',
'using importScriptURI',
),
array(

mw.loader.load('http://meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
true,
+   'UserName',
'mw.loader.load with a http:// link',
),
array(

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:SomeOtherUserName/global.jsaction=rawctype=text/javascript');,
false,
+   'UserName',
'Loading a different user\'s global.js',
),
array(

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
false,
+   'UserName',
'Loading from a different site',
),
 

[MediaWiki-commits] [Gerrit] Better support usernames with spaces in them - change (mediawiki...GlobalCssJs)

2014-08-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Better support usernames with spaces in them
..

Better support usernames with spaces in them

Change-Id: I0b9e077789e560a7ca4822f80cfe206f41579662
(cherry picked from commit b968eeb43e87f7d35397187a31c1c237d925c137)
---
M removeOldManualUserPages.php
M tests/RemoveOldManualUserPagesTest.php
2 files changed, 87 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalCssJs 
refs/changes/34/156534/1

diff --git a/removeOldManualUserPages.php b/removeOldManualUserPages.php
index 9f11ef4..8dfd040 100644
--- a/removeOldManualUserPages.php
+++ b/removeOldManualUserPages.php
@@ -88,8 +88,22 @@
$this-output( {$title-getPrefixedText()} was deleted.\n );
}
 
-   public function checkCss( $text, $domain, $userName ) {
+   /**
+* Given a username, normalize and escape it to be
+* safely used in regex
+*
+* @param string $userName
+* @return string
+*/
+   public function normalizeUserName( $userName ) {
$userName = preg_quote( $userName );
+   // Spaces can be represented as space, underscore, plus, or %20.
+   $userName = str_replace( ' ', '( |_|\+|%20)', $userName );
+   return $userName;
+   }
+
+   public function checkCss( $text, $domain, $userName ) {
+   $userName = $this-normalizeUserName( $userName );
preg_match( /@import 
url\('(https?:)?\/\/$domain\/w\/index\.php\?title=User:$userName\/global\.cssaction=rawctype=text\/css'\);/,
 $text, $matches );
return isset( $matches[0] ) ? $matches[0] === $text : false;
}
@@ -137,8 +151,8 @@
 
public function checkJs( $text, $domain, $userName ) {
$text = $this-stripComments( $text );
-   $userName = preg_quote( $userName );
-   preg_match( 
/(mw\.loader\.load|importScriptURI)\s*\(\s*'(https?:)?\/\/$domain\/w\/index\.php\?title=User:$userName\/global\.jsaction=rawctype=text\/javascript(smaxage=\d*?)?(maxage=\d*?)?'\s*\)\s*;?/,
 $text, $matches );
+   $userName = $this-normalizeUserName( $userName );
+   preg_match( 
/(mw\.loader\.load|importScriptURI)\s*\(\s*('|\)(https?:)?\/\/$domain\/w\/index\.php\?title=User:$userName\/global\.jsaction=rawctype=text\/javascript(smaxage=\d*?)?(maxage=\d*?)?('|\)\s*\)\s*;?/,
 $text, $matches );
return isset( $matches[0] ) ? $matches[0] === $text : false;
}
 
diff --git a/tests/RemoveOldManualUserPagesTest.php 
b/tests/RemoveOldManualUserPagesTest.php
index 0573366..577f77b 100644
--- a/tests/RemoveOldManualUserPagesTest.php
+++ b/tests/RemoveOldManualUserPagesTest.php
@@ -14,62 +14,110 @@
array(

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
true,
+   'UserName',
'mw.loader.load with a proto-rel link',
+   ),
+   array(
+   
'mw.loader.load(//meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript);',
+   true,
+   'UserName',
+   'double quotes',
),
array(

importScriptURI('//meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
true,
+   'UserName',
'using importScriptURI',
),
array(

mw.loader.load('http://meta.wikimedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
true,
+   'UserName',
'mw.loader.load with a http:// link',
),
array(

mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:SomeOtherUserName/global.jsaction=rawctype=text/javascript');,
false,
+   'UserName',
'Loading a different user\'s global.js',
),
array(

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:UserName/global.jsaction=rawctype=text/javascript');,
false,
+   'UserName',
'Loading from a 

[MediaWiki-commits] [Gerrit] Move flow-topic-comments message - change (mediawiki...Flow)

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

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

Change subject: Move flow-topic-comments message
..

Move flow-topic-comments message

Well, I originally wanted to put it here, but that didn't seem to work.
Now, however, it looks like it indeed belongs in where I put it with this patch.
Damn browser cache or whatever made me mess up earlier :p

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


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

diff --git a/Resources.php b/Resources.php
index 608e6e2..7ab0657 100644
--- a/Resources.php
+++ b/Resources.php
@@ -109,6 +109,7 @@
'flow-toggle-topics',
'flow-toggle-topics-posts',
'flow-topic-participants',
+   'flow-topic-comments',
'flow-topic-action-hide-topic',
'flow-topic-action-close-topic',
'flow-topic-action-delete-topic',
@@ -324,7 +325,6 @@
'flow-error-fetch-after-open-close',
'mw-ui-unsubmitted-confirm',
'flow-reply-link',
-   'flow-topic-comments',
)
) + $mobile,
'ext.flow.vendor.storer' = $flowResourceTemplate + array(

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

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

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


[MediaWiki-commits] [Gerrit] Update GlobalCssJs to latest wmf/1.24wmf18 - change (mediawiki/core)

2014-08-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Update GlobalCssJs to latest wmf/1.24wmf18
..

Update GlobalCssJs to latest wmf/1.24wmf18

Changes:
* e4a5d01 - Support usernames with spaces in them Kunal Mehta
* 1d83326 - Add script to delete user global.js/css includes Kunal Mehta

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/156536/1

diff --git a/extensions/GlobalCssJs b/extensions/GlobalCssJs
index 40a9773..e4a5d01 16
--- a/extensions/GlobalCssJs
+++ b/extensions/GlobalCssJs
-Subproject commit 40a97736266aa3d7711246767ff12a2cbbb59ddd
+Subproject commit e4a5d019d63d22a2ae35f8ce1f207a95b11d5337

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fdaa27c1260ce21d238eef037f05d0e509b3920
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf18
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Replace some assert() with actual code - change (mediawiki...Wikibase)

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

Change subject: Replace some assert() with actual code
..


Replace some assert() with actual code

This is related to the planned HHVM switch. assert() depends on a
setting. It may do nothing but should in these cases.

Change-Id: Ic5548eba2e0b673bd5c937bfc8c7c82915de014c
---
M lib/includes/ChangesTable.php
M lib/includes/EntityRetrievingDataTypeLookup.php
M lib/includes/serializers/ClaimSerializer.php
M lib/includes/store/ChunkCache.php
M lib/includes/store/sql/PropertyInfoTable.php
M lib/includes/store/sql/SiteLinkTable.php
6 files changed, 43 insertions(+), 27 deletions(-)

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



diff --git a/lib/includes/ChangesTable.php b/lib/includes/ChangesTable.php
index a4a8c2f..0f63910 100644
--- a/lib/includes/ChangesTable.php
+++ b/lib/includes/ChangesTable.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace Wikibase;
+
 use IORMRow;
 use MWException;
 
@@ -54,7 +55,7 @@
 * @return string
 */
public function getRowClass() {
-   return '\Wikibase\ChangeRow';
+   return 'Wikibase\ChangeRow';
}
 
/**
@@ -117,11 +118,10 @@
 *
 * @param ChangeRow|IORMRow $row
 *
+* @throws MWException
 * @return array
 */
protected function getWriteValues( IORMRow $row ) {
-   assert( $row instanceof ChangeRow );
-
$values = parent::getWriteValues( $row );
 
$infoField = $this-getPrefixedField( 'info' );
@@ -129,6 +129,10 @@
$userIdField = $this-getPrefixedField( 'user_id' );
 
if ( isset( $values[$infoField] ) ) {
+   if ( !( $row instanceof ChangeRow ) ) {
+   throw new MWException( '$row must be a 
ChangeRow.' );
+   }
+
$values[$infoField] = $row-serializeInfo( 
$values[$infoField] );
}
 
@@ -181,4 +185,5 @@
/* @var Change $rec */
return $rec-getId();
}
+
 }
diff --git a/lib/includes/EntityRetrievingDataTypeLookup.php 
b/lib/includes/EntityRetrievingDataTypeLookup.php
index 7cd9d55..6413682 100644
--- a/lib/includes/EntityRetrievingDataTypeLookup.php
+++ b/lib/includes/EntityRetrievingDataTypeLookup.php
@@ -44,11 +44,10 @@
private function getProperty( PropertyId $propertyId ) {
$property = $this-entityLookup-getEntity( $propertyId );
 
-   if ( $property === null ) {
+   if ( !( $property instanceof Property ) ) {
throw new PropertyNotFoundException( $propertyId );
}
 
-   assert( $property instanceof Property );
return $property;
}
 
diff --git a/lib/includes/serializers/ClaimSerializer.php 
b/lib/includes/serializers/ClaimSerializer.php
index c88c9c9..822c0e5 100644
--- a/lib/includes/serializers/ClaimSerializer.php
+++ b/lib/includes/serializers/ClaimSerializer.php
@@ -115,10 +115,10 @@
$serialization['qualifiers'] = $qualifiers;
 
$serialization['qualifiers-order'] = array();
+   /** @var Snak $snak */
foreach( $claim-getQualifiers() as $snak ) {
-   /** @var Snak $snak $id */
$id = $snak-getPropertyId()-getPrefixedId();
-   if( !in_array( $id, 
$serialization['qualifiers-order'] ) ) {
+   if ( !in_array( $id, 
$serialization['qualifiers-order'] ) ) {
$serialization['qualifiers-order'][] = 
$snak-getPropertyId()-getPrefixedId();
}
}
@@ -170,7 +170,7 @@
 * @return ByPropertyListSerializer|ListSerializer
 */
private function getListSerializer() {
-   if( in_array( 'qualifiers', $this-options-getOption( 
SerializationOptions::OPT_GROUP_BY_PROPERTIES ) ) ){
+   if ( in_array( 'qualifiers', $this-options-getOption( 
SerializationOptions::OPT_GROUP_BY_PROPERTIES ) ) ) {
return new ByPropertyListSerializer(
'qualifiers',
$this-snakSerializer,
@@ -227,7 +227,7 @@
$claim = new Claim( $mainSnak );
}
 
-   if( array_key_exists( 'id', $serialization ) ){
+   if ( array_key_exists( 'id', $serialization ) ) {
$claim-setGuid( $serialization['id'] );
}
 
@@ -238,9 +238,6 @@
throw new InvalidArgumentException( 'Invalid 
statement rank provided' );
}
 
-   

[MediaWiki-commits] [Gerrit] Drop some jobs that no more exist in Jenkins - change (integration/zuul-config)

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

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

Change subject: Drop some jobs that no more exist in Jenkins
..

Drop some jobs that no more exist in Jenkins

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


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

diff --git a/layout.yaml b/layout.yaml
index 0fe21e7..df65583 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1379,14 +1379,6 @@
 voting: false
   - name: analytics-asana-stats-pyflakes
 voting: false
-  - name: analytics-check-stats-pep8
-voting: false
-  - name: analytics-check-stats-pyflakes
-voting: false
-  - name: analytics-editor-geocoding-pep8
-voting: false
-  - name: analytics-editor-geocoding-pyflakes
-voting: false
   - name: analytics-gerrit-stats-pep8
 voting: false
   - name: analytics-gerrit-stats-pyflakes
@@ -1657,10 +1649,6 @@
   - name: wikimedia-fundraising-tools-yamllint
 voting: false
   - name: wikimedia-fundraising-SmashPig-sphinx-doc
-voting: false
-
-  # Work in progress (bug 54384)
-  - name: qa-browsertests-build
 voting: false
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie59426ca5ae74070694963fa3c5875ca1919fdc0
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] Fix up php syntax that accidentally became part of a string ... - change (mediawiki/core)

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

Change subject: Fix up php syntax that accidentally became part of a string 
literal
..


Fix up php syntax that accidentally became part of a string literal

Follows-up d15f1cc5e1d6db78.

Previous output:
 474 pages in the MediaWiki namespace ' .
   'override messages.
 4 pages are equal to the default message ' .
   '(+ 0 talk pages).

Change-Id: I6104f716f7dc32d638a2f5a7c37c3a507efad7dd
---
M maintenance/deleteEqualMessages.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/maintenance/deleteEqualMessages.php 
b/maintenance/deleteEqualMessages.php
index bd99845..dbe9698 100644
--- a/maintenance/deleteEqualMessages.php
+++ b/maintenance/deleteEqualMessages.php
@@ -30,8 +30,8 @@
 class DeleteEqualMessages extends Maintenance {
public function __construct() {
parent::__construct();
-   $this-mDescription = Deletes all pages in the MediaWiki 
namespace that are equal to '
-   . 'the default message;
+   $this-mDescription = 'Deletes all pages in the MediaWiki 
namespace that are equal to '
+   . 'the default message';
$this-addOption( 'delete', 'Actually delete the pages 
(default: dry run)' );
$this-addOption( 'delete-talk', 'Don\'t leave orphaned talk 
pages behind during deletion' );
$this-addOption( 'lang-code', 'Check for subpages of this 
language code (default: root '
@@ -138,10 +138,10 @@
return;
}
 
-   $this-output( \n{$messageInfo['relevantPages']} pages in the 
MediaWiki namespace ' .
-   'override messages. );
-   $this-output( \n{$messageInfo['equalPages']} pages are equal 
to the default message ' .
-   '(+ {$messageInfo['equalPagesTalks']} talk pages).\n );
+   $this-output( \n{$messageInfo['relevantPages']} pages in the 
MediaWiki namespace 
+   . override messages. );
+   $this-output( \n{$messageInfo['equalPages']} pages are equal 
to the default message 
+   . (+ {$messageInfo['equalPagesTalks']} talk pages).\n 
);
 
if ( !$doDelete ) {
$list = '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6104f716f7dc32d638a2f5a7c37c3a507efad7dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: PleaseStand pleasest...@live.com
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.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] Drop some jobs that no more exist in Jenkins - change (integration/zuul-config)

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

Change subject: Drop some jobs that no more exist in Jenkins
..


Drop some jobs that no more exist in Jenkins

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

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



diff --git a/layout.yaml b/layout.yaml
index 0fe21e7..df65583 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1379,14 +1379,6 @@
 voting: false
   - name: analytics-asana-stats-pyflakes
 voting: false
-  - name: analytics-check-stats-pep8
-voting: false
-  - name: analytics-check-stats-pyflakes
-voting: false
-  - name: analytics-editor-geocoding-pep8
-voting: false
-  - name: analytics-editor-geocoding-pyflakes
-voting: false
   - name: analytics-gerrit-stats-pep8
 voting: false
   - name: analytics-gerrit-stats-pyflakes
@@ -1657,10 +1649,6 @@
   - name: wikimedia-fundraising-tools-yamllint
 voting: false
   - name: wikimedia-fundraising-SmashPig-sphinx-doc
-voting: false
-
-  # Work in progress (bug 54384)
-  - name: qa-browsertests-build
 voting: false
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie59426ca5ae74070694963fa3c5875ca1919fdc0
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] Typo in unicodejs Jsduck publisher - change (integration/zuul-config)

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

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

Change subject: Typo in unicodejs Jsduck publisher
..

Typo in unicodejs Jsduck publisher

The jsduck-publish job was prefixed 'unicode' instead of 'unicodejs'

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


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

diff --git a/layout.yaml b/layout.yaml
index df65583..bbd6550 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -5798,7 +5798,7 @@
   - unicodejs-jsduck
   - unicodejs-npm
 postmerge:
-  - unicode-jsduck-publish
+  - unicodejs-jsduck-publish
 
   - name: VisualEditor/VisualEditor
 check:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic3ce7993611babb68a9645d98a7476acc2540f70
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] Missing mwext-PdfHandler-ruby1.9.3lint - change (integration/jenkins-job-builder-config)

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

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

Change subject: Missing  mwext-PdfHandler-ruby1.9.3lint
..

Missing  mwext-PdfHandler-ruby1.9.3lint

The job is triggered from Zuul but is not defined in Jenkins :(

Change-Id: Id34846ed22cf4fe32dac7040063f084b1711f4b7
---
M mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 69472d0..99bae23 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -1202,6 +1202,11 @@
  - '{name}-ruby1.9.3lint'
 
 - project:
+name: 'mwext-PdfHandler'
+jobs:
+ - '{name}-ruby1.9.3lint'
+
+- project:
 name: 'mwext-PoolCounter'
 jobs:
  - 'mwext-PoolCounter-build'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id34846ed22cf4fe32dac7040063f084b1711f4b7
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] Missing mwext-PdfHandler-ruby1.9.3lint - change (integration/jenkins-job-builder-config)

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

Change subject: Missing  mwext-PdfHandler-ruby1.9.3lint
..


Missing  mwext-PdfHandler-ruby1.9.3lint

The job is triggered from Zuul but is not defined in Jenkins :(

Change-Id: Id34846ed22cf4fe32dac7040063f084b1711f4b7
---
M mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index 69472d0..99bae23 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -1202,6 +1202,11 @@
  - '{name}-ruby1.9.3lint'
 
 - project:
+name: 'mwext-PdfHandler'
+jobs:
+ - '{name}-ruby1.9.3lint'
+
+- project:
 name: 'mwext-PoolCounter'
 jobs:
  - 'mwext-PoolCounter-build'

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

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

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


[MediaWiki-commits] [Gerrit] Typo in unicodejs Jsduck publisher - change (integration/zuul-config)

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

Change subject: Typo in unicodejs Jsduck publisher
..


Typo in unicodejs Jsduck publisher

The jsduck-publish job was prefixed 'unicode' instead of 'unicodejs'

Change-Id: Ic3ce7993611babb68a9645d98a7476acc2540f70
---
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 df65583..bbd6550 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -5798,7 +5798,7 @@
   - unicodejs-jsduck
   - unicodejs-npm
 postmerge:
-  - unicode-jsduck-publish
+  - unicodejs-jsduck-publish
 
   - name: VisualEditor/VisualEditor
 check:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3ce7993611babb68a9645d98a7476acc2540f70
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] jenkins-jobs-list.py dump list of jenkins jobs - change (integration/jenkins)

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

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

Change subject: jenkins-jobs-list.py dump list of jenkins jobs
..

jenkins-jobs-list.py dump list of jenkins jobs

Zuul can validate its layout against a list of deployed job name. This
script generates such a list.

Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
---
A bin/jenkins-jobs-list.py
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/40/156540/1

diff --git a/bin/jenkins-jobs-list.py b/bin/jenkins-jobs-list.py
new file mode 100755
index 000..abe1ff7
--- /dev/null
+++ b/bin/jenkins-jobs-list.py
@@ -0,0 +1,10 @@
+import json
+import urllib2
+
+JENKINS_API_JOBS_URL = \
+'https://integration.wikimedia.org/ci/api/json?pretty=truetree=jobs[name]'
+
+req = urllib2.urlopen(JENKINS_API_JOBS_URL)
+result = json.load(req)
+
+print \n.join([job.get('name') for job in result.get('jobs')])

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
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] jenkins-jobs-list.py dump list of jenkins jobs - change (integration/jenkins)

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

Change subject: jenkins-jobs-list.py dump list of jenkins jobs
..


jenkins-jobs-list.py dump list of jenkins jobs

Zuul can validate its layout against a list of deployed job name. This
script generates such a list.

Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
---
A bin/jenkins-jobs-list.py
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/bin/jenkins-jobs-list.py b/bin/jenkins-jobs-list.py
new file mode 100755
index 000..abe1ff7
--- /dev/null
+++ b/bin/jenkins-jobs-list.py
@@ -0,0 +1,10 @@
+import json
+import urllib2
+
+JENKINS_API_JOBS_URL = \
+'https://integration.wikimedia.org/ci/api/json?pretty=truetree=jobs[name]'
+
+req = urllib2.urlopen(JENKINS_API_JOBS_URL)
+result = json.load(req)
+
+print \n.join([job.get('name') for job in result.get('jobs')])

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
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] New deployment build, mw1.24-wmf19 - change (mediawiki...Wikidata)

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

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

Change subject: New deployment build, mw1.24-wmf19
..

New deployment build, mw1.24-wmf19

Change-Id: Ie6d6fdab2b1074f065d3d3cf8e970c3300fd3fd8
---
M Wikidata.localisation.php
M composer.json
M composer.lock
M extensions/PropertySuggester/PropertySuggester.php
M extensions/PropertySuggester/README.md
M extensions/PropertySuggester/build/travis/script.sh
M extensions/PropertySuggester/i18n/en.json
M extensions/PropertySuggester/modules/ext.PropertySuggester.EntitySelector.js
M extensions/PropertySuggester/src/PropertySuggester/GetSuggestions.php
M extensions/PropertySuggester/src/PropertySuggester/ResultBuilder.php
M extensions/PropertySuggester/src/PropertySuggester/SuggesterParams.php
M extensions/PropertySuggester/src/PropertySuggester/SuggesterParamsParser.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SimpleSuggester.php
M 
extensions/PropertySuggester/src/PropertySuggester/Suggesters/SuggesterEngine.php
M extensions/PropertySuggester/src/PropertySuggester/SuggestionGenerator.php
M extensions/PropertySuggester/tests/bootstrap.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/GetSuggestionsTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/ResultBuilderTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggesterParamsParserTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/Suggesters/SimpleSuggesterTest.php
M 
extensions/PropertySuggester/tests/phpunit/PropertySuggester/SuggestionGeneratorTest.php
M extensions/Wikibase/.travis.yml
M extensions/Wikibase/Wikibase.php
A extensions/Wikibase/build/jenkins/mw-apply-wb-settings.sh
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/WikibaseClient.i18n.magic.php
M extensions/Wikibase/client/config/WikibaseClient.default.php
M extensions/Wikibase/client/i18n/ast.json
M extensions/Wikibase/client/i18n/bg.json
M extensions/Wikibase/client/i18n/ca.json
M extensions/Wikibase/client/i18n/ce.json
M extensions/Wikibase/client/i18n/et.json
M extensions/Wikibase/client/i18n/fa.json
M extensions/Wikibase/client/i18n/fi.json
M extensions/Wikibase/client/i18n/id.json
M extensions/Wikibase/client/i18n/kk-cyrl.json
M extensions/Wikibase/client/i18n/la.json
M extensions/Wikibase/client/i18n/ms.json
M extensions/Wikibase/client/i18n/nl.json
M extensions/Wikibase/client/i18n/pl.json
M extensions/Wikibase/client/i18n/pt.json
M extensions/Wikibase/client/i18n/scn.json
M extensions/Wikibase/client/i18n/sv.json
A extensions/Wikibase/client/i18n/tet.json
A extensions/Wikibase/client/i18n/udm.json
M extensions/Wikibase/client/i18n/zh-hant.json
M 
extensions/Wikibase/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
M extensions/Wikibase/client/includes/UpdateRepo.php
M extensions/Wikibase/client/includes/WikibaseClient.php
A extensions/Wikibase/client/includes/hooks/ChangesPageWikibaseFilterHandler.php
M extensions/Wikibase/client/includes/hooks/SpecialWatchlistQueryHandler.php
M extensions/Wikibase/client/maintenance/populateInterwiki.php
M extensions/Wikibase/client/tests/phpunit/includes/ChangeHandlerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
M extensions/Wikibase/client/tests/phpunit/includes/RepoLinkerTest.php
M extensions/Wikibase/client/tests/phpunit/includes/UpdateRepoOnMoveTest.php
A 
extensions/Wikibase/client/tests/phpunit/includes/hooks/ChangesPageWikibaseFilterHandlerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/hooks/SpecialWatchlistQueryHandlerTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/docs/options.wiki
M extensions/Wikibase/lib/WikibaseLib.hooks.php
M extensions/Wikibase/lib/WikibaseLib.php
M extensions/Wikibase/lib/i18n/ckb.json
M extensions/Wikibase/lib/i18n/et.json
M extensions/Wikibase/lib/i18n/nl.json
M extensions/Wikibase/lib/i18n/pl.json
M extensions/Wikibase/lib/i18n/zh-hant.json
M extensions/Wikibase/lib/includes/ChangesTable.php
M extensions/Wikibase/lib/includes/EntityFactory.php
M extensions/Wikibase/lib/includes/EntityRetrievingDataTypeLookup.php
M extensions/Wikibase/lib/includes/changes/EntityChange.php
M extensions/Wikibase/lib/includes/formatters/DispatchingSnakFormatter.php
M extensions/Wikibase/lib/includes/formatters/EntityIdHtmlLinkFormatter.php
M extensions/Wikibase/lib/includes/formatters/EntityIdTitleFormatter.php
M extensions/Wikibase/lib/includes/formatters/MessageSnakFormatter.php
M extensions/Wikibase/lib/includes/formatters/MwTimeIsoFormatter.php
M extensions/Wikibase/lib/includes/formatters/PropertyValueSnakFormatter.php
M extensions/Wikibase/lib/includes/formatters/SnakFormatter.php
M 

[MediaWiki-commits] [Gerrit] WIP:mathoid role for production - change (operations/puppet)

2014-08-27 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: WIP:mathoid role for production
..

WIP:mathoid role for production

Change-Id: Iadc5e539b92d0628d022b481756534613dc78ef6
---
M manifests/role/mathoid.pp
1 file changed, 53 insertions(+), 8 deletions(-)


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

diff --git a/manifests/role/mathoid.pp b/manifests/role/mathoid.pp
index b9fc6dc..09d88f5 100644
--- a/manifests/role/mathoid.pp
+++ b/manifests/role/mathoid.pp
@@ -3,14 +3,59 @@
 # We do not have monitoring yet
 #@monitor_group { 'mathoid_eqiad': description = 'eqiad mathoid servers' }
 
-# Skipping production for now
-#class role::mathoid::production {
-#system::role { 'role::mathoid::production':
-#description = 'mathoid server'
-#}
-#
-#deployment::target { 'mathoid': }
-#}
+class role::mathoid::production {
+system::role { 'role::mathoid::production':
+description = 'mathoid server'
+}
+
+class { '::mathoid':
+  base_path = '/srv/deployment/mathoid/mathoid',
+  node_path = '/srv/deployment/mathoid/mathoid/node_modules',
+  conf_path = '/srv/deployment/mathoid/mathoid/mathoid.config.json',
+  log_dir   = '/var/log/mathoid',
+  require   = File[ '/srv/deployment/mathoid/mathoid' ]
+}
+
+file { '/srv/deployment/mathoid/mathoid':
+  ensure = directory,
+  owner = mathoid,
+  group = mathoid,
+  mode = '755',
+}
+
+deployment::target { 'mathoid': }
+
+group { 'mathoid':
+  ensure = present,
+  name   = 'mathoid',
+  system = true,
+}
+
+user { 'mathoid':
+  gid   = 'mathoid',
+  home  = '/srv/deployment/mathoid/mathoid',
+  managehome= true,
+  system= true,
+}
+
+# Beta mathoid server has some ferm DNAT rewriting rules (bug 45868) so we
+# have to explicitly allow mathoid port 10042
+ferm::service { 'http':
+  proto = 'tcp',
+  port  = '10042'
+}
+
+# Allow ssh access from the Jenkins master to the server where mathoid is
+# running
+include contint::firewall::labs
+
+# Instance got to be a Jenkins slave so we can update mathoid whenever a
+# change is made on mediawiki/services/mathoid repository
+include role::ci::slave::labs::common
+# Also need the slave scripts for multi-git.sh
+include contint::slave-scripts
+
+}
 
 class role::mathoid::beta {
 system::role { 'role::mathoid::beta':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadc5e539b92d0628d022b481756534613dc78ef6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Ensure Zuul points to existing jobs - change (integration/jenkins-job-builder-config)

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

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

Change subject: Ensure Zuul points to existing jobs
..

Ensure Zuul points to existing jobs

Fetch the list of defined jobs using jenkins-jobs-list.py which I have
added with https://gerrit.wikimedia.org/r/156540

Zuul layout validation has an option parameter which let you pass a list
of defined jobs and bails out whenever we defined a trigger to a non
existing job.

Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
---
M integration.yaml
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/integration.yaml b/integration.yaml
index 2007ef1..05e0937 100644
--- a/integration.yaml
+++ b/integration.yaml
@@ -31,8 +31,11 @@
  - zuul
 builders:
  - shell: |
+rm -f jenkins_jobs.txt
+python 
/srv/deployment/integration/slave-scripts/bin/jenkins-jobs-list.py  
jenkins_jobs.txt
+
 # FIXME change path whenever we have zuul packaged.
-/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t -l 
$WORKSPACE/layout.yaml
+/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t 
jenkins_jobs.txt -l $WORKSPACE/layout.yaml
 
 # Job for Zuul configuration validation
 # Make sure the Zuul config is passed and show a different with the previous

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
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] [WIP] mw.loader.store: Set virtual sourceURL in the globalEv... - change (mediawiki/core)

2014-08-27 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: [WIP] mw.loader.store: Set virtual sourceURL in the globalEval 
calls
..

[WIP] mw.loader.store: Set virtual sourceURL in the globalEval calls

This allows the useless default fake name like (index), VM
or (eval) to be replaced with modulename.js at the virtual
root of VM://mw.loader.store/.

Screenshot of the behaviour in Chrome:
* http://i.imgur.com/JGCZh90.png
* http://i.imgur.com/46x9sk1.png

Change-Id: Ic8dff1bb8e9188a8d298d7c8980c803862b1b2d5
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 30 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/156544/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index d50fe48..d79ea59 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1379,7 +1379,7 @@
 */
work: function () {
var reqBase, splits, 
maxQueryLength, q, b, bSource, bGroup, bSourceGroup,
-   source, concatSource, 
origBatch, group, g, i, modules, maxVersion, sourceLoadScript,
+   source, concatSource, 
origBatch, s, group, g, i, modules, maxVersion, sourceLoadScript,
currReqBase, currReqBaseLength, 
moduleMap, l,
lastDotIndex, prefix, suffix, 
bytesAdded, async;
 
@@ -1413,36 +1413,43 @@
batch = $.grep( batch, function 
( module ) {
var source = 
mw.loader.store.get( module );
if ( source ) {
-   
concatSource.push( source );
+   
concatSource.push( source + '\n//# sourceURL=VM://mw.loader.store/' + module + 
'.js' );
return false;
}
return true;
} );
-   try {
-   $.globalEval( 
concatSource.join( ';' ) );
-   } catch ( err ) {
-   // Not good, the cached 
mw.loader.implement calls failed! This should
-   // never happen, 
barring ResourceLoader bugs, browser bugs and PEBKACs.
-   // Depending on how 
corrupt the string is, it is likely that some
-   // modules' implement() 
succeeded while the ones after the error will
-   // never run and leave 
their modules in the 'loading' state forever.
 
-   // Since this is an 
error not caused by an individual module but by
-   // something that 
infected the implement call itself, don't take any
-   // risks and clear 
everything in this cache.
-   mw.loader.store.clear();
-   // Re-add the ones 
still pending back to the batch and let the server
-   // repopulate these 
modules to the cache.
-   // This means that at 
most one module will be useless (the one that had
-   // the error) instead 
of all of them.
-   log( 'Error while 
evaluating data from mw.loader.store', err );
-   origBatch = $.grep( 
origBatch, function ( module ) {
-   return 
registry[module].state === 'loading';
-   } );
-   batch = batch.concat( 
origBatch );
+   // Evaluate one module at a 
time in order for sourceURL to work
+   for ( s = 0; s  
concatSource.length; s++) {
+   

[MediaWiki-commits] [Gerrit] Triggering a non existent job - change (integration/zuul-config)

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

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

Change subject: Triggering a non existent job
..

Triggering a non existent job

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


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

diff --git a/layout.yaml b/layout.yaml
index bbd6550..6058843 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1776,6 +1776,7 @@
   - 'integration-jenkins-phplint'
   - 'integration-jenkins-phpunit'
   - 'integration-jenkins-yamllint'
+  - notexisting
 gate-and-submit:
   - 'integration-jenkins-phplint'
   - 'integration-jenkins-phpunit'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1154a792552039360581cd898018d0645a9ef4e8
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] Fix a couple of errors with codfw private DHCP stanzas - change (operations/puppet)

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

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

Change subject: Fix a couple of errors with codfw private DHCP stanzas
..

Fix a couple of errors with codfw private DHCP stanzas

get_domain should be codfw.wmnet and not eqiad.wmnet

Change-Id: I3aec8ee03b211c1b3a37deb45a246ef30045ffae
---
M modules/install-server/files/autoinstall/subnets/private1-a-codfw.cfg
M modules/install-server/files/autoinstall/subnets/private1-b-codfw.cfg
M modules/install-server/files/autoinstall/subnets/private1-c-codfw.cfg
M modules/install-server/files/autoinstall/subnets/private1-d-codfw.cfg
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/156547/1

diff --git 
a/modules/install-server/files/autoinstall/subnets/private1-a-codfw.cfg 
b/modules/install-server/files/autoinstall/subnets/private1-a-codfw.cfg
index 25f3884..58de111 100644
--- a/modules/install-server/files/autoinstall/subnets/private1-a-codfw.cfg
+++ b/modules/install-server/files/autoinstall/subnets/private1-a-codfw.cfg
@@ -1,7 +1,7 @@
 # subnet specific configuration settings
 
 # get_domain should be set, get_hostname is overwritten by DHCP
-d-inetcfg/get_domain   string  eqiad.wmnet
+d-inetcfg/get_domain   string  codfw.wmnet
 
 # ip address is taken from DHCP, rest is set here
 d-inetcfg/get_netmask  string  255.255.252.0
diff --git 
a/modules/install-server/files/autoinstall/subnets/private1-b-codfw.cfg 
b/modules/install-server/files/autoinstall/subnets/private1-b-codfw.cfg
index a7899ca..e6a801c 100644
--- a/modules/install-server/files/autoinstall/subnets/private1-b-codfw.cfg
+++ b/modules/install-server/files/autoinstall/subnets/private1-b-codfw.cfg
@@ -1,7 +1,7 @@
 # subnet specific configuration settings
 
 # get_domain should be set, get_hostname is overwritten by DHCP
-d-inetcfg/get_domain   string  eqiad.wmnet
+d-inetcfg/get_domain   string  codfw.wmnet
 
 # ip address is taken from DHCP, rest is set here
 d-inetcfg/get_netmask  string  255.255.252.0
diff --git 
a/modules/install-server/files/autoinstall/subnets/private1-c-codfw.cfg 
b/modules/install-server/files/autoinstall/subnets/private1-c-codfw.cfg
index 5fda92e..7908caf 100644
--- a/modules/install-server/files/autoinstall/subnets/private1-c-codfw.cfg
+++ b/modules/install-server/files/autoinstall/subnets/private1-c-codfw.cfg
@@ -1,7 +1,7 @@
 # subnet specific configuration settings
 
 # get_domain should be set, get_hostname is overwritten by DHCP
-d-inetcfg/get_domain   string  eqiad.wmnet
+d-inetcfg/get_domain   string  codfw.wmnet
 
 # ip address is taken from DHCP, rest is set here
 d-inetcfg/get_netmask  string  255.255.252.0
diff --git 
a/modules/install-server/files/autoinstall/subnets/private1-d-codfw.cfg 
b/modules/install-server/files/autoinstall/subnets/private1-d-codfw.cfg
index 7604041..b0fc7d7 100644
--- a/modules/install-server/files/autoinstall/subnets/private1-d-codfw.cfg
+++ b/modules/install-server/files/autoinstall/subnets/private1-d-codfw.cfg
@@ -1,7 +1,7 @@
 # subnet specific configuration settings
 
 # get_domain should be set, get_hostname is overwritten by DHCP
-d-inetcfg/get_domain   string  eqiad.wmnet
+d-inetcfg/get_domain   string  codfw.wmnet
 
 # ip address is taken from DHCP, rest is set here
 d-inetcfg/get_netmask  string  255.255.252.0

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

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

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


[MediaWiki-commits] [Gerrit] Switch from experimental to test and gate for wikibase - change (integration/zuul-config)

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

Change subject: Switch from experimental to test and gate for wikibase
..


Switch from experimental to test and gate for wikibase

DEPENDS on: Ifa58a060c3e792ed9efdac04e3737a129cc72451

Change-Id: I951fdd3b0db04810dfbcbdc8014f1630f934
---
M layout.yaml
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/layout.yaml b/layout.yaml
index bbd6550..e6b0508 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -5559,7 +5559,15 @@
   - mwext-Wikibase-jslint
   - mwext-Wikibase-lint
   - php-composer-validate
-experimental:
+test:
+  - mwext-Wikibase-jslint
+  - mwext-Wikibase-lint
+  - php-composer-validate
+  - mwext-Wikibase-repo-tests
+  - mwext-Wikibase-repo-api-tests
+  - mwext-Wikibase-repo-getentities-api-tests
+  - mwext-Wikibase-client-tests
+gate-and-submit:
   - mwext-Wikibase-jslint
   - mwext-Wikibase-lint
   - php-composer-validate

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I951fdd3b0db04810dfbcbdc8014f1630f934
Gerrit-PatchSet: 4
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Integrated fingerprintgroupview into entityview - change (mediawiki...Wikibase)

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

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

Change subject: Integrated fingerprintgroupview into entityview
..

Integrated fingerprintgroupview into entityview

Change-Id: I38cc93a9dbfae2ca9b2b04d2e12de58a0850acf0
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/resources.php
M repo/resources/Resources.php
D repo/resources/wikibase.initTermBox.js
M repo/resources/wikibase.ui.entityViewInit.js
5 files changed, 103 insertions(+), 115 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index 299bb6d..b8a883a 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -17,6 +17,7 @@
  * @option {wikibase.store.EntityStore} entityStore
  * @option {wikibase.ValueViewBuilder} valueViewBuilder
  * @option {wikibase.Api} api
+ * @option {string[]} languages
  */
 $.widget( 'wikibase.entityview', PARENT, {
/**
@@ -35,8 +36,14 @@
value: null,
entityStore: null,
valueViewBuilder: null,
-   api: null
+   api: null,
+   languages: []
},
+
+   /**
+* @type {jQuery}
+*/
+   $toc: null,
 
/**
 * @type {jQuery}
@@ -52,6 +59,11 @@
 * @type {jQuery}
 */
$aliases: null,
+
+   /**
+* @type {jQuery}
+*/
+   $fingerprints: null,
 
/**
 * @type {jQuery}
@@ -72,9 +84,12 @@
throw new Error( 'Required option(s) missing' );
}
 
+   this.$toc = $( '.toc', this.element );
+
this._initLabel();
this._initDescription();
this._initAliases();
+   this._initFingerprints();
this._initClaims();
this._initSiteLinks();
 
@@ -142,6 +157,45 @@
language:  mw.config.get( 'wgUserLanguage' ),
aliases: this.options.value.getAliases( 
mw.config.get( 'wgUserLanguage' ) )
},
+   entityId: this.options.value.getId(),
+   api: this.options.api
+   } );
+   },
+
+   _initFingerprints: function() {
+   if( !this.options.languages.length ) {
+   return;
+   }
+
+   this.$fingerprints = $( '.wikibase-fingerprintgroupview' );
+
+   if( !this.$fingerprints.length ) {
+   var $precedingNode = this.$toc;
+
+   if( !$precedingNode.length ) {
+   $precedingNode = $( '.wikibase-aliasesview' );
+   } else {
+   this._addTocItem(
+   '#wb-terms',
+   mw.msg( 'wikibase-terms' ),
+   this.$toc.find( 'li' ).first()
+   );
+   }
+
+   this.$fingerprints = $( 'div/' ).appendTo( 
$precedingNode );
+   }
+
+   var value = [];
+   for( var i = 0; i  this.options.languages.length; i++ ) {
+   value.push( {
+   language: this.options.languages[i],
+   label: this.options.value.getLabel( 
this.options.languages[i] ) || null,
+   description: this.options.value.getDescription( 
this.options.languages[i] ) || null
+   } );
+   }
+
+   this.$fingerprints.fingerprintgroupview( {
+   value: value,
entityId: this.options.value.getId(),
api: this.options.api
} );
@@ -380,6 +434,35 @@
] );
}
);
+   },
+
+   /**
+* Adds an item to the table of contents.
+*
+* @param {string} href
+* @param {string} text
+* @param {jQuery} [$insertBefore] Omit to have the item inserted at 
the end
+*/
+   _addTocItem: function( href, text, $insertBefore ) {
+   if( !this.$toc.length ) {
+   return;
+   }
+
+   var $li = $( 'li' )
+   .addClass( 'toclevel-1' )
+   .append( $( 'a' ).attr( 'href', href ).text( text ) );
+
+   if( $insertBefore ) {
+   $li.insertBefore( $insertBefore );
+   } else {

[MediaWiki-commits] [Gerrit] Wikibase: check-only - check - change (integration/zuul-config)

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

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

Change subject: Wikibase: check-only - check
..

Wikibase: check-only - check

Since we have tests now \O/

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


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

diff --git a/layout.yaml b/layout.yaml
index e6b0508..70c277b 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -,7 +,7 @@
   - mwext-WikiEditor-lint
 
   - name: mediawiki/extensions/Wikibase
-check-only:
+check:
   - mwext-Wikibase-jslint
   - mwext-Wikibase-lint
   - php-composer-validate

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85228d5723662ef3832dd6d0fd4e197105abbbc3
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] Ensure Zuul points to existing jobs - change (integration/jenkins-job-builder-config)

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

Change subject: Ensure Zuul points to existing jobs
..


Ensure Zuul points to existing jobs

Fetch the list of defined jobs using jenkins-jobs-list.py which I have
added with https://gerrit.wikimedia.org/r/156540

Zuul layout validation has an option parameter which let you pass a list
of defined jobs and bails out whenever we defined a trigger to a non
existing job.

Change-Id: Ifbf559213cc24d7f95fcc9ee25d022779fa2c1c1
---
M integration.yaml
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/integration.yaml b/integration.yaml
index 2007ef1..05e0937 100644
--- a/integration.yaml
+++ b/integration.yaml
@@ -31,8 +31,11 @@
  - zuul
 builders:
  - shell: |
+rm -f jenkins_jobs.txt
+python 
/srv/deployment/integration/slave-scripts/bin/jenkins-jobs-list.py  
jenkins_jobs.txt
+
 # FIXME change path whenever we have zuul packaged.
-/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t -l 
$WORKSPACE/layout.yaml
+/usr/local/bin/zuul-server -c /etc/zuul/public.conf -t 
jenkins_jobs.txt -l $WORKSPACE/layout.yaml
 
 # Job for Zuul configuration validation
 # Make sure the Zuul config is passed and show a different with the previous

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

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

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


[MediaWiki-commits] [Gerrit] Wikibase: check-only - check - change (integration/zuul-config)

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

Change subject: Wikibase: check-only - check
..


Wikibase: check-only - check

Since we have tests now \O/

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

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



diff --git a/layout.yaml b/layout.yaml
index e6b0508..70c277b 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -,7 +,7 @@
   - mwext-WikiEditor-lint
 
   - name: mediawiki/extensions/Wikibase
-check-only:
+check:
   - mwext-Wikibase-jslint
   - mwext-Wikibase-lint
   - php-composer-validate

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85228d5723662ef3832dd6d0fd4e197105abbbc3
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: 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


  1   2   3   4   >