[MediaWiki-commits] [Gerrit] Add a question to the confirm message - change (mediawiki...Translate)

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

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

Change subject: Add a question to the confirm message
..

Add a question to the confirm message

A confirm message needs a question for the user.

Change-Id: I6d934c1a239577f78bad4e6d99d73749a342397a
---
M i18n/core/en.json
M resources/js/ext.translate.special.translate.js
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/i18n/core/en.json b/i18n/core/en.json
index 1ae1b60..788a7e3 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -242,6 +242,7 @@
translate-js-support: Ask question,
translate-js-support-title: Ask for help if there is not enough 
information to translate this message correctly.,
translate-js-support-unsaved-warning: You have unsaved 
translations.,
+   translate-js-support-unsaved-warning-confirm: You have unsaved 
translations.\nDo you want to discard the translations?,
translate-gs-pos: Pos.,
translate-gs-code: Code,
translate-gs-continent: Continent,
diff --git a/resources/js/ext.translate.special.translate.js 
b/resources/js/ext.translate.special.translate.js
index 940fd3a..5438bd2 100644
--- a/resources/js/ext.translate.special.translate.js
+++ b/resources/js/ext.translate.special.translate.js
@@ -199,7 +199,7 @@
 
function checkDirty() {
if ( mw.translate.isDirty() ) {
-   return window.confirm( mw.msg( 
'translate-js-support-unsaved-warning' ) );
+   return window.confirm( mw.msg( 
'translate-js-support-unsaved-warning-confirm' ) );
}
return true;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d934c1a239577f78bad4e6d99d73749a342397a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Move Template{, Registry} to Wikibase\Template - change (mediawiki...Wikibase)

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

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

Change subject: Move Template{,Registry} to Wikibase\Template
..

Move Template{,Registry} to Wikibase\Template

Change-Id: I3d9d20eb7de9a72a7642a5b9033b29742a1f48c4
---
R repo/includes/Template/Template.php
M repo/includes/Template/TemplateFactory.php
R repo/includes/Template/TemplateRegistry.php
M repo/includes/WikibaseRepo.php
R repo/tests/phpunit/includes/Template/TemplateRegistryTest.php
R repo/tests/phpunit/includes/Template/TemplateTest.php
M repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php
M repo/tests/phpunit/includes/View/ClaimsViewTest.php
M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
M repo/tests/phpunit/includes/View/EntityViewPlaceholderExpanderTest.php
M repo/tests/phpunit/includes/View/FingerprintViewTest.php
M repo/tests/phpunit/includes/View/ItemViewTest.php
M repo/tests/phpunit/includes/View/PropertyViewTest.php
M repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php
M repo/tests/phpunit/includes/View/SiteLinksViewTest.php
M repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php
M repo/tests/phpunit/includes/View/TermBoxViewTest.php
17 files changed, 25 insertions(+), 26 deletions(-)


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

diff --git a/repo/includes/Template.php b/repo/includes/Template/Template.php
similarity index 94%
rename from repo/includes/Template.php
rename to repo/includes/Template/Template.php
index 6e7ec71..02c85e1 100644
--- a/repo/includes/Template.php
+++ b/repo/includes/Template/Template.php
@@ -1,6 +1,8 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Template;
+
+use Message;
 
 /**
  * Allows storing and accessing of templates (e.g. snippets commonly used in 
server-side HTML
@@ -13,7 +15,7 @@
  * @licence GNU GPL v2+
  * @author H. Snater mediaw...@snater.com
  */
-class Template extends \Message {
+class Template extends Message {
 
protected $templateRegistry;
 
diff --git a/repo/includes/Template/TemplateFactory.php 
b/repo/includes/Template/TemplateFactory.php
index 7cc0a33..1b4d211 100644
--- a/repo/includes/Template/TemplateFactory.php
+++ b/repo/includes/Template/TemplateFactory.php
@@ -2,9 +2,6 @@
 
 namespace Wikibase\Template;
 
-use Wikibase\Template;
-use Wikibase\TemplateRegistry;
-
 /**
  * @license GNU GPL v2+
  * @author Adrian Lang  adrian.l...@wikimedia.de 
diff --git a/repo/includes/TemplateRegistry.php 
b/repo/includes/Template/TemplateRegistry.php
similarity index 91%
rename from repo/includes/TemplateRegistry.php
rename to repo/includes/Template/TemplateRegistry.php
index 33a326e..4a65e52 100644
--- a/repo/includes/TemplateRegistry.php
+++ b/repo/includes/Template/TemplateRegistry.php
@@ -1,6 +1,6 @@
 ?php
 
-namespace Wikibase;
+namespace Wikibase\Template;
 
 /**
  * Allows storing and accessing of templates (e.g. snippets commonly used in 
server-side HTML
@@ -29,7 +29,7 @@
public static function getDefaultInstance() {
if ( self::$instance === null ) {
self::$instance = new self();
-   self::$instance-addTemplates( include( __DIR__ . 
'/../resources/templates.php' ) );
+   self::$instance-addTemplates( include( __DIR__ . 
'/../../resources/templates.php' ) );
}
return self::$instance;
}
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index c9b953c..5e180d6 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -78,7 +78,7 @@
 use Wikibase\StringNormalizer;
 use Wikibase\SummaryFormatter;
 use Wikibase\Template\TemplateFactory;
-use Wikibase\TemplateRegistry;
+use Wikibase\Template\TemplateRegistry;
 use Wikibase\Utils;
 use Wikibase\Validators\EntityConstraintProvider;
 use Wikibase\Validators\SnakValidator;
diff --git a/repo/tests/phpunit/TemplateRegistryTest.php 
b/repo/tests/phpunit/includes/Template/TemplateRegistryTest.php
similarity index 89%
rename from repo/tests/phpunit/TemplateRegistryTest.php
rename to repo/tests/phpunit/includes/Template/TemplateRegistryTest.php
index 1ce31fb..8368c7f 100644
--- a/repo/tests/phpunit/TemplateRegistryTest.php
+++ b/repo/tests/phpunit/includes/Template/TemplateRegistryTest.php
@@ -1,11 +1,11 @@
 ?php
 
-namespace Wikibase\Test;
+namespace Wikibase\Template\Test;
 
-use Wikibase\TemplateRegistry;
+use Wikibase\Template\TemplateRegistry;
 
 /**
- * @covers Wikibase\TemplateRegistry
+ * @covers Wikibase\Template\TemplateRegistry
  *
  * @group Wikibase
  * @group WikibaseLib
diff --git a/repo/tests/phpunit/TemplateTest.php 
b/repo/tests/phpunit/includes/Template/TemplateTest.php
similarity index 80%
rename from repo/tests/phpunit/TemplateTest.php
rename to repo/tests/phpunit/includes/Template/TemplateTest.php
index 9814d54..7098c43 100644
--- 

[MediaWiki-commits] [Gerrit] Moved accessing mw config variable out of entityview - change (mediawiki...Wikibase)

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

Change subject: Moved accessing mw config variable out of entityview
..


Moved accessing mw config variable out of entityview

Change-Id: I4a7f50bf708866e71dbca29a32db841102112921
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.itemview.tests.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.propertyview.tests.js
M repo/resources/wikibase.ui.entityViewInit.js
5 files changed, 53 insertions(+), 22 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
index 65f4b81..3eb7252 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
@@ -16,6 +16,10 @@
  *
  * @param {Object} options
  * @param {wikibase.datamodel.Entity} options.value
+ * @param {string[]|string} languages
+ *Language codes of the languages to display 
label-/description-/aliasesview in. Other
+ *components of the entityview will use the first language code for 
rendering. May just be a
+ *single language code.
  * @param {wikibase.entityChangers.EntityChangersFactory} 
options.entityChangersFactory
  *Required to be able to store changes applied to the entity.
  * @param {wikibase.store.EntityStore} options.entityStore
@@ -27,9 +31,6 @@
  * @param {dataTypes.DataTypeStore} options.dataTypeStore
  *Required by the `snakview` for retrieving and evaluating a proper 
`dataTypes.DataType`
  *object when interacting on a value `Variation`.
- * @param {string[]} [languages=[]]
- *Language codes of the languages to display 
label-/description-/aliasesview in addition to
- *the base language.
  *
  * @throws {Error} when called.
  */
@@ -63,10 +64,10 @@
],
templateShortCuts: {},
value: null,
+   languages: null,
entityStore: null,
valueViewBuilder: null,
-   dataTypeStore: null,
-   languages: []
+   dataTypeStore: null
},
 
/**
@@ -118,12 +119,15 @@
_initEntityview: function() {
if(
!this.options.value
+   || !this.options.languages
|| !this.options.entityStore
|| !this.options.valueViewBuilder
|| !this.options.entityChangersFactory
) {
throw new Error( 'Required option(s) missing' );
}
+
+   this.option( 'languages', this.options.languages );
 
PARENT.prototype._create.call( this );
 
@@ -153,15 +157,14 @@
}
 
// FIXME: entity object should not contain fallback strings
-   var label = this.options.value.getFingerprint().getLabelFor(
-   mw.config.get( 'wgUserLanguage' )
-   ) || new wb.datamodel.Term( mw.config.get( 'wgUserLanguage' ), 
'' );
+   var label = this.options.value.getFingerprint().getLabelFor( 
this.options.languages[0] )
+   || new wb.datamodel.Term( this.options.languages[0], '' 
);
 
this.$label.labelview( {
value: label,
helpMessage: mw.msg(
'wikibase-description-input-help-message',
-   wb.getLanguageNameByCode( mw.config.get( 
'wgUserLanguage' ) )
+   wb.getLanguageNameByCode( 
this.options.languages[0] )
),
entityId: this.options.value.getId(),
labelsChanger: 
this.options.entityChangersFactory.getLabelsChanger(),
@@ -180,14 +183,14 @@
 
// FIXME: entity object should not contain fallback strings
var description = 
this.options.value.getFingerprint().getDescriptionFor(
-   mw.config.get( 'wgUserLanguage' )
-   ) || new wb.datamodel.Term( mw.config.get( 'wgUserLanguage' ), 
'' );
+   this.options.languages[0]
+   ) || new wb.datamodel.Term( this.options.languages[0], '' );
 
this.$description.descriptionview( {
value: description,
helpMessage: mw.msg(
'wikibase-description-input-help-message',
-   wb.getLanguageNameByCode( mw.config.get( 
'wgUserLanguage' ) )
+   wb.getLanguageNameByCode( 
this.options.languages[0] )
  

[MediaWiki-commits] [Gerrit] [Core] Add new optional keys - change (translatewiki)

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

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

Change subject: [Core] Add new optional keys
..

[Core] Add new optional keys

https://gerrit.wikimedia.org/r/#/c/177171/12/languages/i18n/en.json,unified

Change-Id: I3d0835c39aaf97e76d66e22847a57d7498303e8b
---
M groups/MediaWiki/MediaWiki.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/32/180732/1

diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml
index ed7f092..c9fb455 100644
--- a/groups/MediaWiki/MediaWiki.yaml
+++ b/groups/MediaWiki/MediaWiki.yaml
@@ -50,6 +50,8 @@
 - common.css
 - common.js
 # @deprecated. Remove in MediaWiki 1.23.
+- content-model-css
+- content-model-json
 - created
 - days-abbrev
 - diff-with-additional

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d0835c39aaf97e76d66e22847a57d7498303e8b
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] [Core] Add new optional keys - change (translatewiki)

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

Change subject: [Core] Add new optional keys
..


[Core] Add new optional keys

https://gerrit.wikimedia.org/r/#/c/177171/12/languages/i18n/en.json,unified

Change-Id: I3d0835c39aaf97e76d66e22847a57d7498303e8b
---
M groups/MediaWiki/MediaWiki.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml
index ed7f092..c9fb455 100644
--- a/groups/MediaWiki/MediaWiki.yaml
+++ b/groups/MediaWiki/MediaWiki.yaml
@@ -50,6 +50,8 @@
 - common.css
 - common.js
 # @deprecated. Remove in MediaWiki 1.23.
+- content-model-css
+- content-model-json
 - created
 - days-abbrev
 - diff-with-additional

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d0835c39aaf97e76d66e22847a57d7498303e8b
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

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


[MediaWiki-commits] [Gerrit] misc::maintainenance: fix a bunch of cronspam - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: misc::maintainenance: fix a bunch of cronspam
..

misc::maintainenance: fix a bunch of cronspam

Change-Id: I17cae5c30906795451113ad3711b8285d69475b2
---
M manifests/misc/maintenance.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/180733/1

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 70b90a0..248952b 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -71,7 +71,7 @@
 cron { 'translationnotifications-metawiki':
 ensure  = $ensure,
 user= 'apache',
-command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki metawiki 
21  /var/log/mediawiki/translationnotifications/digests.log',
+command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki metawiki 
21  /var/log/translationnotifications/digests.log',
 weekday = 1, # Monday
 hour= 10,
 minute  = 0,
@@ -80,7 +80,7 @@
 cron { 'translationnotifications-mediawikiwiki':
 ensure  = $ensure,
 user= 'apache',
-command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki 
mediawikiwiki 21  /var/log/mediawiki/translationnotifications/digests.log',
+command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki 
mediawikiwiki 21  /var/log/translationnotifications/digests.log',
 weekday = 1, # Monday
 hour= 10,
 minute  = 5,
@@ -114,7 +114,7 @@
 class misc::maintenance::echo_mail_batch( $ensure = present ) {
 cron { 'echo_mail_batch':
 ensure  = $ensure,
-command = '/usr/local/bin/foreachwikiindblist 
/srv/mediawiki/echowikis.dblist 
extensions/Echo/maintenance/processEchoEmailBatch.php 2/dev/null',
+command = '/usr/local/bin/foreachwikiindblist 
/srv/mediawiki/echowikis.dblist 
extensions/Echo/maintenance/processEchoEmailBatch.php /dev/null',
 user= 'apache',
 minute  = 0,
 hour= 0,
@@ -252,7 +252,7 @@
 minute  = 0,
 hour= 0,
 weekday = 1,
-command = '/usr/local/bin/characterEditStatsTranslate',
+command = '/usr/local/bin/characterEditStatsTranslate /dev/null',
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] misc::maintenance: fix a bunch of cronspam - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: misc::maintenance: fix a bunch of cronspam
..


misc::maintenance: fix a bunch of cronspam

Change-Id: I17cae5c30906795451113ad3711b8285d69475b2
---
M manifests/misc/maintenance.pp
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 70b90a0..248952b 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -71,7 +71,7 @@
 cron { 'translationnotifications-metawiki':
 ensure  = $ensure,
 user= 'apache',
-command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki metawiki 
21  /var/log/mediawiki/translationnotifications/digests.log',
+command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki metawiki 
21  /var/log/translationnotifications/digests.log',
 weekday = 1, # Monday
 hour= 10,
 minute  = 0,
@@ -80,7 +80,7 @@
 cron { 'translationnotifications-mediawikiwiki':
 ensure  = $ensure,
 user= 'apache',
-command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki 
mediawikiwiki 21  /var/log/mediawiki/translationnotifications/digests.log',
+command = '/usr/local/bin/mwscript 
extensions/TranslationNotifications/scripts/DigestEmailer.php --wiki 
mediawikiwiki 21  /var/log/translationnotifications/digests.log',
 weekday = 1, # Monday
 hour= 10,
 minute  = 5,
@@ -114,7 +114,7 @@
 class misc::maintenance::echo_mail_batch( $ensure = present ) {
 cron { 'echo_mail_batch':
 ensure  = $ensure,
-command = '/usr/local/bin/foreachwikiindblist 
/srv/mediawiki/echowikis.dblist 
extensions/Echo/maintenance/processEchoEmailBatch.php 2/dev/null',
+command = '/usr/local/bin/foreachwikiindblist 
/srv/mediawiki/echowikis.dblist 
extensions/Echo/maintenance/processEchoEmailBatch.php /dev/null',
 user= 'apache',
 minute  = 0,
 hour= 0,
@@ -252,7 +252,7 @@
 minute  = 0,
 hour= 0,
 weekday = 1,
-command = '/usr/local/bin/characterEditStatsTranslate',
+command = '/usr/local/bin/characterEditStatsTranslate /dev/null',
 }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17cae5c30906795451113ad3711b8285d69475b2
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] puppetmaster: fix logrotate for cronspam - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: puppetmaster: fix logrotate for cronspam
..

puppetmaster: fix logrotate for cronspam

From the NIH department: we made our own logrotate for Apache, which was
(obviously) buggy and cronspammed. Copy from /etc/logrotate.d/apache2
instead.

Change-Id: Ic48e89ce8ce9fb6573b0ed1fc06a76c81642fbf8
---
M modules/puppetmaster/files/logrotate-passenger
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/modules/puppetmaster/files/logrotate-passenger 
b/modules/puppetmaster/files/logrotate-passenger
index 57f2daa..425692b 100644
--- a/modules/puppetmaster/files/logrotate-passenger
+++ b/modules/puppetmaster/files/logrotate-passenger
@@ -10,8 +10,16 @@
rotate 7
compress
delaycompress
+   create 640 root adm
sharedscripts
postrotate
-   /usr/sbin/service apache2 graceful
+if /etc/init.d/apache2 status  /dev/null ; then \
+/etc/init.d/apache2 reload  /dev/null; \
+fi;
+   endscript
+   prerotate
+   if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+   run-parts /etc/logrotate.d/httpd-prerotate; \
+   fi; \
endscript
 }

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

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

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


[MediaWiki-commits] [Gerrit] contint: fix qunit apache config syntax error - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: contint: fix qunit apache config syntax error
..

contint: fix qunit apache config syntax error

Change-Id: Iaa1b1ff4b65f666e4d0beb30b14bb9587c792a2c
---
M modules/contint/templates/apache/localvhost.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/180735/1

diff --git a/modules/contint/templates/apache/localvhost.erb 
b/modules/contint/templates/apache/localvhost.erb
index 900a6fa..7a7bc0a 100644
--- a/modules/contint/templates/apache/localvhost.erb
+++ b/modules/contint/templates/apache/localvhost.erb
@@ -30,6 +30,7 @@
 Directory /
IfVersion = 2.4
 Require all denied
+   /IfVersion
IfVersion  2.4
 Order deny,allow
 Deny from all

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

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

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


[MediaWiki-commits] [Gerrit] puppetmaster: fix logrotate for cronspam - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: puppetmaster: fix logrotate for cronspam
..


puppetmaster: fix logrotate for cronspam

From the NIH department: we made our own logrotate for Apache, which was
(obviously) buggy and cronspammed. Copy from /etc/logrotate.d/apache2
instead.

Change-Id: Ic48e89ce8ce9fb6573b0ed1fc06a76c81642fbf8
---
M modules/puppetmaster/files/logrotate-passenger
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/puppetmaster/files/logrotate-passenger 
b/modules/puppetmaster/files/logrotate-passenger
index 57f2daa..425692b 100644
--- a/modules/puppetmaster/files/logrotate-passenger
+++ b/modules/puppetmaster/files/logrotate-passenger
@@ -10,8 +10,16 @@
rotate 7
compress
delaycompress
+   create 640 root adm
sharedscripts
postrotate
-   /usr/sbin/service apache2 graceful
+if /etc/init.d/apache2 status  /dev/null ; then \
+/etc/init.d/apache2 reload  /dev/null; \
+fi;
+   endscript
+   prerotate
+   if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
+   run-parts /etc/logrotate.d/httpd-prerotate; \
+   fi; \
endscript
 }

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

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

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


[MediaWiki-commits] [Gerrit] contint: fix qunit apache config syntax error - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: contint: fix qunit apache config syntax error
..


contint: fix qunit apache config syntax error

Change-Id: Iaa1b1ff4b65f666e4d0beb30b14bb9587c792a2c
---
M modules/contint/templates/apache/localvhost.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/contint/templates/apache/localvhost.erb 
b/modules/contint/templates/apache/localvhost.erb
index 900a6fa..7a7bc0a 100644
--- a/modules/contint/templates/apache/localvhost.erb
+++ b/modules/contint/templates/apache/localvhost.erb
@@ -30,6 +30,7 @@
 Directory /
IfVersion = 2.4
 Require all denied
+   /IfVersion
IfVersion  2.4
 Order deny,allow
 Deny from all

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

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

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


[MediaWiki-commits] [Gerrit] Properly validate site ids in SpecialSetSiteLink - change (mediawiki...Wikibase)

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

Change subject: Properly validate site ids in SpecialSetSiteLink
..


Properly validate site ids in SpecialSetSiteLink

Using SiteLinkTargetProvider which the api also uses.

To prevent things like:
https://www.wikidata.org/w/index.php?diff=181731621

Change-Id: Iec23f779382dc8b719d8c82d89377f4663801255
---
R repo/includes/SiteLinkTargetProvider.php
M repo/includes/api/GetEntities.php
M repo/includes/api/LinkTitles.php
M repo/includes/api/ModifyEntity.php
M repo/includes/specials/SpecialSetSiteLink.php
R repo/tests/phpunit/includes/SiteLinkTargetProviderTest.php
6 files changed, 31 insertions(+), 8 deletions(-)

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



diff --git a/repo/includes/api/SiteLinkTargetProvider.php 
b/repo/includes/SiteLinkTargetProvider.php
similarity index 98%
rename from repo/includes/api/SiteLinkTargetProvider.php
rename to repo/includes/SiteLinkTargetProvider.php
index bf8205e..ff80e8c 100644
--- a/repo/includes/api/SiteLinkTargetProvider.php
+++ b/repo/includes/SiteLinkTargetProvider.php
@@ -1,6 +1,6 @@
 ?php
 
-namespace Wikibase\Api;
+namespace Wikibase\Repo;
 
 use Site;
 use SiteList;
diff --git a/repo/includes/api/GetEntities.php 
b/repo/includes/api/GetEntities.php
index 87c2505..eb7b1ba 100644
--- a/repo/includes/api/GetEntities.php
+++ b/repo/includes/api/GetEntities.php
@@ -11,6 +11,7 @@
 use Wikibase\Lib\Serializers\EntitySerializer;
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Store\UnresolvedRedirectException;
+use Wikibase\Repo\SiteLinkTargetProvider;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\StringNormalizer;
 use Wikibase\Utils;
diff --git a/repo/includes/api/LinkTitles.php b/repo/includes/api/LinkTitles.php
index 38bb600..deddd25 100644
--- a/repo/includes/api/LinkTitles.php
+++ b/repo/includes/api/LinkTitles.php
@@ -10,6 +10,7 @@
 use Wikibase\DataModel\SiteLink;
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Repo\WikibaseRepo;
+use Wikibase\Repo\SiteLinkTargetProvider;
 use Wikibase\Summary;
 
 /**
diff --git a/repo/includes/api/ModifyEntity.php 
b/repo/includes/api/ModifyEntity.php
index d0a07b3..908edf7 100644
--- a/repo/includes/api/ModifyEntity.php
+++ b/repo/includes/api/ModifyEntity.php
@@ -16,6 +16,7 @@
 use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\EntityRevision;
+use Wikibase\Repo\SiteLinkTargetProvider;
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use Wikibase\Lib\Store\StorageException;
diff --git a/repo/includes/specials/SpecialSetSiteLink.php 
b/repo/includes/specials/SpecialSetSiteLink.php
index 4cdcd9e..f1ad5ce 100644
--- a/repo/includes/specials/SpecialSetSiteLink.php
+++ b/repo/includes/specials/SpecialSetSiteLink.php
@@ -15,6 +15,7 @@
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Repo\WikibaseRepo;
+use Wikibase\Repo\SiteLinkTargetProvider;
 use Wikibase\Summary;
 
 /**
@@ -31,7 +32,7 @@
 *
 * @since 0.4
 *
-* @var string
+* @var string|null
 */
protected $site;
 
@@ -69,9 +70,19 @@
protected $badgeItems;
 
/**
+* @var string[]
+*/
+   protected $siteLinkGroups;
+
+   /**
 * @var SiteLinkChangeOpFactory
 */
protected $siteLinkChangeOpFactory;
+
+   /**
+* @var SiteLinkTargetProvider
+*/
+   protected $siteLinkTargetProvider;
 
/**
 * @since 0.4
@@ -85,8 +96,13 @@
$this-rightsUrl = $settings-getSetting( 'dataRightsUrl' );
$this-rightsText = $settings-getSetting( 'dataRightsText' );
$this-badgeItems = $settings-getSetting( 'badgeItems' );
+   $this-siteLinkGroups = $settings-getSetting( 'siteLinkGroups' 
);
 
$this-siteLinkChangeOpFactory = 
$wikibaseRepo-getChangeOpFactoryProvider()-getSiteLinkChangeOpFactory();
+   $this-siteLinkTargetProvider = new SiteLinkTargetProvider(
+   $this-siteStore,
+   $settings-getSetting( 'specialSiteLinkGroups' )
+   );
}
 
/**
@@ -115,7 +131,7 @@
$this-site = null;
}
 
-   if ( !$this-isValidSiteId( $this-site )  $this-site !== 
null ) {
+   if ( !$this-isValidSiteId( $this-site ) ) {
$this-showErrorHTML( $this-msg( 
'wikibase-setsitelink-invalid-site', $this-site )-parse() );
}
 
@@ -136,6 +152,10 @@
 */
protected function validateInput() {
$request = $this-getRequest();
+
+   if ( !$this-isValidSiteId( $this-site ) ) {
+   return false;
+   }
 
if ( 

[MediaWiki-commits] [Gerrit] Initial commit - change (mediawiki...Sentry)

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

Change subject: Initial commit
..


Initial commit

Bug: T1345
Change-Id: Ie101251b79b4c779d65c85e31281cf4c7a295ada
---
A .jshintignore
A .jshintrc
A Sentry.php
A SentryHooks.php
A i18n/en.json
A i18n/qqq.json
A resources/init.js
A resources/raven/raven.js
8 files changed, 1,994 insertions(+), 0 deletions(-)

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



diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..4877309
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+# external libraries
+resources/raven
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..9c9e801
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,8 @@
+{
+   browser: true,
+   jquery: true,
+   predef: [
+   mediaWiki,
+   Raven
+   ]
+}
diff --git a/Sentry.php b/Sentry.php
new file mode 100644
index 000..965b1e9
--- /dev/null
+++ b/Sentry.php
@@ -0,0 +1,51 @@
+?php
+
+$wgExtensionCredits['other'][] = array(
+   'path' = __FILE__,
+   'name' = 'Sentry',
+   'author' = 'Gergő Tisza',
+   'url' = 'https://www.mediawiki.org/wiki/Extension:Sentry',
+   'descriptionmsg' = 'sentry-desc',
+   'version'  = 0.1,
+   'license-name' = MIT,
+);
+
+$wgMessagesDirs['Sentry'] = __DIR__ . '/i18n';
+
+$wgAutoloadClasses['SentryHooks'] = __DIR__ . '/SentryHooks.php';
+
+$wgResourceModules += array(
+   'sentry' = array(
+   'scripts' = array(
+   'raven/raven.js',
+   'init.js',
+   ),
+   'position' = 'top',
+   'localBasePath' = __DIR__ . '/resources',
+   'remoteExtPath' = 'Sentry/resources',
+   ),
+);
+
+$wgHooks['ResourceLoaderGetConfigVars'][] = 
'SentryHooks::onResourceLoaderGetConfigVars';
+$wgHooks['BeforePageDisplay'][] = 'SentryHooks::onBeforePageDisplay';
+
+/**
+ * Sentry endpoint / API key
+ * @var string
+ */
+$wgSentryEndpoint = null;
+
+/**
+ * List of domains to log error from.
+ * '*' can be used as a wildcard; the wiki's own domain will be added 
automatically.
+ * Set to false to enable any domain.
+ * @var array|bool
+ */
+$wgSentryWhitelist = false;
+
+/**
+ * Log uncaught Javascript errors automatically.
+ * @var bool
+ */
+$wgSentryLogOnError = true;
+
diff --git a/SentryHooks.php b/SentryHooks.php
new file mode 100644
index 000..e19aec1
--- /dev/null
+++ b/SentryHooks.php
@@ -0,0 +1,31 @@
+?php
+
+class SentryHooks {
+   /**
+* @param array $vars
+* @return bool
+*/
+   public static function onResourceLoaderGetConfigVars( $vars ) {
+   global $wgSentryEndpoint, $wgSentryWhitelist, 
$wgSentryLogOnError;
+
+   $vars['wgSentry'] = array(
+   'endpoint' = $wgSentryEndpoint,
+   'whitelist' = $wgSentryWhitelist,
+   'logOnError' = $wgSentryLogOnError,
+   );
+
+   return true;
+   }
+
+   /**
+* @param OutputPage $out
+* @param Skin $skin
+* @return bool
+*/
+   public static function onBeforePageDisplay( $out, $skin ) {
+   $out-addModules( array( 'sentry' ) );
+
+   return true;
+   }
+}
+
diff --git a/i18n/en.json b/i18n/en.json
new file mode 100644
index 000..4dfceb5
--- /dev/null
+++ b/i18n/en.json
@@ -0,0 +1,4 @@
+{
+   sentry-desc: [https://getsentry.com/ Sentry] integration
+}
+
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..c6cb987
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,4 @@
+{
+   sentry-desc: {{desc}}
+}
+
diff --git a/resources/init.js b/resources/init.js
new file mode 100644
index 000..35a9223
--- /dev/null
+++ b/resources/init.js
@@ -0,0 +1,22 @@
+( function ( mw, Raven ) {
+   var config = mw.config.get( 'wgSentry' ),
+   options = {};
+
+   if ( config.whitelist ) {
+   options.whitelistUrls = config.whitelist.slice( 0 );
+   options.whitelistUrls.push( location.host );
+   }
+   options.collectWindowErrors = config.logOnError;
+   options.tags = {
+   version: mw.config.get( 'wgVersion' ),
+   debug: mw.config.get( 'debug' ),
+   skin: mw.config.get( 'skin' ),
+   action: mw.config.get( 'wgAction' ),
+   ns: mw.config.get( 'wgNamespaceNumber' ),
+   pageName: mw.config.get( 'wgPageName' ),
+   userGroups: mw.config.get( 'wgUserGroups' ),
+   language: mw.config.get( 'wgUserLanguage' )
+   };
+
+   Raven.config( config.endpoint, options ).install();
+} ) ( mediaWiki, Raven );
diff --git a/resources/raven/raven.js b/resources/raven/raven.js
new file mode 100644
index 000..2c37e3d
--- /dev/null
+++ b/resources/raven/raven.js
@@ -0,0 

[MediaWiki-commits] [Gerrit] Removed --no-cache from our nova commandline. - change (operations/puppet)

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

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

Change subject: Removed --no-cache from our nova commandline.
..

Removed --no-cache from our nova commandline.

That arg is no longer supported in icehouse.  This should fix
the puppet status field on wikitech.

Change-Id: I3b778ea0cf8a2945615cfc104c1b0341961e1be8
---
M modules/puppetmaster/lib/puppet/reports/labsstatus.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/180736/1

diff --git a/modules/puppetmaster/lib/puppet/reports/labsstatus.rb 
b/modules/puppetmaster/lib/puppet/reports/labsstatus.rb
index 60e1d6f..6562d86 100644
--- a/modules/puppetmaster/lib/puppet/reports/labsstatus.rb
+++ b/modules/puppetmaster/lib/puppet/reports/labsstatus.rb
@@ -12,7 +12,7 @@
 desc 'Record puppet status of labs instances in labs instance metadata'
 
 def addMeta(conf, project, host, key, value)
-command = /usr/bin/nova --no-cache --os-region-name 
#{conf['region']} --os-auth-url #{conf['auth_url']} --os-password 
#{conf['password']} --os-username #{conf['username']} --os-tenant-name 
#{project} meta #{host} set #{key}=#{value}
+command = /usr/bin/nova --os-region-name #{conf['region']} 
--os-auth-url #{conf['auth_url']} --os-password #{conf['password']} 
--os-username #{conf['username']} --os-tenant-name #{project} meta #{host} set 
#{key}=#{value}
 #system(echo trying \#{command}\  /var/log/labsstatus.log)
 
 stdin, stdout, stderr, wait_thr = Open3.popen3(command)

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

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

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


[MediaWiki-commits] [Gerrit] Make and X more message more flexible for translators - change (mediawiki...MultimediaViewer)

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

Change subject: Make and X more message more flexible for translators
..


Make and X more message more flexible for translators

Also make sure part of it is not a link to avoid two links
ending up next to each other + fix a small documentation bug.

Bug: T76465
Change-Id: I128ec7034b0bb9784fb78d1a5ce90d19848e
---
M MultimediaViewer.php
M i18n/en.json
M i18n/qqq.json
M resources/mmv/mmv.HtmlUtils.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
5 files changed, 12 insertions(+), 7 deletions(-)

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



diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index f69e4ae..f15ca8e 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -585,6 +585,7 @@
'multimediaviewer-credit',
'multimediaviewer-credit-fallback',
'multimediaviewer-multiple-authors',
+   'multimediaviewer-multiple-authors-combine',
 
'multimediaviewer-userpage-link',
 
diff --git a/i18n/en.json b/i18n/en.json
index 74d3c4e..9dfd345 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -15,7 +15,8 @@
multimediaviewer-userpage-link: {{GENDER:$2|Uploaded}} by $1,
multimediaviewer-credit: $1 - $2,
multimediaviewer-credit-fallback: View author information,
-   multimediaviewer-multiple-authors: and {{PLURAL:$1|one more 
author|$1 more authors}},
+   multimediaviewer-multiple-authors: {{PLURAL:$1|one more author|$1 
more authors}},
+   multimediaviewer-multiple-authors-combine: $1 and $2,
multimediaviewer-metadata-error: Error: Could not load image data. 
$1,
multimediaviewer-thumbnail-error: Error: Could not load thumbnail 
data. $1,
multimediaviewer-license-cc-by-1.0: CC BY 1.0,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 172e8cf..3bc72e2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -22,6 +22,7 @@
multimediaviewer-credit: Credit line for images. Parameters:\n* $1 - 
HTML describing the author\n* $2 - HTML describing the source\n\nNeither 
parameters are usernames, so GENDER is useless. Both come directly from the 
API, the extended metadata imageinfo prop in particular.\n\nThey will usually 
be derived from the HTML output from wikitext on a file description page - 
however, no complicated HTML, only links, will be allowed.\n\nSee also 
{{msg-mw|multimediaviewer-credit-fallback}},
multimediaviewer-credit-fallback: Text shown in place of the credit 
line ({{msg-mw|multimediaviewer-credit}}) when neither author nor source 
information is available.,
multimediaviewer-multiple-authors: Text shown after the author name 
when there are multiple authors. The text will link to the file description 
page.\n* $1 - number of additional authors.,
+   multimediaviewer-multiple-authors-combine: Combines the author name 
and the message about other authors.\n* $1 - author name, parsed from the file 
page\n* $2 - {{msg-mw|multimediaviewer-multiple-authors}} wrapped in a link.,
multimediaviewer-metadata-error: Text shown when the information on 
the metadata panel could not be loaded.\n\nParameters:\n* $1 - the error 
message (not localized)\nSee also:\n* 
{{msg-mw|Multimediaviewer-thumbnail-error}},
multimediaviewer-thumbnail-error: Text shown when the image could 
not be loaded. Parameters:\n* $1 - the error message (not localized)\nSee 
also:\n* {{msg-mw|Multimediaviewer-metadata-error}},
multimediaviewer-license-cc-by-1.0: Very short label for the 
Creative Commons Attribution license, version 1.0, used in a link to the file 
information page that has more licensing information.\n{{Identical|CC BY}},
diff --git a/resources/mmv/mmv.HtmlUtils.js b/resources/mmv/mmv.HtmlUtils.js
index d656a23..efb4465 100644
--- a/resources/mmv/mmv.HtmlUtils.js
+++ b/resources/mmv/mmv.HtmlUtils.js
@@ -164,7 +164,7 @@
// There are two possible implementations for this:
// 1) load innto a wrapper element and get its innerHTML;
// 2) use outerHTML.
-   // We go with 2) because it handles the case when a jQuery 
object contains something
+   // We go with 1) because it handles the case when a jQuery 
object contains something
// that is not an element (this can happen with e.g. 
$x.children() which returns text
// nodes as well).
return $( 'div' ).append( $el ).html();
diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index be6b403..1876566 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -505,19 +505,21 @@
 * @return {string} unsafe HTML
 */

[MediaWiki-commits] [Gerrit] Removed --no-cache from our nova commandline. - change (operations/puppet)

2014-12-18 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Removed --no-cache from our nova commandline.
..


Removed --no-cache from our nova commandline.

That arg is no longer supported in icehouse.  This should fix
the puppet status field on wikitech.

Change-Id: I3b778ea0cf8a2945615cfc104c1b0341961e1be8
---
M modules/puppetmaster/lib/puppet/reports/labsstatus.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/puppetmaster/lib/puppet/reports/labsstatus.rb 
b/modules/puppetmaster/lib/puppet/reports/labsstatus.rb
index 60e1d6f..6562d86 100644
--- a/modules/puppetmaster/lib/puppet/reports/labsstatus.rb
+++ b/modules/puppetmaster/lib/puppet/reports/labsstatus.rb
@@ -12,7 +12,7 @@
 desc 'Record puppet status of labs instances in labs instance metadata'
 
 def addMeta(conf, project, host, key, value)
-command = /usr/bin/nova --no-cache --os-region-name 
#{conf['region']} --os-auth-url #{conf['auth_url']} --os-password 
#{conf['password']} --os-username #{conf['username']} --os-tenant-name 
#{project} meta #{host} set #{key}=#{value}
+command = /usr/bin/nova --os-region-name #{conf['region']} 
--os-auth-url #{conf['auth_url']} --os-password #{conf['password']} 
--os-username #{conf['username']} --os-tenant-name #{project} meta #{host} set 
#{key}=#{value}
 #system(echo trying \#{command}\  /var/log/labsstatus.log)
 
 stdin, stdout, stderr, wait_thr = Open3.popen3(command)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b778ea0cf8a2945615cfc104c1b0341961e1be8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Implemented $.util.getDirectionality - change (mediawiki...Wikibase)

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

Change subject: Implemented $.util.getDirectionality
..


Implemented $.util.getDirectionality

By acting as an interface to ULS, the function allows move ULS specifics out of 
the *view widgets.

Change-Id: I987843e00c06e1c5d5b7b9c7b2f25d9801441017
---
M lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
M lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
M lib/resources/jquery.wikibase/resources.php
M repo/resources/Resources.php
A repo/resources/jquery/jquery.util.getDirectionality.js
A repo/resources/jquery/resources.php
A repo/tests/qunit/jquery/jquery.util.getDirectionality.tests.js
A repo/tests/qunit/jquery/resources.php
M repo/tests/qunit/resources.php
9 files changed, 198 insertions(+), 61 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
index eb91f78..8e00e8c 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.descriptionview.js
@@ -125,17 +125,13 @@
return;
}
 
-   var dir = ( $.uls  $.uls.data ) ?
-   $.uls.data.getDir( languageCode ) :
-   $( 'html' ).prop( 'dir' );
-
var $input = $( 'input /', {
// TODO: Inject correct placeholder via options
placeholder: mw.msg(

'wikibase-description-edit-placeholder-language-aware',
wb.getLanguageNameByCode( languageCode )
),
-   dir: dir
+   dir: $.util.getDirectionality( languageCode )
} )
.on( 'eachchange.' + this.widgetName, function( event ) {
self._trigger( 'change' );
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
index 4bfc1f4..01fd2c3 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.labelview.js
@@ -140,17 +140,13 @@
return;
}
 
-   var dir = ( $.uls  $.uls.data ) ?
-   $.uls.data.getDir( languageCode ) :
-   $( 'html' ).prop( 'dir' );
-
var $input = $( 'input /', {
// TODO: Inject correct placeholder via options
placeholder: mw.msg(

'wikibase-label-edit-placeholder-language-aware',
wb.getLanguageNameByCode( languageCode )
),
-   dir: dir
+   dir: $.util.getDirectionality( languageCode )
} )
.on( 'eachchange.' + this.widgetName, function( event ) {
self._trigger( 'change' );
diff --git a/lib/resources/jquery.wikibase/resources.php 
b/lib/resources/jquery.wikibase/resources.php
index 485447c..123cd74 100644
--- a/lib/resources/jquery.wikibase/resources.php
+++ b/lib/resources/jquery.wikibase/resources.php
@@ -125,6 +125,7 @@
'dependencies' = array(
'jquery.inputautoexpand',
'jquery.ui.TemplatedWidget',
+   'jquery.util.getDirectionality',
'jquery.wikibase.edittoolbar',
'jquery.wikibase.toolbarcontroller',
'wikibase.datamodel.Term',
@@ -258,6 +259,7 @@
),
'dependencies' = array(
'jquery.ui.TemplatedWidget',
+   'jquery.util.getDirectionality',
'jquery.wikibase.edittoolbar',
'jquery.wikibase.toolbarcontroller',
'wikibase.datamodel.Term',
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index e94d91d..3479485 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -25,30 +25,6 @@
 
$modules = array(
 
-   'jquery.removeClassByRegex' = $moduleTemplate + array(
-   'scripts' = array(
-   'jquery/jquery.removeClassByRegex.js',
-   ),
-   ),
-
-   'jquery.sticknode' = $moduleTemplate + array(
-   'scripts' = array(
-   'jquery/jquery.sticknode.js',
-   ),
-  

[MediaWiki-commits] [Gerrit] getDirectionality may return undefined - change (mediawiki...Wikibase)

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

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

Change subject: getDirectionality may return undefined
..

getDirectionality may return undefined

Either this or change the doc to @return {string|undefined}.

Change-Id: I043376d0676d82d9052ee98478024dbe9e6f3a5a
---
M repo/resources/jquery/jquery.util.getDirectionality.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/resources/jquery/jquery.util.getDirectionality.js 
b/repo/resources/jquery/jquery.util.getDirectionality.js
index 6a3a746..d2edc26 100644
--- a/repo/resources/jquery/jquery.util.getDirectionality.js
+++ b/repo/resources/jquery/jquery.util.getDirectionality.js
@@ -15,7 +15,7 @@
  */
 $.util.getDirectionality = function( languageCode ) {
var dir = $.uls  $.uls.data ? $.uls.data.getDir( languageCode ) : $( 
'html' ).prop( 'dir' );
-   return dir !== '' ? dir : 'auto';
+   return dir ? dir : 'auto';
 };
 
 }( jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I043376d0676d82d9052ee98478024dbe9e6f3a5a
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] Run structure tests on extensions - change (mediawiki/core)

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

Change subject: Run structure tests on extensions
..


Run structure tests on extensions

The tests in the structure PHPUnit testsuite are used to verify the
Autoloader, ResourceLoader definitions and some basic other tests.

They are not run by Jenkins for MediaWiki extensions since we invoke:

 phpunit.php --testsuite extensions

Add the structure directory to the 'extensions' testsuite.  That will
start enforcing them on all extensions, so need to be merged with care.

We will want to backport this patch on all release branches we support
and make sure they pass for all extensions/branches :-/

Bug: T78798
Change-Id: Icb88fb3f10d203cfcb61c36c9c92864b92d6739c
---
M tests/phpunit/suite.xml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml
index 574c11e..860408f 100644
--- a/tests/phpunit/suite.xml
+++ b/tests/phpunit/suite.xml
@@ -39,6 +39,7 @@
filesuites/UploadFromUrlTestSuite.php/file
/testsuite
testsuite name=extensions
+   directorystructure/directory
filesuites/ExtensionsTestSuite.php/file
filesuites/ExtensionsParserTestSuite.php/file
filesuites/LessTestSuite.php/file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb88fb3f10d203cfcb61c36c9c92864b92d6739c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
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] QA: update navigation test for rspec - change (mediawiki...MultimediaViewer)

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

Change subject: QA: update navigation test for rspec
..


QA: update navigation test for rspec

This should be pretty straightforward

* use RSpec3 expect() syntax
* prefer string to regex as argument to match() when appropriate
* use Selenium $browser.back instead of inline javascript

Change-Id: I2e214752224397859a00f11bf9acc5bdc7685464
---
M tests/browser/features/step_definitions/mmv_navigation_steps.rb
M tests/browser/features/step_definitions/mmv_steps.rb
2 files changed, 48 insertions(+), 48 deletions(-)

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



diff --git a/tests/browser/features/step_definitions/mmv_navigation_steps.rb 
b/tests/browser/features/step_definitions/mmv_navigation_steps.rb
index 68a569e..5d83e63 100644
--- a/tests/browser/features/step_definitions/mmv_navigation_steps.rb
+++ b/tests/browser/features/step_definitions/mmv_navigation_steps.rb
@@ -9,13 +9,13 @@
 end
 
 When /^I press the browser back button$/ do
-  on(E2ETestPage).execute_script(window.history.back(););
+  $browser.back
 end
 
 Then /^the image and metadata of the next image should appear$/ do
   on(E2ETestPage) do |page|
 # MMV was launched, article is not visible yet
-page.image1_in_article_element.should_not be_visible
+expect(page.image1_in_article_element).not_to be_visible
 check_elements_in_viewer_for_image3 page
   end
 end
@@ -23,7 +23,7 @@
 Then /^the image and metadata of the previous image should appear$/ do
   on(E2ETestPage) do |page|
 # MMV was launched, article is not visible yet
-page.image1_in_article_element.should_not be_visible
+expect(page.image1_in_article_element).not_to be_visible
 check_elements_in_viewer_for_image1 page
   end
 end
@@ -31,13 +31,13 @@
 Then /^the wiki article should be scrolled to the same position as before 
opening MMV$/ do
   on(E2ETestPage) do |page|
 @scrollDifference = page.execute_script(return $(window).scrollTop();) - 
@articleScrollTop
-@scrollDifference.abs.should be  2
+expect(@scrollDifference.abs).to be  2
   end
 end
 
 Then /^I should be navigated back to the original wiki article$/ do
   on(E2ETestPage) do |page|
-page.image1_in_article_element.should be_visible
-page.mmv_wrapper_element.should_not be_visible
+expect(page.image1_in_article_element).to be_visible
+expect(page.mmv_wrapper_element).not_to be_visible
   end
 end
\ No newline at end of file
diff --git a/tests/browser/features/step_definitions/mmv_steps.rb 
b/tests/browser/features/step_definitions/mmv_steps.rb
index 0a6e77e..bdd5817 100644
--- a/tests/browser/features/step_definitions/mmv_steps.rb
+++ b/tests/browser/features/step_definitions/mmv_steps.rb
@@ -55,97 +55,97 @@
 # while looking at image1 (Kerala)
 def check_elements_in_viewer_for_image1(page)
   # Check basic MMV elements are present
-  page.mmv_overlay_element.when_present.should be_visible
-  page.mmv_wrapper_element.when_present.should be_visible
-  page.mmv_image_div_element.should be_visible
+  expect(page.mmv_overlay_element.when_present).to be_visible
+  expect(page.mmv_wrapper_element.when_present).to be_visible
+  expect(page.mmv_image_div_element).to be_visible
 
   # Check image content
-  page.mmv_image_div_element.image_element.attribute('src').should match 
/Kerala/
+  expect(page.mmv_image_div_element.image_element.attribute('src')).to match 
/Kerala/
 
   # Check basic metadata is present
 
   # Title
-  page.mmv_metadata_title_element.when_present.text.should match /^Sunrise 
over fishing boats$/
+  expect(page.mmv_metadata_title_element.when_present.text).to match /^Sunrise 
over fishing boats$/
   # License
-  page.mmv_metadata_license_element.when_present.attribute('href').should 
match /^http:\/\/creativecommons\.org\/licenses\/by-sa\/3\.0$/
-  page.mmv_metadata_license_element.when_present.text.should match /CC BY-SA 
3.0/
+  expect(page.mmv_metadata_license_element.when_present.attribute('href')).to 
match /^http:\/\/creativecommons\.org\/licenses\/by-sa\/3\.0$/
+  expect(page.mmv_metadata_license_element.when_present.text).to match 'CC 
BY-SA 3.0'
   # Credit
-  page.mmv_metadata_credit_element.when_present.should be_visible
-  page.mmv_metadata_source_element.when_present.text.should match /Own work/
+  expect(page.mmv_metadata_credit_element.when_present).to be_visible
+  expect(page.mmv_metadata_source_element.when_present.text).to match 'Own 
work'
 
   # Image metadata
-  page.mmv_image_metadata_wrapper_element.when_present.should be_visible
+  expect(page.mmv_image_metadata_wrapper_element.when_present).to be_visible
   # Description
-  page.mmv_image_metadata_desc_element.when_present.text.should match /Sunrise 
over fishing boats on the beach south of Kovalam/
+  expect(page.mmv_image_metadata_desc_element.when_present.text).to match 
'Sunrise over fishing boats on the beach south of 

[MediaWiki-commits] [Gerrit] Hide inputs on preview - change (mediawiki...Flow)

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

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

Change subject: Hide inputs on preview
..

Hide inputs on preview

Fixes T78725
Bug: T78725

Change-Id: I17736bb28806e615660a7a55f930a60b6030fed3
---
M modules/styles/js.less
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/styles/js.less b/modules/styles/js.less
index 8766113..225b288 100644
--- a/modules/styles/js.less
+++ b/modules/styles/js.less
@@ -22,7 +22,7 @@
}
 
// API interaction indicator
-   div#content div#bodyContent  .flow-api-inprogress {
+   div#content div#bodyContent .flow-api-inprogress {
opacity: 0.5;
cursor: wait;
}
@@ -34,7 +34,7 @@
color: @colorRegressive;
}
 
-   div#content div#bodyContent  .flow-preview-target-hidden {
+   div#content div#bodyContent .flow-preview-target-hidden {
display: none;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17736bb28806e615660a7a55f930a60b6030fed3
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] Factor out EntityTermLookupBase - change (mediawiki...Wikibase)

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

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

Change subject: Factor out EntityTermLookupBase
..

Factor out EntityTermLookupBase

Change-Id: Icd364395285f3034b87306fd821968feaeaeb678
---
M lib/includes/Store/BufferingTermLookup.php
M lib/includes/store/EntityTermLookup.php
A lib/includes/store/EntityTermLookupBase.php
3 files changed, 116 insertions(+), 86 deletions(-)


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

diff --git a/lib/includes/Store/BufferingTermLookup.php 
b/lib/includes/Store/BufferingTermLookup.php
index 7ac2a4f..2030162 100644
--- a/lib/includes/Store/BufferingTermLookup.php
+++ b/lib/includes/Store/BufferingTermLookup.php
@@ -4,7 +4,7 @@
 
 use MapCacheLRU;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Lib\Store\EntityTermLookup;
+use Wikibase\Lib\Store\EntityTermLookupBase;
 use Wikibase\Lib\Store\StorageException;
 use Wikibase\Lib\Store\TermBuffer;
 use Wikibase\Term;
@@ -17,7 +17,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Kinzler
  */
-class BufferingTermLookup extends EntityTermLookup implements TermBuffer {
+class BufferingTermLookup extends EntityTermLookupBase implements TermBuffer {
 
/**
 * @var MapCacheLRU
@@ -25,12 +25,17 @@
private $buffer;
 
/**
+* @var TermIndex
+*/
+   private $termIndex;
+
+   /**
 * @param TermIndex $termIndex
 * @param int $bufferSize
 */
public function __construct( TermIndex $termIndex, $bufferSize = 1000 ) 
{
-   parent::__construct( $termIndex );
$this-buffer = new MapCacheLRU( $bufferSize );
+   $this-termIndex = $termIndex;
}
 
/**
diff --git a/lib/includes/store/EntityTermLookup.php 
b/lib/includes/store/EntityTermLookup.php
index e16ee24..52c6808 100644
--- a/lib/includes/store/EntityTermLookup.php
+++ b/lib/includes/store/EntityTermLookup.php
@@ -2,10 +2,7 @@
 
 namespace Wikibase\Lib\Store;
 
-use OutOfBoundsException;
-use string;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Term;
 use Wikibase\TermIndex;
 
 /**
@@ -15,80 +12,18 @@
  * @author Katie Filbert  aude.w...@gmail.com 
  * @author Daniel Kinzler
  */
-class EntityTermLookup implements TermLookup {
+class EntityTermLookup extends EntityTermLookupBase {
 
/**
 * @var TermIndex
 */
-   protected $termIndex;
+   private $termIndex;
 
/**
 * @param TermIndex $termIndex
 */
public function __construct( TermIndex $termIndex ) {
$this-termIndex = $termIndex;
-   }
-
-   /**
-* @see TermLookup::getLabel
-*
-* @param EntityId $entityId
-* @param string $languageCode
-*
-* @throws OutOfBoundsException if no label in that language is known
-* @return string
-*/
-   public function getLabel( EntityId $entityId, $languageCode ) {
-   $labels = $this-getLabels( $entityId, array( $languageCode ) );
-
-   if ( !isset( $labels[$languageCode] ) ) {
-   throw new OutOfBoundsException( 'No label found for 
language ' . $languageCode );
-   }
-
-   return $labels[$languageCode];
-   }
-
-   /**
-* @see TermLookup::getLabels
-*
-* @param EntityId $entityId
-* @param string[]|null $languageCodes The languages to get terms for; 
null means all languages.
-*
-* @return string[]
-*/
-   public function getLabels( EntityId $entityId, array $languageCodes = 
null ) {
-   return $this-getTermsOfType( $entityId, 'label', 
$languageCodes );
-   }
-
-   /**
-* @see TermLookup::getDescription
-*
-* @param EntityId $entityId
-* @param string $languageCode
-*
-* @throws OutOfBoundsException if no description in that language is 
known
-* @return string
-*/
-   public function getDescription( EntityId $entityId, $languageCode ) {
-   $descriptions = $this-getDescriptions( $entityId, array( 
$languageCode ) );
-
-   if ( !isset( $descriptions[$languageCode] ) ) {
-   throw new OutOfBoundsException( 'No description found 
for language ' . $languageCode );
-   }
-
-   return $descriptions[$languageCode];
-   }
-
-   /**
-* @see TermLookup::getDescriptions
-*
-* @param EntityId $entityId
-* @param string[]|null $languageCodes The languages to get terms for; 
null means all languages.
-*
-* @return string[]
-*/
-   public function getDescriptions( EntityId $entityId, array 
$languageCodes = null ) {
-   return $this-getTermsOfType( $entityId, 'description', 

[MediaWiki-commits] [Gerrit] MobileFrontend depends on VisualEditor - change (integration/config)

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

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

Change subject: MobileFrontend depends on VisualEditor
..

MobileFrontend depends on VisualEditor

It relies on resourceloader entries defined in VisualEditor.

Change-Id: I5659426e5130aca210a5ff9f1ce37cb033c132bb
---
M jjb/mediawiki-extensions.yaml
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 2d33204..cf43f9c 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -651,9 +651,9 @@
  - Minifier
  - MixedNamespaceSearchSuggestions
  - MobileApp:
-dependencies: 'MobileFrontend,Mantle'
+dependencies: 'MobileFrontend,Mantle,VisualEditor'
  - MobileFrontend:
-dependencies: 'Mantle'
+dependencies: 'Mantle,VisualEditor'
  - Model
  - MolHandler
  - MoodBar
@@ -991,7 +991,7 @@
  - WikiEditor
  - WikiForum
  - WikiGrok:
-dependencies: 'MobileFrontend,Mantle'
+dependencies: 'MobileFrontend,Mantle,VisualEditor'
  - wikihiero
  - WikiLexicalData
  - Wikilog
@@ -1017,9 +1017,9 @@
  - YotpoReviews
  - YouTube
  - ZeroBanner:
-dependencies: 'JsonConfig,MobileFrontend,Mantle'
+dependencies: 'JsonConfig,MobileFrontend,Mantle,VisualEditor'
  - ZeroPortal:
-dependencies: 'JsonConfig,MobileFrontend,Mantle,ZeroBanner'
+dependencies: 
'JsonConfig,MobileFrontend,Mantle,VisualEditor,ZeroBanner'
 
 mwbranch:
  - master

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5659426e5130aca210a5ff9f1ce37cb033c132bb
Gerrit-PatchSet: 1
Gerrit-Project: integration/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] add .gitreview - change (labs...wikicaptcha)

2014-12-18 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: add .gitreview
..

add .gitreview

Change-Id: I228278fff3292d9cbc9ea4310883d2b1cbeebb93
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikicaptcha 
refs/changes/41/180741/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..aa62df9
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=labs/tools/wikicaptcha.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I228278fff3292d9cbc9ea4310883d2b1cbeebb93
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikicaptcha
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa ricordisa...@openmailbox.org

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


[MediaWiki-commits] [Gerrit] Log Last-Modified header in performance logger - change (mediawiki...MultimediaViewer)

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

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

Change subject: Log Last-Modified header in performance logger
..

Log Last-Modified header in performance logger

Bug: T78767
Change-Id: If747453b32cbe1db7e307193609af9eaa2bdcc7d
---
M MultimediaViewer.php
M resources/mmv/logging/mmv.logging.PerformanceLogger.js
2 files changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index e421476..9af5c04 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -1063,7 +1063,7 @@
 $wgHooks['EventLoggingRegisterSchemas'][] = function( array $schemas ) {
$schemas += array(
'MediaViewer' = 10606177,
-   'MultimediaViewerNetworkPerformance' = 10596581,
+   'MultimediaViewerNetworkPerformance' = 10774577,
'MultimediaViewerDuration' = 10427980,
'MultimediaViewerAttribution' = 9758179,
'MultimediaViewerDimensions' = 10014238,
diff --git a/resources/mmv/logging/mmv.logging.PerformanceLogger.js 
b/resources/mmv/logging/mmv.logging.PerformanceLogger.js
index 2ac6e1b..df3fedd 100644
--- a/resources/mmv/logging/mmv.logging.PerformanceLogger.js
+++ b/resources/mmv/logging/mmv.logging.PerformanceLogger.js
@@ -185,7 +185,8 @@
contentLength,
xcache,
xvarnish,
-   varnishXCache;
+   varnishXCache,
+   lastModified;
 
if ( !request ) {
return;
@@ -223,6 +224,11 @@
}
 
stats.timestamp = new Date( request.getResponseHeader( 'Date' ) 
).getTime() / 1000;
+
+   lastModified = request.getResponseHeader( 'Last-Modified' );
+   if ( lastModified ) {
+   stats.lastModified = new Date( lastModified ).getTime() 
/ 1000;
+   }
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If747453b32cbe1db7e307193609af9eaa2bdcc7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.25wmf12
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Log Last-Modified header in performance logger - change (mediawiki...MultimediaViewer)

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

Change subject: Log Last-Modified header in performance logger
..


Log Last-Modified header in performance logger

Bug: T78767
Change-Id: If747453b32cbe1db7e307193609af9eaa2bdcc7d
---
M MultimediaViewer.php
M resources/mmv/logging/mmv.logging.PerformanceLogger.js
2 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index e421476..9af5c04 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -1063,7 +1063,7 @@
 $wgHooks['EventLoggingRegisterSchemas'][] = function( array $schemas ) {
$schemas += array(
'MediaViewer' = 10606177,
-   'MultimediaViewerNetworkPerformance' = 10596581,
+   'MultimediaViewerNetworkPerformance' = 10774577,
'MultimediaViewerDuration' = 10427980,
'MultimediaViewerAttribution' = 9758179,
'MultimediaViewerDimensions' = 10014238,
diff --git a/resources/mmv/logging/mmv.logging.PerformanceLogger.js 
b/resources/mmv/logging/mmv.logging.PerformanceLogger.js
index 2ac6e1b..df3fedd 100644
--- a/resources/mmv/logging/mmv.logging.PerformanceLogger.js
+++ b/resources/mmv/logging/mmv.logging.PerformanceLogger.js
@@ -185,7 +185,8 @@
contentLength,
xcache,
xvarnish,
-   varnishXCache;
+   varnishXCache,
+   lastModified;
 
if ( !request ) {
return;
@@ -223,6 +224,11 @@
}
 
stats.timestamp = new Date( request.getResponseHeader( 'Date' ) 
).getTime() / 1000;
+
+   lastModified = request.getResponseHeader( 'Last-Modified' );
+   if ( lastModified ) {
+   stats.lastModified = new Date( lastModified ).getTime() 
/ 1000;
+   }
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If747453b32cbe1db7e307193609af9eaa2bdcc7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.25wmf12
Gerrit-Owner: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Backport Last-Modified performance logging for Media Viewer - change (mediawiki/core)

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

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

Change subject: Backport Last-Modified performance logging for Media Viewer
..

Backport Last-Modified performance logging for Media Viewer

Bug: T78767
Change-Id: I33c0aa1a618c7d4b9fd1da3d285ed3e582c9fd9f
---
M extensions/MultimediaViewer
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/180743/1

diff --git a/extensions/MultimediaViewer b/extensions/MultimediaViewer
index 58b6aac..628dd8a 16
--- a/extensions/MultimediaViewer
+++ b/extensions/MultimediaViewer
-Subproject commit 58b6aac24cc9bc8516857929c2652ab12d481279
+Subproject commit 628dd8a8785408677b71524048463d78ffc65365

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33c0aa1a618c7d4b9fd1da3d285ed3e582c9fd9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf12
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update network performance schema queries - change (analytics/multimedia)

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

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

Change subject: Update network performance schema queries
..

Update network performance schema queries

Bug: T84852
Change-Id: I102bafd6519570129427f52248cc81f6630cbd07
---
M geoperf/template.sql
M perf/cache-miss-ratio.sql
M perf/template.sql
3 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia 
refs/changes/44/180744/1

diff --git a/geoperf/template.sql b/geoperf/template.sql
index 0ec307c..02424e1 100644
--- a/geoperf/template.sql
+++ b/geoperf/template.sql
@@ -24,4 +24,7 @@
 UNION ALL
 SELECT timestamp, event_total, event_country, event_type, wiki FROM 
MultimediaViewerNetworkPerformance_10596581
 WHERE %wiki% %metricwhere% AND timestamp  TIMESTAMP(CURDATE()) AND timestamp 
= TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 10 DAY)) AND event_total  20 AND 
event_country != ''
+UNION ALL
+SELECT timestamp, event_total, event_country, event_type, wiki FROM 
MultimediaViewerNetworkPerformance_10774577
+WHERE %wiki% %metricwhere% AND timestamp  TIMESTAMP(CURDATE()) AND timestamp 
= TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 10 DAY)) AND event_total  20 AND 
event_country != ''
 ) MultimediaViewerNetworkPerformanceUnioned GROUP BY country HAVING 
sample_size  10 ORDER BY mean ASC
\ No newline at end of file
diff --git a/perf/cache-miss-ratio.sql b/perf/cache-miss-ratio.sql
index b11a70e..ff1b7af 100644
--- a/perf/cache-miss-ratio.sql
+++ b/perf/cache-miss-ratio.sql
@@ -24,6 +24,18 @@
 event_type = 'image'
 AND LENGTH(event_XCache)  0
 AND timestamp BETWEEN TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 90 DAY)) 
AND TIMESTAMP(CURDATE())
+UNION ALL
+SELECT
+(event_varnish1hits = 0 AND event_varnish2hits = 0 AND 
event_varnish3hits = 0) miss,
+concat(substring(timestamp, 1, 4), '-', substring(timestamp, 5, 2), 
'-', substring(timestamp, 7, 2)) datestring
+FROM
+MultimediaViewerNetworkPerformance_10774577
+WHERE
+-- %wiki%
+event_type = 'image'
+AND LENGTH(event_XCache)  0
+AND timestamp BETWEEN TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 90 DAY)) 
AND TIMESTAMP(CURDATE())
+
 ) MultimediaViewerNetworkPerformanceUnioned
 GROUP BY datestring
 ORDER BY datestring ASC;
diff --git a/perf/template.sql b/perf/template.sql
index 5401fbe..191b230 100644
--- a/perf/template.sql
+++ b/perf/template.sql
@@ -2,6 +2,12 @@
 SELECT * FROM (SELECT concat(substring(timestamp, 1, 4), '-', 
substring(timestamp, 5, 2), '-', substring(timestamp, 7, 2)) AS datestring FROM 
(
 SELECT timestamp FROM MultimediaViewerNetworkPerformance_7917896
 WHERE timestamp  TIMESTAMP(CURDATE()) AND timestamp = 
TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY))
+UNION ALL
+SELECT timestamp FROM MultimediaViewerNetworkPerformance_10596581
+WHERE timestamp  TIMESTAMP(CURDATE()) AND timestamp = 
TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY))
+UNION ALL
+SELECT timestamp FROM MultimediaViewerNetworkPerformance_10774577
+WHERE timestamp  TIMESTAMP(CURDATE()) AND timestamp = 
TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY))
 ) AS MultimediaViewerNetworkPerformanceUnioned GROUP BY datestring ORDER BY 
datestring ASC) dates
 
 LEFT OUTER JOIN
@@ -30,4 +36,7 @@
 UNION ALL
 SELECT %metricfields% FROM MultimediaViewerNetworkPerformance_10596581
 WHERE %wiki% timestamp  TIMESTAMP(CURDATE()) AND timestamp = 
TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) AND event_total  20 AND 
%metricwhere%
+UNION ALL
+SELECT %metricfields% FROM MultimediaViewerNetworkPerformance_10774577
+WHERE %wiki% timestamp  TIMESTAMP(CURDATE()) AND timestamp = 
TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY)) AND event_total  20 AND 
%metricwhere%
 ) AS MultimediaViewerNetworkPerformanceUnioned GROUP BY datestring ORDER BY 
datestring ASC ) stats USING (datestring)
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I102bafd6519570129427f52248cc81f6630cbd07
Gerrit-PatchSet: 1
Gerrit-Project: analytics/multimedia
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Reset to InitialReview branch - change (mediawiki...Teahouse)

2014-12-18 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: Reset to InitialReview branch
..

Reset to InitialReview branch

Change-Id: I8f51a9fc607ec0559b9374f338ae3fe7965d39f2
Commit: 0f8b72bd17d81361cc4ae0c1b9338e4c87ba330d
CR: https://gerrit.wikimedia.org/r/#/c/170702/8
---
M Teahouse.php
M assets/MediaWiki_Gadget-teahouse-opt-in.wiki
M assets/MediaWiki_Gadgets-definition.partial.wiki
M assets/Template_Ask_your_question.wiki
M assets/Template_Question.wiki
D docs/README
A docs/wmfde.Teahouse.js
M gadgetize.json
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
A resources/mediawiki.teahouse.board.js
A resources/mediawiki.teahouse.css
R resources/mediawiki.teahouse.dialog.js
A resources/mediawiki.teahouse.gadget.development.js
A resources/mediawiki.teahouse.gadget.js
A resources/mediawiki.teahouse.js
R resources/mediawiki.teahouse.notifications.js
D resources/mediawiki.util.teahouse.board.js
D resources/mediawiki.util.teahouse.css
D resources/mediawiki.util.teahouse.gadget.development.js
D resources/mediawiki.util.teahouse.gadget.js
D resources/mediawiki.util.teahouse.gadget.test.js
D resources/mediawiki.util.teahouse.js
D resources/ui/dialog/Message.js
D resources/ui/dialog/Question.js
A resources/ui/dialogs/th.ui.MessageDialog.js
A resources/ui/dialogs/th.ui.QuestionDialog.js
28 files changed, 799 insertions(+), 996 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Teahouse 
refs/changes/45/180745/1

diff --git a/Teahouse.php b/Teahouse.php
index c913f94..c324c23 100644
--- a/Teahouse.php
+++ b/Teahouse.php
@@ -26,7 +26,7 @@
'Robert Vogel'
),
'url' = 'https://www.mediawiki.org/wiki/Extension:Teahouse',
-   'descriptionmsg' = 'teahouse-desc',
+   'description' = '',
'version'  = 1.24
 );
 
@@ -34,39 +34,36 @@
 
 $wgResourceModules['ext.teahouse'] = array(
'scripts' = array(
-   'mediawiki.util.teahouse.js',
-   'mediawiki.util.teahouse.board.js',
-   'mediawiki.util.teahouse.notifications.js',
-   'mediawiki.util.teahouse.dialog.js',
-   //'mediawiki.util.teahouse.gadget.js',
-   'mediawiki.util.teahouse.gadget.development.js'
+   'mediawiki.teahouse.js',
+   'mediawiki.teahouse.board.js',
+   'mediawiki.teahouse.notifications.js',
+   'mediawiki.teahouse.dialog.js',
+   //'mediawiki.teahouse.gadget.js',
+   'mediawiki.teahouse.gadget.development.js'
),
'styles' = array(
-   'mediawiki.util.teahouse.css'
+   'mediawiki.teahouse.css'
),
//This is just for development: The gadget's I18N is injected through 
the init-Method.
/*
'messages' = array(
-   'teahouse-button-text',
-   'teahouse-button-title',
-   'teahouse-dialog-title',
-   'teahouse-dialog-description-top',
-   'teahouse-dialog-label-summary',
-   'teahouse-dialog-label-text',
-   'teahouse-dialog-label-similar',
-   'teahouse-dialog-btn-ok',
-   'teahouse-dialog-btn-cancel',
-   'teahouse-dialog-licence-html',
-   'teahouse-dialog-anon-ip-hint-html',
-   'teahouse-dialog-msg-title-save',
-   'teahouse-dialog-msg-text-save',
-   'teahouse-dialog-msg-btn-yes',
-   'teahouse-dialog-msg-btn-no',
-   'teahouse-notifications-badge-title',
-   'teahouse-notifications-popup-title',
-   'teahouse-board-added-by-teahouse',
-   'teahouse-dialog-error-process,
-   'teahouse-dialog-error-details'
+   'th-button-text',
+   'th-button-title',
+   'th-dialog-title',
+   'th-dialog-description-top',
+   'th-dialog-label-summary',
+   'th-dialog-label-text',
+   'th-dialog-label-similar',
+   'th-dialog-btn-ok',
+   'th-dialog-btn-cancel',
+   'th-dialog-disclaimer',
+   'th-dialog-anon-ip-hint',
+   'th-dialog-msg-title-save',
+   'th-dialog-msg-text-save',
+   'th-dialog-msg-btn-yes',
+   'th-dialog-msg-btn-no',
+   'th-notifications-badge-title',
+   'th-notifications-popup-title'
),
*/
'localBasePath' = __DIR__.'/resources',
diff --git a/assets/MediaWiki_Gadget-teahouse-opt-in.wiki 
b/assets/MediaWiki_Gadget-teahouse-opt-in.wiki
index d26be63..24bc039 100644
--- a/assets/MediaWiki_Gadget-teahouse-opt-in.wiki
+++ b/assets/MediaWiki_Gadget-teahouse-opt-in.wiki
@@ -1 +1 @@
-[[Wikipedia:Teahouse|Wikipedia Teahouse]] OPT IN - Always display Ask your 
question link in personal tools
\ No 

[MediaWiki-commits] [Gerrit] Distinguish bacula Storage devices based on hostname - change (operations/puppet)

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

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

Change subject: Distinguish bacula Storage devices based on hostname
..

Distinguish bacula Storage devices based on hostname

We now got 2 Storage Daemons. To support them in bacula we need to
distinguish them by providing them with unique names. Prepend the
hostname in the identifier to achieve this. Amend the director to
actually point to itself for now as in our environment it is also a
Storage Daemon.

Change-Id: Ie8c1b7fe20638de53a1a70c7e0274e39de2b75eb
---
M manifests/role/backup.pp
M modules/bacula/templates/bacula-storage.erb
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/180746/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 57d770d..e311900 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -60,7 +60,7 @@
 # One pool for all
 bacula::director::pool { $pool:
 max_vols = 50,
-storage  = 'FileStorage1',
+storage  = ${::hostname}-FileStorage1,
 volume_retention = '180 days',
 label_fmt= $pool,
 max_vol_bytes= '536870912000',
@@ -69,14 +69,14 @@
 # Default pool needed internally by bacula
 bacula::director::pool { 'Default':
 max_vols = 1,
-storage  = 'FileStorage1',
+storage  = ${::hostname}-FileStorage1,
 volume_retention = '1800 days',
 }
 
 # Archive pool for long term archival.
 bacula::director::pool { 'Archive':
 max_vols = 5,
-storage  = 'FileStorage2',
+storage  = ${::hostname}-FileStorage2,
 volume_retention = '5 years',
 label_fmt= 'archive',
 max_vol_bytes= '536870912000',
diff --git a/modules/bacula/templates/bacula-storage.erb 
b/modules/bacula/templates/bacula-storage.erb
index 2032474..6c54293 100644
--- a/modules/bacula/templates/bacula-storage.erb
+++ b/modules/bacula/templates/bacula-storage.erb
@@ -1,7 +1,7 @@
 # This file has been autogenerated by puppet. Don't edit by hand
 
 Storage {
-Name = %= @name %
+Name = %= @hostname %-%= @name %
 Address = %= @fqdn %
 SDPort = %= @sd_port %
 Password = %= @directorpassword %

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8c1b7fe20638de53a1a70c7e0274e39de2b75eb
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] Distinguish bacula Storage devices based on hostname - change (operations/puppet)

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

Change subject: Distinguish bacula Storage devices based on hostname
..


Distinguish bacula Storage devices based on hostname

We now got 2 Storage Daemons. To support them in bacula we need to
distinguish them by providing them with unique names. Prepend the
hostname in the identifier to achieve this. Amend the director to
actually point to itself for now as in our environment it is also a
Storage Daemon.

Change-Id: Ie8c1b7fe20638de53a1a70c7e0274e39de2b75eb
---
M manifests/role/backup.pp
M modules/bacula/templates/bacula-storage.erb
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index 57d770d..e311900 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -60,7 +60,7 @@
 # One pool for all
 bacula::director::pool { $pool:
 max_vols = 50,
-storage  = 'FileStorage1',
+storage  = ${::hostname}-FileStorage1,
 volume_retention = '180 days',
 label_fmt= $pool,
 max_vol_bytes= '536870912000',
@@ -69,14 +69,14 @@
 # Default pool needed internally by bacula
 bacula::director::pool { 'Default':
 max_vols = 1,
-storage  = 'FileStorage1',
+storage  = ${::hostname}-FileStorage1,
 volume_retention = '1800 days',
 }
 
 # Archive pool for long term archival.
 bacula::director::pool { 'Archive':
 max_vols = 5,
-storage  = 'FileStorage2',
+storage  = ${::hostname}-FileStorage2,
 volume_retention = '5 years',
 label_fmt= 'archive',
 max_vol_bytes= '536870912000',
diff --git a/modules/bacula/templates/bacula-storage.erb 
b/modules/bacula/templates/bacula-storage.erb
index 2032474..6c54293 100644
--- a/modules/bacula/templates/bacula-storage.erb
+++ b/modules/bacula/templates/bacula-storage.erb
@@ -1,7 +1,7 @@
 # This file has been autogenerated by puppet. Don't edit by hand
 
 Storage {
-Name = %= @name %
+Name = %= @hostname %-%= @name %
 Address = %= @fqdn %
 SDPort = %= @sd_port %
 Password = %= @directorpassword %

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8c1b7fe20638de53a1a70c7e0274e39de2b75eb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] SPECIAL CODE REVIEW BRANCH/COMMIT - change (mediawiki...Teahouse)

2014-12-18 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: SPECIAL CODE REVIEW BRANCH/COMMIT
..


SPECIAL CODE REVIEW BRANCH/COMMIT

DO NOT MERGE

This branch is just for code review of the code base! This is not a
single change.

Patch Set 2:
* Implemented CR of Patch Set 1

Patch Set 3:
* changed 'th.ui.*' to 'mw.util.teahouse.ui.*'

Patch Set 5:
* Renamed all 'th-' prefixes to 'teahouse-'
* Moved everything to 'mw.util.teahouse.*'
* Renamed a files to reflect new 'mw.util.teahouse.*' structure
* Implemented better error handling for non standard API errors
* Added hint when the user has a url in his description text which may
  cause an error on save

Patch Set 6:
* Fixed issue introduced by renaming in Patch Set 5

Patch Set 7:
* Added more documentation
* Changed eligable rule from membership of autoconfirmed to editcount
  threshold
* Moved RL dependencies from code to Gadget-definition
* Added second parameter to question template

Patch Set 8:
* Saving editcount to cookie to reduce API calls
* Litte bugfix

Patch Set 9:
* Implemented CR comment: Now storing less explizit data in cookie (We
  could also use localStorage)
* Added length restriction validation for description text. Improvement of
  this should be part of future development.

Change-Id: I8c2d2ee1a34ffaf738599d7637f50af03b7653ae
---
M Teahouse.php
M assets/MediaWiki_Gadget-teahouse-opt-in.wiki
M assets/MediaWiki_Gadgets-definition.partial.wiki
M assets/Template_Ask_your_question.wiki
M assets/Template_Question.wiki
A docs/README
D docs/wmfde.Teahouse.js
M gadgetize.json
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
D resources/mediawiki.teahouse.board.js
D resources/mediawiki.teahouse.css
D resources/mediawiki.teahouse.gadget.development.js
D resources/mediawiki.teahouse.gadget.js
D resources/mediawiki.teahouse.js
A resources/mediawiki.util.teahouse.board.js
A resources/mediawiki.util.teahouse.css
R resources/mediawiki.util.teahouse.dialog.js
A resources/mediawiki.util.teahouse.gadget.development.js
A resources/mediawiki.util.teahouse.gadget.js
A resources/mediawiki.util.teahouse.gadget.test.js
A resources/mediawiki.util.teahouse.js
R resources/mediawiki.util.teahouse.notifications.js
A resources/ui/dialog/Message.js
A resources/ui/dialog/Question.js
D resources/ui/dialogs/th.ui.MessageDialog.js
D resources/ui/dialogs/th.ui.QuestionDialog.js
28 files changed, 996 insertions(+), 799 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/Teahouse.php b/Teahouse.php
index c324c23..c913f94 100644
--- a/Teahouse.php
+++ b/Teahouse.php
@@ -26,7 +26,7 @@
'Robert Vogel'
),
'url' = 'https://www.mediawiki.org/wiki/Extension:Teahouse',
-   'description' = '',
+   'descriptionmsg' = 'teahouse-desc',
'version'  = 1.24
 );
 
@@ -34,36 +34,39 @@
 
 $wgResourceModules['ext.teahouse'] = array(
'scripts' = array(
-   'mediawiki.teahouse.js',
-   'mediawiki.teahouse.board.js',
-   'mediawiki.teahouse.notifications.js',
-   'mediawiki.teahouse.dialog.js',
-   //'mediawiki.teahouse.gadget.js',
-   'mediawiki.teahouse.gadget.development.js'
+   'mediawiki.util.teahouse.js',
+   'mediawiki.util.teahouse.board.js',
+   'mediawiki.util.teahouse.notifications.js',
+   'mediawiki.util.teahouse.dialog.js',
+   //'mediawiki.util.teahouse.gadget.js',
+   'mediawiki.util.teahouse.gadget.development.js'
),
'styles' = array(
-   'mediawiki.teahouse.css'
+   'mediawiki.util.teahouse.css'
),
//This is just for development: The gadget's I18N is injected through 
the init-Method.
/*
'messages' = array(
-   'th-button-text',
-   'th-button-title',
-   'th-dialog-title',
-   'th-dialog-description-top',
-   'th-dialog-label-summary',
-   'th-dialog-label-text',
-   'th-dialog-label-similar',
-   'th-dialog-btn-ok',
-   'th-dialog-btn-cancel',
-   'th-dialog-disclaimer',
-   'th-dialog-anon-ip-hint',
-   'th-dialog-msg-title-save',
-   'th-dialog-msg-text-save',
-   'th-dialog-msg-btn-yes',
-   'th-dialog-msg-btn-no',
-   'th-notifications-badge-title',
-   'th-notifications-popup-title'
+   'teahouse-button-text',
+   'teahouse-button-title',
+   'teahouse-dialog-title',
+   'teahouse-dialog-description-top',
+   'teahouse-dialog-label-summary',
+   'teahouse-dialog-label-text',
+   'teahouse-dialog-label-similar',
+   'teahouse-dialog-btn-ok',
+   'teahouse-dialog-btn-cancel',
+  

[MediaWiki-commits] [Gerrit] Add autoload entry for ZeroPortal\\ConfigMerger - change (mediawiki...ZeroPortal)

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

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

Change subject: Add autoload entry for ZeroPortal\\ConfigMerger
..

Add autoload entry for ZeroPortal\\ConfigMerger

The MediaWiki core 'structure' test is complaining about the class
missing in $wgAutoloadClasses.

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


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

diff --git a/ZeroPortal.php b/ZeroPortal.php
index 5f7056b..270aa1f 100644
--- a/ZeroPortal.php
+++ b/ZeroPortal.php
@@ -46,6 +46,7 @@
   ) as $key = $class ) {
$wgAutoloadClasses['ZeroPortal\\' . ( is_string( $key ) ? $key : $class 
)] = $zpDir . $class . '.php';
 }
+$wgAutoloadClasses['ZeroPortal\\ConfigMerger'] = $zpDir . 
'PortalSpecialPage.php';
 unset( $zpDir );
 
 $wgResourceModules['zeroportal.config'] = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I671840cce8bb353e5ebb9b0c83524b71da0389bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
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 structure suite - change (mediawiki...MobileFrontend)

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

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

Change subject: Fix structure suite
..

Fix structure suite

The mobile.site and mobile.usermodule RL modules don't have the
desktop target while the modules that use them do, which causes the
structure test suite to fail.

Change-Id: Ifce458e31ad794750f7ba2719e1ef6a61836b44a
---
M includes/modules/MobileSiteModule.php
M includes/modules/MobileUserModule.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/modules/MobileSiteModule.php 
b/includes/modules/MobileSiteModule.php
index 4848179..e3cc71c 100644
--- a/includes/modules/MobileSiteModule.php
+++ b/includes/modules/MobileSiteModule.php
@@ -8,7 +8,7 @@
  */
 class MobileSiteModule extends ResourceLoaderSiteModule {
/** @var array Saves the target for the module (e.g. desktop and 
mobile). */
-   protected $targets = array( 'mobile' );
+   protected $targets = array( 'mobile', 'desktop' );
 
/**
 * Gets list of pages used by this module.
diff --git a/includes/modules/MobileUserModule.php 
b/includes/modules/MobileUserModule.php
index f3cb158..3e8e483 100644
--- a/includes/modules/MobileUserModule.php
+++ b/includes/modules/MobileUserModule.php
@@ -8,7 +8,7 @@
  */
 class MobileUserModule extends ResourceLoaderUserModule {
/** @var array Sets the target for the module (e.g. desktop and 
mobile). */
-   protected $targets = array( 'mobile' );
+   protected $targets = array( 'mobile', 'desktop' );
 
/**
 * Gets list of pages used by this module.

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

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

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


[MediaWiki-commits] [Gerrit] Monitor bacula director/sd processes - change (operations/puppet)

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

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

Change subject: Monitor bacula director/sd processes
..

Monitor bacula director/sd processes

Standard icinga nrpe checks

Change-Id: Ief9aa45b17d7275d1bcc83eac26e48933853c6d7
---
M manifests/role/backup.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/180749/1

diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index e311900..21abe58 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -225,6 +225,11 @@
 class { 'bacula::console':
 director   = $::fqdn,
 }
+
+nrpe::monitor_service { 'bacula_director':
+description  = 'bacula director process',
+nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
bacula -C bacula-dir,
+}
 }
 
 class role::backup::storage() {
@@ -280,4 +285,9 @@
 archive_device  = '/srv/baculasd2',
 max_concur_jobs = 2,
 }
+
+nrpe::monitor_service { 'bacula_sd':
+description  = 'bacula sd process',
+nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
bacula -C bacula-sd,
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief9aa45b17d7275d1bcc83eac26e48933853c6d7
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] Monitor bacula director/sd processes - change (operations/puppet)

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

Change subject: Monitor bacula director/sd processes
..


Monitor bacula director/sd processes

Standard icinga nrpe checks

Change-Id: Ief9aa45b17d7275d1bcc83eac26e48933853c6d7
---
M manifests/role/backup.pp
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/backup.pp b/manifests/role/backup.pp
index e311900..21abe58 100644
--- a/manifests/role/backup.pp
+++ b/manifests/role/backup.pp
@@ -225,6 +225,11 @@
 class { 'bacula::console':
 director   = $::fqdn,
 }
+
+nrpe::monitor_service { 'bacula_director':
+description  = 'bacula director process',
+nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
bacula -C bacula-dir,
+}
 }
 
 class role::backup::storage() {
@@ -280,4 +285,9 @@
 archive_device  = '/srv/baculasd2',
 max_concur_jobs = 2,
 }
+
+nrpe::monitor_service { 'bacula_sd':
+description  = 'bacula sd process',
+nrpe_command = /usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u 
bacula -C bacula-sd,
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief9aa45b17d7275d1bcc83eac26e48933853c6d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] admin: move access rights from ssmith to phuedx - change (operations/puppet)

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

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

Change subject: admin: move access rights from ssmith to phuedx
..

admin: move access rights from ssmith to phuedx

As requested by Sam.

Change-Id: I8f3a4d1754ba5b358b6fac056d2d0e2bb30da7b6
---
M modules/admin/data/data.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 6d43e84..1175d5a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -43,7 +43,7 @@
   gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, krinkle, 
manybubbles,
   maxsem, mattflaschen, marktraceur, milimetric, mlitn,
   nikerabbit, reedy, rmoen, robla, spage, ssastry, tomasz, yurik,
-  tgr, ssmith, bsimmers, ejegg, twentyafterfour, legoktm, catrope, qchris]
+  tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, qchris]
   restricted:
 gid: 706
 description: access to terbium, fluorine (private data) and bastion hosts
@@ -214,7 +214,7 @@
   halfak, dr0ptp4kt, qchris, tnegrin, ironholds,
   kleduc, nuria, haithams, otto, deskana,
   bsitzmann, dbrant, declerambaul, ellery, nettrom, leila,
-  ezachte, mforns, reedy, west1, ssmith]
+  ezachte, mforns, reedy, west1, phuedx]
   analytics-admins:
 gid: 732
 description: Admin access to analytics cluster.

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

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

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


[MediaWiki-commits] [Gerrit] admin: move access rights from ssmith to phuedx - change (operations/puppet)

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

Change subject: admin: move access rights from ssmith to phuedx
..


admin: move access rights from ssmith to phuedx

As requested by Sam.

Change-Id: I8f3a4d1754ba5b358b6fac056d2d0e2bb30da7b6
---
M modules/admin/data/data.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 6d43e84..1175d5a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -43,7 +43,7 @@
   gjg, gwicke, halfak, hashar, hoo, kaldari, kartik, khorn, krinkle, 
manybubbles,
   maxsem, mattflaschen, marktraceur, milimetric, mlitn,
   nikerabbit, reedy, rmoen, robla, spage, ssastry, tomasz, yurik,
-  tgr, ssmith, bsimmers, ejegg, twentyafterfour, legoktm, catrope, qchris]
+  tgr, phuedx, bsimmers, ejegg, twentyafterfour, legoktm, catrope, qchris]
   restricted:
 gid: 706
 description: access to terbium, fluorine (private data) and bastion hosts
@@ -214,7 +214,7 @@
   halfak, dr0ptp4kt, qchris, tnegrin, ironholds,
   kleduc, nuria, haithams, otto, deskana,
   bsitzmann, dbrant, declerambaul, ellery, nettrom, leila,
-  ezachte, mforns, reedy, west1, ssmith]
+  ezachte, mforns, reedy, west1, phuedx]
   analytics-admins:
 gid: 732
 description: Admin access to analytics cluster.

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

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

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


[MediaWiki-commits] [Gerrit] Fix structure suite - change (mediawiki...MobileFrontend)

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

Change subject: Fix structure suite
..


Fix structure suite

The mobile.site and mobile.usermodule RL modules don't have the
desktop target while the modules that use them do, which causes the
structure test suite to fail.

Change-Id: Ifce458e31ad794750f7ba2719e1ef6a61836b44a
---
M includes/modules/MobileSiteModule.php
M includes/modules/MobileUserModule.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/modules/MobileSiteModule.php 
b/includes/modules/MobileSiteModule.php
index 4848179..e3cc71c 100644
--- a/includes/modules/MobileSiteModule.php
+++ b/includes/modules/MobileSiteModule.php
@@ -8,7 +8,7 @@
  */
 class MobileSiteModule extends ResourceLoaderSiteModule {
/** @var array Saves the target for the module (e.g. desktop and 
mobile). */
-   protected $targets = array( 'mobile' );
+   protected $targets = array( 'mobile', 'desktop' );
 
/**
 * Gets list of pages used by this module.
diff --git a/includes/modules/MobileUserModule.php 
b/includes/modules/MobileUserModule.php
index f3cb158..3e8e483 100644
--- a/includes/modules/MobileUserModule.php
+++ b/includes/modules/MobileUserModule.php
@@ -8,7 +8,7 @@
  */
 class MobileUserModule extends ResourceLoaderUserModule {
/** @var array Sets the target for the module (e.g. desktop and 
mobile). */
-   protected $targets = array( 'mobile' );
+   protected $targets = array( 'mobile', 'desktop' );
 
/**
 * Gets list of pages used by this module.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifce458e31ad794750f7ba2719e1ef6a61836b44a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx g...@samsmith.io
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Jhernandez jhernan...@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 autoloader entries - change (mediawiki...AbuseFilter)

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

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

Change subject: Fix autoloader entries
..

Fix autoloader entries

Change-Id: I4b9996239fc5a3e6efd087db49566c95edd95a09
---
M AbuseFilter.php
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/51/180751/1

diff --git a/AbuseFilter.php b/AbuseFilter.php
index 7a81392..3b7de9b 100644
--- a/AbuseFilter.php
+++ b/AbuseFilter.php
@@ -32,24 +32,35 @@
 $wgAutoloadClasses['AbuseFilterParser'] = $dir/AbuseFilter.parser.php;
 $wgAutoloadClasses['AbuseFilterHooks'] = $dir/AbuseFilter.hooks.php;
 $wgAutoloadClasses['SpecialAbuseLog'] = $dir/special/SpecialAbuseLog.php;
+$wgAutoloadClasses['AbuseLogPager'] = $dir/special/SpecialAbuseLog.php;
 $wgAutoloadClasses['SpecialAbuseFilter'] = 
$dir/special/SpecialAbuseFilter.php;
 $wgAutoloadClasses['AbuseLogHitFormatter'] = $dir/AbuseLogHitFormatter.php;
 
 $wgAutoloadClasses['AbuseFilterViewList'] = 
$dir/Views/AbuseFilterViewList.php;
+$wgAutoloadClasses['AbuseFilterPager'] = $dir/Views/AbuseFilterViewList.php;
+$wgAutoloadClasses['GlobalAbuseFilterPager'] = 
$dir/Views/AbuseFilterViewList.php;
 $wgAutoloadClasses['AbuseFilterView'] = $dir/Views/AbuseFilterView.php;
 $wgAutoloadClasses['AbuseFilterViewEdit'] = 
$dir/Views/AbuseFilterViewEdit.php;
 $wgAutoloadClasses['AbuseFilterViewTools'] = 
$dir/Views/AbuseFilterViewTools.php;
 $wgAutoloadClasses['AbuseFilterViewHistory'] = 
$dir/Views/AbuseFilterViewHistory.php;
+$wgAutoloadClasses['AbuseFilterHistoryPager'] = 
$dir/Views/AbuseFilterViewHistory.php;
 $wgAutoloadClasses['AbuseFilterViewRevert'] = 
$dir/Views/AbuseFilterViewRevert.php;
 $wgAutoloadClasses['AbuseFilterViewTestBatch'] = 
$dir/Views/AbuseFilterViewTestBatch.php;
 $wgAutoloadClasses['AbuseFilterViewExamine'] = 
$dir/Views/AbuseFilterViewExamine.php;
-$wgAutoloadClasses['AbuseFilterChangesList'] = 
$dir/Views/AbuseFilterViewExamine.php;
+$wgAutoloadClasses['AbuseFilterExaminePager'] = 
$dir/Views/AbuseFilterViewExamine.php;
+$wgAutoloadClasses['AbuseFilterChangesList'] = 
$dir/Views/AbuseFilterView.php;
 $wgAutoloadClasses['AbuseFilterViewDiff'] = 
$dir/Views/AbuseFilterViewDiff.php;
+$wgAutoloadClasses['TableDiffFormatterFullContext'] = 
$dir/Views/AbuseFilterViewDiff.php;
 $wgAutoloadClasses['AbuseFilterViewImport'] = 
$dir/Views/AbuseFilterViewImport.php;
 
 $wgAutoloadClasses['AbuseFilterVariableHolder'] = 
$dir/AbuseFilterVariableHolder.php;
 $wgAutoloadClasses['AFComputedVariable'] = 
$dir/AbuseFilterVariableHolder.php;
 $wgAutoloadClasses['AFPData'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPException'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPParserState'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPRegexErrorHandler'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPToken'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPUserVisibleException'] = $dir/AbuseFilter.parser.php;
 
 $wgSpecialPages['AbuseLog'] = 'SpecialAbuseLog';
 $wgSpecialPages['AbuseFilter'] = 'SpecialAbuseFilter';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b9996239fc5a3e6efd087db49566c95edd95a09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
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] [WMF] New Package Version with various bugfixes - change (operations...hhvm)

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

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

Change subject: [WMF] New Package Version with various bugfixes
..

[WMF] New Package Version with various bugfixes

- Upgrade to 3.3.1
- Fix a serious memleak (backport from 3.4)
- Fix wddx serialization (Bug T75531)
- Fix build-dependency on libjpeg-dev (Bug T73413)
- Fix Time Zone info (Bug T74556)

Change-Id: I6ba5c2adb6b92d103cca4764f8ddcbc8e3504546
---
M debian/changelog
M debian/control
A debian/patches/fix_libboost_memleak.patch
A debian/patches/htmlencode_wddx_serialize_value.patch
M debian/patches/series
A debian/patches/use_system_TZinfo.patch
6 files changed, 891 insertions(+), 4 deletions(-)


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

diff --git a/debian/changelog b/debian/changelog
index 0902f1e..03533fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,14 @@
-hhvm (3.3.0+dfsg1-1+wm5) UNRELEASED; urgency=medium
+hhvm (3.3.1+dfsg1-1+wm1) UNRELEASED; urgency=medium
+
+  * Upgrade to 3.3.1
+  * Add a fix for a libbost memleak on trusty
+  * Add a fix for wddx serialization
+  * Make HHVM use the system tzinfo
+  * remove build-dep alternative for libjpeg62-dev which was confusing trusty
+
+ -- Giuseppe Lavagetto glavage...@wikimedia.org  Wed, 17 Dec 2014 10:46:22 
+0100
+
+hhvm (3.3.0+dfsg1-1+wm5) trusty-wikimedia; urgency=medium
 
   * Add EZC fixes from https://github.com/facebook/hhvm/pull/4330  
 
diff --git a/debian/control b/debian/control
index 1cff5b1..624acbb 100644
--- a/debian/control
+++ b/debian/control
@@ -36,7 +36,7 @@
   libicu-dev,
   libinotifytools0-dev,
   libjemalloc-dev,
-  libjpeg62-dev | libjpeg-dev,
+  libjpeg-dev,
   libjson-c-dev,
   libldap2-dev,
   liblz4-dev,
diff --git a/debian/patches/fix_libboost_memleak.patch 
b/debian/patches/fix_libboost_memleak.patch
new file mode 100644
index 000..1b705fd
--- /dev/null
+++ b/debian/patches/fix_libboost_memleak.patch
@@ -0,0 +1,69 @@
+From 12f44e0498189ab75dbdbdc64b76fbe4183af168 Mon Sep 17 00:00:00 2001
+From: Josh Watzman jwatz...@fb.com
+Date: Fri, 12 Dec 2014 14:34:06 -0800
+Subject: [PATCH] Work around leak in boost flat_set
+
+Summary: This is very likely to be the memory leak reported to be new in
+HHVM 3.4. See code comment and linked GitHub issue for full explanation.
+
+Fixes https://github.com/facebook/hhvm/issues/4268
+
+{sync, type=child, parent=internal, parentrevid=1736543, 
parentrevfbid=1584241511789266, parentdiffid=5935230}
+
+Reviewed By: @paulbiss
+
+Differential Revision: D1736543
+---
+ hphp/runtime/vm/jit/containers.h | 16 
+ 1 file changed, 16 insertions(+)
+
+diff --git a/hphp/runtime/base/smart-containers.h 
b/hphp/runtime/base/smart-containers.h
+index af5793b..e501991 100644
+--- a/hphp/runtime/base/smart-containers.h
 b/hphp/runtime/base/smart-containers.h
+@@ -26,8 +26,10 @@
+ #include unordered_map
+ #include unordered_set
+ #include vector
++#include set
+ 
+ #include boost/container/flat_map.hpp
++#include boost/version.hpp
+ #include limits
+ #include list
+ #include set
+diff --git a/hphp/runtime/vm/jit/containers.h 
b/hphp/runtime/vm/jit/containers.h
+index 0d65eba..2ebcd31 100644
+--- a/hphp/runtime/vm/jit/containers.h
 b/hphp/runtime/vm/jit/containers.h
+@@ -19,6 +19,8 @@
+ 
+ #include hphp/runtime/base/smart-containers.h
+ #include memory
++#include set
++#include boost/version.hpp
+ 
+ namespace HPHP {
+ namespace jit {
+@@ -51,7 +53,21 @@ templateclass T
+ using unique_ptr = std::unique_ptrT;
+ 
+ templateclass K, class Pred = std::lessK
++#if defined(BOOST_VERSION)  BOOST_VERSION  105100  BOOST_VERSION  105500
++// There's some leak in boost's flat_set that caused serious memory problems 
to
++// be reported externally: https://github.com/facebook/hhvm/issues/4268. The
++// bug looks to be https://svn.boost.org/trac/boost/ticket/9166 but it's not
++// totally clear. There were a ton of leaks fixed in 1.55 -- but FB is using
++// 1.51 internally and we aren't hitting the leak. So also unclear where it 
was
++// *introduced*. So for now just picking those two bounds; they may need to be
++// adjusted with future reports.
++//
++// It sounds like the leak might affect other boost containers as well, but we
++// only definitively observed it mattering for flat_set.
++using flat_set = std::setK, Pred;
++#else
+ using flat_set = boost::container::flat_setK, Pred;
++#endif
+ 
+ templateclass K, class V, class Pred = std::lessK
+ using flat_map = boost::container::flat_mapK,V,Pred;
diff --git a/debian/patches/htmlencode_wddx_serialize_value.patch 
b/debian/patches/htmlencode_wddx_serialize_value.patch
new file mode 100644
index 000..c068e38
--- /dev/null
+++ b/debian/patches/htmlencode_wddx_serialize_value.patch
@@ -0,0 +1,63 @@
+From 324701c9fd31beb4f070f1b7ef78b115fbdfec34 Mon Sep 17 00:00:00 2001
+From: Paul Bissonnette 

[MediaWiki-commits] [Gerrit] Make rollover state a link to topic history - change (mediawiki...Flow)

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

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

Change subject: Make rollover state a link to topic history
..

Make rollover state a link to topic history

We add a link to history behind post timestamps - this also adds one for the
link in the topic titlebar.

Bug: T77900
Change-Id: Iff8d51ecdae70e531baa46cd124c9176bc4bd102
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/flow_topic_titlebar_content.handlebars
3 files changed, 21 insertions(+), 15 deletions(-)


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

diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index f691efa..257ca08 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -73,11 +73,13 @@
 
'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-comments',((isset($in['reply_count'])  is_array($in)) 
? $in['reply_count'] : null)),Array()), 'encq').' bull;
 
-   '.((LCRun3::ifvar($cx, ((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null))) ? '
-   '.LCRun3::ch($cx, 'timestamp', 
Array(Array(((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null)),Array()), 'encq').'
-   ' : '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
-   ').'
+   a 
href='.htmlentities((string)((isset($in['links']['topic-history']['url'])  
is_array($in['links']['topic-history'])) ? $in['links']['topic-history']['url'] 
: null), ENT_QUOTES, 'UTF-8').' class=flow-timestamp-anchor
+   '.((LCRun3::ifvar($cx, ((isset($in['last_updated'])  
is_array($in)) ? $in['last_updated'] : null))) ? '
+   '.LCRun3::ch($cx, 'timestamp', 
Array(Array(((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null)),Array()), 'encq').'
+   ' : '
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   ').'
+   /a
 /div
 '.((LCRun3::ifvar($cx, ((isset($in['isModerated'])  is_array($in)) ? 
$in['isModerated'] : null))) ? '
div class=flow-moderated-topic-title 
flow-ui-text-truncated'.htmlentities((string)((isset($in['noop'])  
is_array($in)) ? $in['noop'] : null), ENT_QUOTES, 'UTF-8').''.LCRun3::p($cx, 
'flow_topic_moderation_flag', Array(Array($in),Array())).'
diff --git a/handlebars/compiled/flow_block_topiclist.handlebars.php 
b/handlebars/compiled/flow_block_topiclist.handlebars.php
index 9e87b2e..0d943d3 100644
--- a/handlebars/compiled/flow_block_topiclist.handlebars.php
+++ b/handlebars/compiled/flow_block_topiclist.handlebars.php
@@ -192,11 +192,13 @@
 
'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-comments',((isset($in['reply_count'])  is_array($in)) 
? $in['reply_count'] : null)),Array()), 'encq').' bull;
 
-   '.((LCRun3::ifvar($cx, ((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null))) ? '
-   '.LCRun3::ch($cx, 'timestamp', 
Array(Array(((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null)),Array()), 'encq').'
-   ' : '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
-   ').'
+   a 
href='.htmlentities((string)((isset($in['links']['topic-history']['url'])  
is_array($in['links']['topic-history'])) ? $in['links']['topic-history']['url'] 
: null), ENT_QUOTES, 'UTF-8').' class=flow-timestamp-anchor
+   '.((LCRun3::ifvar($cx, ((isset($in['last_updated'])  
is_array($in)) ? $in['last_updated'] : null))) ? '
+   '.LCRun3::ch($cx, 'timestamp', 
Array(Array(((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null)),Array()), 'encq').'
+   ' : '
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   ').'
+   /a
 /div
 '.((LCRun3::ifvar($cx, ((isset($in['isModerated'])  is_array($in)) ? 
$in['isModerated'] : null))) ? '
div class=flow-moderated-topic-title 
flow-ui-text-truncated'.htmlentities((string)((isset($in['noop'])  
is_array($in)) ? $in['noop'] : null), ENT_QUOTES, 'UTF-8').''.LCRun3::p($cx, 
'flow_topic_moderation_flag', Array(Array($in),Array())).'
diff --git a/handlebars/flow_topic_titlebar_content.handlebars 
b/handlebars/flow_topic_titlebar_content.handlebars
index f4a3f3d..9728468 100644
--- a/handlebars/flow_topic_titlebar_content.handlebars
+++ 

[MediaWiki-commits] [Gerrit] Make rollover state a link to topic history - change (mediawiki...Flow)

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

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

Change subject: Make rollover state a link to topic history
..

Make rollover state a link to topic history

We only linked to history after a post had been edited, this will now always
hide a link behind the timestamp, for a post.

Bug: T77900
Change-Id: I7a67df1ac8da35a6a6b8e65d925892c863ef8006
---
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_post_meta_actions.handlebars
4 files changed, 12 insertions(+), 4 deletions(-)


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

diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index e5f8b18..eaad122 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -117,7 +117,9 @@
 
span class=flow-post-timestamp
'.((LCRun3::ifvar($cx, ((isset($in['isOriginalContent'])  
is_array($in)) ? $in['isOriginalContent'] : null))) ? '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   a 
href='.htmlentities((string)((isset($in['links']['topic-history']['url'])  
is_array($in['links']['topic-history'])) ? $in['links']['topic-history']['url'] 
: null), ENT_QUOTES, 'UTF-8').' class=flow-timestamp-anchor
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   /a
' : '
span
'.LCRun3::hbch($cx, 'ifCond', 
Array(Array(((isset($in['creator']['name'])  is_array($in['creator'])) ? 
$in['creator']['name'] : null),'===',((isset($in['lastEditUser']['name'])  
is_array($in['lastEditUser'])) ? $in['lastEditUser']['name'] : null)),Array()), 
$in, function($cx, $in) {return '
diff --git a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
index f8f06f8..2376dec 100644
--- a/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
@@ -117,7 +117,9 @@
 
span class=flow-post-timestamp
'.((LCRun3::ifvar($cx, ((isset($in['isOriginalContent'])  
is_array($in)) ? $in['isOriginalContent'] : null))) ? '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   a 
href='.htmlentities((string)((isset($in['links']['topic-history']['url'])  
is_array($in['links']['topic-history'])) ? $in['links']['topic-history']['url'] 
: null), ENT_QUOTES, 'UTF-8').' class=flow-timestamp-anchor
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   /a
' : '
span
'.LCRun3::hbch($cx, 'ifCond', 
Array(Array(((isset($in['creator']['name'])  is_array($in['creator'])) ? 
$in['creator']['name'] : null),'===',((isset($in['lastEditUser']['name'])  
is_array($in['lastEditUser'])) ? $in['lastEditUser']['name'] : null)),Array()), 
$in, function($cx, $in) {return '
diff --git a/handlebars/compiled/flow_post.handlebars.php 
b/handlebars/compiled/flow_post.handlebars.php
index 932fcf3..1c7775c 100644
--- a/handlebars/compiled/flow_post.handlebars.php
+++ b/handlebars/compiled/flow_post.handlebars.php
@@ -95,7 +95,9 @@
 
span class=flow-post-timestamp
'.((LCRun3::ifvar($cx, ((isset($in['isOriginalContent'])  
is_array($in)) ? $in['isOriginalContent'] : null))) ? '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   a 
href='.htmlentities((string)((isset($in['links']['topic-history']['url'])  
is_array($in['links']['topic-history'])) ? $in['links']['topic-history']['url'] 
: null), ENT_QUOTES, 'UTF-8').' class=flow-timestamp-anchor
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   /a
' : '
span
'.LCRun3::hbch($cx, 'ifCond', 

[MediaWiki-commits] [Gerrit] JS-generated timestamps have no hover, only displays readabl... - change (mediawiki...Flow)

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

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

Change subject: JS-generated timestamps have no hover, only displays readable 
time
..

JS-generated timestamps have no hover, only displays readable time

Get rid of all time-ago-only hackery, which was likely a remnant of when
we did timestamps differently.

The only place time-ago-only was still in use was for auto-updating the
readable timestamp (so that when you're on a page, it keeps updating the
timestamp as time passes). Since we use a library for that, there's no
need to keep pushing that through .timestamp, which in that case returns
something way different (just readable timestamp) then it usually does
(full HTML for both readable  full timestamp)

CSS still assumed we only have 1 timestamp in no-JS when in fact we
generate both readable  full timestamp, so the hover-effect should work
there too.

Fixes T84858

Bug: T84858
Change-Id: I7abfddf3cecb7cd55fd55a164dabdf4480f0e83b
---
M handlebars/compiled/timestamp.handlebars.php
M handlebars/timestamp.handlebars
M includes/TemplateHelper.php
M modules/engine/components/board/base/flow-board-load-events.js
M modules/engine/misc/flow-handlebars.js
M modules/styles/board/timestamps.less
6 files changed, 23 insertions(+), 43 deletions(-)


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

diff --git a/handlebars/compiled/timestamp.handlebars.php 
b/handlebars/compiled/timestamp.handlebars.php
index 4c3c88a..e6c044d 100644
--- a/handlebars/compiled/timestamp.handlebars.php
+++ b/handlebars/compiled/timestamp.handlebars.php
@@ -24,7 +24,6 @@
time datetime='.htmlentities((string)((isset($in['time_iso'])  
is_array($in)) ? $in['time_iso'] : null), ENT_QUOTES, 'UTF-8').'
  class=flow-timestamp flow-load-interactive
  data-flow-load-handler=timestamp
- 
data-time-ago-only='.htmlentities((string)((isset($in['time_ago_only'])  
is_array($in)) ? $in['time_ago_only'] : null), ENT_QUOTES, 'UTF-8').'

 ').'
span 
class=flow-timestamp-user-formatted'.htmlentities((string)((isset($in['time_readable'])
  is_array($in)) ? $in['time_readable'] : null), ENT_QUOTES, 'UTF-8').'/span
diff --git a/handlebars/timestamp.handlebars b/handlebars/timestamp.handlebars
index 7415a0a..6531e89 100644
--- a/handlebars/timestamp.handlebars
+++ b/handlebars/timestamp.handlebars
@@ -4,7 +4,6 @@
time datetime={{time_iso}}
  class=flow-timestamp flow-load-interactive
  data-flow-load-handler=timestamp
- data-time-ago-only={{time_ago_only}}

 {{/if}}
span class=flow-timestamp-user-formatted{{time_readable}}/span
diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 53cb318..7ed19da 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -200,11 +200,10 @@
 * @throws WrongNumberArgumentsException
 */
static public function uuidTimestamp( array $args, array $named ) {
-   if ( count( $args )  1 || count( $args )  2 ) {
-   throw new WrongNumberArgumentsException( $args, 'one', 
'two' );
+   if ( count( $args ) !== 1 ) {
+   throw new WrongNumberArgumentsException( $args, 'one' );
}
$uuid = $args[0];
-   $timeAgoOnly = isset( $args[1] ) ? $args[1] : false;
 
$obj = UUID::create( $uuid );
if ( !$obj ) {
@@ -213,7 +212,7 @@
 
// timestamp helper expects ms timestamp
$timestamp = $obj-getTimestampObj()-getTimestamp() * 1000;
-   return self::timestamp( $timestamp, $timeAgoOnly );
+   return self::timestamp( $timestamp );
}
 
/**
@@ -233,12 +232,10 @@
}
 
/**
-* This server-side version of timestamp does not render time-ago.
 * @param integer $timestamp milliseconds since the unix epoch
-* @param boolean $timeAgoOnly true to return plaintext '5 hours ago'
 * @return string|false
 */
-   static protected function timestamp( $timestamp, $timeAgoOnly = false ) 
{
+   static protected function timestamp( $timestamp ) {
global $wgLang, $wgUser;
 
if ( !$timestamp ) {
@@ -249,16 +246,11 @@
$timestamp /= 1000;
$ts = new MWTimestamp( $timestamp );
 
-   if ( $timeAgoOnly ) {
-   return $ts-getHumanTimestamp();
-   }
-
return self::html( self::processTemplate(
'timestamp',
array(
'time_iso' = $timestamp,
'time_ago' = $ts-getHumanTimestamp(),
-   'time_ago_only' = $timeAgoOnly ? 1 : 

[MediaWiki-commits] [Gerrit] Fix autoloader entries - change (mediawiki...AbuseFilter)

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

Change subject: Fix autoloader entries
..


Fix autoloader entries

Change-Id: I4b9996239fc5a3e6efd087db49566c95edd95a09
---
M AbuseFilter.php
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/AbuseFilter.php b/AbuseFilter.php
index 7a81392..3b7de9b 100644
--- a/AbuseFilter.php
+++ b/AbuseFilter.php
@@ -32,24 +32,35 @@
 $wgAutoloadClasses['AbuseFilterParser'] = $dir/AbuseFilter.parser.php;
 $wgAutoloadClasses['AbuseFilterHooks'] = $dir/AbuseFilter.hooks.php;
 $wgAutoloadClasses['SpecialAbuseLog'] = $dir/special/SpecialAbuseLog.php;
+$wgAutoloadClasses['AbuseLogPager'] = $dir/special/SpecialAbuseLog.php;
 $wgAutoloadClasses['SpecialAbuseFilter'] = 
$dir/special/SpecialAbuseFilter.php;
 $wgAutoloadClasses['AbuseLogHitFormatter'] = $dir/AbuseLogHitFormatter.php;
 
 $wgAutoloadClasses['AbuseFilterViewList'] = 
$dir/Views/AbuseFilterViewList.php;
+$wgAutoloadClasses['AbuseFilterPager'] = $dir/Views/AbuseFilterViewList.php;
+$wgAutoloadClasses['GlobalAbuseFilterPager'] = 
$dir/Views/AbuseFilterViewList.php;
 $wgAutoloadClasses['AbuseFilterView'] = $dir/Views/AbuseFilterView.php;
 $wgAutoloadClasses['AbuseFilterViewEdit'] = 
$dir/Views/AbuseFilterViewEdit.php;
 $wgAutoloadClasses['AbuseFilterViewTools'] = 
$dir/Views/AbuseFilterViewTools.php;
 $wgAutoloadClasses['AbuseFilterViewHistory'] = 
$dir/Views/AbuseFilterViewHistory.php;
+$wgAutoloadClasses['AbuseFilterHistoryPager'] = 
$dir/Views/AbuseFilterViewHistory.php;
 $wgAutoloadClasses['AbuseFilterViewRevert'] = 
$dir/Views/AbuseFilterViewRevert.php;
 $wgAutoloadClasses['AbuseFilterViewTestBatch'] = 
$dir/Views/AbuseFilterViewTestBatch.php;
 $wgAutoloadClasses['AbuseFilterViewExamine'] = 
$dir/Views/AbuseFilterViewExamine.php;
-$wgAutoloadClasses['AbuseFilterChangesList'] = 
$dir/Views/AbuseFilterViewExamine.php;
+$wgAutoloadClasses['AbuseFilterExaminePager'] = 
$dir/Views/AbuseFilterViewExamine.php;
+$wgAutoloadClasses['AbuseFilterChangesList'] = 
$dir/Views/AbuseFilterView.php;
 $wgAutoloadClasses['AbuseFilterViewDiff'] = 
$dir/Views/AbuseFilterViewDiff.php;
+$wgAutoloadClasses['TableDiffFormatterFullContext'] = 
$dir/Views/AbuseFilterViewDiff.php;
 $wgAutoloadClasses['AbuseFilterViewImport'] = 
$dir/Views/AbuseFilterViewImport.php;
 
 $wgAutoloadClasses['AbuseFilterVariableHolder'] = 
$dir/AbuseFilterVariableHolder.php;
 $wgAutoloadClasses['AFComputedVariable'] = 
$dir/AbuseFilterVariableHolder.php;
 $wgAutoloadClasses['AFPData'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPException'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPParserState'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPRegexErrorHandler'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPToken'] = $dir/AbuseFilter.parser.php;
+$wgAutoloadClasses['AFPUserVisibleException'] = $dir/AbuseFilter.parser.php;
 
 $wgSpecialPages['AbuseLog'] = 'SpecialAbuseLog';
 $wgSpecialPages['AbuseFilter'] = 'SpecialAbuseFilter';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b9996239fc5a3e6efd087db49566c95edd95a09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: Se4598 se4...@gmx.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update autoload.php - change (mediawiki...Flow)

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

Change subject: Update autoload.php
..


Update autoload.php

`make autoload` had some changes

Change-Id: I2cc57394b33427227ef240065671783a2bea050a
---
M autoload.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/autoload.php b/autoload.php
index 1177875..4c5218c 100644
--- a/autoload.php
+++ b/autoload.php
@@ -280,6 +280,7 @@
'Flow\\Tests\\Api\\ApiTestCase' = __DIR__ . 
'/tests/phpunit/api/ApiTestCase.php',
'Flow\\Tests\\Api\\ApiWatchTopicTest' = __DIR__ . 
'/tests/phpunit/api/ApiWatchTopicTest.php',
'Flow\\Tests\\BlockFactoryTest' = __DIR__ . 
'/tests/phpunit/BlockFactoryTest.php',
+   'Flow\\Tests\\Block\\TopicListTest' = __DIR__ . 
'/tests/phpunit/Block/TopicListTest.php',
'Flow\\Tests\\BufferedBagOStuffTest' = __DIR__ . 
'/tests/phpunit/Data/BagOStuff/BufferedBagOStuffTest.php',
'Flow\\Tests\\BufferedCacheTest' = __DIR__ . 
'/tests/phpunit/Data/BufferedCacheTest.php',
'Flow\\Tests\\Collection\\PostCollectionTest' = __DIR__ . 
'/tests/phpunit/Collection/PostCollectionTest.php',
@@ -288,8 +289,8 @@
'Flow\\Tests\\Data\\CachingObjectManagerTest' = __DIR__ . 
'/tests/phpunit/Data/CachingObjectMapperTest.php',
'Flow\\Tests\\Data\\FlowNothingTest' = __DIR__ . 
'/tests/phpunit/Data/NothingTest.php',
'Flow\\Tests\\Data\\IndexTest' = __DIR__ . 
'/tests/phpunit/Data/IndexTest.php',
+   'Flow\\Tests\\Data\\Index\\FeatureIndexTest' = __DIR__ . 
'/tests/phpunit/Data/Index/FeatureIndexTest.php',
'Flow\\Tests\\Data\\Index\\MockFeatureIndex' = __DIR__ . 
'/tests/phpunit/Data/Index/FeatureIndexTest.php',
-   'Flow\\Tests\\Data\\Index\\UniqueFeatureIndexTests' = __DIR__ . 
'/tests/phpunit/Data/Index/FeatureIndexTest.php',
'Flow\\Tests\\Data\\Listener\\RecentChangesListenerTest' = __DIR__ . 
'/tests/phpunit/Data/Listener/RecentChangesListenerTest.php',
'Flow\\Tests\\Data\\ManagerGroupTest' = __DIR__ . 
'/tests/phpunit/Data/ManagerGroupTest.php',
'Flow\\Tests\\Data\\ObjectLocatorTest' = __DIR__ . 
'/tests/phpunit/Data/ObjectLocatorTest.php',
@@ -334,6 +335,7 @@
'Flow\\Tests\\Repository\\TreeRepositoryTest' = __DIR__ . 
'/tests/phpunit/Repository/TreeRepositoryTest.php',
'Flow\\Tests\\Repository\\TreeRepositorydbTest' = __DIR__ . 
'/tests/phpunit/Repository/TreeRepositoryDbTest.php',
'Flow\\Tests\\SpamFilter\\AbuseFilterTest' = __DIR__ . 
'/tests/phpunit/SpamFilter/AbuseFilterTest.php',
+   'Flow\\Tests\\SpamFilter\\ConfirmEditTest' = __DIR__ . 
'/tests/phpunit/SpamFilter/ConfirmEditTest.php',
'Flow\\Tests\\SpamFilter\\SpamBlacklistTest' = __DIR__ . 
'/tests/phpunit/SpamFilter/SpamBlacklistTest.php',
'Flow\\Tests\\SpamFilter\\SpamRegexTest' = __DIR__ . 
'/tests/phpunit/SpamFilter/SpamRegexTest.php',
'Flow\\Tests\\TemplateHelperTest' = __DIR__ . 
'/tests/phpunit/TemplateHelperTest.php',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cc57394b33427227ef240065671783a2bea050a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: SG shah...@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] Import new upstream version from git 1acdff3 - change (operations...carbon-c-relay)

2014-12-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: Import new upstream version from git 1acdff3
..

Import new upstream version from git 1acdff3

* Import new upstream version from git 1acdff3
  + udp listener support
  + misc bug fixes

Change-Id: I4e3d3362bca80394e8d76edc4f08bd08a6ae36b2
---
M debian/changelog
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/carbon-c-relay 
refs/changes/57/180757/1

diff --git a/debian/changelog b/debian/changelog
index c9a1f15..9984355 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+carbon-c-relay (0.36+git20141218-1) unstable; urgency=medium
+
+  * Import new upstream version from git 1acdff3
++ udp listener support
++ misc bug fixes
+
+ -- Filippo Giunchedi fili...@wikimedia.org  Thu, 18 Dec 2014 10:24:40 +
+
 carbon-c-relay (0.36-1) unstable; urgency=medium
 
   * Initial release. (Closes: #768983)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e3d3362bca80394e8d76edc4f08bd08a6ae36b2
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/carbon-c-relay
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update setupToolbar signature in mobile target - change (mediawiki...VisualEditor)

2014-12-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Update setupToolbar signature in mobile target
..

Update setupToolbar signature in mobile target

This method now takes arguments to make sure they are passed.

Change-Id: Ifba696c2a1b60690bdccd1b58d347c254dec5432
---
M modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
index 4d33392..a81b649 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
@@ -84,9 +84,9 @@
 /**
  * @inheritdoc
  */
-ve.init.mw.MobileViewTarget.prototype.setupToolbar = function () {
+ve.init.mw.MobileViewTarget.prototype.setupToolbar = function ( surface ) {
// Parent method
-   ve.init.mw.Target.prototype.setupToolbar.call( this );
+   ve.init.mw.Target.prototype.setupToolbar.call( this, surface );
 
this.toolbar.$element
// FIXME shouldn't be using viewPageTarget styles

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

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

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


[MediaWiki-commits] [Gerrit] Add tests for the Category class - change (pywikibot/core)

2014-12-18 Thread Unicodesnowman (Code Review)
Unicodesnowman has uploaded a new change for review.

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

Change subject: Add tests for the Category class
..

Add tests for the Category class

Move category-related tests from page_tests to the new
category_tests.py, implement tests for sortKey, categoryinfo,
members, subcategories and articles.

A very odd issue was found with subcategories() not returning
certain subcategories: T84860

Many of the tests introduced reference specific en.wikipedia
categories. They have been chosen for being the most likely
to remain stable - many of them date from 2004-2005 so the risk
should be low.

Bug: T78231
Change-Id: I6e42a3a0ccb9efc85abdd411ee8c35a44603dba0
---
A tests/category_tests.py
M tests/page_tests.py
2 files changed, 145 insertions(+), 25 deletions(-)


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

diff --git a/tests/category_tests.py b/tests/category_tests.py
new file mode 100644
index 000..8f35a20
--- /dev/null
+++ b/tests/category_tests.py
@@ -0,0 +1,145 @@
+# -*- coding: utf-8  -*-
+Tests for the Category class.
+#
+# (C) Pywikibot team, 2008-2014
+#
+# Distributed under the terms of the MIT license.
+#
+__version__ = '$Id$'
+
+import sys
+import pywikibot
+from pywikibot import InvalidTitle
+from pywikibot import config
+import pywikibot.page
+
+from tests.aspects import unittest, TestCase, DefaultSiteTestCase
+from tests.utils import allowed_failure
+
+if sys.version_info[0]  2:
+basestring = (str, )
+unicode = str
+
+class TestCategoryObject(TestCase):
+
+Test Category object.
+
+family = 'wikipedia'
+code = 'en'
+
+cached = True
+
+def test_isEmptyCategory(self):
+Test if category is empty or not.
+site = self.get_site()
+cat_empty = pywikibot.Category(site, u'Category:foo')
+cat_not_empty = pywikibot.Category(site, u'Category:Wikipedia 
categories')
+self.assertTrue(cat_empty.isEmptyCategory())
+self.assertFalse(cat_not_empty.isEmptyCategory())
+
+def test_isHiddenCategory(self):
+Test isHiddenCategory
+site = self.get_site()
+cat_hidden = pywikibot.Category(site, u'Category:Hidden categories')
+cat_not_hidden = pywikibot.Category(site, u'Category:Wikipedia 
categories')
+self.assertTrue(cat_hidden.isHiddenCategory())
+self.assertFalse(cat_not_hidden.isHiddenCategory())
+
+def test_sortKey(self):
+Test the sortKey attribute
+site = self.get_site()
+cat = pywikibot.Category(site, u'Category:Wikipedia categories', 
'Example')
+self.assertEqual(cat.aslink(), u'[[Category:Wikipedia 
categories|Example]]')
+self.assertEqual(cat.aslink(sortKey='Foo'), u'[[Category:Wikipedia 
categories|Foo]]')
+
+def test_categoryinfo(self):
+Test the categoryinfo property
+site = self.get_site()
+cat = pywikibot.Category(site, u'Category:Wikipedia categories')
+categoryinfo = cat.categoryinfo
+self.assertTrue(u'files' in categoryinfo)
+self.assertTrue(u'pages' in categoryinfo)
+self.assertTrue(u'size' in categoryinfo)
+self.assertTrue(u'subcats' in categoryinfo)
+
+def test_members(self):
+Test the members method
+site = self.get_site()
+cat = pywikibot.Category(site, u'Category:Wikipedia legal policies')
+p1 = pywikibot.Page(site, u'Category:Wikipedia disclaimers')
+p2 = pywikibot.Page(site, u'Wikipedia:Terms of use')
+p3 = pywikibot.Page(site, u'Wikipedia:Risk disclaimer')
+
+members = list(cat.members())
+self.assertIn(p1, members)
+self.assertIn(p2, members)
+self.assertNotIn(p3, members)
+
+members_recurse = list(cat.members(recurse=True))
+self.assertIn(p1, members_recurse)
+self.assertIn(p2, members_recurse)
+self.assertIn(p3, members_recurse)
+
+members_namespace = list(cat.members(namespaces=14))
+self.assertIn(p1, members_namespace)
+self.assertNotIn(p2, members_namespace)
+self.assertNotIn(p3, members_namespace)
+
+members_total = list(cat.members(total=2))
+self.assertEqual(len(members_total), 2)
+
+def test_subcategories(self):
+Test the subcategories method
+site = self.get_site()
+cat = pywikibot.Category(site, u'Category:Wikipedians by gender')
+c1 = pywikibot.Category(site, u'Category:Female Wikipedians')
+c2 = pywikibot.Category(site, u'Category:Lesbian Wikipedians')
+
+subcategories = list(cat.subcategories())
+self.assertIn(c1, subcategories)
+self.assertNotIn(c2, subcategories)
+
+subcategories_total = list(cat.subcategories(total=2))
+self.assertEqual(len(subcategories_total), 2)
+
+@allowed_failure
+def test_subcategories_recurse(self):
+Tests the 

[MediaWiki-commits] [Gerrit] MobileFrontend depends on Echo, VisualEditor - change (integration/config)

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

Change subject: MobileFrontend depends on Echo,VisualEditor
..


MobileFrontend depends on Echo,VisualEditor

It relies on resourceloader entries defined in VisualEditor.

Add a lame hack to update the VisualEditor submodule.

Change-Id: I5659426e5130aca210a5ff9f1ce37cb033c132bb
---
M jjb/mediawiki-extensions.yaml
1 file changed, 11 insertions(+), 5 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 2d33204..b9bd336 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -110,6 +110,12 @@
  - zuul-cloner:
  projects: 
  $(cat deps.txt)
+ # zuul-cloner should let us process submodules whenever needed
+ - shell: |
+ if [ ! $(grep mediawiki/extensions/VisualEditor deps.txt  /dev/null) 
]; then
+cd src/extensions/VisualEditor
+git submodule update --init
+ fi
 
 - builder:
 name: prepare-mediawiki
@@ -651,9 +657,9 @@
  - Minifier
  - MixedNamespaceSearchSuggestions
  - MobileApp:
-dependencies: 'MobileFrontend,Mantle'
+dependencies: 'Echo,MobileFrontend,Mantle,VisualEditor'
  - MobileFrontend:
-dependencies: 'Mantle'
+dependencies: 'Echo,Mantle,VisualEditor'
  - Model
  - MolHandler
  - MoodBar
@@ -991,7 +997,7 @@
  - WikiEditor
  - WikiForum
  - WikiGrok:
-dependencies: 'MobileFrontend,Mantle'
+dependencies: 'Echo,MobileFrontend,Mantle,VisualEditor'
  - wikihiero
  - WikiLexicalData
  - Wikilog
@@ -1017,9 +1023,9 @@
  - YotpoReviews
  - YouTube
  - ZeroBanner:
-dependencies: 'JsonConfig,MobileFrontend,Mantle'
+dependencies: 'Echo,JsonConfig,MobileFrontend,Mantle,VisualEditor'
  - ZeroPortal:
-dependencies: 'JsonConfig,MobileFrontend,Mantle,ZeroBanner'
+dependencies: 
'Echo,JsonConfig,MobileFrontend,Mantle,VisualEditor,ZeroBanner'
 
 mwbranch:
  - master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5659426e5130aca210a5ff9f1ce37cb033c132bb
Gerrit-PatchSet: 2
Gerrit-Project: integration/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] Add autoload entry for ZeroPortal\\ConfigMerger - change (mediawiki...ZeroPortal)

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

Change subject: Add autoload entry for ZeroPortal\\ConfigMerger
..


Add autoload entry for ZeroPortal\\ConfigMerger

The MediaWiki core 'structure' test is complaining about the class
missing in $wgAutoloadClasses.

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

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



diff --git a/ZeroPortal.php b/ZeroPortal.php
index 5f7056b..270aa1f 100644
--- a/ZeroPortal.php
+++ b/ZeroPortal.php
@@ -46,6 +46,7 @@
   ) as $key = $class ) {
$wgAutoloadClasses['ZeroPortal\\' . ( is_string( $key ) ? $key : $class 
)] = $zpDir . $class . '.php';
 }
+$wgAutoloadClasses['ZeroPortal\\ConfigMerger'] = $zpDir . 
'PortalSpecialPage.php';
 unset( $zpDir );
 
 $wgResourceModules['zeroportal.config'] = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I671840cce8bb353e5ebb9b0c83524b71da0389bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Yurik yu...@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] Rework and clean up badge related code - change (mediawiki...Wikibase)

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

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

Change subject: Rework and clean up badge related code
..

Rework and clean up badge related code

Change-Id: I268f60f5c9376016b7e8e982a4c2388da730f3c0
---
M lib/includes/serializers/SiteLinkSerializer.php
M repo/includes/ChangeOp/SiteLinkChangeOpFactory.php
M repo/includes/View/SiteLinksView.php
3 files changed, 33 insertions(+), 24 deletions(-)


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

diff --git a/lib/includes/serializers/SiteLinkSerializer.php 
b/lib/includes/serializers/SiteLinkSerializer.php
index 9773753..5f48885 100644
--- a/lib/includes/serializers/SiteLinkSerializer.php
+++ b/lib/includes/serializers/SiteLinkSerializer.php
@@ -87,11 +87,12 @@
}
 
if ( !$setRemoved ) {
-   $badges = array();
-
-   foreach ( $siteLink-getBadges() as $badge ) {
-   $badges[] = $badge-getSerialization();
-   }
+   $badges = array_map(
+   function( ItemId $id ) {
+   return $id-getSerialization();
+   },
+   $siteLink-getBadges()
+   );
 
if ( $this-options-shouldIndexTags() ) {
$this-setIndexedTagName( $badges, 
'badge' );
diff --git a/repo/includes/ChangeOp/SiteLinkChangeOpFactory.php 
b/repo/includes/ChangeOp/SiteLinkChangeOpFactory.php
index 66914f0..186fa79 100644
--- a/repo/includes/ChangeOp/SiteLinkChangeOpFactory.php
+++ b/repo/includes/ChangeOp/SiteLinkChangeOpFactory.php
@@ -3,6 +3,7 @@
 namespace Wikibase\ChangeOp;
 
 use InvalidArgumentException;
+use Wikibase\DataModel\Entity\ItemId;
 
 /**
  * Factory for ChangeOps that modify SiteLinks.
@@ -15,12 +16,12 @@
/**
 * @param string $siteId
 * @param string $pageName
-* @param array|null $badges
+* @param ItemId[]|null $badges
 *
 * @throws InvalidArgumentException
 * @return ChangeOp
 */
-   public function newSetSiteLinkOp( $siteId, $pageName, $badges = array() 
) {
+   public function newSetSiteLinkOp( $siteId, $pageName, $badges = null ) {
return new ChangeOpSiteLink( $siteId, $pageName, $badges );
}
 
diff --git a/repo/includes/View/SiteLinksView.php 
b/repo/includes/View/SiteLinksView.php
index ae1a932..d7fb2c9 100644
--- a/repo/includes/View/SiteLinksView.php
+++ b/repo/includes/View/SiteLinksView.php
@@ -7,9 +7,9 @@
 use Sanitizer;
 use Site;
 use SiteList;
-use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\SiteLink;
+use Wikibase\DataModel\Term\FingerprintProvider;
 use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Utils;
 
@@ -40,9 +40,9 @@
private $entityLookup;
 
/**
-* @var string
+* @var string[]
 */
-   private $languageCode;
+   private $badgeItems;
 
/**
 * @var string[]
@@ -50,10 +50,18 @@
private $specialSiteLinkGroups;
 
/**
-* @var array
+* @var string
 */
-   private $badgeItems;
+   private $languageCode;
 
+   /**
+* @param SiteList $sites
+* @param SectionEditLinkGenerator $sectionEditLinkGenerator
+* @param EntityLookup $entityLookup
+* @param string[] $badgeItems
+* @param string[] $specialSiteLinkGroups
+* @param string $languageCode
+*/
public function __construct(
SiteList $sites,
SectionEditLinkGenerator $sectionEditLinkGenerator,
@@ -317,7 +325,6 @@
private function getHtmlForBadges( SiteLink $siteLink ) {
$html = '';
 
-   /** @var ItemId $badge */
foreach ( $siteLink-getBadges() as $badge ) {
$serialization = $badge-getSerialization();
$classes = Sanitizer::escapeClass( $serialization );
@@ -339,22 +346,22 @@
 * Returns the title for the given badge id.
 * @todo use TermLookup when we have one
 *
-* @param EntityId $badgeId
+* @param ItemId $badgeId
 *
 * @return string
 */
-   private function getTitleForBadge( EntityId $badgeId ) {
-   $entity = $this-entityLookup-getEntity( $badgeId );
-   if ( $entity === null ) {
-   return $badgeId-getSerialization();
+   private function getTitleForBadge( ItemId $badgeId ) {
+   $badge = $this-entityLookup-getEntity( $badgeId );
+
+ 

[MediaWiki-commits] [Gerrit] Refactoring of ChangeOpSiteLink - change (mediawiki...Wikibase)

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

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

Change subject: Refactoring of ChangeOpSiteLink
..

Refactoring of ChangeOpSiteLink

Change-Id: I94006953ede551aa9b301fa4f02a2afe8383b223
---
M repo/includes/ChangeOp/ChangeOpSiteLink.php
1 file changed, 56 insertions(+), 104 deletions(-)


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

diff --git a/repo/includes/ChangeOp/ChangeOpSiteLink.php 
b/repo/includes/ChangeOp/ChangeOpSiteLink.php
index 0cbe137..0375186 100644
--- a/repo/includes/ChangeOp/ChangeOpSiteLink.php
+++ b/repo/includes/ChangeOp/ChangeOpSiteLink.php
@@ -7,7 +7,7 @@
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\SiteLink;
+use Wikibase\DataModel\SiteLinkList;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Summary;
 
@@ -19,40 +19,35 @@
  * @author Tobias Gritschacher  tobias.gritschac...@wikimedia.de 
  * @author Michał Łazowik
  * @author Bene*  benestar.wikime...@gmail.com 
+ * @author Thiemo Mättig
  */
 class ChangeOpSiteLink extends ChangeOpBase {
 
/**
-* @since 0.4
-*
 * @var string
 */
-   protected $siteId;
+   private $siteId;
 
/**
-* @since 0.4
-*
 * @var string|null
 */
-   protected $pageName;
+   private $pageName;
 
/**
-* @since 0.5
-*
 * @var ItemId[]|null
 */
-protected $badges;
+   private $badges;
 
/**
 * @since 0.4
 *
 * @param string $siteId
 * @param string|null $pageName Null to remove the sitelink (if $badges 
are also null)
-* @param array|null $badges Null for no-op
+* @param ItemId[]|null $badges Null for no-op
 *
 * @throws InvalidArgumentException
 */
-   public function __construct( $siteId, $pageName, $badges = null ) {
+   public function __construct( $siteId, $pageName, array $badges = null ) 
{
if ( !is_string( $siteId ) ) {
throw new InvalidArgumentException( '$siteId needs to 
be a string' );
}
@@ -61,14 +56,8 @@
throw new InvalidArgumentException( '$linkPage needs to 
be a string or null' );
}
 
-   if ( !is_array( $badges )  $badges !== null ) {
-   throw new InvalidArgumentException( '$badges need to be 
an array of ItemIds or null' );
-   }
-
if ( $badges !== null ) {
-   $this-validateBadges( $badges );
-
-   $badges = $this-removeDuplicateBadges( $badges );
+   $badges = $this-validateBadges( $badges );
}
 
$this-siteId = $siteId;
@@ -77,116 +66,80 @@
}
 
/**
-* @param array $badges
+* @param ItemId[] $badges
 *
 * @throws InvalidArgumentException
+* @return ItemId[]
 */
private function validateBadges( array $badges ) {
$badgeItems = 
WikibaseRepo::getDefaultInstance()-getSettings()-getSetting( 'badgeItems' );
+   $uniqueBadges = array();
 
-   foreach ( $badges as $badge ) {
-   if ( !( $badge instanceof ItemId ) ) {
-   throw new InvalidArgumentException( '$badge 
needs to be an ItemId' );
+   foreach ( $badges as $id ) {
+   if ( !( $id instanceof ItemId ) ) {
+   throw new InvalidArgumentException( '$badges 
needs to be an array of ItemId instances' );
}
 
-   if ( !array_key_exists( $badge-getSerialization(), 
$badgeItems ) ) {
-   throw new InvalidArgumentException( 'Only items 
specified in the config can be badges' );
+   if ( !array_key_exists( $id-getSerialization(), 
$badgeItems ) ) {
+   throw new InvalidArgumentException( 'Only items 
specified in the badgeItems setting can be badges' );
}
+
+   $uniqueBadges[$id-getSerialization()] = $id;
}
+
+   return array_values( $uniqueBadges );
}
 
/**
-* Removes duplicate badges from the array and returns the new list of 
badges.
-*
-* @param ItemId[] $badges
-*
-* @return ItemId[]
-*/
-   private function removeDuplicateBadges( array $badges ) {
-   $final = array();
-   foreach ( $badges as $badge ) {
-   if ( !$this-containsBadge( $final, $badge ) ) {
-   $final[] = $badge;
-   }
- 

[MediaWiki-commits] [Gerrit] Page linked by another user : link to the original article - change (mediawiki...Echo)

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

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

Change subject: Page linked by another user : link to the original article
..

Page linked by another user : link to the original article

Fixes T55647

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


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

diff --git a/i18n/en.json b/i18n/en.json
index 0056e5b..9d0b73a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -60,7 +60,7 @@
notification-edit-talk-page-flyout2: $1 {{GENDER:$1|left}} a message 
on your [[User talk:$2#$3|talk page]].,
notification-edit-talk-page-flyout-with-section: $1 
{{GENDER:$1|left}} a message on your talk page in \[[User talk:$2#$3|$4]]\.,
notification-page-linked: [[:$2]] was {{GENDER:$1|linked}} from 
[[:$3]]. [[Special:WhatLinksHere/$2|See all links to this page]].,
-   notification-page-linked-flyout: $2 was {{GENDER:$1|linked}} from 
[[:$3]].,
+   notification-page-linked-flyout: [[:$2]] was {{GENDER:$1|linked}} 
from [[:$3]].,
notification-add-comment2: [[User:$1|$1]] {{GENDER:$1|commented}} on 
\[[$3|$2]]\ on the \$4\ talk page.,
notification-add-talkpage-topic2: [[User:$1|$1]] 
{{GENDER:$1|posted}} a new topic \$2\ on [[$3]].,
notification-add-talkpage-topic-yours2: [[User:$1|$1]] 
{{GENDER:$1|sent}} you a message: \[[$3#$2|$2]]\.,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09c2cfdfe165a0df262848d9287ce2ff962b4b8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Hygiene: Move lockViewport to Browser.js - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Move lockViewport to Browser.js
..


Hygiene: Move lockViewport to Browser.js

Change-Id: I78f988731c21aba686fc3b89c4ae833920881669
---
M javascripts/application.js
M javascripts/browser.js
2 files changed, 21 insertions(+), 27 deletions(-)

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



diff --git a/javascripts/application.js b/javascripts/application.js
index 4c684c3..bf548fb 100644
--- a/javascripts/application.js
+++ b/javascripts/application.js
@@ -26,8 +26,7 @@
isIos8 = isIos  /OS 8_/.test( ua ) || /Version\/8/.test( ua ),
isIPhone4 = isIos  /OS 4_/.test( ua ),
isOldIPhone = isIos  /OS [4]_[0-2]|OS [3]_/.test( ua ),
-   isIPhone5 = isIos  /OS 5_/.test( ua ),
-   isAndroid2 = /Android 2/.test( ua );
+   isIPhone5 = isIos  /OS 5_/.test( ua );
 
/**
 * Escape dots and colons in a hash, jQuery doesn't like them beause 
they
@@ -41,16 +40,6 @@
 */
function escapeHash( hash ) {
return hash.replace( /(:|\.)/g, '\\$1' );
-   }
-
-   /**
-* Locks the viewport so that pinch zooming is disabled
-* FIXME: Move to Browser.js
-*
-* @method
-*/
-   function lockViewport() {
-   $viewportMeta.attr( 'content', 'initial-scale=1.0, 
maximum-scale=1.0, user-scalable=no' );
}
 
/**
@@ -131,7 +120,6 @@
// allow disabling of transitions in android ics 4.0.2
 
/**
-* Locks viewport and enables position fixed for Android 2
 * Works around iPhone 4 and 5 bugs with the viewport.
 *
 * FIXME: Move to Browser.js
@@ -141,18 +129,10 @@
function fixBrowserBugs() {
// see http://adactio.com/journal/4470/ (fixed in ios 6)
if ( $viewportMeta[0]  ( isIPhone4 || isIPhone5 ) ) {
-   lockViewport();
+   browser.lockViewport();
document.addEventListener( 'gesturestart', 
function () {
-   lockViewport();
+   browser.lockViewport();
}, false );
-   }
-
-   // FIXME: Android 2.x can act weird
-   // (remove if we drop support for some features on it)
-   if ( isAndroid2 ) {
-   $body.addClass( 'android2' );
-   // lock the viewport for this device - too 
problematic
-   lockViewport();
}
}
fixBrowserBugs();
@@ -292,8 +272,6 @@
inNamespace: inNamespace,
getCurrentPage: getCurrentPage,
getSessionId: getSessionId,
-   // FIXME: Move to browser.js
-   lockViewport: lockViewport,
log: log,
// FIXME: Move to browser.js
isIos: isIos,
diff --git a/javascripts/browser.js b/javascripts/browser.js
index ebb79ad..1b3d60d 100644
--- a/javascripts/browser.js
+++ b/javascripts/browser.js
@@ -5,12 +5,28 @@
 * Representation of user's current browser
 * @class Browser
 * @param {String} ua the user agent of the current browser
+* @param {jQuery.Object} $container an element to associate with the 
Browser object
 */
-   function Browser( ua ) {
+   function Browser( ua, $container ) {
this.userAgent  = ua;
+   this.$el = $container;
+
+   if ( this.isAndroid2() ) {
+   // lock the viewport for this device - too problematic
+   this.lockViewport();
+   }
}
 
Browser.prototype = {
+   /**
+* Locks the viewport so that pinch zooming is disabled
+*/
+   lockViewport: function () {
+   if ( this.$el ) {
+   this.$el.find( 'meta[name=viewport]' )
+   .attr( 'content', 'initial-scale=1.0, 
maximum-scale=1.0, user-scalable=no' );
+   }
+   },
/**
 * Determine if a device is Android 2.
 * @method
@@ -131,7 +147,7 @@
}
};
 
-   browser = new Browser( window.navigator.userAgent );
+   browser = new Browser( window.navigator.userAgent, $( 'html' ) );
M.define( 'Browser', Browser );
M.define( 'browser', browser );
 }( mw.mobileFrontend, jQuery ) );

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] sudo: move sudo-ldap Package from ldap to sudo - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: move sudo-ldap Package from ldap to sudo
..


sudo: move sudo-ldap Package from ldap to sudo

sudo-ldap is a sudo replacement, so it makes more sense semantically to
have it in the sudo module. Practically speaking, it also helps with
handling Package/sudoers dependencies, as it will soon become evident.

Change-Id: I98fa182c7b72088185860542d175bf66259d628e
---
M modules/ldap/manifests/client.pp
M modules/sudo/manifests/init.pp
2 files changed, 8 insertions(+), 11 deletions(-)

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



diff --git a/modules/ldap/manifests/client.pp b/modules/ldap/manifests/client.pp
index dea87f1..f8e3ab4 100644
--- a/modules/ldap/manifests/client.pp
+++ b/modules/ldap/manifests/client.pp
@@ -261,11 +261,7 @@
 }
 
 class ldap::client::sudo($ldapconfig) {
-if ! defined (Package['sudo-ldap']) {
-package { 'sudo-ldap':
-ensure = latest,
-}
-}
+require sudo
 
 # sudo-ldap.conf has always been a duplicate of /etc/ldap/ldap.conf.
 #  Make it official.
diff --git a/modules/sudo/manifests/init.pp b/modules/sudo/manifests/init.pp
index 4c8d98e..749567dd5 100644
--- a/modules/sudo/manifests/init.pp
+++ b/modules/sudo/manifests/init.pp
@@ -1,9 +1,10 @@
 class sudo {
-if $::realm == 'labs' {
-# We use sudo-ldap, defined elsewhere.
-} else {
-package { 'sudo':
-ensure = installed,
-}
+$package = $::realm ? {
+'labs'  = 'sudo-ldap',
+default = 'sudo',
+}
+
+package { $package:
+ensure = installed,
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98fa182c7b72088185860542d175bf66259d628e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update setupToolbar signature in mobile target - change (mediawiki...VisualEditor)

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

Change subject: Update setupToolbar signature in mobile target
..


Update setupToolbar signature in mobile target

This method now takes arguments to make sure they are passed.

Bug: T78710
Change-Id: Ifba696c2a1b60690bdccd1b58d347c254dec5432
---
M modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
index 4d33392..a81b649 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
@@ -84,9 +84,9 @@
 /**
  * @inheritdoc
  */
-ve.init.mw.MobileViewTarget.prototype.setupToolbar = function () {
+ve.init.mw.MobileViewTarget.prototype.setupToolbar = function ( surface ) {
// Parent method
-   ve.init.mw.Target.prototype.setupToolbar.call( this );
+   ve.init.mw.Target.prototype.setupToolbar.call( this, surface );
 
this.toolbar.$element
// FIXME shouldn't be using viewPageTarget styles

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifba696c2a1b60690bdccd1b58d347c254dec5432
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Alex Monk kren...@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: c5d9275..f49bbf7 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: c5d9275..f49bbf7
..


Syncronize VisualEditor: c5d9275..f49bbf7

Change-Id: I2524be1be51a1d218dcc57dc5ef0e63f0d8f3caa
---
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 c5d9275..f49bbf7 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c5d927552a709564548cb0df508d86bcc550c2b2
+Subproject commit f49bbf783ab68fd839725a4bee6454eea5255db4

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2524be1be51a1d218dcc57dc5ef0e63f0d8f3caa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c5d9275..f49bbf7 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: c5d9275..f49bbf7
..

Syncronize VisualEditor: c5d9275..f49bbf7

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


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

diff --git a/VisualEditor b/VisualEditor
index c5d9275..f49bbf7 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c5d927552a709564548cb0df508d86bcc550c2b2
+Subproject commit f49bbf783ab68fd839725a4bee6454eea5255db4

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2524be1be51a1d218dcc57dc5ef0e63f0d8f3caa
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] Fix typo in MobileContext - change (VisualEditor/VisualEditor)

2014-12-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Fix typo in MobileContext
..

Fix typo in MobileContext

Change-Id: I4c2ff743deb1865fafbbad0297236d24ee2a2fd1
---
M src/ui/ve.ui.MobileContext.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/65/180765/1

diff --git a/src/ui/ve.ui.MobileContext.js b/src/ui/ve.ui.MobileContext.js
index 963e361..233e00b 100644
--- a/src/ui/ve.ui.MobileContext.js
+++ b/src/ui/ve.ui.MobileContext.js
@@ -57,7 +57,7 @@
 /**
  * @inheritdoc
  */
-ve.ui.Context.prototype.createItem = function ( tool ) {
+ve.ui.MobileContext.prototype.createItem = function ( tool ) {
return new ve.ui.MobileContextOptionWidget(
tool.tool, tool.model, { $: this.$, data: tool.tool.static.name 
}
);

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

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

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


[MediaWiki-commits] [Gerrit] Change bugzilla - phabricator - change (mediawiki/core)

2014-12-18 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Change bugzilla - phabricator
..

Change bugzilla - phabricator

Bug: T84855
Change-Id: Ic71206f5c0c8b7c6c56a350a136eb3f0ae7bc229
---
M includes/api/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 52f7e33..23878da 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -1105,5 +1105,5 @@
api-help-right-apihighlimits: Use higher limits in API queries (slow 
queries: $1; fast queries: $2). The limits for slow queries also apply to 
multivalue parameters.,
 
api-credits-header: Credits,
-   api-credits: API developers:\n* Roan Kattouw (lead developer Sep 
2007–2009)\n* Victor Vasiliev\n* Bryan Tong Minh\n* Sam Reed\n* Yuri Astrakhan 
(creator, lead developer Sep 2006–Sep 2007)\n* Brad Jorsch (lead developer 
2013–present)\n\nPlease send your comments, suggestions and questions to 
mediawiki-...@lists.wikimedia.org\nor file a bug report at 
https://bugzilla.wikimedia.org/.;
+   api-credits: API developers:\n* Roan Kattouw (lead developer Sep 
2007–2009)\n* Victor Vasiliev\n* Bryan Tong Minh\n* Sam Reed\n* Yuri Astrakhan 
(creator, lead developer Sep 2006–Sep 2007)\n* Brad Jorsch (lead developer 
2013–present)\n\nPlease send your comments, suggestions and questions to 
mediawiki-...@lists.wikimedia.org\nor file a bug report at 
https://phabricator.wikimedia.org/.;
 }

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

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

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


[MediaWiki-commits] [Gerrit] Imported Upstream version 0.36+git1acdff3 - change (operations...carbon-c-relay)

2014-12-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: Imported Upstream version 0.36+git1acdff3
..

Imported Upstream version 0.36+git1acdff3

Change-Id: Ia850be88f3e7ffc8dcd23f1b13f04f14996e28e3
---
M README.md
A contrib/relay.conf
A contrib/relay.init
A contrib/relay.logrotate
A contrib/relay.monit
A contrib/relay.spec
A contrib/relay.sysconfig
M dispatcher.c
M dispatcher.h
M receptor.c
M receptor.h
M relay.c
M router.c
13 files changed, 442 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/carbon-c-relay 
refs/changes/56/180756/1

diff --git a/README.md b/README.md
index 4d670e5..bc612b9 100644
--- a/README.md
+++ b/README.md
@@ -28,8 +28,22 @@
 right destination(s).  The route file supports two main constructs:
 clusters and matches.  The first define groups of hosts data metrics can
 be sent to, the latter define which metrics should be sent to which
-cluster.  Aggregation rules are seen as matches.  The syntax in this
-file is as follows:
+cluster.  Aggregation rules are seen as matches.
+
+For every metric received by the relay, cleansing is performed.  The
+following changes are performed before any match, aggregate or rewrite
+rule sees the metric:
+
+  - double dot elimination (necessary for correctly functioning
+consistent hash routing)
+  - trailing/leading dot elimination
+  - whitespace normalisation (this mostly affects output of the relay
+to other targets: metric, value and timestamp will be separated by
+a single space only, ever)
+  - irregular char replacement with underscores (\_), currently
+irregular is defined as not being in [0-9a-zA-Z-_:#].
+
+The route file syntax is as follows:
 
 ```
 # comments are allowed in any place and start with a hash (#)
@@ -124,9 +138,11 @@
 final, as no new entries are allowed to be added any more.  On top of an
 aggregation multiple aggregations can be computed.  They can be of the
 same or different aggregation types, but should write to a unique new
-metric.  Produced metrics are sent to the relay as if they were
-submitted from the outside, hence match and aggregation rules apply to
-those.  Care should be taken that loops are avoided.  Also, since
+metric.  The metric names can include back references like in rewrite
+expressions, allowing for powerful single aggregation rules that yield
+in many aggregations.  Produced metrics are sent to the relay as if they
+were submitted from the outside, hence match and aggregation rules apply
+to those.  Care should be taken that loops are avoided.  Also, since
 aggregations appear as matches without `stop` keyword, their positioning
 matters in the same way ordering of match statements.
 
@@ -313,8 +329,8 @@
 e.g. for each hostname encountered.  A typical aggregation looks like:
 
 aggregate
-sys.dc1.somehost-[0-9]+.somecluster.mysql.replication_delay
-sys.dc2.somehost-[0-9]+.somecluster.mysql.replication_delay
+^sys\.dc1\.somehost-[0-9]+\.somecluster\.mysql\.replication_delay
+^sys\.dc2\.somehost-[0-9]+\.somecluster\.mysql\.replication_delay
 every 10 seconds
 expire after 35 seconds
 compute sum write to
@@ -350,6 +366,31 @@
 carbon-c-relay instance, such that it is easy to forward the produced
 metrics to another relay instance is a good practice.
 
+The previous example could also be written as follows to be more
+dynamic:
+
+aggregate
+^sys\.dc[0-9].(somehost-[0-9]+)\.([^.]+)\.mysql\.replication_delay
+every 10 seconds
+expire after 35 seconds
+compute sum write to
+mysql.host.\1.replication_delay
+compute sum write to
+mysql.host.all.replication_delay
+compute sum write to
+mysql.cluster.\2.replication_delay
+compute sum write to
+mysql.cluster.all.replication_delay
+;
+
+Here a single match, results in four aggregations, each of a different
+scope.  In this example aggregation based on hostname and cluster are
+being made, as well as the more general `all` targets, which in this
+example have both identical values.  Note that with this single
+aggregation rule, both per-cluster, per-host and total aggregations are
+produced.  Obviously, the input metrics define which hosts and clusters
+are produced.
+
 
 Author
 --
diff --git a/contrib/relay.conf b/contrib/relay.conf
new file mode 100644
index 000..a32242c
--- /dev/null
+++ b/contrib/relay.conf
@@ -0,0 +1,63 @@
+# comments are allowed in any place and start with a hash (#)
+#
+#cluster name
+#forward | any_of | carbon_ch | fnv1a_ch [replication count]
+#host[:port] [proto udp | tcp] ...
+#;
+#match * | expression
+#send to cluster | blackhole
+#[stop]
+#;
+#rewrite expression
+#into replacement
+#;
+#aggregate
+#

[MediaWiki-commits] [Gerrit] Import new upstream version from git 1acdff3 - change (operations...carbon-c-relay)

2014-12-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Import new upstream version from git 1acdff3
..


Import new upstream version from git 1acdff3

* Import new upstream version from git 1acdff3
  + udp listener support
  + misc bug fixes

Change-Id: I4e3d3362bca80394e8d76edc4f08bd08a6ae36b2
---
M debian/changelog
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved
  Faidon Liambotis: Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
index c9a1f15..9984355 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+carbon-c-relay (0.36+git20141218-1) unstable; urgency=medium
+
+  * Import new upstream version from git 1acdff3
++ udp listener support
++ misc bug fixes
+
+ -- Filippo Giunchedi fili...@wikimedia.org  Thu, 18 Dec 2014 10:24:40 +
+
 carbon-c-relay (0.36-1) unstable; urgency=medium
 
   * Initial release. (Closes: #768983)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e3d3362bca80394e8d76edc4f08bd08a6ae36b2
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/carbon-c-relay
Gerrit-Branch: master
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Imported Upstream version 0.36+git1acdff3 - change (operations...carbon-c-relay)

2014-12-18 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged.

Change subject: Imported Upstream version 0.36+git1acdff3
..


Imported Upstream version 0.36+git1acdff3

Change-Id: Ia850be88f3e7ffc8dcd23f1b13f04f14996e28e3
---
M README.md
A contrib/relay.conf
A contrib/relay.init
A contrib/relay.logrotate
A contrib/relay.monit
A contrib/relay.spec
A contrib/relay.sysconfig
M dispatcher.c
M dispatcher.h
M receptor.c
M receptor.h
M relay.c
M router.c
13 files changed, 442 insertions(+), 70 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index 4d670e5..bc612b9 100644
--- a/README.md
+++ b/README.md
@@ -28,8 +28,22 @@
 right destination(s).  The route file supports two main constructs:
 clusters and matches.  The first define groups of hosts data metrics can
 be sent to, the latter define which metrics should be sent to which
-cluster.  Aggregation rules are seen as matches.  The syntax in this
-file is as follows:
+cluster.  Aggregation rules are seen as matches.
+
+For every metric received by the relay, cleansing is performed.  The
+following changes are performed before any match, aggregate or rewrite
+rule sees the metric:
+
+  - double dot elimination (necessary for correctly functioning
+consistent hash routing)
+  - trailing/leading dot elimination
+  - whitespace normalisation (this mostly affects output of the relay
+to other targets: metric, value and timestamp will be separated by
+a single space only, ever)
+  - irregular char replacement with underscores (\_), currently
+irregular is defined as not being in [0-9a-zA-Z-_:#].
+
+The route file syntax is as follows:
 
 ```
 # comments are allowed in any place and start with a hash (#)
@@ -124,9 +138,11 @@
 final, as no new entries are allowed to be added any more.  On top of an
 aggregation multiple aggregations can be computed.  They can be of the
 same or different aggregation types, but should write to a unique new
-metric.  Produced metrics are sent to the relay as if they were
-submitted from the outside, hence match and aggregation rules apply to
-those.  Care should be taken that loops are avoided.  Also, since
+metric.  The metric names can include back references like in rewrite
+expressions, allowing for powerful single aggregation rules that yield
+in many aggregations.  Produced metrics are sent to the relay as if they
+were submitted from the outside, hence match and aggregation rules apply
+to those.  Care should be taken that loops are avoided.  Also, since
 aggregations appear as matches without `stop` keyword, their positioning
 matters in the same way ordering of match statements.
 
@@ -313,8 +329,8 @@
 e.g. for each hostname encountered.  A typical aggregation looks like:
 
 aggregate
-sys.dc1.somehost-[0-9]+.somecluster.mysql.replication_delay
-sys.dc2.somehost-[0-9]+.somecluster.mysql.replication_delay
+^sys\.dc1\.somehost-[0-9]+\.somecluster\.mysql\.replication_delay
+^sys\.dc2\.somehost-[0-9]+\.somecluster\.mysql\.replication_delay
 every 10 seconds
 expire after 35 seconds
 compute sum write to
@@ -350,6 +366,31 @@
 carbon-c-relay instance, such that it is easy to forward the produced
 metrics to another relay instance is a good practice.
 
+The previous example could also be written as follows to be more
+dynamic:
+
+aggregate
+^sys\.dc[0-9].(somehost-[0-9]+)\.([^.]+)\.mysql\.replication_delay
+every 10 seconds
+expire after 35 seconds
+compute sum write to
+mysql.host.\1.replication_delay
+compute sum write to
+mysql.host.all.replication_delay
+compute sum write to
+mysql.cluster.\2.replication_delay
+compute sum write to
+mysql.cluster.all.replication_delay
+;
+
+Here a single match, results in four aggregations, each of a different
+scope.  In this example aggregation based on hostname and cluster are
+being made, as well as the more general `all` targets, which in this
+example have both identical values.  Note that with this single
+aggregation rule, both per-cluster, per-host and total aggregations are
+produced.  Obviously, the input metrics define which hosts and clusters
+are produced.
+
 
 Author
 --
diff --git a/contrib/relay.conf b/contrib/relay.conf
new file mode 100644
index 000..a32242c
--- /dev/null
+++ b/contrib/relay.conf
@@ -0,0 +1,63 @@
+# comments are allowed in any place and start with a hash (#)
+#
+#cluster name
+#forward | any_of | carbon_ch | fnv1a_ch [replication count]
+#host[:port] [proto udp | tcp] ...
+#;
+#match * | expression
+#send to cluster | blackhole
+#[stop]
+#;
+#rewrite expression
+#into replacement
+#;
+#aggregate
+#expression ...
+#every interval seconds
+#expire after 

[MediaWiki-commits] [Gerrit] Hygiene: Move class name generation to browser.js - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Move class name generation to browser.js
..


Hygiene: Move class name generation to browser.js

* Apply all classes to the viewport tag rather than the body tag for consistency
* Include ipod in test for ios devices
* Remove ios class and replace it with overlay-ios
* Kill wgMFEnableCssAnimations

Change-Id: I9d1ff1725ba43956d1b7f1f9c2732ce9b2e80392
---
M MobileFrontend.php
M includes/skins/SkinMinerva.php
M javascripts/Overlay.js
M javascripts/application.js
M javascripts/browser.js
M javascripts/modules/editor/VisualEditorOverlay.js
M less/Overlay.less
7 files changed, 32 insertions(+), 35 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index cc96685..4e00d6e 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -450,12 +450,6 @@
 $wgMFLeadPhotoUploadCssSelector = 'img, .navbox';
 
 /**
- * Enable CSS animations in all browsers that support them
- * @var bool
- */
-$wgMFEnableCssAnimations = true;
-
-/**
  * DB key of the category which members will never display mobile view
  */
 $wgMFNoMobileCategory = false;
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 88479f9..ffea318 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -853,7 +853,6 @@
'wgMFAnonymousEditing' = $wgMFAnonymousEditing,
'wgMFPhotoUploadAppendToDesc' = 
$wgMFPhotoUploadAppendToDesc,
'wgMFLeadPhotoUploadCssSelector' = 
$wgMFLeadPhotoUploadCssSelector,
-   'wgMFEnableCssAnimations' = $wgMFEnableCssAnimations,
'wgMFPhotoUploadEndpoint' = $wgMFPhotoUploadEndpoint ? 
$wgMFPhotoUploadEndpoint : '',
'wgPreferredVariant' = 
$title-getPageLanguage()-getPreferredVariant(),
// FIXME: Kill variable in favour of $wgRestrictionEdit
diff --git a/javascripts/Overlay.js b/javascripts/Overlay.js
index 7279fd7..2ad8a4f 100644
--- a/javascripts/Overlay.js
+++ b/javascripts/Overlay.js
@@ -5,6 +5,7 @@
View = M.require( 'View' ),
Icon = M.require( 'Icon' ),
icons = M.require( 'icons' ),
+   browser = M.require( 'browser' ),
$window = $( window ),
Overlay;
 
@@ -81,12 +82,20 @@
closeOnContentTap: false,
 
/** @inheritdoc */
+   initialize: function ( options ) {
+   this.isIos = browser.isIos();
+   View.prototype.initialize.apply( this, arguments );
+   },
+   /** @inheritdoc */
postRender: function ( options ) {
var
self = this,
$overlayContent = this.$overlayContent = 
this.$( '.overlay-content' ),
startY;
 
+   if ( this.isIos ) {
+   this.$el.addClass( 'overlay-ios' );
+   }
// Truncate any text inside in the overlay header.
this.$( '.overlay-header h2 span' ).addClass( 
'truncated-text' );
// FIXME: Remove .initial-header selector when bug 
71203 resolved.
@@ -105,7 +114,7 @@
ev.stopPropagation();
} );
 
-   if ( M.isIos  this.hasFixedHeader ) {
+   if ( this.isIos  this.hasFixedHeader ) {
$overlayContent
.on( 'touchstart', function ( ev ) {
startY = 
ev.originalEvent.touches[0].pageY;
@@ -169,7 +178,7 @@
}
 
// prevent scrolling and bouncing outside of 
.overlay-content
-   if ( M.isIos  this.hasFixedHeader ) {
+   if ( this.isIos  this.hasFixedHeader ) {
$window
.on( 'touchmove.ios', function ( ev ) {
ev.preventDefault();
@@ -200,7 +209,7 @@
 
this.$el.detach();
 
-   if ( M.isIos ) {
+   if ( this.isIos ) {
$window.off( '.ios' );
}
 
@@ -230,7 +239,7 @@
_fixIosHeader: function ( el ) {
var self = this;
 
-   if ( M.isIos ) {
+   if ( this.isIos ) {
this._resizeContent( $( window ).height() );
$( el )
   

[MediaWiki-commits] [Gerrit] Stop installing Package['sudo-ldap'] - change (labs/private)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Stop installing Package['sudo-ldap']
..

Stop installing Package['sudo-ldap']

Installing packages from the private repository is very
counter-intuitive. We already install sudo-ldap via the sudo class, so
switch to depending on that one instead.

Change-Id: I255faa3345324cb64f7c893fdc81e056608eb6f8
---
M modules/passwords/manifests/init.pp
1 file changed, 1 insertion(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/67/180767/1

diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index 56abaa7..f60eff2 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -5,15 +5,9 @@
 ##
 
 class passwords::root {
-if ! defined (Package['sudo-ldap']) {
-package { 'sudo-ldap':
-ensure = latest;
-}
-}
-
 user { 'root':
 password = '!',
-before   = Package['sudo-ldap'];
+before   = Class['sudo'],
 }
 
 file {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I255faa3345324cb64f7c893fdc81e056608eb6f8
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Stop installing Package['sudo-ldap'] - change (labs/private)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Stop installing Package['sudo-ldap']
..


Stop installing Package['sudo-ldap']

Installing packages from the private repository is very
counter-intuitive. We already install sudo-ldap via the sudo class, so
switch to depending on that one instead.

Change-Id: I255faa3345324cb64f7c893fdc81e056608eb6f8
---
M modules/passwords/manifests/init.pp
1 file changed, 1 insertion(+), 7 deletions(-)

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



diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index 56abaa7..f60eff2 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -5,15 +5,9 @@
 ##
 
 class passwords::root {
-if ! defined (Package['sudo-ldap']) {
-package { 'sudo-ldap':
-ensure = latest;
-}
-}
-
 user { 'root':
 password = '!',
-before   = Package['sudo-ldap'];
+before   = Class['sudo'],
 }
 
 file {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I255faa3345324cb64f7c893fdc81e056608eb6f8
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove Class['sudo'] - User['root'] - change (labs/private)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: Remove Class['sudo'] - User['root']
..

Remove Class['sudo'] - User['root']

It doesn't make any sense. Presumably the original author wanted the
exact opposite order with the intention of not getting locked out of a
machine.

Change-Id: Id3cac0c8882a665e786f191ab464e4b7ff459dc3
---
M modules/passwords/manifests/init.pp
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/68/180768/1

diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index f60eff2..f1f1063 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -7,7 +7,6 @@
 class passwords::root {
 user { 'root':
 password = '!',
-before   = Class['sudo'],
 }
 
 file {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3cac0c8882a665e786f191ab464e4b7ff459dc3
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove Class['sudo'] - User['root'] - change (labs/private)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Remove Class['sudo'] - User['root']
..


Remove Class['sudo'] - User['root']

It doesn't make any sense. Presumably the original author wanted the
exact opposite order with the intention of not getting locked out of a
machine.

Change-Id: Id3cac0c8882a665e786f191ab464e4b7ff459dc3
---
M modules/passwords/manifests/init.pp
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index f60eff2..f1f1063 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -7,7 +7,6 @@
 class passwords::root {
 user { 'root':
 password = '!',
-before   = Class['sudo'],
 }
 
 file {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3cac0c8882a665e786f191ab464e4b7ff459dc3
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Move /etc/sudoers from module admin to sudo - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Move /etc/sudoers from module admin to sudo
..


Move /etc/sudoers from module admin to sudo

This isn't specific to the admin module, so might just as well move it
to the sudo module and include sudo instead.

The sudo module also had a sudoers.labs sudoers file that would
conflict with this, but fortunately it had the exact same contents, so
we can just drop it. Yay deduplication!

This is part of a broader admin/sudo consolidation.

Change-Id: I43e0c56c055c0f213b49a1f59ce1f049d86c95b8
---
M modules/admin/manifests/init.pp
R modules/sudo/files/sudoers
D modules/sudo/files/sudoers.labs
M modules/sudo/manifests/init.pp
M modules/sudo/manifests/labs_project.pp
5 files changed, 10 insertions(+), 41 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/admin/manifests/init.pp b/modules/admin/manifests/init.pp
index a343968..1b3db64 100644
--- a/modules/admin/manifests/init.pp
+++ b/modules/admin/manifests/init.pp
@@ -14,6 +14,7 @@
 $always_groups=['absent', 'ops', 'wikidev'],
 )
 {
+include sudo
 
 $module_path = get_module_path($module_name)
 $data = loadyaml(${module_path}/data/data.yaml)
@@ -30,15 +31,6 @@
 ensure = file,
 mode   = '0555',
 source = 'puppet:///modules/admin/enforce-users-groups.sh',
-}
-
-file { '/etc/sudoers':
-ensure = file,
-mode   = '0440',
-owner  = 'root',
-group  = 'root',
-source = 'puppet:///modules/admin/sudoers',
-tag= 'sudoers',
 }
 
 admin::hashgroup { $all_groups:
diff --git a/modules/admin/files/sudoers b/modules/sudo/files/sudoers
similarity index 100%
rename from modules/admin/files/sudoers
rename to modules/sudo/files/sudoers
diff --git a/modules/sudo/files/sudoers.labs b/modules/sudo/files/sudoers.labs
deleted file mode 100644
index cf4447c..000
--- a/modules/sudo/files/sudoers.labs
+++ /dev/null
@@ -1,25 +0,0 @@
-# /etc/sudoers
-#
-# This file MUST be edited with the 'visudo' command as root.
-#
-# See the man page for details on how to write a sudoers file.
-#
-
-Defaultsenv_reset
-
-# Host alias specification
-
-# User alias specification
-
-# Cmnd alias specification
-
-# User privilege specification
-rootALL=(ALL) ALL
-
-# Allow members of group sudo to execute any command after they have
-# provided their password
-# (Note that later entries override this, so you might need to move
-# it further down)
-%sudo ALL=(ALL) ALL
-#
-#includedir /etc/sudoers.d
diff --git a/modules/sudo/manifests/init.pp b/modules/sudo/manifests/init.pp
index 749567dd5..7bf897e 100644
--- a/modules/sudo/manifests/init.pp
+++ b/modules/sudo/manifests/init.pp
@@ -7,4 +7,13 @@
 package { $package:
 ensure = installed,
 }
+
+file { '/etc/sudoers':
+ensure  = present,
+mode= '0440',
+owner   = 'root',
+group   = 'root',
+source  = 'puppet:///modules/sudo/sudoers',
+require = Package[$package],
+}
 }
diff --git a/modules/sudo/manifests/labs_project.pp 
b/modules/sudo/manifests/labs_project.pp
index 6e4ae01..27a47fa 100644
--- a/modules/sudo/manifests/labs_project.pp
+++ b/modules/sudo/manifests/labs_project.pp
@@ -4,13 +4,6 @@
 if $::realm != 'labs' {
 fail('This class is labs-specific')
 }
-# labs specific sudo default
-file { '/etc/sudoers':
-owner  = root,
-group  = root,
-mode   = '0440',
-source = 'puppet:///modules/sudo/sudoers.labs';
-}
 
 # Was handled via sudo ldap, now handled via puppet
 sudo::group { 'ops': privileges = ['ALL=(ALL) NOPASSWD: ALL'] }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43e0c56c055c0f213b49a1f59ce1f049d86c95b8
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] sudo: fold sudo::labs_project into the role class - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: fold sudo::labs_project into the role class
..


sudo: fold sudo::labs_project into the role class

Now that sudo::labs_project doesn't include the sudoers config file, it
practically only consists of a single sudo::group definition. Fold this
into the role::labs::instance and kill the class.

Change-Id: I01b76d039210569bb4976d57ce1cfe9a5c7d2c7d
---
M manifests/role/labs.pp
D modules/sudo/manifests/labs_project.pp
2 files changed, 5 insertions(+), 15 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index b0e1442..55cb0a5 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -2,7 +2,11 @@
 
 include standard
 include base::instance-upstarts
-include sudo::labs_project
+include sudo
+
+sudo::group { 'ops':
+privileges = ['ALL=(ALL) NOPASSWD: ALL'],
+}
 
 class { 'ldap::role::client::labs':
 # Puppet requires ldap, so we need to update ldap before anything
diff --git a/modules/sudo/manifests/labs_project.pp 
b/modules/sudo/manifests/labs_project.pp
deleted file mode 100644
index 27a47fa..000
--- a/modules/sudo/manifests/labs_project.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class sudo::labs_project {
-require sudo
-
-if $::realm != 'labs' {
-fail('This class is labs-specific')
-}
-
-# Was handled via sudo ldap, now handled via puppet
-sudo::group { 'ops': privileges = ['ALL=(ALL) NOPASSWD: ALL'] }
-# Old way of handling this.
-sudo::group { $instanceproject: ensure = absent }
-# Another old way, before per-project sudo
-sudo::group { $projectgroup: ensure = absent }
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01b76d039210569bb4976d57ce1cfe9a5c7d2c7d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@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] sudo: reduce delta between ::group ::user - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: reduce delta between ::group  ::user
..


sudo: reduce delta between ::group  ::user

sudo::user has gained a few niceties that sudo::group hadn't, like
comments and a $title_safe regexp, so port them over.

Change-Id: I9c7bb4bd3ecc94599e213b4e92dd66a42b60cb4b
---
M modules/sudo/manifests/group.pp
M modules/sudo/manifests/user.pp
2 files changed, 37 insertions(+), 8 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/sudo/manifests/group.pp b/modules/sudo/manifests/group.pp
index ed0c66a..dff8195 100644
--- a/modules/sudo/manifests/group.pp
+++ b/modules/sudo/manifests/group.pp
@@ -1,12 +1,41 @@
-define sudo::group( $privileges=[], $ensure='present', $group = $title ) {
+# == Define: sudo::group
+#
+# Manages a sudo specification in /etc/sudoers.d.
+#
+# === Parameters
+#
+# [*privileges*]
+#   Array of sudo privileges.
+#
+# [*group*]
+#   User to which privileges should be assigned.
+#   Defaults to the resource title.
+#
+# === Examples
+#
+#  sudo::group { 'nagios_check_raid':
+#group   = 'nagios',
+#privileges = [
+#  'ALL = NOPASSWD: /usr/local/lib/nagios/plugins/check-raid'
+#],
+#  }
+#
+define sudo::group(
+$privileges,
+$ensure  = present,
+$group   = $title,
+) {
 require sudo
 
-file { /etc/sudoers.d/${title}:
+validate_ensure($ensure)
+
+$title_safe = regsubst($title, '\W', '-', 'G')
+
+file { /etc/sudoers.d/${title_safe}:
 ensure  = $ensure,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0440',
 content = template('sudo/sudoers.erb'),
 }
-
 }
diff --git a/modules/sudo/manifests/user.pp b/modules/sudo/manifests/user.pp
index 2f1a9bb..cb49639 100644
--- a/modules/sudo/manifests/user.pp
+++ b/modules/sudo/manifests/user.pp
@@ -22,8 +22,8 @@
 #
 define sudo::user(
 $privileges,
-$ensure = present,
-$user   = $title,
+$ensure  = present,
+$user= $title,
 ) {
 require sudo
 
@@ -33,9 +33,9 @@
 
 file { /etc/sudoers.d/${title_safe}:
 ensure  = $ensure,
-content = template('sudo/sudoers.erb'),
 owner   = 'root',
 group   = 'root',
 mode= '0440',
+content = template('sudo/sudoers.erb'),
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c7bb4bd3ecc94599e213b4e92dd66a42b60cb4b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] sudo: adjust sudoers for compat with newer sudo - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: adjust sudoers for compat with newer sudo
..


sudo: adjust sudoers for compat with newer sudo

As NEWS.Debian informs us:
- sudo = 1.7.4p4-2 is resetting $HOME and $MAIL to the target user when
  sudoing. Undo this for $HOME by adding it to env_keep as we're too
  used to it.
- sudo = 1.8.2-1 is not configured with --with-secure-path anymore and
  the setting has been moved into a sudoers directive. Add this
  directive to our own sudoers file.

Finally, remove the special-handling of the sudo group. We don't use
this here and we shouldn't treat it like that, especially since we don't
manage the group members.

Change-Id: I9052a89b4aa4a534fe2ca4473aa15aa72ad3d76b
---
M modules/sudo/files/sudoers
1 file changed, 4 insertions(+), 18 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/sudo/files/sudoers b/modules/sudo/files/sudoers
index cf4447c..ea823fd 100644
--- a/modules/sudo/files/sudoers
+++ b/modules/sudo/files/sudoers
@@ -1,25 +1,11 @@
 # /etc/sudoers
 #
-# This file MUST be edited with the 'visudo' command as root.
-#
-# See the man page for details on how to write a sudoers file.
-#
+# This file is managed by Puppet
 
-Defaultsenv_reset
+Defaults   env_reset
+Defaults   env_keep += HOME
+Defaults   
secure_path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
 
-# Host alias specification
-
-# User alias specification
-
-# Cmnd alias specification
-
-# User privilege specification
 rootALL=(ALL) ALL
 
-# Allow members of group sudo to execute any command after they have
-# provided their password
-# (Note that later entries override this, so you might need to move
-# it further down)
-%sudo ALL=(ALL) ALL
-#
 #includedir /etc/sudoers.d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9052a89b4aa4a534fe2ca4473aa15aa72ad3d76b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] admin::sudo: remove privs = [absent] support - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: admin::sudo: remove privs = [absent] support
..


admin::sudo: remove privs = [absent] support

Currently unused and complicates the admin/sudo consolidation for no
good reason.

Change-Id: If3a64265107d5818fb32d78ff696081ee7f84fac
---
M modules/admin/README
M modules/admin/manifests/sudo.pp
2 files changed, 1 insertion(+), 18 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/admin/README b/modules/admin/README
index d0b2dbb..aba7207 100644
--- a/modules/admin/README
+++ b/modules/admin/README
@@ -163,17 +163,6 @@
 # This file is managed by Puppet!
 %adm ALL=(ALL:ALL) ALL
 
-Removing sudo permissions from a group:
-
-- if you remove a group the permissions are removed as well
-- the 'absent' keyword will also remove all sudo permissions while
-- retaining the group and members
-
-bar:
-  gid: 680
-  privs: [absent]
-  members: [a, b, c]
-
 Users can be given sudo permissions in the same way:
 
 - this is a limited use approach.  these permissions would apply across the 
entire env.
diff --git a/modules/admin/manifests/sudo.pp b/modules/admin/manifests/sudo.pp
index c20e382..4d4f406 100644
--- a/modules/admin/manifests/sudo.pp
+++ b/modules/admin/manifests/sudo.pp
@@ -46,16 +46,10 @@
 $priv_holder = $name
 }
 
-if member($privs, 'absent') {
-$final_ensure = 'absent'
-} else {
-$final_ensure = $ensure
-}
-
 #WARNING: if path supplied is an existing dir Puppet will swallow this 
silently
 $filepath = /etc/sudoers.d/50_${name}
 file { $filepath:
-ensure  = $final_ensure,
+ensure  = $ensure,
 owner   = 'root',
 group   = 'root',
 mode= '0440',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3a64265107d5818fb32d78ff696081ee7f84fac
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] sudo: port over linting sudoers from admin::sudo - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: port over linting  sudoers from admin::sudo
..


sudo: port over linting  sudoers from admin::sudo

admin::sudo pulls a nifty trick to lint bad sudoers values and
self-heal, as to not let mistakes break sudo for the whole system. Port
it over to sudo::user  sudo::group. While at it, also cleanup our own
sudoers file, basing it off the admin::sudo sudoers (and also fixing the
undefined variable check).

Change-Id: I6fd4dd59242020f7e2b319a52d5a6a6ed9a630cf
---
M modules/sudo/manifests/group.pp
M modules/sudo/manifests/user.pp
M modules/sudo/templates/sudoers.erb
3 files changed, 27 insertions(+), 8 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/sudo/manifests/group.pp b/modules/sudo/manifests/group.pp
index dff8195..107dfc6 100644
--- a/modules/sudo/manifests/group.pp
+++ b/modules/sudo/manifests/group.pp
@@ -30,12 +30,21 @@
 validate_ensure($ensure)
 
 $title_safe = regsubst($title, '\W', '-', 'G')
+$filename = /etc/sudoers.d/${title_safe}
 
-file { /etc/sudoers.d/${title_safe}:
+file { $filename:
 ensure  = $ensure,
 owner   = 'root',
 group   = 'root',
 mode= '0440',
 content = template('sudo/sudoers.erb'),
 }
+
+exec { sudo_group_${title}_linting:
+command = rm -f ${filename}  false,
+unless  = test -e ${filename}  visudo -cf ${filename} || exit 
0,
+path= '/bin:/usr/bin:/usr/sbin',
+refreshonly = true,
+subscribe   = File[$filename],
+}
 }
diff --git a/modules/sudo/manifests/user.pp b/modules/sudo/manifests/user.pp
index cb49639..48fb4a4 100644
--- a/modules/sudo/manifests/user.pp
+++ b/modules/sudo/manifests/user.pp
@@ -30,12 +30,21 @@
 validate_ensure($ensure)
 
 $title_safe = regsubst($title, '\W', '-', 'G')
+$filename = /etc/sudoers.d/${title_safe}
 
-file { /etc/sudoers.d/${title_safe}:
+file { $filename:
 ensure  = $ensure,
 owner   = 'root',
 group   = 'root',
 mode= '0440',
 content = template('sudo/sudoers.erb'),
 }
+
+exec { sudo_user_${title}_linting:
+command = rm -f ${filename}  false,
+unless  = test -e ${filename}  visudo -cf ${filename} || exit 
0,
+path= '/bin:/usr/bin:/usr/sbin',
+refreshonly = true,
+subscribe   = File[$filename],
+}
 }
diff --git a/modules/sudo/templates/sudoers.erb 
b/modules/sudo/templates/sudoers.erb
index 4faba8a..e439353 100644
--- a/modules/sudo/templates/sudoers.erb
+++ b/modules/sudo/templates/sudoers.erb
@@ -1,8 +1,9 @@
-# Wikimedia user based sudo policy
 # This file is managed by Puppet!
 
-# vim: sts=0 noet ts=8
-
-% @privileges.each do |privilege| -%
-   % if has_variable?(user) then %%= @user %% elsif 
has_variable?(group) then %%%= @group %% end % %= privilege %
-% end -%
+%- @privileges.each do |privilege| -%
+%- if @user then %
+%= @priv_holder % %= privilege %
+%- elsif @group then %
+%%= @priv_holder % %= privilege %
+%- end -%
+%- end -%

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fd4dd59242020f7e2b319a52d5a6a6ed9a630cf
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] admin::sudo: remove comment support - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: admin::sudo: remove comment support
..


admin::sudo: remove comment support

This is sparsely used and when it is, it's really obvious comments, so
this probably encourages a bad behavior. Besides, if there's something
really important that belongs into a comment, it can be placed in a
puppet comment; reading /etc/sudoers.d files manually isn't going to
give the full picture anyway.

Change-Id: I15506c376c811ce79ec1dfd6f0d714814e0dd670
---
M modules/admin/README
M modules/admin/manifests/sudo.pp
M modules/admin/templates/sudoers.erb
M modules/diamond/manifests/collector/minimalpuppetagent.pp
M modules/toollabs/manifests/mailrelay.pp
5 files changed, 0 insertions(+), 12 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/admin/README b/modules/admin/README
index aba7207..61ee053 100644
--- a/modules/admin/README
+++ b/modules/admin/README
@@ -175,7 +175,6 @@
 
 admin::sudo { foo_user_only_should_do_x:
 user='bob',
-comment='this is good karma',
 privs=['ALL = NOPASSWD: X'],
 }
 
diff --git a/modules/admin/manifests/sudo.pp b/modules/admin/manifests/sudo.pp
index 4d4f406..44ff4bf 100644
--- a/modules/admin/manifests/sudo.pp
+++ b/modules/admin/manifests/sudo.pp
@@ -15,10 +15,6 @@
 #  WARNING:  Use for user oneoffs.  Sudo privs should be handled in
 #the main user/group definition in almost all cases.
 #
-# [*comment*]
-#  In case of a non-user definition/non-group definition priv a comment
-#  can be provided.
-#
 # [*privs*]
 #  An array of lines to be included in a sudoers.d/ file
 #
@@ -30,7 +26,6 @@
 define admin::sudo(
 $ensure='present',
 $user=undef,
-$comment=undef,
 $privs=[],
 $is_group=false,
 )
diff --git a/modules/admin/templates/sudoers.erb 
b/modules/admin/templates/sudoers.erb
index b13ded3..cb12a51 100644
--- a/modules/admin/templates/sudoers.erb
+++ b/modules/admin/templates/sudoers.erb
@@ -1,8 +1,5 @@
 # This file is managed by Puppet!
 
-%- if @comment %
-#%= @comment %
-%- end %
 %- @privs.each do |privilege| -%
 %- if @is_group == true %
 %%= @priv_holder % %= privilege %
diff --git a/modules/diamond/manifests/collector/minimalpuppetagent.pp 
b/modules/diamond/manifests/collector/minimalpuppetagent.pp
index 09c74cb..572c43d 100644
--- a/modules/diamond/manifests/collector/minimalpuppetagent.pp
+++ b/modules/diamond/manifests/collector/minimalpuppetagent.pp
@@ -11,10 +11,8 @@
 # puppet, since /var/lib/puppet doesn't have +x set
 admin::sudo { 'diamond_sudo_for_puppet':
 user= 'diamond',
-comment = diamond needs sudo to access puppet's 
last_run_summary.yaml file,
 privs   = ['ALL=(puppet) NOPASSWD: /bin/cat 
/var/lib/puppet/state/last_run_summary.yaml']
 }
-
 
 diamond::collector { 'MinimalPuppetAgent':
 source  = 'puppet:///modules/diamond/collector/minimalpuppetagent.py',
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index 3a83b9b..f361d24 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -65,7 +65,6 @@
 # Diamond user needs sudo to access exim
 admin::sudo { 'diamond_sudo_for_exim':
 user= 'diamond',
-comment = 'diamond needs sudo to access exim mail queue length',
 privs   = ['ALL=(root) NOPASSWD: /usr/sbin/exim']
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15506c376c811ce79ec1dfd6f0d714814e0dd670
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@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] Replace admin::sudo calls with sudo::user/group - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Replace admin::sudo calls with sudo::user/group
..


Replace admin::sudo calls with sudo::user/group

admin::sudo was never meant for system users and it was misused across
the tree. Replace with sudo::user  sudo::group instead. The distinction
is subtle and is about to go away as part of a broader admin/sudo
consolidation.

Change-Id: I51ccfe7a5e1d8e1c341e5c0ece4385c62aafceca
---
M modules/diamond/manifests/collector/minimalpuppetagent.pp
M modules/releases/manifests/reprepro.pp
M modules/toollabs/manifests/mailrelay.pp
3 files changed, 9 insertions(+), 9 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/diamond/manifests/collector/minimalpuppetagent.pp 
b/modules/diamond/manifests/collector/minimalpuppetagent.pp
index 572c43d..55f0914 100644
--- a/modules/diamond/manifests/collector/minimalpuppetagent.pp
+++ b/modules/diamond/manifests/collector/minimalpuppetagent.pp
@@ -9,9 +9,9 @@
 
 # Diamond user needs sudo to access last_run_summary.yaml file generated by
 # puppet, since /var/lib/puppet doesn't have +x set
-admin::sudo { 'diamond_sudo_for_puppet':
-user= 'diamond',
-privs   = ['ALL=(puppet) NOPASSWD: /bin/cat 
/var/lib/puppet/state/last_run_summary.yaml']
+sudo::user { 'diamond_sudo_for_puppet':
+user   = 'diamond',
+privileges = ['ALL=(puppet) NOPASSWD: /bin/cat 
/var/lib/puppet/state/last_run_summary.yaml']
 }
 
 diamond::collector { 'MinimalPuppetAgent':
diff --git a/modules/releases/manifests/reprepro.pp 
b/modules/releases/manifests/reprepro.pp
index 7c0677b..a7b7857 100644
--- a/modules/releases/manifests/reprepro.pp
+++ b/modules/releases/manifests/reprepro.pp
@@ -150,8 +150,8 @@
 before = File['/usr/local/bin/deb-upload'],
 }
 
-admin::sudo { 'releases_dput':
-user  = $sudo_user,
-privs = [ALL = (${user}) NOPASSWD: /usr/bin/dput],
+sudo::user { 'releases_dput':
+user   = $sudo_user,
+privileges = [ALL = (${user}) NOPASSWD: /usr/bin/dput],
 }
 }
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index f361d24..e68f01a 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -63,9 +63,9 @@
 }
 
 # Diamond user needs sudo to access exim
-admin::sudo { 'diamond_sudo_for_exim':
-user= 'diamond',
-privs   = ['ALL=(root) NOPASSWD: /usr/sbin/exim']
+sudo::user { 'diamond_sudo_for_exim':
+user   = 'diamond',
+privileges = ['ALL=(root) NOPASSWD: /usr/sbin/exim']
 }
 
 diamond::collector { 'Exim':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51ccfe7a5e1d8e1c341e5c0ece4385c62aafceca
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@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] admin: rename privs to privileges - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: admin: rename privs to privileges
..


admin: rename privs to privileges

Currently, the sudo module is using privileges, but the admin
module is using privs. This is confusing, so pick one of the two.
Since privileges is more explicit (and the admin module even
iterated privs into privilege), keep that one.

Change-Id: Id4e793cf41b05b8e9bbe98ebd47ebc63fc9bb00d
---
M modules/admin/README
M modules/admin/data/data.yaml
M modules/admin/manifests/group.pp
M modules/admin/manifests/hashgroup.pp
M modules/admin/manifests/hashuser.pp
M modules/admin/manifests/sudo.pp
M modules/admin/manifests/user.pp
M modules/admin/templates/sudoers.erb
8 files changed, 62 insertions(+), 62 deletions(-)

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



diff --git a/modules/admin/README b/modules/admin/README
index 61ee053..453cdf7 100644
--- a/modules/admin/README
+++ b/modules/admin/README
@@ -156,7 +156,7 @@
 groups:
 adm:
 members: [foo, bar]
-privs: [ALL=(ALL:ALL) ALL]
+privileges: [ALL=(ALL:ALL) ALL]
 
 Creates: '/etc/sudoers.d/adm'
 
@@ -169,13 +169,13 @@
 
   foo:
 ensure: present
-privs: [ALL=(ALL:ALL) ALL]
+privileges: [ALL=(ALL:ALL) ALL]
 
 Assigning one-off (single user, single case) sudo permissions:
 
 admin::sudo { foo_user_only_should_do_x:
-user='bob',
-privs=['ALL = NOPASSWD: X'],
+user   ='bob',
+privileges =['ALL = NOPASSWD: X'],
 }
 
 Creates '/etc/sudoers.d/foo_user_only_should_do_x':
diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 1175d5a..dabe657 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -12,17 +12,17 @@
 members: [filippo, jgreen, bblack, andrew, faidon, rush, marc, oblivian, 
laner, yuvipanda,
   dzahn, akosiaris, springle, mark, gage, ariel, cmjohnson, otto, 
robh, tstarling,
   ori, midom]
-privs: ['ALL = (ALL) NOPASSWD: ALL']
+privileges: ['ALL = (ALL) NOPASSWD: ALL']
   parsoid-roots:
 gid: 701
 description: RT 5934
 members: [gwicke, catrope]
-privs: ['ALL = (parsoid) NOPASSWD: ALL']
+privileges: ['ALL = (parsoid) NOPASSWD: ALL']
   parsoid-admin:
 gid: 702
 description: RT 5934
 members: [ssastry, cscott, arlolra]
-privs: ['ALL = (root) NOPASSWD: /usr/sbin/service parsoid stop',
+privileges: ['ALL = (root) NOPASSWD: /usr/sbin/service parsoid stop',
 'ALL = (root) NOPASSWD: /usr/sbin/service parsoid start',
 'ALL = (root) NOPASSWD: /usr/sbin/service parsoid restart',
 'ALL = (root) NOPASSWD: /usr/sbin/service parsoid reload']
@@ -30,7 +30,7 @@
 gid: 703
 description: manage gerrit server
 members: [demon, catrope]
-privs: ['ALL = NOPASSWD: ALL']
+privileges: ['ALL = NOPASSWD: ALL']
   gerrit-admin:
 gid: 704
 description: RT 6720 - assist in managing gerrit server
@@ -62,12 +62,12 @@
 gid: 708
 description: users with root on cassandra hosts
 members: [gwicke, ssastry]
-privs: ['ALL = (ALL) NOPASSWD: ALL']
+privileges: ['ALL = (ALL) NOPASSWD: ALL']
   elasticsearch-roots:
 gid: 709
 description: manage elasticsearch nodes
 members: [manybubbles, demon]
-privs: ['ALL = NOPASSWD: ALL']
+privileges: ['ALL = NOPASSWD: ALL']
   dataset-admins:
 gid: 710
 description: does work on dataset hosts
@@ -97,7 +97,7 @@
 gid: 715
 description: ldap admins
 members: [robla, reedy, demon]
-privs: ['ALL = NOPASSWD: /usr/local/sbin/add-ldap-user',
+privileges: ['ALL = NOPASSWD: /usr/local/sbin/add-ldap-user',
 'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user',
 'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user',
 'ALL = NOPASSWD: /usr/local/bin/svn-group',
@@ -107,7 +107,7 @@
 gid: 716
 description: non-ops admins for search
 members: [manybubbles, demon]
-privs: ['ALL = NOPASSWD: ALL']
+privileges: ['ALL = NOPASSWD: ALL']
   search-users:
 gid: 717
 description: elastic search testing
@@ -120,7 +120,7 @@
 gid: 719
 description: users with some sudo permissions on jenkins hosts
 members: [bd808, cscott, demon, krinkle, reedy, marktraceur]
-privs: ['ALL = (jenkins) NOPASSWD: ALL',
+privileges: ['ALL = (jenkins) NOPASSWD: ALL',
 'ALL = (jenkins-slave) NOPASSWD: ALL',
 'ALL = (gerritslave) NOPASSWD: ALL',
 'ALL = (zuul) NOPASSWD: ALL',
@@ -131,12 +131,12 @@
 gid: 720
 description: users who have full root on jenkins servers
 members: [hashar]
-privs: ['ALL = NOPASSWD: ALL']
+privileges: ['ALL = NOPASSWD: ALL']
   ocg-render-admins:
 gid: 721
 description: admins for pdf render (rt 6468)
 members: [cscott, ssastry, 

[MediaWiki-commits] [Gerrit] Allow to get JsonContent data as associative array - change (mediawiki/core)

2014-12-18 Thread QChris (Code Review)
Hello Ori.livneh,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: Allow to get JsonContent data as associative array
..

Allow to get JsonContent data as associative array

The deprecated JsonContent::getJsonData method allowed to get data as
associative array. The suggested replacement JsonContent::getData no
longer allows this. As this is causing issues for extensions as
EventLogging, we teach JsonContent::getData to allow returning
associative arrays.

Change-Id: Ifea3096d3fbc03dd81a7093fc6ee3a521df48305
---
M includes/content/JsonContent.php
M tests/phpunit/includes/content/JsonContentTest.php
2 files changed, 28 insertions(+), 1 deletion(-)


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

diff --git a/includes/content/JsonContent.php b/includes/content/JsonContent.php
index ff3b25b..d871ae7 100644
--- a/includes/content/JsonContent.php
+++ b/includes/content/JsonContent.php
@@ -43,9 +43,14 @@
/**
 * Decodes the JSON string into a PHP object.
 *
+* @param bool $assoc When true, returned objects will be converted 
into associative arrays.
+*
 * @return Status
 */
-   public function getData() {
+   public function getData( $assoc = false ) {
+   if ( $assoc ) {
+   return FormatJson::parse( $this-getNativeData(), 
FormatJson::FORCE_ASSOC );
+   }
if ( $this-jsonParse === null ) {
$this-jsonParse = FormatJson::parse( 
$this-getNativeData() );
}
diff --git a/tests/phpunit/includes/content/JsonContentTest.php 
b/tests/phpunit/includes/content/JsonContentTest.php
index 0ad8ecc..f2aba51 100644
--- a/tests/phpunit/includes/content/JsonContentTest.php
+++ b/tests/phpunit/includes/content/JsonContentTest.php
@@ -139,4 +139,26 @@
$this-assertInstanceOf( 'ParserOutput', $parserOutput );
$this-assertEquals( $expected, $parserOutput-getText() );
}
+
+   public function testGetDataAsArray() {
+   $obj = new JsonContent( '{ foo: { bar: baz, qux: 1 }, 
quux: 2}' );
+   $dataStatus = $obj-getData( true );
+
+   $this-assertTrue( $dataStatus-isGood() );
+
+   $data = $dataStatus-getValue();
+   $expected = array( 'foo' = array( 'bar' = 'baz', 'qux' = 1 
), 'quux' = 2 );
+   $this-assertEquals( $expected, $data );
+   }
+
+   public function testGetDataAsObject() {
+   $obj = new JsonContent( '{ foo: { bar: baz, qux: 1 }, 
quux: 2}' );
+   $dataStatus = $obj-getData();
+
+   $this-assertTrue( $dataStatus-isGood() );
+
+   $data = $dataStatus-getValue();
+   $expected = (object) array( 'foo' = (object) array( 'bar' = 
'baz', 'qux' = 1 ), 'quux' = 2 );
+   $this-assertEquals( $expected, $data );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifea3096d3fbc03dd81a7093fc6ee3a521df48305
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Give editor an empty label to prevent rendering bug - change (mediawiki...MobileFrontend)

2014-12-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Give editor an empty label to prevent rendering bug
..

Give editor an empty label to prevent rendering bug

An empty button tag generates extra height, throwing all the vertical
alignment off slightly.

Change-Id: Ic9ab6856959947cfda562afb943a230283910599
---
M javascripts/modules/editor/EditorOverlayBase.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/javascripts/modules/editor/EditorOverlayBase.js 
b/javascripts/modules/editor/EditorOverlayBase.js
index 0b6d5b7..41c5edd 100644
--- a/javascripts/modules/editor/EditorOverlayBase.js
+++ b/javascripts/modules/editor/EditorOverlayBase.js
@@ -46,6 +46,8 @@
switcherButton: new Icon( {
tagName: 'button',
name: 'edit-switch',
+   // Label required to prevent height rendering 
bug
+   label: 'nbsp;',
additionalClassNames: 'editor-switcher'
} ).toHtmlString(),
sourceButton: new Icon( {

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

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

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


[MediaWiki-commits] [Gerrit] sudo: fix sudoers.erb template mishap - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: sudo: fix sudoers.erb template mishap
..

sudo: fix sudoers.erb template mishap

Change-Id: Id929b2fa4f6c228cfc40fcb37b2c03bc70525aca
---
M modules/sudo/templates/sudoers.erb
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/180773/1

diff --git a/modules/sudo/templates/sudoers.erb 
b/modules/sudo/templates/sudoers.erb
index e439353..841f080 100644
--- a/modules/sudo/templates/sudoers.erb
+++ b/modules/sudo/templates/sudoers.erb
@@ -1,9 +1,9 @@
 # This file is managed by Puppet!
 
 %- @privileges.each do |privilege| -%
-%- if @user then %
-%= @priv_holder % %= privilege %
-%- elsif @group then %
-%%= @priv_holder % %= privilege %
+%- if @user then -%
+%= @user % %= privilege %
+%- elsif @group then -%
+%%= @group % %= privilege %
 %- end -%
 %- end -%

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

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

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


[MediaWiki-commits] [Gerrit] sudo: fix sudoers.erb template mishap - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: fix sudoers.erb template mishap
..


sudo: fix sudoers.erb template mishap

Change-Id: Id929b2fa4f6c228cfc40fcb37b2c03bc70525aca
---
M modules/sudo/templates/sudoers.erb
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/sudo/templates/sudoers.erb 
b/modules/sudo/templates/sudoers.erb
index e439353..841f080 100644
--- a/modules/sudo/templates/sudoers.erb
+++ b/modules/sudo/templates/sudoers.erb
@@ -1,9 +1,9 @@
 # This file is managed by Puppet!
 
 %- @privileges.each do |privilege| -%
-%- if @user then %
-%= @priv_holder % %= privilege %
-%- elsif @group then %
-%%= @priv_holder % %= privilege %
+%- if @user then -%
+%= @user % %= privilege %
+%- elsif @group then -%
+%%= @group % %= privilege %
 %- end -%
 %- end -%

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

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

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


[MediaWiki-commits] [Gerrit] DataView Performance enhancements - change (phabricator...Sprint)

2014-12-18 Thread Christopher Johnson (WMDE) (Code Review)
Christopher Johnson (WMDE) has uploaded a new change for review.

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

Change subject: DataView Performance enhancements
..

DataView Performance enhancements

removes duplication of calls to getTasks() which is a slow range edge query
adds task setter function in TasksTableView
renames BurndownDataViewController to SprintDataViewController
renames BurndownDataView to SprintDataView

Bug: T78679
Change-Id: I88db37fd8934fd641b9a814a3baca19ec852545a
---
M src/__phutil_library_map__.php
M src/controller/SprintDataViewController.php
M src/query/SprintQuery.php
R src/view/SprintDataView.php
M src/view/SprintTableView.php
M src/view/TasksTableView.php
6 files changed, 73 insertions(+), 56 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/extensions/Sprint 
refs/changes/74/180774/1

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
index 10c1f52..3addf12 100644
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -13,7 +13,6 @@
 'BurndownActionMenuEventListener' = 
'events/BurndownActionMenuEventListener.php',
 'BurndownDataDate' = 'util/BurndownDataDate.php',
 'BurndownDataDateTest' = 'tests/BurndownDataDateTest.php',
-'BurndownDataView' = 'view/BurndownDataView.php',
 'BurndownException' = 'exception/BurndownException.php',
 'CeleritySprintResources' = 'celerity/CeleritySprintResources.php',
 'DateIterator' = 'tests/DateIterator.php',
@@ -41,6 +40,7 @@
 'SprintController' = 'controller/SprintController.php',
 'SprintControllerTest' = 'tests/SprintControllerTest.php',
 'SprintDAO' = 'storage/SprintDAO.php',
+'SprintDataView' = 'view/SprintDataView.php',
 'SprintDataViewController' = 'controller/SprintDataViewController.php',
 'SprintDefaultViewCapability' = 
'capability/SprintDefaultViewCapability.php',
 'SprintEndDateField' = 'customfield/SprintEndDateField.php',
@@ -55,6 +55,7 @@
 'SprintReportController' = 'controller/SprintReportController.php',
 'SprintReportOpenTasksView' = 'view/SprintReportOpenTasksView.php',
 'SprintTableView' = 'view/SprintTableView.php',
+'SprintTask' = 'storage/SprintTask.php',
 'SprintTaskStoryPointsField' = 
'customfield/SprintTaskStoryPointsField.php',
 'SprintTestCase' = 'tests/SprintTestCase.php',
 'SprintTransaction' = 'storage/SprintTransaction.php',
@@ -68,7 +69,6 @@
   'xmap' = array(
 'BurndownActionMenuEventListener' = 'PhabricatorEventListener',
 'BurndownDataDateTest' = 'SprintTestCase',
-'BurndownDataView' = 'SprintView',
 'BurndownException' = 'Exception',
 'CeleritySprintResources' = 'CelerityResourcesOnDisk',
 'DateIterator' = 'Iterator',
@@ -90,6 +90,7 @@
 'SprintController' = 'PhabricatorController',
 'SprintControllerTest' = 'SprintTestCase',
 'SprintDAO' = 'PhabricatorLiskDAO',
+'SprintDataView' = 'SprintView',
 'SprintDataViewController' = 'SprintController',
 'SprintDefaultViewCapability' = 'PhabricatorPolicyCapability',
 'SprintEndDateField' = 'SprintProjectCustomField',
@@ -106,6 +107,19 @@
 'SprintReportBurndownView' = 'SprintView',
 'SprintReportController' = 'SprintController',
 'SprintReportOpenTasksView' = 'SprintView',
+'SprintTask' = array(
+  'SprintDAO',
+  'PhabricatorMarkupInterface',
+  'PhabricatorPolicyInterface',
+  'PhabricatorTokenReceiverInterface',
+  'PhabricatorFlaggableInterface',
+  'PhabricatorMentionableInterface',
+  'PhrequentTrackableInterface',
+  'PhabricatorCustomFieldInterface',
+  'PhabricatorDestructibleInterface',
+  'PhabricatorApplicationTransactionInterface',
+  'PhabricatorProjectInterface',
+),
 'SprintTaskStoryPointsField' = array(
   'ManiphestCustomField',
   'PhabricatorStandardCustomFieldInterface',
diff --git a/src/controller/SprintDataViewController.php 
b/src/controller/SprintDataViewController.php
index 107e441..1a16b03 100644
--- a/src/controller/SprintDataViewController.php
+++ b/src/controller/SprintDataViewController.php
@@ -27,7 +27,7 @@
 $burndown_view = false;
 
 try {
-  $burndown_view = id(new BurndownDataView())
+  $burndown_view = id(new SprintDataView())
   -setProject($project)
   -setViewer($viewer)
   -setRequest($request);
diff --git a/src/query/SprintQuery.php b/src/query/SprintQuery.php
index dd44c89..48038de 100644
--- a/src/query/SprintQuery.php
+++ b/src/query/SprintQuery.php
@@ -73,7 +73,6 @@
 
   public function getXactions($tasks) {
 $task_phids = mpull($tasks, 'getPHID');
-
 $xactions = id(new ManiphestTransactionQuery())
 -setViewer($this-viewer)
 -withObjectPHIDs($task_phids)
diff --git a/src/view/BurndownDataView.php b/src/view/SprintDataView.php
similarity index 76%
rename from src/view/BurndownDataView.php
rename to 

[MediaWiki-commits] [Gerrit] Remove border-box rule from reset.less - change (mediawiki...MobileFrontend)

2014-12-18 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Remove border-box rule from reset.less
..

Remove border-box rule from reset.less

Having this rule applied generally is potentially hugely problematic
as evidenced by the fact it had to be overriden for CentralNotice. In
the future it could be a blocker to importing a module. If a specific
part of MF requires border-box it should be applied in a targetted
manner.

Currently MobileFrontend makes almost no use of this, I couldn't
see any more than single pixel changes when disabling the style.

Change-Id: I9d85c2fd09613736d51cb75bb6d151b840ebd1dd
---
M less/reset.less
1 file changed, 0 insertions(+), 6 deletions(-)


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

diff --git a/less/reset.less b/less/reset.less
index fe0affa..d5d8cf0 100644
--- a/less/reset.less
+++ b/less/reset.less
@@ -21,15 +21,9 @@
font: inherit;
vertical-align: baseline;
background: none;
-   .box-sizing(border-box);
 }
 table, caption, tbody, tfoot, thead, tr, th, td {
font-size: 100%;
-   .box-sizing(border-box);
-}
-// CentralNotice banners use regular box-sizing
-div#centralNotice {
-   .box-sizing(content-box);
 }
 button {
border: none;

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

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

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


[MediaWiki-commits] [Gerrit] admin: remove ::sudo in favor of sudo::user/group - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: admin: remove ::sudo in favor of sudo::user/group
..


admin: remove ::sudo in favor of sudo::user/group

Now that we've fully converged the two modules, there's really no point
in duplicating this sort of functionality in two places; it's confusing
already (as evident by previous commits) and wouldn't be DRY.

Make the sudo::user/group definitions canonical and remove admin::sudo
altogether.

Change-Id: I4745c83b1357a764c066f5aa74ef3e2f9799e84a
---
M modules/admin/README
M modules/admin/manifests/group.pp
D modules/admin/manifests/sudo.pp
M modules/admin/manifests/user.pp
4 files changed, 4 insertions(+), 82 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/admin/README b/modules/admin/README
index 453cdf7..ae5e39b 100644
--- a/modules/admin/README
+++ b/modules/admin/README
@@ -171,19 +171,6 @@
 ensure: present
 privileges: [ALL=(ALL:ALL) ALL]
 
-Assigning one-off (single user, single case) sudo permissions:
-
-admin::sudo { foo_user_only_should_do_x:
-user   ='bob',
-privileges =['ALL = NOPASSWD: X'],
-}
-
-Creates '/etc/sudoers.d/foo_user_only_should_do_x':
-
-# This file is managed by Puppet!
-#this is good karma
-bob ALL = NOPASSWD: X
-
 Getting your /home/ stuff wherever you are:
 
 - if you define a dir for your username in '${module}/files/home' all 
contents are managed
diff --git a/modules/admin/manifests/group.pp b/modules/admin/manifests/group.pp
index 9a64854..76e5bac 100644
--- a/modules/admin/manifests/group.pp
+++ b/modules/admin/manifests/group.pp
@@ -12,7 +12,7 @@
 #  Sets the group id
 #
 # [*privileges*]
-#  An array of privileges to setup via admin::sudo
+#  An array of sudo privileges to setup
 #
 
 define admin::group(
@@ -33,10 +33,9 @@
 }
 
 if !empty($privileges) {
-admin::sudo { $name:
+sudo::group { $name:
 ensure = $ensure,
 privileges = $privileges,
-is_group   = true,
 }
 }
 }
diff --git a/modules/admin/manifests/sudo.pp b/modules/admin/manifests/sudo.pp
deleted file mode 100644
index 7f74a98..000
--- a/modules/admin/manifests/sudo.pp
+++ /dev/null
@@ -1,64 +0,0 @@
-# A defined type for user/group sudo privilege management
-#
-# === Parameters
-#
-# [*name*]
-#  If this is for a user or group this is the user or group name.
-#  If this is a one-off it is the name of the on-system sudo file
-#
-# [*ensure*]
-#  Add or remove the priv definition in /etc/sudoers.d [ present | absent]
-#
-# [*user*]
-#  The username of the user to be given priviledges.
-#
-#  WARNING:  Use for user oneoffs.  Sudo privs should be handled in
-#the main user/group definition in almost all cases.
-#
-# [*privileges*]
-#  An array of lines to be included in a sudoers.d/ file
-#
-# [*is_group*]
-#  Boolean value to determine if this is a group.
-#  Group declarations in sudo terms need a '%' prepend
-#
-
-define admin::sudo(
-$ensure='present',
-$user=undef,
-$privileges=[],
-$is_group=false,
-)
-{
-
-if ($user) and ($is_group) {
-fail(${user} specified as group)
-}
-
-if ($user) {
-$priv_holder = $user
-} else {
-$priv_holder = $name
-}
-
-#WARNING: if path supplied is an existing dir Puppet will swallow this 
silently
-$filepath = /etc/sudoers.d/50_${name}
-file { $filepath:
-ensure  = $ensure,
-owner   = 'root',
-group   = 'root',
-mode= '0440',
-content = template('admin/sudoers.erb'),
-tag = 'sudoers',
-}
-
-#messing up sudo can have dire consquences.  here we are linting
-#the final sudo file.  if bad, remove and throw an exception.
-#prepending all admin sudo w/ numeric to allow for easy before or after 
processing
-exec { ${name}_sudo_linting:
-command   = rm -f ${filepath}  false,
-unless= test -e ${filepath}  /usr/sbin/visudo -cf ${filepath} 
|| exit 0,
-path  = '/bin:/usr/bin',
-subscribe = File[$filepath],
-}
-}
diff --git a/modules/admin/manifests/user.pp b/modules/admin/manifests/user.pp
index 1758e19..8703072 100644
--- a/modules/admin/manifests/user.pp
+++ b/modules/admin/manifests/user.pp
@@ -35,7 +35,7 @@
 #  The login shell.
 #
 # [*privileges*]
-#  An array of privileges to setup via admin::sudo
+#  An array of sudo privileges to setup
 #  Rarely should a user differ from an established group.
 #
 # [*ssh_keys*]
@@ -122,7 +122,7 @@
 }
 
 if !empty($privileges) {
-admin::sudo { $name:
+sudo::user { $name:
 ensure = $ensure,
 privileges = $privileges,
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/180512

[MediaWiki-commits] [Gerrit] DataView Performance enhancements - change (phabricator...Sprint)

2014-12-18 Thread Christopher Johnson (WMDE) (Code Review)
Christopher Johnson (WMDE) has submitted this change and it was merged.

Change subject: DataView Performance enhancements
..


DataView Performance enhancements

removes duplication of calls to getTasks() which is a slow range edge query
adds task setter function in TasksTableView
renames BurndownDataViewController to SprintDataViewController
renames BurndownDataView to SprintDataView

Bug: T78679
Change-Id: I88db37fd8934fd641b9a814a3baca19ec852545a
---
M src/__phutil_library_map__.php
M src/controller/SprintDataViewController.php
M src/query/SprintQuery.php
R src/view/SprintDataView.php
M src/view/SprintTableView.php
M src/view/TasksTableView.php
6 files changed, 73 insertions(+), 56 deletions(-)

Approvals:
  Christopher Johnson (WMDE): Verified; Looks good to me, approved



diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
index 10c1f52..3addf12 100644
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -13,7 +13,6 @@
 'BurndownActionMenuEventListener' = 
'events/BurndownActionMenuEventListener.php',
 'BurndownDataDate' = 'util/BurndownDataDate.php',
 'BurndownDataDateTest' = 'tests/BurndownDataDateTest.php',
-'BurndownDataView' = 'view/BurndownDataView.php',
 'BurndownException' = 'exception/BurndownException.php',
 'CeleritySprintResources' = 'celerity/CeleritySprintResources.php',
 'DateIterator' = 'tests/DateIterator.php',
@@ -41,6 +40,7 @@
 'SprintController' = 'controller/SprintController.php',
 'SprintControllerTest' = 'tests/SprintControllerTest.php',
 'SprintDAO' = 'storage/SprintDAO.php',
+'SprintDataView' = 'view/SprintDataView.php',
 'SprintDataViewController' = 'controller/SprintDataViewController.php',
 'SprintDefaultViewCapability' = 
'capability/SprintDefaultViewCapability.php',
 'SprintEndDateField' = 'customfield/SprintEndDateField.php',
@@ -55,6 +55,7 @@
 'SprintReportController' = 'controller/SprintReportController.php',
 'SprintReportOpenTasksView' = 'view/SprintReportOpenTasksView.php',
 'SprintTableView' = 'view/SprintTableView.php',
+'SprintTask' = 'storage/SprintTask.php',
 'SprintTaskStoryPointsField' = 
'customfield/SprintTaskStoryPointsField.php',
 'SprintTestCase' = 'tests/SprintTestCase.php',
 'SprintTransaction' = 'storage/SprintTransaction.php',
@@ -68,7 +69,6 @@
   'xmap' = array(
 'BurndownActionMenuEventListener' = 'PhabricatorEventListener',
 'BurndownDataDateTest' = 'SprintTestCase',
-'BurndownDataView' = 'SprintView',
 'BurndownException' = 'Exception',
 'CeleritySprintResources' = 'CelerityResourcesOnDisk',
 'DateIterator' = 'Iterator',
@@ -90,6 +90,7 @@
 'SprintController' = 'PhabricatorController',
 'SprintControllerTest' = 'SprintTestCase',
 'SprintDAO' = 'PhabricatorLiskDAO',
+'SprintDataView' = 'SprintView',
 'SprintDataViewController' = 'SprintController',
 'SprintDefaultViewCapability' = 'PhabricatorPolicyCapability',
 'SprintEndDateField' = 'SprintProjectCustomField',
@@ -106,6 +107,19 @@
 'SprintReportBurndownView' = 'SprintView',
 'SprintReportController' = 'SprintController',
 'SprintReportOpenTasksView' = 'SprintView',
+'SprintTask' = array(
+  'SprintDAO',
+  'PhabricatorMarkupInterface',
+  'PhabricatorPolicyInterface',
+  'PhabricatorTokenReceiverInterface',
+  'PhabricatorFlaggableInterface',
+  'PhabricatorMentionableInterface',
+  'PhrequentTrackableInterface',
+  'PhabricatorCustomFieldInterface',
+  'PhabricatorDestructibleInterface',
+  'PhabricatorApplicationTransactionInterface',
+  'PhabricatorProjectInterface',
+),
 'SprintTaskStoryPointsField' = array(
   'ManiphestCustomField',
   'PhabricatorStandardCustomFieldInterface',
diff --git a/src/controller/SprintDataViewController.php 
b/src/controller/SprintDataViewController.php
index 107e441..1a16b03 100644
--- a/src/controller/SprintDataViewController.php
+++ b/src/controller/SprintDataViewController.php
@@ -27,7 +27,7 @@
 $burndown_view = false;
 
 try {
-  $burndown_view = id(new BurndownDataView())
+  $burndown_view = id(new SprintDataView())
   -setProject($project)
   -setViewer($viewer)
   -setRequest($request);
diff --git a/src/query/SprintQuery.php b/src/query/SprintQuery.php
index dd44c89..48038de 100644
--- a/src/query/SprintQuery.php
+++ b/src/query/SprintQuery.php
@@ -73,7 +73,6 @@
 
   public function getXactions($tasks) {
 $task_phids = mpull($tasks, 'getPHID');
-
 $xactions = id(new ManiphestTransactionQuery())
 -setViewer($this-viewer)
 -withObjectPHIDs($task_phids)
diff --git a/src/view/BurndownDataView.php b/src/view/SprintDataView.php
similarity index 76%
rename from src/view/BurndownDataView.php
rename to src/view/SprintDataView.php
index e9a9091..77b879a 100644
--- 

[MediaWiki-commits] [Gerrit] Added encapsulate option to TemplatedWidget - change (mediawiki...Wikibase)

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

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

Change subject: Added encapsulate option to TemplatedWidget
..

Added encapsulate option to TemplatedWidget

Prevents events from bubbling up the DOM tree unnecessarily. -78149

Change-Id: Iee90bfa54e8fdb0692d4bbe21ef2fd2d60aaccb8
---
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
M repo/resources/jquery.ui/jquery.ui.EditableTemplatedWidget.js
M repo/resources/jquery.ui/jquery.ui.TemplatedWidget.js
6 files changed, 66 insertions(+), 21 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
index 0e9ffd5..f394465 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgrouplistview.js
@@ -76,7 +76,8 @@
},
 
_createListview: function() {
-   var self = this;
+   var self = this,
+   prefix = 
$.wikibase.sitelinkgroupview.prototype.widgetEventPrefix;
 
this.$listview = this.element.find( '.wb-listview' );
 
@@ -98,7 +99,11 @@
};
}
} ),
-   value: self.options.value || null
+   value: self.options.value || null,
+   encapsulate: true
+   } )
+   .on( prefix + 'disable.' + this.widgetName, function( event ) {
+   event.stopPropagation();
} );
},
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
index c275f48..4e1068f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkgroupview.js
@@ -156,25 +156,11 @@
 
this.$sitelinklistview
.on( prefix + 'change.' + this.widgetName, function( event ) {
-   event.stopPropagation();
self._trigger( 'change' );
} )
.on( prefix + 'toggleerror.' + this.widgetName, function( 
event, error ) {
-   event.stopPropagation();
self.setError( error );
} )
-   .on(
-   [
-   prefix + 'create.' + this.widgetName,
-   prefix + 'afterstartediting.' + this.widgetName,
-   prefix + 'stopediting.' + this.widgetName,
-   prefix + 'afterstopediting.' + this.widgetName,
-   prefix + 'disable.' + this.widgetName
-   ].join( ' ' ),
-   function( event ) {
-   event.stopPropagation();
-   }
-   )
.sitelinklistview( {
value: this._getSiteLinksOfGroup(),
allowedSiteIds: this.options.value
@@ -183,7 +169,8 @@
entityStore: this.options.entityStore,
siteLinksChanger: this.options.siteLinksChanger,
eventSingleton: this._eventSingleton,
-   $counter: this.$counter
+   $counter: this.$counter,
+   encapsulate: true
} );
},
 
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
index 6474e84..8b88a79 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinklistview.js
@@ -137,7 +137,8 @@
}
} ),
value: self.options.value || null,
-   listItemNodeName: 'LI'
+   listItemNodeName: 'LI',
+   encapsulate: true
} )
.on( prefix + 'change.' + this.widgetName, function( event ) {
event.stopPropagation();
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
index 72bf6ba..ad49e37 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.sitelinkview.js
+++ 

[MediaWiki-commits] [Gerrit] Fix exceptions module docstring for AutoblockUser - change (pywikibot/core)

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

Change subject: Fix exceptions module docstring for AutoblockUser
..


Fix exceptions module docstring for AutoblockUser

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

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



diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index 697d904..64a93ac 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -4,7 +4,7 @@
 
 Error: Base class, all exceptions should the subclass of this class.
   - NoUsername: Username is not in user-config.py, or it is invalid.
-  - UserBlockedY: our username or IP has been blocked
+  - UserBlocked: Username or IP has been blocked
   - AutoblockUser: requested action on a virtual autoblock user not valid
   - UserActionRefuse: requested user action, such as email user, refused
   - BadTitle: Server responded with BadTitle

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

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

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


[MediaWiki-commits] [Gerrit] Add .pyo files to .gitignore - change (pywikibot/core)

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

Change subject: Add .pyo files to .gitignore
..


Add .pyo files to .gitignore

Change-Id: I9a52ed807f4e689517a5605097c038e83f917bf8
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 16842b7..80f131c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 user-*.py
 *.bak
 *.pyc
+*.pyo
 *.py~
 /.tox
 /*.egg

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

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

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


[MediaWiki-commits] [Gerrit] Add i18n for API module help - change (mediawiki...PollNY)

2014-12-18 Thread M4tx (Code Review)
M4tx has uploaded a new change for review.

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

Change subject: Add i18n for API module help
..

Add i18n for API module help

Bug: T76888
Change-Id: I1c7bf76a9c1808273c45bcc3f95847f36199
---
M ApiPollNY.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 56 insertions(+), 6 deletions(-)


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

diff --git a/ApiPollNY.php b/ApiPollNY.php
index 1cc38f5..f61cbc6 100644
--- a/ApiPollNY.php
+++ b/ApiPollNY.php
@@ -211,7 +211,7 @@
}
 
/**
-* @return String: human-readable module description
+* @deprecated since MediaWiki core 1.25
 */
public function getDescription() {
return 'PollNY API - includes both user and admin functions';
@@ -244,7 +244,9 @@
);
}
 
-   // Describe the parameter
+   /**
+* @deprecated since MediaWiki core 1.25
+*/
public function getParamDescription() {
return array_merge( parent::getParamDescription(), array(
'what' = 'What to do?',
@@ -256,7 +258,9 @@
) );
}
 
-   // Get examples
+   /**
+* @deprecated since MediaWiki core 1.25
+*/
public function getExamples() {
return array(
'api.php?action=pollnywhat=deletepollID=66' = 
'Deletes the poll #66',
@@ -267,4 +271,24 @@
'api.php?action=pollnywhat=votepollID=33choiceID=4' 
= 'Votes (answers) the poll #33 with the 4th choice',
);
}
-}
\ No newline at end of file
+
+   /**
+* @see ApiBase::getExamplesMessages()
+*/
+   protected function getExamplesMessages() {
+   return array(
+   'action=pollnywhat=deletepollID=66'
+   = 'apihelp-pollny-example-1',
+   'action=pollnywhat=getPollResultspollID=666'
+   = 'apihelp-pollny-example-2',
+   'action=pollnywhat=getRandom'
+   = 'apihelp-pollny-example-3',
+   
'action=pollnywhat=titleExistspageName=Is%20PollNY%20awesome%3F'
+   = 'apihelp-pollny-example-4',
+   'action=pollnywhat=updateStatuspollID=47status=1'
+   = 'apihelp-pollny-example-5',
+   'action=pollnywhat=votepollID=33choiceID=4'
+   = 'apihelp-pollny-example-6'
+   );
+   }
+}
diff --git a/i18n/en.json b/i18n/en.json
index ba654bb..3f4e5dc 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -91,5 +91,18 @@
 poll-time-minutes: {{PLURAL:$1|one minute|$1 minutes}},
 poll-time-seconds: {{PLURAL:$1|one second|$1 seconds}},
 specialpages-group-poll: Polls,
-right-polladmin: Administer polls
+right-polladmin: Administer polls,
+apihelp-pollny-description: PollNY API - includes both user and admin 
functions.,
+apihelp-pollny-param-what: What to do?,
+apihelp-pollny-param-choiceID: Same as clicking the choiceIDth choice 
via the GUI; only used when what=vote.,
+apihelp-pollny-param-pageName: Title to check for (only used when 
what=titleExists); should be URL-encoded.,
+apihelp-pollny-param-pollID: Poll ID of the poll that is being 
deleted/updated/voted for.,
+apihelp-pollny-param-pageID: Page ID (only used when 
what=getPollResults).,
+apihelp-pollny-param-status: New status of the poll (when 
what=updateStatus); possible values are 0 (=closed), 1 and 2 (=flagged).,
+apihelp-pollny-example-1: Deletes the poll #66,
+apihelp-pollny-example-2: Gets the results of the poll #666,
+apihelp-pollny-example-3: Gets a random poll to which the current user 
hasn't answered yet,
+apihelp-pollny-example-4: Checks if there is already a poll with the 
title \Is PollNY awesome?\,
+apihelp-pollny-example-5: Sets the status of the poll #47 to 1 (=open); 
possible status values are 0 (=closed), 1 and 2 (=flagged),
+apihelp-pollny-example-6: Votes (answers) the poll #33 with the 4th 
choice
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b502890..e1104ed 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -93,5 +93,18 @@
poll-time-minutes: Used as code$1/code in the following 
messages:\n* {{msg-mw|Poll-ago}}\n* {{msg-mw|Poll-time-ago}}\nParameters:\n* $1 
- number of minutes\n{{Related|Poll-time}}\n{{Identical|Minute}},
poll-time-seconds: Used as code$1/code in the following 
messages:\n* {{msg-mw|Poll-ago}}\n* {{msg-mw|Poll-time-ago}}\nParameters:\n* $1 
- number of seconds\n{{Related|Poll-time}}\n{{Identical|Second}},
specialpages-group-poll: {{doc-special-group}}\n{{Identical|Poll}},
-   right-polladmin: {{doc-right|polladmin}}
+  

[MediaWiki-commits] [Gerrit] sudo: actually make the lintin safety checks work - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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

Change subject: sudo: actually make the lintin safety checks work
..

sudo: actually make the lintin safety checks work

The current linting Execs, as shamelessly stolen from the admin module,
had a logic error in which it tried doing exit 0 as means to handle
the ensure = absent case, but ended up doing it unconditionally,
therefore rendering the whole check moot!

There's two ways to fix this: either move the test -e check to a
separate onlyif parameter, or guard the whole Exec with an if $ensure
== present check. The latter feels cleaner, so just do this.

Change-Id: I9b29d3e093446cbd602087d27718f6813cfe372b
---
M modules/sudo/manifests/group.pp
M modules/sudo/manifests/user.pp
2 files changed, 14 insertions(+), 12 deletions(-)


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

diff --git a/modules/sudo/manifests/group.pp b/modules/sudo/manifests/group.pp
index 107dfc6..2ee2118 100644
--- a/modules/sudo/manifests/group.pp
+++ b/modules/sudo/manifests/group.pp
@@ -40,11 +40,12 @@
 content = template('sudo/sudoers.erb'),
 }
 
-exec { sudo_group_${title}_linting:
-command = rm -f ${filename}  false,
-unless  = test -e ${filename}  visudo -cf ${filename} || exit 
0,
-path= '/bin:/usr/bin:/usr/sbin',
-refreshonly = true,
-subscribe   = File[$filename],
+if $ensure == 'present' {
+exec { sudo_group_${title}_linting:
+command = /bin/rm -f ${filename}  /bin/false,
+unless  = /usr/sbin/visudo -cqf ${filename},
+refreshonly = true,
+subscribe   = File[$filename],
+}
 }
 }
diff --git a/modules/sudo/manifests/user.pp b/modules/sudo/manifests/user.pp
index 48fb4a4..6a64fdc 100644
--- a/modules/sudo/manifests/user.pp
+++ b/modules/sudo/manifests/user.pp
@@ -40,11 +40,12 @@
 content = template('sudo/sudoers.erb'),
 }
 
-exec { sudo_user_${title}_linting:
-command = rm -f ${filename}  false,
-unless  = test -e ${filename}  visudo -cf ${filename} || exit 
0,
-path= '/bin:/usr/bin:/usr/sbin',
-refreshonly = true,
-subscribe   = File[$filename],
+if $ensure == 'present' {
+exec { sudo_user_${title}_linting:
+command = /bin/rm -f ${filename}  /bin/false,
+unless  = /usr/sbin/visudo -cqf ${filename},
+refreshonly = true,
+subscribe   = File[$filename],
+}
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Follow MediaWikis move from getJsonData to getData - change (mediawiki...EventLogging)

2014-12-18 Thread QChris (Code Review)
QChris has uploaded a new change for review.

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

Change subject: Follow MediaWikis move from getJsonData to getData
..

Follow MediaWikis move from getJsonData to getData

MediaWiki deprecated getJsonData in favour of getData. Hence, we
migrate our use of getJsonData to getData.

Change-Id: I68d26ad7dbbb9822c430991af5339eaaccf3862a
---
M includes/ApiJsonSchema.php
M includes/JsonSchemaContent.php
2 files changed, 11 insertions(+), 5 deletions(-)


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

diff --git a/includes/ApiJsonSchema.php b/includes/ApiJsonSchema.php
index 5849fc8..9dd571f 100644
--- a/includes/ApiJsonSchema.php
+++ b/includes/ApiJsonSchema.php
@@ -125,7 +125,11 @@
}
 
$this-markCacheable();
-   $schema = $content-getJsonData( true );
+   $status = $content-getData( true );
+   if ( !$status-isGood() ) {
+   $this-dieStatus( $status );
+   }
+   $schema = $status-getValue();
 
$result = $this-getResult();
$result-addValue( null, 'title', $title-getText() );
diff --git a/includes/JsonSchemaContent.php b/includes/JsonSchemaContent.php
index 96e5709..ea30a16 100644
--- a/includes/JsonSchemaContent.php
+++ b/includes/JsonSchemaContent.php
@@ -56,8 +56,9 @@
 * @return bool: True if valid.
 */
function validate() {
-   $schema = $this-getJsonData();
-   if ( !is_array( $schema ) ) {
+   $status = $this-getData( true );
+   $schema = $status-getValue();
+   if ( !$status-isGood() || !is_array( $schema ) ) {
throw new JsonSchemaException( wfMessage( 
'eventlogging-invalid-json' )-parse() );
}
return efSchemaValidate( $schema );
@@ -178,7 +179,8 @@
 * @return string: HTML representation.
 */
function getHtml() {
-   $schema = $this-getJsonData();
-   return is_array( $schema ) ? self::objectTable( $schema ) : '';
+   $status = $this-getData( true );
+   $schema = $status-getValue();
+   return ( $status-isGood()  is_array( $schema ) ) ? 
self::objectTable( $schema ) : '';
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68d26ad7dbbb9822c430991af5339eaaccf3862a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at

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


[MediaWiki-commits] [Gerrit] sudo: actually make the linting safety checks work - change (operations/puppet)

2014-12-18 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: sudo: actually make the linting safety checks work
..


sudo: actually make the linting safety checks work

The current linting Execs, shamelessly stolen from the admin module, had
a logic error in which it tried doing exit 0 as means to handle the
ensure = absent case, but ended up doing it unconditionally, therefore
rendering the whole check moot!

There's two ways to fix this: either move the test -e check to a
separate onlyif parameter, or guard the whole Exec with an if $ensure
== present check. The latter feels cleaner, so pick that one.

Change-Id: I9b29d3e093446cbd602087d27718f6813cfe372b
---
M modules/sudo/manifests/group.pp
M modules/sudo/manifests/user.pp
2 files changed, 14 insertions(+), 12 deletions(-)

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



diff --git a/modules/sudo/manifests/group.pp b/modules/sudo/manifests/group.pp
index 107dfc6..2ee2118 100644
--- a/modules/sudo/manifests/group.pp
+++ b/modules/sudo/manifests/group.pp
@@ -40,11 +40,12 @@
 content = template('sudo/sudoers.erb'),
 }
 
-exec { sudo_group_${title}_linting:
-command = rm -f ${filename}  false,
-unless  = test -e ${filename}  visudo -cf ${filename} || exit 
0,
-path= '/bin:/usr/bin:/usr/sbin',
-refreshonly = true,
-subscribe   = File[$filename],
+if $ensure == 'present' {
+exec { sudo_group_${title}_linting:
+command = /bin/rm -f ${filename}  /bin/false,
+unless  = /usr/sbin/visudo -cqf ${filename},
+refreshonly = true,
+subscribe   = File[$filename],
+}
 }
 }
diff --git a/modules/sudo/manifests/user.pp b/modules/sudo/manifests/user.pp
index 48fb4a4..6a64fdc 100644
--- a/modules/sudo/manifests/user.pp
+++ b/modules/sudo/manifests/user.pp
@@ -40,11 +40,12 @@
 content = template('sudo/sudoers.erb'),
 }
 
-exec { sudo_user_${title}_linting:
-command = rm -f ${filename}  false,
-unless  = test -e ${filename}  visudo -cf ${filename} || exit 
0,
-path= '/bin:/usr/bin:/usr/sbin',
-refreshonly = true,
-subscribe   = File[$filename],
+if $ensure == 'present' {
+exec { sudo_user_${title}_linting:
+command = /bin/rm -f ${filename}  /bin/false,
+unless  = /usr/sbin/visudo -cqf ${filename},
+refreshonly = true,
+subscribe   = File[$filename],
+}
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b29d3e093446cbd602087d27718f6813cfe372b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [FIX] QueryGenerator: Allow missing 'query' entry - change (pywikibot/core)

2014-12-18 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] QueryGenerator: Allow missing 'query' entry
..

[FIX] QueryGenerator: Allow missing 'query' entry

The QueryGenerator stopped when the result didn't contain a 'query'
entry. If the result doesn't contain anything yet (but needs to be
continued) it's not returning a 'query' entry when used with the
'generator' API feature.

Instead of stopping the iteration when there is not 'query' entry it's
just stopping the iteration if there is no continuation provided.

Bug: T84860
Change-Id: I1f8c4986d69be18134987c951fd65237300e277e
---
M pywikibot/data/api.py
1 file changed, 6 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/79/180779/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 04420c2..864e0ea 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1483,14 +1483,7 @@
 % self.__class__.__name__,
 _logger)
 return
-if query not in self.data:
-pywikibot.debug(
-u%s: stopped iteration because 'query' not found in api 
-uresponse. % self.__class__.__name__,
-_logger)
-pywikibot.debug(unicode(self.data), _logger)
-return
-if self.resultkey in self.data[query]:
+if 'query' in self.data and self.resultkey in self.data[query]:
 resultdata = self.data[query][self.resultkey]
 if isinstance(resultdata, dict):
 pywikibot.debug(u%s received %s; limit=%s
@@ -1538,6 +1531,11 @@
 # self.resultkey in data in last request.submit()
 previous_result_had_data = True
 else:
+if 'query' not in self.data:
+pywikibot.debug(%s: 'query' not found in api response. %
+self.__class__.__name__,
+_logger)
+pywikibot.debug(unicode(self.data), _logger)
 # if (query-)continue is present, self.resultkey might not have
 # been fetched yet
 if self.continue_name not in self.data:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f8c4986d69be18134987c951fd65237300e277e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] Fix autoloader entries - change (mediawiki...CentralAuth)

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

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

Change subject: Fix autoloader entries
..

Fix autoloader entries

Change-Id: I119088ce1f3af860af172f9f40955aa63cc1d59c
---
M CentralAuth.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/CentralAuth.php b/CentralAuth.php
index fcb7e07..a0be43e 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -256,6 +256,7 @@
 $wgAutoloadClasses['SpecialCentralLogin'] = 
$caBase/includes/specials/SpecialCentralLogin.php;
 $wgAutoloadClasses['SpecialMergeAccount'] = 
$caBase/includes/specials/SpecialMergeAccount.php;
 $wgAutoloadClasses['SpecialGlobalUsers'] = 
$caBase/includes/specials/SpecialGlobalUsers.php;
+$wgAutoloadClasses['GlobalUsersPager'] = 
$caBase/includes/specials/SpecialGlobalUsers.php;
 $wgAutoloadClasses['SpecialMultiLock'] = 
$caBase/includes/specials/SpecialMultiLock.php;
 $wgAutoloadClasses['CentralAuthUser'] = $caBase/includes/CentralAuthUser.php;
 $wgAutoloadClasses['CentralAuthPlugin'] = 
$caBase/includes/CentralAuthPlugin.php;
@@ -307,7 +308,7 @@
 $wgAutoloadClasses['UsersToRenameDatabaseUpdates'] = 
$caBase/includes/UsersToRename/UsersToRenameDatabaseUpdates.php;
 
 // only used by maintenance/sendConfirmAndMigrateEmail.php
-$wgAutoloadClasses['EmailableUser'] = $caBase/EmailableUser.php;
+$wgAutoloadClasses['EmailableUser'] = $caBase/includes/EmailableUser.php;
 
 $wgMessagesDirs['SpecialCentralAuth'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['SpecialCentralAuth'] = 
$caBase/CentralAuth.i18n.php;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I119088ce1f3af860af172f9f40955aa63cc1d59c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Make PHPCS pass on JsonContentTest - change (mediawiki/core)

2014-12-18 Thread QChris (Code Review)
QChris has uploaded a new change for review.

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

Change subject: Make PHPCS pass on JsonContentTest
..

Make PHPCS pass on JsonContentTest

Change-Id: I1054d7d0e903e3be7cb815035dddb0f34bcd6334
---
M tests/phpunit/includes/content/JsonContentTest.php
1 file changed, 12 insertions(+), 4 deletions(-)


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

diff --git a/tests/phpunit/includes/content/JsonContentTest.php 
b/tests/phpunit/includes/content/JsonContentTest.php
index 0ad8ecc..0df8d40 100644
--- a/tests/phpunit/includes/content/JsonContentTest.php
+++ b/tests/phpunit/includes/content/JsonContentTest.php
@@ -74,7 +74,11 @@
 */
public function testPreSaveTransform( $input, $transformed ) {
$obj = new JsonContent( $input );
-   $newObj = $obj-preSaveTransform( $this-getMockTitle(), 
$this-getMockUser(), $this-getMockParserOptions() );
+   $newObj = $obj-preSaveTransform(
+   $this-getMockTitle(),
+   $this-getMockUser(),
+   $this-getMockParserOptions()
+   );
$this-assertTrue( $newObj-equals( new JsonContent( 
$transformed ) ) );
}
 
@@ -99,11 +103,13 @@
return array(
array(
(object)array(),
-   'table class=mw-jsontbodytrtd 
class=mw-json-emptyEmpty object/td/tr/tbody/table'
+   'table class=mw-jsontbodytrtd 
class=mw-json-emptyEmpty object/td/tr' .
+   '/tbody/table'
),
array(
(object)array( 'foo' ),
-   'table 
class=mw-jsontbodytrth0/thtd 
class=valuequot;fooquot;/td/tr/tbody/table'
+   'table 
class=mw-jsontbodytrth0/thtd 
class=valuequot;fooquot;/td/tr' .
+   '/tbody/table'
),
array(
(object)array( 'foo', 'bar' ),
@@ -125,7 +131,9 @@
),
array(
(object)array( 
'scriptalert(evil!)/script'),
-   'table 
class=mw-jsontbodytrth0/thtd 
class=valuequot;lt;scriptgt;alert(quot;evil!quot;)lt;/scriptgt;quot;/td/tr/tbody/table',
+   'table 
class=mw-jsontbodytrth0/thtd class=valuequot;' .
+   
'lt;scriptgt;alert(quot;evil!quot;)lt;/scriptgt;quot;' .
+   '/td/tr/tbody/table',
),
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1054d7d0e903e3be7cb815035dddb0f34bcd6334
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at

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


[MediaWiki-commits] [Gerrit] API: Return parsedsummary on onlypst - change (mediawiki/core)

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

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

Change subject: API: Return parsedsummary on onlypst
..

API: Return parsedsummary on onlypst

This updates the summary preview on Show changes for LivePreview.

Bug: T84836
Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
---
M includes/api/ApiParse.php
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/180782/1

diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index ff91b92..ec1abf3 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -218,6 +218,14 @@
$result_array['wikitext'] = array();
ApiResult::setContent( 
$result_array['wikitext'], $this-content-serialize( $format ) );
}
+   if ( !is_null( $params['summary'] ) ) {
+   $result_array['parsedsummary'] = 
array();
+   ApiResult::setContent(
+   $result_array['parsedsummary'],
+   Linker::formatComment( 
$params['summary'], $titleObj )
+   );
+   }
+
$result-addValue( null, 
$this-getModuleName(), $result_array );
 
return;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I169fd1e1b6ed4d4f43ca69f92bc7a38e7823ddae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Beta parsoid conf is now in deploy repo - change (integration/config)

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

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

Change subject: Beta parsoid conf is now in deploy repo
..

Beta parsoid conf is now in deploy repo

We used to provide Parsoid settings via puppet and creating a symlink
for the service to find it.  Nowadays, the settings are maintained in
the deploy repo directly:

/srv/deployment/parsoid/deploy/conf/wmf/betalabs.localsettings.js

Subbu confirmed the Parsoid upstart loads that file.

Delete obsolete localsettings.js link.

Change-Id: I56cee82d0eff87912a6046faafb06426f5e5b57d
---
M jjb/beta.yaml
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/83/180783/1

diff --git a/jjb/beta.yaml b/jjb/beta.yaml
index 84919bd..ebd86be 100644
--- a/jjb/beta.yaml
+++ b/jjb/beta.yaml
@@ -249,8 +249,6 @@
  RSYNC_OPTS=--update --times --recursive --links --delete-after 
--delay-updates
  rsync $RSYNC_OPTS $WORKSPACE/parsoid $PARSOID_TARGET
  rsync $RSYNC_OPTS $WORKSPACE/deploy $PARSOID_TARGET
- # Configuration file is managed by puppet
- ln -s /srv/deployment/parsoid/localsettings.js 
$PARSOID_TARGET/parsoid/api/localsettings.js
 
  - shell: |
  sudo /etc/init.d/parsoid restart

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56cee82d0eff87912a6046faafb06426f5e5b57d
Gerrit-PatchSet: 1
Gerrit-Project: integration/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] Fixed $wgAutoloadClasses for ConfigMerger - change (mediawiki...ZeroPortal)

2014-12-18 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Fixed $wgAutoloadClasses for ConfigMerger
..

Fixed $wgAutoloadClasses for ConfigMerger

Change-Id: I6535369acc5f0e747e3c351a5477dbf8eea73b35
---
M ZeroPortal.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal 
refs/changes/84/180784/1

diff --git a/ZeroPortal.php b/ZeroPortal.php
index 270aa1f..3282e17 100644
--- a/ZeroPortal.php
+++ b/ZeroPortal.php
@@ -41,12 +41,12 @@
  'ApiZeroPortal',
  'ConfigPageHooks',
  'LuaLibrary',
- 'PortalSpecialPage',
- 'ZeroConfigView',
+ 'PortalSpecialPage',
+ 'ConfigMerger' = 'PortalSpecialPage',
+ 'ZeroConfigView',
   ) as $key = $class ) {
$wgAutoloadClasses['ZeroPortal\\' . ( is_string( $key ) ? $key : $class 
)] = $zpDir . $class . '.php';
 }
-$wgAutoloadClasses['ZeroPortal\\ConfigMerger'] = $zpDir . 
'PortalSpecialPage.php';
 unset( $zpDir );
 
 $wgResourceModules['zeroportal.config'] = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6535369acc5f0e747e3c351a5477dbf8eea73b35
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed $wgAutoloadClasses for ConfigMerger - change (mediawiki...ZeroPortal)

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

Change subject: Fixed $wgAutoloadClasses for ConfigMerger
..


Fixed $wgAutoloadClasses for ConfigMerger

Change-Id: I6535369acc5f0e747e3c351a5477dbf8eea73b35
---
M ZeroPortal.php
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/ZeroPortal.php b/ZeroPortal.php
index 270aa1f..eaa466a 100644
--- a/ZeroPortal.php
+++ b/ZeroPortal.php
@@ -38,15 +38,15 @@
 // autoload extension classes
 $zpDir .= 'includes' . DIRECTORY_SEPARATOR;
 foreach ( array(
- 'ApiZeroPortal',
- 'ConfigPageHooks',
- 'LuaLibrary',
- 'PortalSpecialPage',
- 'ZeroConfigView',
-  ) as $key = $class ) {
+ 'ApiZeroPortal',
+ 'ConfigPageHooks',
+ 'LuaLibrary',
+ 'PortalSpecialPage',
+ 'ConfigMerger' = 'PortalSpecialPage',
+ 'ZeroConfigView',
+ ) as $key = $class ) {
$wgAutoloadClasses['ZeroPortal\\' . ( is_string( $key ) ? $key : $class 
)] = $zpDir . $class . '.php';
 }
-$wgAutoloadClasses['ZeroPortal\\ConfigMerger'] = $zpDir . 
'PortalSpecialPage.php';
 unset( $zpDir );
 
 $wgResourceModules['zeroportal.config'] = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6535369acc5f0e747e3c351a5477dbf8eea73b35
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ZeroPortal
Gerrit-Branch: master
Gerrit-Owner: Yurik yu...@wikimedia.org
Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Yurik yu...@wikimedia.org
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   5   >