[MediaWiki-commits] [Gerrit] More code cleanup on Special:CheckUser - change (mediawiki...CheckUser)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: More code cleanup on Special:CheckUser
..


More code cleanup on Special:CheckUser

* Fix regression introduced in I4b7723635 (parentheses wrapped in both 
timestamps)
* Make sure that users without 'block' right cannot use mass blocker
* Add some FIXMEs

Change-Id: Ic9f4842cf0f220b46a084b00aa872f6930cc21c7
---
M specials/SpecialCheckUser.php
1 file changed, 176 insertions(+), 153 deletions(-)

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



diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index 978bdbc..9f7f0f1 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -15,17 +15,18 @@
}
 
public function execute( $subpage ) {
-   $request = $this->getRequest();
-
-   $this->checkPermissions();
$this->setHeaders();
+   $this->checkPermissions();
+
+   $out = $this->getOutput();
+   $request = $this->getRequest();
 
if ( $this->getUser()->isAllowed( 'checkuser-log' ) ) {
$subtitleLink = Linker::linkKnown(
SpecialPage::getTitleFor( 'CheckUserLog' ),
$this->msg( 'checkuser-showlog' )->escaped()
);
-   $this->getOutput()->addSubtitle( $subtitleLink );
+   $out->addSubtitle( $subtitleLink );
}
 
$user = $request->getText( 'user', $request->getText( 'ip', 
$subpage ) );
@@ -61,16 +62,17 @@
$name = $user;
}
 
+   $this->showIntroductoryText();
$this->showForm( $user, $reason, $checktype, $ip, $xff, $name, 
$period );
 
// Perform one of the various submit operations...
if ( $request->wasPosted() ) {
if ( !$this->getUser()->matchEditToken( 
$request->getVal( 'wpEditToken' ) ) ) {
-   $this->getOutput()->wrapWikiMsg( '$1', 'checkuser-token-fail' );
+   $out->wrapWikiMsg( '$1', 'checkuser-token-fail' );
} elseif ( $request->getVal( 'action' ) === 'block' ) {
$this->doMassUserBlock( $users, $blockParams, 
$tag, $talkTag );
} elseif ( !$this->checkReason( $reason ) ) {
-   $this->getOutput()->addWikiMsg( 
'checkuser-noreason' );
+   $out->addWikiMsg( 'checkuser-noreason' );
} elseif ( $checktype == 'subuserips' ) {
$this->doUserIPsRequest( $name, $reason, 
$period );
} elseif ( $xff && $checktype == 'subedits' ) {
@@ -87,23 +89,10 @@
}
// Add CIDR calculation convenience JS form
$this->addJsCIDRForm();
-   $this->getOutput()->addModules( 'ext.checkUser' );
+   $out->addModules( 'ext.checkUser' );
}
 
-   /**
-* As we use the same small set of messages in various methods and that
-* they are called often, we call them once and save them in 
$this->message
-*/
-   protected function preCacheMessages() {
-   if ( $this->message === null ) {
-   $msgKeys = array( 'diff', 'hist', 'minoreditletter', 
'newpageletter', 'blocklink', 'log' );
-   foreach ( $msgKeys as $msg ) {
-   $this->message[$msg] = $this->msg( $msg 
)->escaped();
-   }
-   }
-   }
-
-   protected function showGuide() {
+   protected function showIntroductoryText() {
global $wgCheckUserCIDRLimit;
$this->getOutput()->addWikiText(
$this->msg( 'checkuser-summary',
@@ -140,8 +129,6 @@
} else {
$encuserips = 1;
}
-
-   $this->showGuide(); // explanation text
 
$form = Xml::openElement( 'form', array( 'action' => $action,
'name' => 'checkuserform', 'id' => 'checkuserform', 
'method' => 'post' ) );
@@ -186,10 +173,10 @@
 
/**
 * Get a selector of time period options
-* @param int $selected, selected level
+* @param int $selected Currently selected option
 * @return string
 */
-   protected function getPeriodMenu( $selected = null ) {
+   protected function getPeriodMenu( $selected ) {
$s = '' . $this->msg( 'checkuser-period' 
)->escaped() . '';
$s .= Xml::openElement(
'select',
@@ -218,6 +205,28 @@
}
 
/**
+* @param string $reason
+* 

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

2016-03-25 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: ff65a71..ec1f924
..


Syncronize VisualEditor: ff65a71..ec1f924

Change-Id: I4e102b66e2028eac199978550ede68b2714dbb9e
---
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 ff65a71..ec1f924 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit ff65a717734cf6166d12942829817f1e48c9ee1c
+Subproject commit ec1f924c59c7a44b7c7e1e7d40922ba886c70b5a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e102b66e2028eac199978550ede68b2714dbb9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


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

2016-03-25 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: ff65a71..ec1f924
..

Syncronize VisualEditor: ff65a71..ec1f924

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/93/279693/1

diff --git a/VisualEditor b/VisualEditor
index ff65a71..ec1f924 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit ff65a717734cf6166d12942829817f1e48c9ee1c
+Subproject commit ec1f924c59c7a44b7c7e1e7d40922ba886c70b5a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e102b66e2028eac199978550ede68b2714dbb9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Template Dialog: pushPending while the dialog is closing - change (mediawiki...VisualEditor)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Template Dialog: pushPending while the dialog is closing
..


Template Dialog: pushPending while the dialog is closing

Double-clicking the "insert" button would double-insert the template. Counting
the close as a pending action avoids that.

Bug: T129725
Change-Id: I41af7c051fd54004cecd563d7a6cf8fdb452840f
---
M modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
index 4ddf49a..34693c2 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWTemplateDialog.js
@@ -428,7 +428,8 @@

dialog.transclusionModel.insertTransclusionNode( dialog.getFragment() );
}
 
-   dialog.close( { action: action } );
+   dialog.pushPending();
+   dialog.close( { action: action } ).always( 
dialog.popPending.bind( dialog ) );
} ).always( deferred.resolve );
 
return deferred;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41af7c051fd54004cecd563d7a6cf8fdb452840f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
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: 068bafd..ff65a71 - change (mediawiki/extensions)

2016-03-25 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 068bafd..ff65a71
..


Syncronize VisualEditor: 068bafd..ff65a71

Change-Id: Ib7687ba7fbf2b67ed911e34cb90aa4b5566267a8
---
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 068bafd..ff65a71 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 068bafd9dfcc4382d7ad1fb3b5a4a1dd19bbd71c
+Subproject commit ff65a717734cf6166d12942829817f1e48c9ee1c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7687ba7fbf2b67ed911e34cb90aa4b5566267a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] MediaWiki theme: Replace fixed CSS property values with vari... - change (oojs/ui)

2016-03-25 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

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

Change subject: MediaWiki theme: Replace fixed CSS property values with 
variables
..

MediaWiki theme: Replace fixed CSS property values with variables

Replacing fixed CSS property values with variables and also specifying
`background-color` property.

Change-Id: Idba17bde058d6623fcc0433c335785857c296136
---
M src/themes/mediawiki/widgets.less
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/91/279691/1

diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index aea985f..72d6314 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -376,17 +376,17 @@
.oo-ui-box-sizing( border-box );
position: absolute;
left: 0;
-   border-radius: @border-radius-default;
width: @size-input-binary;
height: @size-input-binary;
-   background-color: white;
-   border: @border-input-binary;
+   background-color: @background-color-default;
.oo-ui-background-image-svg( 
'@{oo-ui-default-image-path}/icons/check-constructive-deprecated' );
.oo-ui-background-image-safari( 
'@{oo-ui-default-image-path}/icons/check-constructive-deprecated' );
background-repeat: no-repeat;
background-position: center center;
background-origin: border-box;
background-size: 0 0;
+   border: @border-input-binary;
+   border-radius: @border-radius-default;
}
 
&:checked + span  {
@@ -499,17 +499,17 @@
.oo-ui-box-sizing( border-box );
position: absolute;
left: 0;
-   border-radius: 100%;
width: @size-input-binary;
height: @size-input-binary;
-   background: white;
-   border: @border-input-binary;
+   background-color: @background-color-default;
.oo-ui-background-image-svg( 
'@{oo-ui-default-image-path}/icons/circle-constructive-deprecated' );
.oo-ui-background-image-safari( 
'@{oo-ui-default-image-path}/icons/circle-constructive-deprecated' );
background-repeat: no-repeat;
background-position: center center;
background-origin: border-box;
background-size: 0 0;
+   border: @border-input-binary;
+   border-radius: 100%;
}
 
&:checked + span  {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idba17bde058d6623fcc0433c335785857c296136
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FundraiserLandingPage)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add npm entry point
..


Add npm entry point

Change-Id: Ife27970d41a068ebc8dc40cbeaa34f5813146176
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife27970d41a068ebc8dc40cbeaa34f5813146176
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FundraiserLandingPage
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ArticleTarget: Don't assume an explicit oldid is old; check ... - change (mediawiki...VisualEditor)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: ArticleTarget: Don't assume an explicit oldid is old; check 
against current
..


ArticleTarget: Don't assume an explicit oldid is old; check against current

Bug: T130810
Change-Id: I3d5b748da37a0a059f282f97dd0d68d1846e2553
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 14f9dce..6829160 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -42,10 +42,12 @@
 
// Sometimes we actually don't want to send a useful oldid
// if we do, PostEdit will give us a 'page restored' message
+   revisionId = Number.parseInt( revisionId );
this.requestedRevId = revisionId;
-   this.revid = revisionId || mw.config.get( 'wgCurRevisionId' );
+   this.currentRevisionId = mw.config.get( 'wgCurRevisionId' );
+   this.revid = revisionId || this.currentRevisionId;
 
-   this.restoring = !!revisionId;
+   this.restoring = !!revisionId && revisionId !== this.currentRevisionId;
this.pageDeletedWarning = false;
this.editToken = mw.user.tokens.get( 'editToken' );
this.submitUrl = ( new mw.Uri( mw.util.getUrl( this.pageName ) ) )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d5b748da37a0a059f282f97dd0d68d1846e2553
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] contint: increase tmpfs size to 384M (+128M) - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: contint: increase tmpfs size to 384M (+128M)
..


contint: increase tmpfs size to 384M (+128M)

There have been recent issues related to a full tmpfs and package
installation/compilation. This issue will be moot once we're fully moved
over to nodepool instances that make use of the package caching, but
let's increase the tmpfs size for now to accommodate jobs still running
on older instances.

Change-Id: Idc3c7a2ff0daec351d4269f425d811f1e06a30a3
---
M modules/role/manifests/ci/slave.pp
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/ci/slave.pp 
b/modules/role/manifests/ci/slave.pp
index 253aca8..05bc3cb 100644
--- a/modules/role/manifests/ci/slave.pp
+++ b/modules/role/manifests/ci/slave.pp
@@ -44,8 +44,9 @@
 
 contint::tmpfs { 'tmpfs for jenkins CI slave':
 mount_point => '/var/lib/jenkins-slave/tmpfs',
-size=> '256M',
+size=> '384M',
 }
+
 nrpe::monitor_service { 'ci_tmpfs':
 description  => 'CI tmpfs disk space',
 nrpe_command => '/usr/lib/nagios/plugins/check_disk -w 20% -c 5% -e -p 
/var/lib/jenkins-slave/tmpfs',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc3c7a2ff0daec351d4269f425d811f1e06a30a3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dduvall 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Paladox 
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 video-js to 5.8.6, Update videojs-resolution-switcher... - change (mediawiki...TimedMediaHandler)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update video-js to 5.8.6, Update videojs-resolution-switcher to 
0.4.1
..


Update video-js to 5.8.6, Update videojs-resolution-switcher to 0.4.1

videojs -> https://github.com/videojs/video.js/releases

videojs-resolution-switcher ->
https://github.com/kmoskwiak/videojs-resolution-switcher/releases

Change-Id: Id93207100161bd3edf2a952f9126cbf1999002eb
---
M TimedMediaHandler.hooks.php
M package.json
M patches/videojs.defaults.patch
M resources/videojs-resolution-switcher/videojs-resolution-switcher.css
M resources/videojs-resolution-switcher/videojs-resolution-switcher.js
M resources/videojs/font/VideoJS.eot
M resources/videojs/font/VideoJS.ttf
M resources/videojs/font/VideoJS.woff
M resources/videojs/ie8/videojs-ie8.js
M resources/videojs/lang/ar.js
M resources/videojs/lang/ba.js
M resources/videojs/lang/bg.js
M resources/videojs/lang/ca.js
M resources/videojs/lang/cs.js
M resources/videojs/lang/da.js
M resources/videojs/lang/de.js
A resources/videojs/lang/en.js
M resources/videojs/lang/es.js
A resources/videojs/lang/fa.js
M resources/videojs/lang/fi.js
M resources/videojs/lang/fr.js
M resources/videojs/lang/hr.js
M resources/videojs/lang/hu.js
M resources/videojs/lang/it.js
M resources/videojs/lang/ja.js
M resources/videojs/lang/ko.js
A resources/videojs/lang/nb.js
M resources/videojs/lang/nl.js
A resources/videojs/lang/nn.js
M resources/videojs/lang/pt-BR.js
M resources/videojs/lang/ru.js
M resources/videojs/lang/sr.js
M resources/videojs/lang/sv.js
M resources/videojs/lang/tr.js
M resources/videojs/lang/uk.js
M resources/videojs/lang/vi.js
M resources/videojs/lang/zh-CN.js
M resources/videojs/lang/zh-TW.js
M resources/videojs/video-js.css
M resources/videojs/video.js
40 files changed, 3,184 insertions(+), 1,269 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id93207100161bd3edf2a952f9126cbf1999002eb
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Optimise for automatic page images banners on moile views - change (mediawiki...WikidataPageBanner)

2016-03-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Optimise for automatic page images banners on moile views
..

Optimise for automatic page images banners on moile views

Update algorithm for positioning images
* Hide the image until its positioned to avoid jerking movements
* Take into consideration whether a position was provided or not
* For portrait photos (height is greater than container) reposition
to -10% on basis that most portraits put the face in this position
* Add a bottom transparent border for white lead banners
* Add a panorama class to distinguish between portrait photos and panoramas
in the styling
** Reposition panoramas at -25% when no center position given

Change-Id: Idff7c17a6d1ab6e1324053247903052bc4087f5b
---
M includes/WikidataPageBanner.functions.php
M includes/WikidataPageBanner.hooks.php
M 
resources/ext.WikidataPageBanner.positionBanner/ext.WikidataPageBanner.positionBanner.js
M resources/ext.WikidataPageBanner.styles/ext.WikidataPageBanner.less
M resources/ext.WikidataPageBanner.styles/ext.WikidataPageBanner.minerva.less
M templates/banner.mustache
6 files changed, 83 insertions(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner 
refs/changes/87/279687/1

diff --git a/includes/WikidataPageBanner.functions.php 
b/includes/WikidataPageBanner.functions.php
index 8072990..8e7836b 100644
--- a/includes/WikidataPageBanner.functions.php
+++ b/includes/WikidataPageBanner.functions.php
@@ -76,13 +76,14 @@
public static function addFocus( &$paramsForBannerTemplate, 
$argumentsFromParserFunction ) {
// default centering would be 0, and -1 would represent extreme 
left and extreme top
// Allowed values for each coordinate is between 0 and 1
-   $paramsForBannerTemplate['data-pos-x'] = 0;
-   $paramsForBannerTemplate['data-pos-y'] = 0;
+   // If no value has been specified these are set to null
+   $paramsForBannerTemplate['hasPosition'] = false;
 
if ( isset( $argumentsFromParserFunction['origin'] ) ) {
// split the origin into x and y coordinates
$coords = explode( ',', 
$argumentsFromParserFunction['origin'] );
if ( count( $coords ) === 2 ) {
+   $paramsForBannerTemplate['hasPosition'] = true;
$positionx = $coords[0];
$positiony = $coords[1];
// TODO:Add a js module to use the data-pos 
values being set below to fine tune the
@@ -167,7 +168,9 @@
$options['banner'] = $bannerurl;
$options['srcset'] = $srcset;
$file = wfFindFile( $bannerfile );
-   $options['maxWidth'] = $file->getWidth();
+   $fileWidth = $file->getWidth();
+   $options['maxWidth'] = $fileWidth;
+   $options['isPanorama'] = $fileWidth > ( 
$file->getHeight() * 2 );
$options['isHeadingOverrideEnabled'] = $config->get( 
'WPBEnableHeadingOverride' );
$banner = $templateParser->processTemplate(
'banner',
diff --git a/includes/WikidataPageBanner.hooks.php 
b/includes/WikidataPageBanner.hooks.php
index 31cdc94..a0bdab9 100644
--- a/includes/WikidataPageBanner.hooks.php
+++ b/includes/WikidataPageBanner.hooks.php
@@ -287,10 +287,12 @@
$parser->getOutput()->setExtensionData( 
'wpb-banner-options', $paramsForBannerTemplate );
$parser->fetchFileAndTitle( $bannerTitle );
$parser->getOutput()->setProperty( 
'wpb_banner', $bannerTitle->getText() );
-   $parser->getOutput()->setProperty( 
'wpb_banner_focus_x',
-   
$paramsForBannerTemplate['data-pos-x'] );
-   $parser->getOutput()->setProperty( 
'wpb_banner_focus_y',
-   
$paramsForBannerTemplate['data-pos-y'] );
+   if ( isset( 
$paramsForBannerTemplate['data-pos-x'] ) ) {
+   $parser->getOutput()->setProperty( 
'wpb_banner_focus_x',
+   
$paramsForBannerTemplate['data-pos-x'] );
+   $parser->getOutput()->setProperty( 
'wpb_banner_focus_y',
+   
$paramsForBannerTemplate['data-pos-y'] );
+   }
}
}
}
diff --git 

[MediaWiki-commits] [Gerrit] [Thanks] Add dependencies in parameter_functions.py - change (integration/config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [Thanks] Add dependencies in parameter_functions.py
..


[Thanks] Add dependencies in parameter_functions.py

This makes the dependencies be the same as in
jjb/mediawiki-extensions.yaml .

Change-Id: I322c406d3637e5495b019689e8dc03e820656899
---
M zuul/parameter_functions.py
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 0eca0a4..330a781 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -99,7 +99,9 @@
 'SolrStore': ['SemanticMediaWiki'],
 'Spreadsheet': ['PHPExcel'],
 'SyntaxHighlight_GeSHi': ['VisualEditor'],
-'Thanks': ['Echo', 'Flow', 'MobileFrontend'],
+'Thanks': ['Echo', 'Flow', 'MobileFrontend', 'VisualEditor',
+   'GuidedTour', 'AbuseFilter', 'SpamBlacklist',
+   'CheckUser', 'EventLogging', 'ConfirmEdit'],
 'Translate': ['UniversalLanguageSelector', 'EventLogging'],
 'TranslateSvg': ['Translate'],
 'TranslationNotifications': ['Translate'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I322c406d3637e5495b019689e8dc03e820656899
Gerrit-PatchSet: 7
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Drop wmf prefix from resource_change topic - change (mediawiki/vagrant)

2016-03-25 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Drop wmf prefix from resource_change topic
..

Drop wmf prefix from resource_change topic

This topic is not limited to WMF use, so it doesn't seem to make sense to
single it out as WMF-specific.

Change-Id: I23dba6b1b900694acd3de06279a6d3ad422be15d
---
M puppet/modules/role/files/eventbus/topics.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/86/279686/1

diff --git a/puppet/modules/role/files/eventbus/topics.yaml 
b/puppet/modules/role/files/eventbus/topics.yaml
index 090dcdf..e489419 100644
--- a/puppet/modules/role/files/eventbus/topics.yaml
+++ b/puppet/modules/role/files/eventbus/topics.yaml
@@ -20,5 +20,5 @@
 mediawiki.revision_create:
   schema_name: revision_create
 
-wmf.resource_change:
+resource_change:
   schema_name: resource_change

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23dba6b1b900694acd3de06279a6d3ad422be15d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 35ea4b3..d395b31 - change (mediawiki/extensions)

2016-03-25 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 35ea4b3..d395b31
..

Syncronize VisualEditor: 35ea4b3..d395b31

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/84/279684/1

diff --git a/VisualEditor b/VisualEditor
index 35ea4b3..d395b31 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 35ea4b3e4e31aeac617122f63edc0d7d6c9dc0a8
+Subproject commit d395b31fdb16a10e66298a2fa98beced0f519478

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id8fa2cf62830491d7d946a0560b158c1c56ff762
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] [bugfix] Don't break watchlist.py for InvalidTitle - change (pywikibot/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [bugfix] Don't break watchlist.py for InvalidTitle
..


[bugfix] Don't break watchlist.py for InvalidTitle

Instead of breaking the script print the error message.

Bug: T106954
Change-Id: Ie8ca8fa4c66d724b998be72b53a389a402c55e7e
---
M scripts/watchlist.py
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index 9774c5d..316ed70 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -115,7 +115,10 @@
 watchlist = refresh(site, sysop=sysop)
 pywikibot.output(u'%i pages in the watchlist.' % len(watchlist))
 for page in watchlist:
-pywikibot.stdout(page.title())
+try:
+pywikibot.stdout(page.title())
+except pywikibot.InvalidTitle:
+pywikibot.exception()
 
 if __name__ == "__main__":
 main()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8ca8fa4c66d724b998be72b53a389a402c55e7e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
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 VE core submodule to master (b286f7f) - change (mediawiki...VisualEditor)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (b286f7f)
..


Update VE core submodule to master (b286f7f)

New changes:
1f298ce Update OOjs UI to v0.16.4
650776a Improve drop target preview for block node dragging
77fb965 LinearArrowKeyDownHandler: test more
0f669bf Fix behaviour of SurfaceFragment#annotateContent
fa08fca ve.ui.ContentActions: Add tests
3f4185f Tests: Add speed warnings to UI surface constructors
4bee4eb Localisation updates from https://translatewiki.net.
b678dbe Refactor getNodeAndOffset
254a802 Localisation updates from https://translatewiki.net.
0f0d980 SurfaceFramgent: Guard against tx.getModifiedRange returning null
603abe4 TriggerRegistry: Alter trigger for paste special on Mac to OS standard

Change-Id: I512c9b3a99673a876040e0fce789483e7221a78c
---
M .jsduck/categories.json
M .jsduck/eg-iframe.html
M extension.json
M lib/ve
4 files changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 48f1d6d..752fc3c 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -51,6 +51,7 @@
"classes": [
"ve",
"ve.Range",
+   "ve.PositionStep",
"ve.SelectionState",
"ve.EventSequencer",
"ve.Filibuster",
diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 465e4e0..9c1e8ff 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -152,6 +152,7 @@



+   



diff --git a/extension.json b/extension.json
index 26e0572..459d15e 100644
--- a/extension.json
+++ b/extension.json
@@ -511,6 +511,7 @@
"lib/ve/src/ve.Range.js",
"lib/ve/src/ve.SelectionState.js",
"lib/ve/src/ve.Node.js",
+   "lib/ve/src/ve.PositionStep.js",
"lib/ve/src/ve.BranchNode.js",
"lib/ve/src/ve.LeafNode.js",
"lib/ve/src/ve.Document.js",
diff --git a/lib/ve b/lib/ve
index d1ce123..b286f7f 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit d1ce123f9ff1f46d86476c86b8ccb23d04ee35a7
+Subproject commit b286f7fb9457e12a606afdd55bbfea7a43c21a5a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I512c9b3a99673a876040e0fce789483e7221a78c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Krinkle 
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: 8bf7d4b..35ea4b3 - change (mediawiki/extensions)

2016-03-25 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 8bf7d4b..35ea4b3
..

Syncronize VisualEditor: 8bf7d4b..35ea4b3

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


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

diff --git a/VisualEditor b/VisualEditor
index 8bf7d4b..35ea4b3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 8bf7d4ba0791059c513be23e49cecf5b1faa6337
+Subproject commit 35ea4b3e4e31aeac617122f63edc0d7d6c9dc0a8

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fd761674a4e3da27c11c4ba4708a1eb86f91c48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8bf7d4b..35ea4b3 - change (mediawiki/extensions)

2016-03-25 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 8bf7d4b..35ea4b3
..


Syncronize VisualEditor: 8bf7d4b..35ea4b3

Change-Id: I2fd761674a4e3da27c11c4ba4708a1eb86f91c48
---
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 8bf7d4b..35ea4b3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 8bf7d4ba0791059c513be23e49cecf5b1faa6337
+Subproject commit 35ea4b3e4e31aeac617122f63edc0d7d6c9dc0a8

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fd761674a4e3da27c11c4ba4708a1eb86f91c48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Don't strip namespace from text that we replace firstHeading... - change (mediawiki...VisualEditor)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't strip namespace from text that we replace firstHeading 
with
..


Don't strip namespace from text that we replace firstHeading with

wgTitle is basically just $title->getText()
wgPageName is $title->getPrefixedDBkey()

So we need to take wgPageName and run getPrefixedText (difference is underscores
get replaced by spaces)

Change-Id: Ib99f0d20f1ba99338f80bbbf39cffd544887c3fa
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index d3c04ea..7508482 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -297,7 +297,9 @@
this.checkboxesByName = {};
this.$otherFields = $( [] );
if ( [ 'edit', 'submit' ].indexOf( mw.util.getParamValue( 'action' ) ) 
!== -1 ) {
-   $( '#content #firstHeading' ).text( mw.config.get( 'wgTitle' ) 
);
+   $( '#content #firstHeading' ).text(
+   mw.Title.newFromText( mw.config.get( 'wgPageName' ) 
).getPrefixedText()
+   );
}
 
if ( data.checkboxes ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib99f0d20f1ba99338f80bbbf39cffd544887c3fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Exclude null edits from edit metrics - change (mediawiki...WikimediaEvents)

2016-03-25 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Exclude null edits from edit metrics
..

Exclude null edits from edit metrics

Edit metrics are generally interested in actual edits with content changes,
rather than null edits without any content change.

To this end, the WikimediaEventsHooks extension had set up a quick return for
the case that the $revision parameter is null. This is inspired by the
documentation for PageContentSaveComplete [1], which mentions that the
$revision parameter *can* be null if the content was not changed. However, on
the MediaWiki side, the $revision parameter actually ends up being defined
even if the content has not changed.

This patch improves null edit detection by additionally checking for the
revision property in the status object, which is null for null edits.

[1]: https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete

Bug: T128838
Change-Id: Ia855b653534a19c35f600988f59e204457cad3c4
---
M WikimediaEventsHooks.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 7f70a97..e74e23f 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -54,7 +54,8 @@
public static function onPageContentSaveComplete( $article, $user, 
$content, $summary,
$isMinor, $isWatch, $section, $flags, $revision, $status, 
$baseRevId ) {
 
-   if ( !$revision ) {
+   if ( !$revision || is_null( $status->getValue()['revision'] ) ) 
{
+   // Null edit. Do not count.
return;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia855b653534a19c35f600988f59e204457cad3c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] [IMPR] Show which special page is retrieved - change (pywikibot/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [IMPR] Show which special page is retrieved
..


[IMPR] Show which special page is retrieved

- If the operator is running multiple scripts maybe in a loop
  it is a good approach to inform him which special page is processed.
- The additional comment may be omitted then.

Change-Id: I85ec74cc626e00e3daaf9cad33f4664925b7219e
---
M scripts/redirect.py
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/scripts/redirect.py b/scripts/redirect.py
index 8677d14..cb12475 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -295,8 +295,7 @@
 elif self.page_title:
 yield self.page_title
 else:
-# retrieve information from broken redirect special page
-pywikibot.output(u'Retrieving special page...')
+pywikibot.output('Retrieving broken redirect special page...')
 for page in self.site.preloadpages(self.site.broken_redirects()):
 yield page
 
@@ -330,8 +329,7 @@
 elif self.page_title:
 yield self.page_title
 else:
-# retrieve information from double redirect special page
-pywikibot.output(u'Retrieving special page...')
+pywikibot.output('Retrieving double redirect special page...')
 for page in self.site.preloadpages(self.site.double_redirects()):
 yield page
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85ec74cc626e00e3daaf9cad33f4664925b7219e
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [CirrusSearch] Update Jenkins tests - change (integration/config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [CirrusSearch] Update Jenkins tests
..


[CirrusSearch] Update Jenkins tests

Add jsonlint and jshint to check: for non-whitelisted users.

Please also see I463e92dc78d558cab7f537117cb06fa385ab09ea

Change-Id: I71679c6e2d1f4e1825fee86d413530768ea65565
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 46a6ae3..1632915 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2585,11 +2585,13 @@
 
   - name: mediawiki/extensions/CirrusSearch
 template:
-  - name: jshint
   - name: extension-gate
   - name: rake
   - name: mw-checks-test
   - name: npm
+check:
+  - jsonlint
+  - jshint
 test:
   - mwext-CirrusSearch-whitespaces
 gate-and-submit:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71679c6e2d1f4e1825fee86d413530768ea65565
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] djvutxt.py: specify Page ns in title when creating Page - change (pywikibot/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: djvutxt.py: specify Page ns in title when creating Page
..


djvutxt.py: specify Page ns in title when creating Page

Construct target page title using explicitly Proofread Page namespace to
avoid errors when instantiating ProofreadPage object.

Bug: T130908
Change-Id: I1e138e694acb3523b8e3be1efa447ffaa681dd9b
---
M scripts/djvutext.py
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/scripts/djvutext.py b/scripts/djvutext.py
index 806b99f..7a3589d 100644
--- a/scripts/djvutext.py
+++ b/scripts/djvutext.py
@@ -74,6 +74,7 @@
 self._djvu = djvu
 self._index = index
 self._prefix = self._index.title(withNamespace=False)
+self._page_ns = self.site._proofread_page_ns.custom_name
 
 if not pages:
 self._pages = (1, self._djvu.number_of_images())
@@ -99,8 +100,10 @@
 def gen(self):
 """Generate pages from specified page interval."""
 for page_number in self.page_number_gen():
-title = '{prefix}/{number}'.format(prefix=self._prefix,
-   number=page_number)
+title = '{page_ns}:{prefix}/{number}'.format(
+page_ns=self._page_ns,
+prefix=self._prefix,
+number=page_number)
 page = ProofreadPage(self._index.site, title)
 page.page_number = page_number  # remember page number in djvu file
 yield page

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e138e694acb3523b8e3be1efa447ffaa681dd9b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use distinct log actions for patrol - change (mediawiki/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use distinct log actions for patrol
..


Use distinct log actions for patrol

A distinct log action is provided for automatic patrols.
The old 'auto' param is preserved so that old log entries can still
be correctly identified in logs and API queries.
With I6a61175f9a111c03d15b4d41751c818e3a411ff6, this enables us to
filter new manual patrol entries in logs.
Old automatic entries will be in the wrong list, but still marked
as automatic.

Bug: T27799
Change-Id: I05d962fa3ec45039122bb7e370b7e3fb8bbaa3c8
---
M includes/DefaultSettings.php
M includes/logging/PatrolLog.php
M includes/logging/PatrolLogFormatter.php
M languages/i18n/en.json
M languages/i18n/qqq.json
5 files changed, 17 insertions(+), 4 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3b2c697..2aefc64 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -7218,6 +7218,7 @@
'move/move' => 'MoveLogFormatter',
'move/move_redir' => 'MoveLogFormatter',
'patrol/patrol' => 'PatrolLogFormatter',
+   'patrol/autopatrol' => 'PatrolLogFormatter',
'protect/modify' => 'ProtectLogFormatter',
'protect/move_prot' => 'ProtectLogFormatter',
'protect/protect' => 'ProtectLogFormatter',
@@ -7255,6 +7256,10 @@
'event' => [ 'event' ],
'revision' => [ 'revision' ],
],
+   'patrol' => [
+   'patrol' => [ 'patrol' ],
+   'autopatrol' => [ 'autopatrol' ],
+   ],
'protect' => [
'protect' => [ 'protect' ],
'modify' => [ 'modify' ],
diff --git a/includes/logging/PatrolLog.php b/includes/logging/PatrolLog.php
index f6ecc50..d1de2cd 100644
--- a/includes/logging/PatrolLog.php
+++ b/includes/logging/PatrolLog.php
@@ -58,7 +58,9 @@
$user = $wgUser;
}
 
-   $entry = new ManualLogEntry( 'patrol', 'patrol' );
+   $action = $auto ? 'autopatrol' : 'patrol';
+
+   $entry = new ManualLogEntry( 'patrol', $action );
$entry->setTarget( $rc->getTitle() );
$entry->setParameters( self::buildParams( $rc, $auto ) );
$entry->setPerformer( $user );
diff --git a/includes/logging/PatrolLogFormatter.php 
b/includes/logging/PatrolLogFormatter.php
index e6f9fb6..5b933ce 100644
--- a/includes/logging/PatrolLogFormatter.php
+++ b/includes/logging/PatrolLogFormatter.php
@@ -30,11 +30,11 @@
  */
 class PatrolLogFormatter extends LogFormatter {
protected function getMessageKey() {
-   $key = parent::getMessageKey();
$params = $this->getMessageParameters();
if ( isset( $params[5] ) && $params[5] ) {
-   // Messages: logentry-patrol-patrol-auto
-   $key .= '-auto';
+   $key = 'logentry-patrol-patrol-auto';
+   } else {
+   $key = 'logentry-patrol-patrol';
}
 
return $key;
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 5ae694e..d1f7abc 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -4032,6 +4032,7 @@
"randomrootpage": "Random root page",
"log-action-filter-block": "Type of block:",
"log-action-filter-delete": "Type of deletion:",
+   "log-action-filter-patrol": "Type of patrol:",
"log-action-filter-protect": "Type of protection:",
"log-action-filter-upload": "Type of upload:",
"log-action-filter-all": "All",
@@ -4042,6 +4043,8 @@
"log-action-filter-delete-restore": "Page undeletion",
"log-action-filter-delete-event": "Log deletion",
"log-action-filter-delete-revision": "Revision deletion",
+   "log-action-filter-patrol-patrol": "Manual patrol",
+   "log-action-filter-patrol-autopatrol": "Automatic patrol",
"log-action-filter-protect-protect": "Protection",
"log-action-filter-protect-modify": "Protection modification",
"log-action-filter-protect-unprotect": "Unprotection",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index 1c144dd..a8eb696 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -4208,6 +4208,7 @@
"randomrootpage": "{{doc-special|RandomRootPage}}",
"log-action-filter-block": "Which type of action to filter for in this 
log",
"log-action-filter-delete": "Which type of action to filter for in this 
log",
+   "log-action-filter-patrol": "Which type of action to filter for in this 
log",
"log-action-filter-protect": "Which type of action to filter for in 
this log",
"log-action-filter-upload": "Which type of action to filter for in this 

[MediaWiki-commits] [Gerrit] Proxydashboard: Check for ownership of a proxy before delet... - change (operations/puppet)

2016-03-25 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Proxydashboard:  Check for ownership of a proxy before deleting.
..


Proxydashboard:  Check for ownership of a proxy before deleting.

Change-Id: I07b346131c532e0b07e2f10b47160a37a4261ca9
---
M modules/openstack/files/liberty/horizon/proxy/views.py
1 file changed, 22 insertions(+), 12 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/openstack/files/liberty/horizon/proxy/views.py 
b/modules/openstack/files/liberty/horizon/proxy/views.py
index 9c27efa..a6ae2f9 100644
--- a/modules/openstack/files/liberty/horizon/proxy/views.py
+++ b/modules/openstack/files/liberty/horizon/proxy/views.py
@@ -66,6 +66,12 @@
 record = obj_id[:obj_id.find('.')]
 domain = obj_id[obj_id.find('.') + 1:]
 
+# First let's make sure that this proxy is really ours to delete.
+fqdn = "%s.%s" % (record, domain)
+existing_domains = [proxy.domain for proxy in get_proxy_list(request)]
+if fqdn not in existing_domains:
+raise Exception("Proxy \'%s\' is to be deleted but is not owned by 
this view." % domain)
+
 if domain == 'wmflabs.org.':
 auth = identity_generic.Password(
 auth_url=base.url_for(request, 'identity'),
@@ -141,6 +147,21 @@
 self.backends = backends
 
 
+def get_proxy_list(request):
+try:
+resp = requests.get(base.url_for(request, 'proxy') + '/mapping')
+if resp.status_code == 400 and resp.text == 'No such project':
+proxies = []
+elif not resp:
+raise Exception("Got status " + str(resp.status_code))
+else:
+proxies = [Proxy(route['domain'], route['backends']) for route in 
resp.json()['routes']]
+except Exception:
+proxies = []
+exceptions.handle(request, _("Unable to retrieve proxies: " + 
resp.text))
+return proxies
+
+
 class IndexView(tables.DataTableView):
 table_class = ProxyTable
 template_name = 'project/proxy/index.html'
@@ -148,18 +169,7 @@
 
 def get_data(self):
 resp = None
-try:
-resp = requests.get(base.url_for(self.request, 'proxy') + 
'/mapping')
-if resp.status_code == 400 and resp.text == 'No such project':
-proxies = []
-elif not resp:
-raise Exception("Got status " + str(resp.status_code))
-else:
-proxies = [Proxy(route['domain'], route['backends']) for route 
in resp.json()['routes']]
-except Exception:
-proxies = []
-exceptions.handle(self.request, _("Unable to retrieve proxies: " + 
resp.text))
-return proxies
+return get_proxy_list(self.request)
 
 
 class CreateProxyForm(forms.SelfHandlingForm):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07b346131c532e0b07e2f10b47160a37a4261ca9
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Proxydashboard: Move proxy panel into the 'dns' group - change (operations/puppet)

2016-03-25 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Proxydashboard: Move proxy panel into the 'dns' group
..


Proxydashboard: Move proxy panel into the 'dns' group

It's not a perfect fit but it looked so lonely out on its own...

Change-Id: Id8d9483535f1f3ddc2b4b8e0c1b06ce5da6bc190
---
M modules/openstack/files/liberty/horizon/proxy_enable.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/openstack/files/liberty/horizon/proxy_enable.py 
b/modules/openstack/files/liberty/horizon/proxy_enable.py
index c9919f8..4bed1d3 100644
--- a/modules/openstack/files/liberty/horizon/proxy_enable.py
+++ b/modules/openstack/files/liberty/horizon/proxy_enable.py
@@ -1,4 +1,4 @@
 PANEL = 'proxy'
-PANEL_GROUP = 'default'
+PANEL_GROUP = 'dns'
 PANEL_DASHBOARD = 'project'
 ADD_PANEL = ('wikimediaproxydashboard.panel.Proxy')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8d9483535f1f3ddc2b4b8e0c1b06ce5da6bc190
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Proxydashboard: Explanatory changes to the 'Create a Proxy' ... - change (operations/puppet)

2016-03-25 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Proxydashboard: Explanatory changes to the 'Create a Proxy' 
panel
..


Proxydashboard: Explanatory changes to the 'Create a Proxy' panel

Change-Id: I069ce36bbef1a420efede740d1729ef0246c96bd
---
M modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
M modules/openstack/files/liberty/horizon/proxy/views.py
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Alex Monk: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git 
a/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html 
b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
index cfecda6..cb8b11a 100644
--- a/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
+++ b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
@@ -7,6 +7,6 @@
 {% block modal-body-right %}
   {% trans "Description:" %}
   
- {% trans "We can 
put some useful text explaining the form here." %}
+ {% trans "A web 
proxy will relay web traffic from the specified hostname to the backend 
instance.  The proxy will also provide ssl termination." %}
   
 {% endblock %}
diff --git a/modules/openstack/files/liberty/horizon/proxy/views.py 
b/modules/openstack/files/liberty/horizon/proxy/views.py
index 849cf65..f39375d 100644
--- a/modules/openstack/files/liberty/horizon/proxy/views.py
+++ b/modules/openstack/files/liberty/horizon/proxy/views.py
@@ -163,7 +163,7 @@
 
 
 class CreateProxyForm(forms.SelfHandlingForm):
-record = forms.CharField(max_length=255, label=_("Record"))
+record = forms.CharField(max_length=255, label=_("Hostname"))
 domain = forms.ChoiceField(widget=forms.Select(), label=_("Domain"))
 backendInstance = forms.ChoiceField(widget=forms.Select(), 
label=_("Backend instance"))
 backendPort = forms.CharField(widget=TextInput(attrs={'type': 'number'}), 
label=_("Backend port"))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I069ce36bbef1a420efede740d1729ef0246c96bd
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] openstack: Add proxy panel files - change (operations/puppet)

2016-03-25 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: openstack: Add proxy panel files
..


openstack: Add proxy panel files

Bug: T129245
Change-Id: I785bf87a58c9361c9c92e51c2df64215665733fa
---
A modules/openstack/files/liberty/horizon/proxy/__init__.py
A modules/openstack/files/liberty/horizon/proxy/panel.py
A modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
A modules/openstack/files/liberty/horizon/proxy/templates/proxy/create.html
A modules/openstack/files/liberty/horizon/proxy/templates/proxy/index.html
A modules/openstack/files/liberty/horizon/proxy/urls.py
A modules/openstack/files/liberty/horizon/proxy/views.py
A modules/openstack/files/liberty/horizon/proxy_enable.py
M modules/openstack/manifests/horizon/service.pp
9 files changed, 365 insertions(+), 0 deletions(-)

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



diff --git a/modules/openstack/files/liberty/horizon/proxy/__init__.py 
b/modules/openstack/files/liberty/horizon/proxy/__init__.py
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/proxy/__init__.py
diff --git a/modules/openstack/files/liberty/horizon/proxy/panel.py 
b/modules/openstack/files/liberty/horizon/proxy/panel.py
new file mode 100644
index 000..b128a67
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/proxy/panel.py
@@ -0,0 +1,20 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from django.utils.translation import ugettext_lazy as _
+import horizon
+
+
+class Proxy(horizon.Panel):
+name = _("Web Proxies")
+slug = "proxy"
+policy_rules = (("dns", "get_records"),)
diff --git 
a/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html 
b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
new file mode 100644
index 000..cfecda6
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/_create.html
@@ -0,0 +1,12 @@
+{% extends "horizon/common/_modal_form.html" %}
+{% load i18n %}
+
+{% block form_attrs %}enctype="multipart/form-data"{% endblock %}
+
+
+{% block modal-body-right %}
+  {% trans "Description:" %}
+  
+ {% trans "We can 
put some useful text explaining the form here." %}
+  
+{% endblock %}
diff --git 
a/modules/openstack/files/liberty/horizon/proxy/templates/proxy/create.html 
b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/create.html
new file mode 100644
index 000..52c987d
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/create.html
@@ -0,0 +1,8 @@
+{% extends 'base.html' %}
+{% load i18n %}
+{% block title %}{% trans "Create A Proxy" %}{% endblock %}
+
+{% block main %}
+  {% include 'project/proxy/_create.html' %}
+{% endblock %}
+
diff --git 
a/modules/openstack/files/liberty/horizon/proxy/templates/proxy/index.html 
b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/index.html
new file mode 100644
index 000..788a093
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/proxy/templates/proxy/index.html
@@ -0,0 +1,13 @@
+{% extends 'base.html' %}
+{% load i18n %}
+{% block title %}{% trans "Proxy" %}{% endblock %}
+
+{% block page_header %}
+  {% include "horizon/common/_page_header.html" with title=_("Proxy") %}
+{% endblock page_header %}
+
+{% block main %}
+  {{ table.render }}
+{% endblock %}
+
+
diff --git a/modules/openstack/files/liberty/horizon/proxy/urls.py 
b/modules/openstack/files/liberty/horizon/proxy/urls.py
new file mode 100644
index 000..e39bfa8
--- /dev/null
+++ b/modules/openstack/files/liberty/horizon/proxy/urls.py
@@ -0,0 +1,21 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from django.conf.urls import url
+
+from wikimediaproxydashboard import views
+
+
+urlpatterns = [
+url(r'^$', views.IndexView.as_view(), name='index'),
+url(r'^create/$', 

[MediaWiki-commits] [Gerrit] Enable filtering by action on Special:Log - change (mediawiki/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable filtering by action on Special:Log
..


Enable filtering by action on Special:Log

This allows logs to be filtered by log actions, provided
the log type has been set as such in config.
There is an index for log actions so the queries should
be performant enough (already used by API).

Extensions can use $wgActionFilteredLogs to filter their
own logs in the same way.

Bug: T20954
Change-Id: I6a61175f9a111c03d15b4d41751c818e3a411ff6
---
M includes/DefaultSettings.php
M includes/logging/LogEventsList.php
M includes/specials/SpecialLog.php
M languages/i18n/en.json
M languages/i18n/qqq.json
5 files changed, 137 insertions(+), 4 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c04602c..3b2c697 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -7236,6 +7236,37 @@
 ];
 
 /**
+ * List of log types that can be filtered by action types
+ *
+ * To each action is associated the list of log_action
+ * subtypes to search for, usually one, but not necessarily so
+ * Extensions may append to this array
+ * @since 1.27
+ */
+$wgActionFilteredLogs = [
+   'block' => [
+   'block' => [ 'block' ],
+   'reblock' => [ 'reblock' ],
+   'unblock' => [ 'unblock' ],
+   ],
+   'delete' => [
+   'delete' => [ 'delete' ],
+   'restore' => [ 'restore' ],
+   'event' => [ 'event' ],
+   'revision' => [ 'revision' ],
+   ],
+   'protect' => [
+   'protect' => [ 'protect' ],
+   'modify' => [ 'modify' ],
+   'unprotect' => [ 'unprotect' ],
+   ],
+   'upload' => [
+   'upload' => [ 'upload' ],
+   'overwrite' => [ 'overwrite' ],
+   ],
+];
+
+/**
  * Maintain a log of newusers at Log/newusers?
  */
 $wgNewUserLog = true;
diff --git a/includes/logging/LogEventsList.php 
b/includes/logging/LogEventsList.php
index c96c0db..9d39d54 100644
--- a/includes/logging/LogEventsList.php
+++ b/includes/logging/LogEventsList.php
@@ -41,6 +41,11 @@
protected $showTagEditUI;
 
/**
+* @var array
+*/
+   protected $allowedActions = null;
+
+   /**
 * Constructor.
 * The first two parameters used to be $skin and $out, but now only a 
context
 * is needed, that's why there's a second unused parameter.
@@ -74,9 +79,10 @@
 * @param int $month Month
 * @param array $filter
 * @param string $tagFilter Tag to select by default
+* @param string $action
 */
public function showOptions( $types = [], $user = '', $page = '', 
$pattern = '', $year = 0,
-   $month = 0, $filter = null, $tagFilter = ''
+   $month = 0, $filter = null, $tagFilter = '', $action = null
) {
global $wgScript, $wgMiserMode;
 
@@ -111,6 +117,11 @@
// Filter links
if ( $filter ) {
$html .= Xml::tags( 'p', null, $this->getFilterLinks( 
$filter ) );
+   }
+
+   // Action filter
+   if ( $action !== null ) {
+   $html .= Xml::tags( 'p', null, 
$this->getActionSelector( $types, $action ) );
}
 
// Submit button
@@ -288,6 +299,41 @@
}
 
/**
+* Drop down menu for selection of actions that can be used to filter 
the log
+* @param array $types
+* @param string $action
+* @return string
+* @since 1.27
+*/
+   private function getActionSelector( $types, $action ) {
+   if ( $this->allowedActions === null || !count( 
$this->allowedActions ) ) {
+   return '';
+   }
+   $html = '';
+   $html .= xml::label( wfMessage( 'log-action-filter-' . 
$types[0] )->text(),
+   'action-filter-' .$types[0] ) . "\n";
+   $select = new XmlSelect( 'subtype' );
+   $select->addOption( wfMessage( 'log-action-filter-all' 
)->text(), '' );
+   foreach ( $this->allowedActions as $value ) {
+   $msgKey = 'log-action-filter-' . $types[0] . '-' . 
$value;
+   $select->addOption( wfMessage( $msgKey )->text(), 
$value );
+   }
+   $select->setDefault( $action );
+   $html .= $select->getHtml();
+   return $html;
+   }
+
+   /**
+* Sets the action types allowed for log filtering
+* To one action type may correspond several log_actions
+* @param array $actions
+* @since 1.27
+*/
+   public function setAllowedActions( $actions ) {
+   

[MediaWiki-commits] [Gerrit] moment: Correct support language codes sr-el and sr - change (mediawiki/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: moment: Correct support language codes sr-el and sr
..


moment: Correct support language codes sr-el and sr

MediaWiki currently uses the language code sr-el for Serbian written
using the Latin script. The language code sr has as fallback sr-ec and
used for Serbian written using the Cyrillic script.

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

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/Resources.php b/resources/Resources.php
index a63de2a..4fa5daf 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -797,8 +797,8 @@
'sk' => 'resources/lib/moment/locale/sk.js',
'sl' => 'resources/lib/moment/locale/sl.js',
'sq' => 'resources/lib/moment/locale/sq.js',
-   'sr' => 'resources/lib/moment/locale/sr.js',
'sr-ec' => 'resources/lib/moment/locale/sr-cyrl.js',
+   'sr-el' => 'resources/lib/moment/locale/sr.js',
'sv' => 'resources/lib/moment/locale/sv.js',
'ta' => 'resources/lib/moment/locale/ta.js',
'th' => 'resources/lib/moment/locale/th.js',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I450ac589cfbe9e1e37c67c4f7f2472c7563c0fc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Horizon: Update session config - change (operations/puppet)

2016-03-25 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Horizon:  Update session config
..


Horizon:  Update session config

This is an attempt to use secure cookies and prolong the
session lifespan.

Bug: T130621
Change-Id: I32211fa75a3ffe9fcd93b2f9e394eb39fa96bc05
---
M modules/openstack/templates/liberty/horizon/local_settings.py.erb
1 file changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/modules/openstack/templates/liberty/horizon/local_settings.py.erb 
b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
index ed8ff3e..5b74200 100644
--- a/modules/openstack/templates/liberty/horizon/local_settings.py.erb
+++ b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
@@ -27,13 +27,11 @@
 # https://docs.djangoproject.com/en/1.4/ref/settings/#secure-proxy-ssl-header
 # SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
 
-# If Horizon is being served through SSL, then uncomment the following two
-# settings to better secure the cookies from security exploits
-#CSRF_COOKIE_SECURE = True
-#SESSION_COOKIE_SECURE = True
-
 # SESSION_TIMEOUT is in seconds and defaults to 1800.  This is seven days:
 SESSION_TIMEOUT = 604800
+SESSION_COOKIE_AGE = 604800
+CSRF_COOKIE_SECURE = True
+SESSION_COOKIE_SECURE = True
 
 # Overrides for OpenStack API versions. Use this setting to force the
 # OpenStack dashboard to use a specific API version for a given service API.
@@ -527,4 +525,4 @@
 DESIGNATE = { 'records_use_fips': True }
 
 WMFLABSDOTORG_ADMIN_USERNAME = '<%= @designateconfig['wmflabsdotorg_admin'] %>'
-WMFLABSDOTORG_ADMIN_PASSWORD = '<%= @designateconfig['wmflabsdotorg_pass'] %>'
\ No newline at end of file
+WMFLABSDOTORG_ADMIN_PASSWORD = '<%= @designateconfig['wmflabsdotorg_pass'] %>'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32211fa75a3ffe9fcd93b2f9e394eb39fa96bc05
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Hashar 
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 case of "Pods" to make tests pass - change (operations...kubernetes)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Fix case of "Pods" to make tests pass
..


Fix case of "Pods" to make tests pass

Change-Id: I1bba69b2eb20f0e321ac9858067d8041f2892d50
---
M plugin/pkg/admission/uidenforcer/admission.go
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/plugin/pkg/admission/uidenforcer/admission.go 
b/plugin/pkg/admission/uidenforcer/admission.go
index 669f14c..ba99bbb 100644
--- a/plugin/pkg/admission/uidenforcer/admission.go
+++ b/plugin/pkg/admission/uidenforcer/admission.go
@@ -48,7 +48,7 @@
 
 // Admit will deny pods that have a RunAsUser set that isn't the uid of the 
user requesting it
 func (p *plugin) Admit(a admission.Attributes) (err error) {
-   if a.GetResource() != api.Resource("Pods") {
+   if a.GetResource() != api.Resource("pods") {
return nil
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1bba69b2eb20f0e321ac9858067d8041f2892d50
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/kubernetes
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Fix tests to run with v1.2.0 - change (operations...kubernetes)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Fix tests to run with v1.2.0
..


Fix tests to run with v1.2.0

Change-Id: I871dc98f6a45ae01a984b29d165365ea51c93b3e
---
M plugin/pkg/admission/uidenforcer/admission_test.go
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/plugin/pkg/admission/uidenforcer/admission_test.go 
b/plugin/pkg/admission/uidenforcer/admission_test.go
index 92308f0..81c01de 100644
--- a/plugin/pkg/admission/uidenforcer/admission_test.go
+++ b/plugin/pkg/admission/uidenforcer/admission_test.go
@@ -23,7 +23,7 @@
"k8s.io/kubernetes/pkg/admission"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/auth/user"
-   "k8s.io/kubernetes/pkg/client/unversioned/testclient"
+   
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake"
 )
 
 func validPod(name string, numContainers int) api.Pod {
@@ -40,18 +40,18 @@
 }
 
 func TestFailWithNoUserInfo(t *testing.T) {
-   client := testclient.NewSimpleFake()
+   client := fake.NewSimpleClientset()
 
enforcer := NewUidEnforcer(client)
testPod := validPod("test", 2)
-   err := enforcer.Admit(admission.NewAttributesRecord(, "Pod", 
"test", "testPod", "pods", "", admission.Update, nil))
+   err := enforcer.Admit(admission.NewAttributesRecord(, 
api.Kind("Pod"), "test", "testPod", api.Resource("pods"), "", admission.Update, 
nil))
if err == nil {
t.Errorf("Expected an error since the pod did not specify 
resource limits in its update call")
}
 }
 
 func TestPodWithUID(t *testing.T) {
-   client := testclient.NewSimpleFake()
+   client := fake.NewSimpleClientset()
 
enforcer := NewUidEnforcer(client)
testPod := validPod("test", 2)
@@ -61,7 +61,7 @@
Groups: nil,
}
 
-   err := enforcer.Admit(admission.NewAttributesRecord(, "Pod", 
"test", "testPod", "pods", "", admission.Update, userInfo))
+   err := enforcer.Admit(admission.NewAttributesRecord(, 
api.Kind("Pod"), "test", "testPod", api.Resource("pods"), "", admission.Update, 
userInfo))
if err != nil {
t.Errorf("%+v", err)
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I871dc98f6a45ae01a984b29d165365ea51c93b3e
Gerrit-PatchSet: 2
Gerrit-Project: operations/software/kubernetes
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Fix case of "Pods" to make tests pass - change (operations...kubernetes)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Fix case of "Pods" to make tests pass
..

Fix case of "Pods" to make tests pass

Change-Id: I1bba69b2eb20f0e321ac9858067d8041f2892d50
---
M plugin/pkg/admission/uidenforcer/admission.go
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/kubernetes 
refs/changes/79/279679/1

diff --git a/plugin/pkg/admission/uidenforcer/admission.go 
b/plugin/pkg/admission/uidenforcer/admission.go
index 669f14c..ba99bbb 100644
--- a/plugin/pkg/admission/uidenforcer/admission.go
+++ b/plugin/pkg/admission/uidenforcer/admission.go
@@ -48,7 +48,7 @@
 
 // Admit will deny pods that have a RunAsUser set that isn't the uid of the 
user requesting it
 func (p *plugin) Admit(a admission.Attributes) (err error) {
-   if a.GetResource() != api.Resource("Pods") {
+   if a.GetResource() != api.Resource("pods") {
return nil
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bba69b2eb20f0e321ac9858067d8041f2892d50
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/kubernetes
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] moment: Correct support language codes sr-el and sr - change (mediawiki/core)

2016-03-25 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: moment: Correct support language codes sr-el and sr
..

moment: Correct support language codes sr-el and sr

MediaWiki currently uses the language code sr-el for Serbian written
using the Latin script. The language code sr has as fallback sr-ec and
used for Serbian written using the Cyrillic script.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/279678/1

diff --git a/resources/Resources.php b/resources/Resources.php
index a63de2a..4fa5daf 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -797,8 +797,8 @@
'sk' => 'resources/lib/moment/locale/sk.js',
'sl' => 'resources/lib/moment/locale/sl.js',
'sq' => 'resources/lib/moment/locale/sq.js',
-   'sr' => 'resources/lib/moment/locale/sr.js',
'sr-ec' => 'resources/lib/moment/locale/sr-cyrl.js',
+   'sr-el' => 'resources/lib/moment/locale/sr.js',
'sv' => 'resources/lib/moment/locale/sv.js',
'ta' => 'resources/lib/moment/locale/ta.js',
'th' => 'resources/lib/moment/locale/th.js',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I450ac589cfbe9e1e37c67c4f7f2472c7563c0fc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] Encapsulate PayPal staging logic - change (mediawiki...DonationInterface)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Encapsulate PayPal staging logic
..


Encapsulate PayPal staging logic

Bug: T130075
Change-Id: If06ca1b8a59195000116c5ccba51d8ba7b35f5f0
---
M DonationInterface.php
A paypal_gateway/CleanupRecurringLength.php
A paypal_gateway/PayPalLocale.php
M paypal_gateway/paypal.adapter.php
4 files changed, 73 insertions(+), 62 deletions(-)

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



diff --git a/DonationInterface.php b/DonationInterface.php
index f6db55e..039eb40 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -111,8 +111,10 @@
 $wgAutoloadClasses['AstroPayMethodCodec'] = __DIR__ . 
'/astropay_gateway/AstroPayMethodCodec.php';
 
 // Paypal
+$wgAutoloadClasses['CleanupRecurringLength'] = __DIR__ . 
'/paypal_gateway/CleanupRecurringLength.php';
 $wgAutoloadClasses['PaypalGateway'] = __DIR__ . 
'/paypal_gateway/paypal_gateway.body.php';
 $wgAutoloadClasses['PaypalAdapter'] = __DIR__ . 
'/paypal_gateway/paypal.adapter.php';
+$wgAutoloadClasses['PayPalLocale'] = __DIR__ . 
'/paypal_gateway/PayPalLocale.php';
 
 // Worldpay
 $wgAutoloadClasses['WorldpayGateway'] = __DIR__ . 
'/worldpay_gateway/worldpay_gateway.body.php';
diff --git a/paypal_gateway/CleanupRecurringLength.php 
b/paypal_gateway/CleanupRecurringLength.php
new file mode 100644
index 000..646df0f
--- /dev/null
+++ b/paypal_gateway/CleanupRecurringLength.php
@@ -0,0 +1,12 @@
+data_transformers = parent::getCoreDataTransformers();
+   $this->data_transformers = array_merge( 
parent::getCoreDataTransformers(), array(
+   new CleanupRecurringLength(),
+   new PayPalLocale(),
+   ) );
}
 
function getBasedir() {
@@ -256,66 +259,5 @@
// 'TRY', // in-country only
'USD',
);
-   }
-
-   protected function stage_recurring_length() {
-   if (
-   array_key_exists(
-   'recurring_length', $this->staged_data
-   ) && !$this->staged_data['recurring_length']
-   ) {
-   unset( $this->staged_data['recurring_length'] );
-   }
-   }
-
-   protected function stage_locale() {
-   $supported_countries = array(
-   'AU',
-   'AT',
-   'BE',
-   'BR',
-   'CA',
-   'CH',
-   'CN',
-   'DE',
-   'ES',
-   'GB',
-   'FR',
-   'IT',
-   'NL',
-   'PL',
-   'PT',
-   'RU',
-   'US',
-   );
-   $supported_full_locales = array(
-   'da_DK',
-   'he_IL',
-   'id_ID',
-   'jp_JP',
-   'no_NO',
-   'pt_BR',
-   'ru_RU',
-   'sv_SE',
-   'th_TH',
-   'tr_TR',
-   'zh_CN',
-   'zh_HK',
-   'zh_TW',
-   );
-
-   if ( in_array( $this->unstaged_data['country'], 
$supported_countries ) ) {
-   $this->staged_data['locale'] = 
$this->unstaged_data['country'];
-   }
-
-   $fallbacks = Language::getFallbacksFor( strtolower( 
$this->unstaged_data['language'] ) );
-   array_unshift( $fallbacks, strtolower( 
$this->unstaged_data['language'] ) );
-   foreach ( $fallbacks as $lang ) {
-   $locale = "{$lang}_{$this->unstaged_data['country']}";
-   if ( in_array( $locale, $supported_full_locales ) ) {
-   $this->staged_data['locale'] = $locale;
-   return;
-   }
-   }
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If06ca1b8a59195000116c5ccba51d8ba7b35f5f0
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Add tests for logging functionality to ensure the tables are... - change (wikimedia...civicrm)

2016-03-25 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Add tests for logging functionality to ensure the tables are 
still creating well
..


Add tests for logging functionality to ensure the tables are still creating well

The tests are actually being added into Core - this is a backport to keep the 
file in sync

https://github.com/civicrm/civicrm-core/pull/7988/commits

Bug: T130161

Change-Id: I6ef4d48d16e25d232b0f46e7ce3cf5d569e7053c
---
M CRM/Logging/Schema.php
1 file changed, 14 insertions(+), 3 deletions(-)

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



diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index 2562da0..f37ed84 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -625,9 +625,7 @@
* Predicate whether logging is enabled.
*/
   public function isEnabled() {
-$config = CRM_Core_Config::singleton();
-
-if ($config->logging) {
+if (CRM_Core_Config::singleton()->logging) {
   return $this->tablesExist() and $this->triggersExist();
 }
 return FALSE;
@@ -641,6 +639,19 @@
   }
 
   /**
+   * Drop all log tables.
+   *
+   * This does not currently have a usage outside the tests.
+   */
+  public function dropAllLogTables() {
+if ($this->tablesExist()) {
+  foreach ($this->logs as $log_table) {
+CRM_Core_DAO::executeQuery("DROP TABLE $log_table");
+  }
+}
+  }
+
+  /**
* Get an sql clause to find the names of any log tables that do not match 
the normal pattern.
*
* Most tables are civicrm_xxx with the log table being log_civicrm_xxx

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ef4d48d16e25d232b0f46e7ce3cf5d569e7053c
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Finish encapsulating Ingenico staging logic - change (mediawiki...DonationInterface)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Finish encapsulating Ingenico staging logic
..


Finish encapsulating Ingenico staging logic

Bug: T130075
Change-Id: Ibcc31c1c550a64899e4d7c9bd10a2d638fb80286
---
M globalcollect_gateway/globalcollect.adapter.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index bde929f..44f7149 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -2054,6 +2054,7 @@
switch ( $this->getData_Unstaged_Escaped( 'payment_method' ) ) {
case 'dd':
case 'ew':
+   // TODO: Review.  Why is this set to country_bank_code 
in other cases?
$this->var_map['COUNTRYCODEBANK'] = 'country';
break;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcc31c1c550a64899e4d7c9bd10a2d638fb80286
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
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: Add browser tests to cover the alternative language butt... - change (mediawiki...MobileFrontend)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: QA: Add browser tests to cover the alternative language button 
in beta
..


QA: Add browser tests to cover the alternative language button in beta

Follow-up: I4d09c645c02a0d137595c6f6124696913b763c44
Change-Id: I46931c872ed2c64307be0973107602f8358d1eac
---
M tests/browser/LocalSettings.php
M tests/browser/features/language_beta.feature
M tests/browser/features/step_definitions/create_page_api_steps.rb
M tests/browser/features/step_definitions/language_icon_steps.rb
M tests/browser/features/support/pages/article_page.rb
5 files changed, 28 insertions(+), 2 deletions(-)

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



diff --git a/tests/browser/LocalSettings.php b/tests/browser/LocalSettings.php
index 1500529..058a7ab 100644
--- a/tests/browser/LocalSettings.php
+++ b/tests/browser/LocalSettings.php
@@ -18,5 +18,6 @@
// nothing to do, continue lookup
return true;
 };
+$wgInterwikiCache = false;
 
 $wgMFEnableBeta = true;
diff --git a/tests/browser/features/language_beta.feature 
b/tests/browser/features/language_beta.feature
index 96e73ec..a1a021a 100644
--- a/tests/browser/features/language_beta.feature
+++ b/tests/browser/features/language_beta.feature
@@ -4,23 +4,36 @@
   Background:
 Given I am using the mobile site
   And I am in beta mode
-  And I go to a page that has languages
 
   @smoke @integration
   Scenario: Language button in beta
- Then I should see the alternative language switcher button
+Given I go to a page that has languages
+Then I should see the alternative language switcher button
+
+  @smoke @integration
+  Scenario: Language button in beta (on a page that doesn't have languages)
+Given I go to a page that does not have languages
+Then I should see the disabled alternative language switcher button
 
   Scenario: Tapping icon opens language overlay
+Given I go to a page that has languages
 When I click the alternative language button
 Then I should see the language overlay
 
+  Scenario: Tapping icon does not open language overlay (on a page that 
doesn't have languages)
+Given I go to a page that does not have languages
+When I click the alternative language button
+Then I should not see the languages overlay
+
   Scenario: Closing language overlay (overlay button)
+Given I go to a page that has languages
 When I click the alternative language button
  And I see the language overlay
  And I click the language overlay close button
 Then I should not see the languages overlay
 
   Scenario: Closing language overlay (browser button)
+Given I go to a page that has languages
 When I click the alternative language button
  And I see the language overlay
  And I click the browser back button
diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb 
b/tests/browser/features/step_definitions/create_page_api_steps.rb
index aa816bd..8d6177d 100644
--- a/tests/browser/features/step_definitions/create_page_api_steps.rb
+++ b/tests/browser/features/step_definitions/create_page_api_steps.rb
@@ -72,6 +72,13 @@
   step 'I am on the "Selenium language test page" page'
 end
 
+Given(/^I go to a page that does not have languages$/) do
+  wikitext = 'This page is used by Selenium to test language related features.'
+
+  api.create_page 'Selenium language test page without languages', wikitext
+  step 'I am on the "Selenium language test page without languages" page'
+end
+
 Given(/^the wiki has a terms of use$/) do
   api.create_page 'MediaWiki:mobile-frontend-terms-url', 
'http://m.wikimediafoundation.org/wiki/Terms_of_Use'
   api.create_page 'MediaWiki:mobile-frontend-terms-text', 'Terms of use'
diff --git a/tests/browser/features/step_definitions/language_icon_steps.rb 
b/tests/browser/features/step_definitions/language_icon_steps.rb
index c6ea3df..dc246ab 100644
--- a/tests/browser/features/step_definitions/language_icon_steps.rb
+++ b/tests/browser/features/step_definitions/language_icon_steps.rb
@@ -2,6 +2,10 @@
   on(ArticlePage).alternative_language_button_element.when_present.click
 end
 
+Then(/^I should see the disabled alternative language switcher button$/) do
+  expect(on(ArticlePage).disabled_alternative_language_button_element).to 
be_visible
+end
+
 Then(/^I should see the alternative language switcher button$/) do
   expect(on(ArticlePage).alternative_language_button_element).to be_visible
 end
diff --git a/tests/browser/features/support/pages/article_page.rb 
b/tests/browser/features/support/pages/article_page.rb
index a95a402..dba922f 100644
--- a/tests/browser/features/support/pages/article_page.rb
+++ b/tests/browser/features/support/pages/article_page.rb
@@ -139,6 +139,7 @@
   ## languages
   a(:language_button, css: '#page-secondary-actions #language-switcher')
   

[MediaWiki-commits] [Gerrit] CRM-18213 remove hard-coding of DAO names - change (wikimedia...civicrm)

2016-03-25 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: CRM-18213 remove hard-coding of DAO names
..


CRM-18213 remove hard-coding of DAO names

Merged into 4.7

Change-Id: I37facda0a751da0e52ca47c595f067df78658a47
---
M CRM/Logging/Differ.php
1 file changed, 2 insertions(+), 19 deletions(-)

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



diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php
index 7a5acb2..118726c 100644
--- a/CRM/Logging/Differ.php
+++ b/CRM/Logging/Differ.php
@@ -257,25 +257,8 @@
 static $titles = array();
 static $values = array();
 
-// FIXME: split off the table → DAO mapping to a GenCode-generated class
-static $daos = array(
-  'civicrm_address' => 'CRM_Core_DAO_Address',
-  'civicrm_contact' => 'CRM_Contact_DAO_Contact',
-  'civicrm_email' => 'CRM_Core_DAO_Email',
-  'civicrm_im' => 'CRM_Core_DAO_IM',
-  'civicrm_openid' => 'CRM_Core_DAO_OpenID',
-  'civicrm_phone' => 'CRM_Core_DAO_Phone',
-  'civicrm_website' => 'CRM_Core_DAO_Website',
-  'civicrm_contribution' => 'CRM_Contribute_DAO_Contribution',
-  'civicrm_note' => 'CRM_Core_DAO_Note',
-  'civicrm_relationship' => 'CRM_Contact_DAO_Relationship',
-  'civicrm_activity' => 'CRM_Activity_DAO_Activity',
-  'civicrm_case' => 'CRM_Case_DAO_Case',
-);
-
 if (!isset($titles[$table]) or !isset($values[$table])) {
-
-  if (in_array($table, array_keys($daos))) {
+  if (($tableDAO = CRM_Core_DAO_AllCoreTables::getClassForTable($table)) 
!= FALSE) {
 // FIXME: these should be populated with pseudo constants as they
 // were at the time of logging rather than their current values
 // FIXME: Use *_BAO:buildOptions() method rather than pseudoconstants 
& fetch programmatically
@@ -311,7 +294,7 @@
 break;
 }
 
-$dao = new $daos[$table]();
+$dao = new $tableDAO();
 foreach ($dao->fields() as $field) {
   $titles[$table][$field['name']] = CRM_Utils_Array::value('title', 
$field);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37facda0a751da0e52ca47c595f067df78658a47
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use UnreadNotificationCounter to count notifications - change (mediawiki...MobileFrontend)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use UnreadNotificationCounter to count notifications
..


Use UnreadNotificationCounter to count notifications

Bug: T129726
Change-Id: I4511d3fef76f54e0df24706645794826f1b1f54f
Depends-On: I9af4defc00dd491ed2b355eb4e85073476e08ce7
---
M resources/mobile.notifications.overlay/NotificationsOverlay.js
1 file changed, 13 insertions(+), 8 deletions(-)

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



diff --git a/resources/mobile.notifications.overlay/NotificationsOverlay.js 
b/resources/mobile.notifications.overlay/NotificationsOverlay.js
index cd1bf56..65458f1 100644
--- a/resources/mobile.notifications.overlay/NotificationsOverlay.js
+++ b/resources/mobile.notifications.overlay/NotificationsOverlay.js
@@ -10,7 +10,8 @@
 * @uses mw.Api
 */
NotificationsOverlay = function ( options ) {
-   var model, wrapperWidget,
+   var model, unreadCounter, wrapperWidget,
+   maxNotificationCount = mw.config.get( 
'wgEchoMaxNotificationCount' ),
echoApi = new mw.echo.api.EchoApi();
 
Overlay.apply( this, options );
@@ -26,8 +27,11 @@
return;
}
 
+   unreadCounter = new mw.echo.dm.UnreadNotificationCounter( 
echoApi, 'all', maxNotificationCount );
+
model = new mw.echo.dm.NotificationsModel(
echoApi,
+   unreadCounter,
{ type: 'all' }
);
 
@@ -36,8 +40,8 @@
} );
 
// Events
-   wrapperWidget.connect( this, {
-   unreadChange: 'onUnreadChange'
+   unreadCounter.connect( this, {
+   countChange: 'onUnreadCountChange'
} );
 
// Initialize
@@ -77,14 +81,15 @@
/**
 * Update the unread number on the notifications badge
 *
-* @param {mw.echo.dm.NotificationItem} items An array of the 
unread items
+* @param {Number} count Number of unread notifications
 * @method
 */
-   onUnreadChange: function ( items ) {
-   if ( items.length > 0 ) {
-   this.$badge.find( '.notification-count' ).text( 
items.length );
+   onUnreadCountChange: function ( count ) {
+   var $badgeCounter = this.$badge.find( 
'.notification-count' );
+   if ( count > 0 ) {
+   $badgeCounter.text( count ).show();
} else {
-   this.$badge.find( '.notification-count' 
).remove();
+   $badgeCounter.hide();
}
},
/** @inheritdoc */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4511d3fef76f54e0df24706645794826f1b1f54f
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Logging: convert to short array syntax - change (operations/mediawiki-config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Logging: convert to short array syntax
..


Logging: convert to short array syntax

Change all `array()` declarations to `[]`. These are starting to creep
in slowly so we may as well rip the bandaid off in one cleanup commit.

Change-Id: I28b137f5e0358b9b54c217c2e76ed7d117f0fae8
---
M wmf-config/logging.php
1 file changed, 82 insertions(+), 80 deletions(-)

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



diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 008c2e7..e9868d4 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -13,8 +13,8 @@
  * - $wmgMonologChannels : per-channel logging config
  *   - channel => false  == ignore all log events on this channel
  *   - channel => level  == record all events of this level or higher to 
udp2log and logstash
- *   - channel => array( 'udp2log'=>level, 'logstash'=>level, 'kafka'=>level, 
'sample'=>rate )
- *   Defaults: array( 'udp2log'=>'debug', 'logstash'=>'info', 'kafka'=>false, 
'sample'=>false )
+ *   - channel => [ 'udp2log'=>level, 'logstash'=>level, 'kafka'=>level, 
'sample'=>rate ]
+ *   Defaults: [ 'udp2log'=>'debug', 'logstash'=>'info', 'kafka'=>false, 
'sample'=>false ]
  *   Valid levels: 'debug', 'info', 'warning', 'error', false
  *   Note: sampled logs will not be sent to Logstash
  *   Note: Udp2log events are sent to udp://{$wmfUdp2logDest}/{$channel}
@@ -29,9 +29,11 @@
$wgDebugLogFile = '/tmp/wiki.log';
$wmgDefaultMonologHandler = 'wgDebugLogFile';
$wmgLogstashServers = false;
-   $wmgMonologChannels = array();
+   $wmgMonologChannels = [];
$wgDebugDumpSql = true;
-} elseif ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) && preg_match( 
'/\blog\b/i', $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) ) {
+} elseif ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) &&
+   preg_match( '/\blog\b/i', $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] )
+) {
// Forward all log messages to logstash for debugging.
// See .
$wgDebugLogFile = "udp://{$wmfUdp2logDest}/XWikimediaDebug";
@@ -49,17 +51,17 @@
 // T124985: The Processors listed in $wmgMonologProcessors are applied to
 // a message in reverse list order (bottom to top). The normalized_message
 // processor needs to be listed *after* the psr processor to work as expected.
-$wmgMonologProcessors = array(
-   'wiki' => array(
+$wmgMonologProcessors = [
+   'wiki' => [
'class' => '\\MediaWiki\\Logger\\Monolog\\WikiProcessor',
-   ),
-   'psr' => array(
+   ],
+   'psr' => [
'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor',
-   ),
-   'web' => array(
+   ],
+   'web' => [
'class' => '\\Monolog\\Processor\\WebProcessor',
-   ),
-   'normalized_message' => array(
+   ],
+   'normalized_message' => [
'factory' => function () {
/**
 * Add a "normalized_message" field to log records.
@@ -86,8 +88,8 @@
return $record;
};
},
-   ),
-);
+   ],
+];
 
 $wmgMonologHandlers = [
'blackhole' => [
@@ -119,78 +121,78 @@
 
 
 // Post construction calls to make for new Logger instances
-$wmgMonologLoggerCalls = array(
+$wmgMonologLoggerCalls = [
// T116550 - Requires Monolog > 1.17.2
-   'useMicrosecondTimestamps' => array( false ),
-);
+   'useMicrosecondTimestamps' => [ false ],
+];
 
-$wmgMonologConfig =  array(
-   'loggers' => array(
+$wmgMonologConfig =  [
+   'loggers' => [
// Template for all undefined log channels
-   '@default' => array(
+   '@default' => [
'handlers' => (array) $wmgDefaultMonologHandler,
'processors' => array_keys( $wmgMonologProcessors ),
'calls' => $wmgMonologLoggerCalls,
-   ),
-   ),
+   ],
+   ],
 
'processors' => $wmgMonologProcessors,
 
'handlers' => $wmgMonologHandlers,
 
-   'formatters' => array(
-   'line' => array(
+   'formatters' => [
+   'line' => [
'class' => 
'\\MediaWiki\\Logger\\Monolog\\LineFormatter',
-   'args' => array(
+   'args' => [
"%datetime% [%extra.reqId%] %extra.host% 
%extra.wiki% %extra.mwversion% %channel% %level_name%: %message% %context% 
%exception%\n",
'Y-m-d H:i:s',
true, // allowInlineLineBreaks
true, // ignoreEmptyContextAndExtra
true, // includeStacktraces
-   

[MediaWiki-commits] [Gerrit] Integrate X-Wikimedia-Debug with Logstash - change (operations/mediawiki-config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Integrate X-Wikimedia-Debug with Logstash
..


Integrate X-Wikimedia-Debug with Logstash

* When $wmgLogstashServers is non-empty, eagerly declare a handler for each log 
level.
** This does mean that we create logstash handlers that we sometime don't use,
   which breaks the current test suite's expectations for number of configured
   handlers. But the tests shouldn't care how many handlers are declared; it
   should care about which handlers are actually enabled, and it should care
   that those handlers exist. So refactor the tests accordingly.
* Allow $wmgDefaultMonologHandler to be an array of handler names.
* When the X-Wikimedia-Debug header is present and contains a 'log' attribute, 
log
  messages to both Logstash and fluorine.

Either the browser extensions or a JavaScript snippet could construct a link to
'https://logstash.wikimedia.org/#/dashboard/elasticsearch/request-id?id=' + 
mw.config.get( 'wgRequestId' )

Change-Id: Ibc96f9d3bde31b3809bfa9b0e56ba4507e58673a
---
M tests/loggingTest.php
M wmf-config/logging.php
2 files changed, 44 insertions(+), 48 deletions(-)

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



diff --git a/tests/loggingTest.php b/tests/loggingTest.php
index 6129b99..2d76be7 100644
--- a/tests/loggingTest.php
+++ b/tests/loggingTest.php
@@ -24,51 +24,42 @@
'Setting only a level sends to udp2log and logstash' => 
array(
// configuration for 'test' channel in 
wmgMonologChannels
'debug',
-   // number of expected handlers
-   5,
// handlers expected on the 'test' channel
array( 
'failuregroup|udp2log-debug|logstash-info' )
),
 
'Can disable logstash' => array(
array( 'logstash' => false ),
-   4,
array( 'failuregroup|udp2log-debug' ),
),
 
'Disabling udp2log also disables logstash' => array(
array( 'udp2log' => false ),
-   2,
array( 'blackhole' ),
),
 
'Logstash can be enabled when udp2log is disabled' => 
array(
array( 'udp2log' => false, 'logstash' => 'info' 
),
-   4,
array( 'failuregroup|logstash-info' )
),
 
'can enable only kafka' => array(
array( 'kafka' => 'debug', 'logstash' => false, 
'udp2log' => false ),
-   4,
array( 'failuregroup|kafka-debug' ),
),
 
'can enable buffering' => array(
array( 'buffer' => true ),
-   7,
array( 
'failuregroup|udp2log-debug-buffered|logstash-info-buffered' ),
),
 
'can enable sampling, which disables logstash' => array(
array( 'sample' => 1000 ),
-   5,
array( 
'failuregroup|udp2log-debug-sampled-1000' ),
),
 
'false yields backhole' => array(
false,
-   2,
array( 'blackhole' ),
),
);
@@ -77,7 +68,7 @@
/**
 * @dataProvider provideHandlerSetup
 */
-   public function testHandlerSetup( $channelConfig, $expectCount, 
$expectHandlers ) {
+   public function testHandlerSetup( $channelConfig, $expectHandlers ) {
// logging.php does not explicitly declare anything global, so 
it will
// only read from the local scope defined here.
$wmgDefaultMonologHandler = 'blackhole';
@@ -91,7 +82,6 @@
 
include __DIR__ . '/../wmf-config/logging.php';
 
-   $this->assertCount( $expectCount, $wmgMonologConfig['handlers'] 
);
foreach ( $expectHandlers as $handlerName ) {
$this->assertArrayHasKey( $handlerName, 
$wmgMonologConfig['handlers'] );
}
diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index e4c1303..008c2e7 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -31,16 +31,18 @@
$wmgLogstashServers = false;

[MediaWiki-commits] [Gerrit] Emit resource_change events. - change (mediawiki...EventBus)

2016-03-25 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review.

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

Change subject: Emit resource_change events.
..

Emit resource_change events.

In order to rerender RESTBase content and purge content
we need to emit resource_chande events for mediawiki
purge and null edits.

Bug: T128838
Bug: T128510
Change-Id: I5695a3fa29c4cc2bf9aa16095fac1b22ce212484
---
M EventBus.hooks.php
M extension.json
2 files changed, 61 insertions(+), 4 deletions(-)


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

diff --git a/EventBus.hooks.php b/EventBus.hooks.php
index 11e4578..2ca2995 100644
--- a/EventBus.hooks.php
+++ b/EventBus.hooks.php
@@ -230,6 +230,60 @@
} );
}
 
+/**
+ * Callback for article purge.
+ *
+ * @see https://www.mediawiki.org/wiki/Manual:Hooks/ArticlePurge
+ *
+ * @param WikiPage $wikiPage
+ */
+   public static function onArticlePurge( $wikiPage ) {
+   global $wgCanonicalServer, $wgArticlePath;
+   $uri = $wgCanonicalServer . str_replace( '$1', 
$wikiPage->getTitle()->getText(), $wgArticlePath);
+   $event = self::createEvent( $uri, 'wmf.resource_change', array(
+   'tags' => array( 'purge' )
+   ) );
+
+   DeferredUpdates::addCallableUpdate( function() use ( $event ) {
+   EventBus::getInstance()->send( array( $event ) );
+   } );
+   }
+
+   /**
+  * Occurs after the save page request has been processed.
+  *
+  * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
+  *
+  * @param WikiPage $article
+ * @param User $user
+  * @param Content $content
+  * @param string $summary
+  * @param boolean $isMinor
+  * @param boolean $isWatch
+  * @param $section Deprecated
+  * @param integer $flags
+  * @param {Revision|null} $revision
+  * @param Status $status
+  * @param integer $baseRevId
+  */
+public static function onPageContentSaveComplete( $article, $user, 
$content, $summary, $isMinor,
+   $isWatch, $section, $flags, $revision, $status, 
$baseRevId
+) {
+global $wgCanonicalServer, $wgArticlePath;
+
+// In case of a null edit the status revision value will be null
+if ( is_null( $status->getValue()['revision'] ) ) {
+$uri = $wgCanonicalServer . str_replace( '$1', 
$article->getTitle()->getText(), $wgArticlePath);
+   $event = self::createEvent( $uri, 
'wmf.resource_change', array(
+   'tags' => array( 'null_edit' )
+   ) );
+
+   DeferredUpdates::addCallableUpdate( function() use ( 
$event ) {
+   EventBus::getInstance()->send( array( $event ) 
);
+   } );
+}
+}
+
/**
 * Load our unit tests
 */
diff --git a/extension.json b/extension.json
index 48fa07e..e7f67e1 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "EventBus",
-   "version": "0.2.1",
+   "version": "0.2.2",
"author": [
"Eric Evans"
],
@@ -30,15 +30,18 @@
"ArticleUndelete": [
"EventBusHooks::onArticleUndelete"
],
-   "ArticleUndelete": [
-   "EventBusHooks::onArticleUndelete"
-   ],
"TitleMoveComplete": [
"EventBusHooks::onTitleMoveComplete"
],
"ArticleRevisionVisibilitySet": [
"EventBusHooks::onArticleRevisionVisibilitySet"
],
+   "PageContentSaveComplete": [
+   "EventBusHooks::onPageContentSaveComplete"
+   ],
+   "ArticlePurge": [
+   "EventBusHooks::onArticlePurge"
+   ],
"UnitTestsList": [
"EventBusHooks::onUnitTestsList"
]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5695a3fa29c4cc2bf9aa16095fac1b22ce212484
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventBus
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] Update uidenforcer to work with v1.2.0 release - change (operations...kubernetes)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Update uidenforcer to work with v1.2.0 release
..

Update uidenforcer to work with v1.2.0 release

Change-Id: I15e9be74579b368a5e87822c223e4927fb8d9ada
---
M plugin/pkg/admission/uidenforcer/admission.go
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/kubernetes 
refs/changes/74/279674/1

diff --git a/plugin/pkg/admission/uidenforcer/admission.go 
b/plugin/pkg/admission/uidenforcer/admission.go
index 30a3a39..669f14c 100644
--- a/plugin/pkg/admission/uidenforcer/admission.go
+++ b/plugin/pkg/admission/uidenforcer/admission.go
@@ -23,11 +23,11 @@
"k8s.io/kubernetes/pkg/admission"
"k8s.io/kubernetes/pkg/api"
apierrors "k8s.io/kubernetes/pkg/api/errors"
-   client "k8s.io/kubernetes/pkg/client/unversioned"
+   clientset 
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 )
 
 func init() {
-   admission.RegisterPlugin("UidEnforcer", func(client client.Interface, 
config io.Reader) (admission.Interface, error) {
+   admission.RegisterPlugin("UidEnforcer", func(client 
clientset.Interface, config io.Reader) (admission.Interface, error) {
return NewUidEnforcer(client), nil
})
 }
@@ -35,11 +35,11 @@
 // plugin contains the client used by the uidenforcer admin controller
 type plugin struct {
*admission.Handler
-   client client.Interface
+   client clientset.Interface
 }
 
 // NewSecurityContextDeny creates a new instance of the SecurityContextDeny 
admission controller
-func NewUidEnforcer(client client.Interface) admission.Interface {
+func NewUidEnforcer(client clientset.Interface) admission.Interface {
return {
Handler: admission.NewHandler(admission.Create, 
admission.Update),
client:  client,
@@ -48,7 +48,7 @@
 
 // Admit will deny pods that have a RunAsUser set that isn't the uid of the 
user requesting it
 func (p *plugin) Admit(a admission.Attributes) (err error) {
-   if a.GetResource() != string(api.ResourcePods) {
+   if a.GetResource() != api.Resource("Pods") {
return nil
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15e9be74579b368a5e87822c223e4927fb8d9ada
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/kubernetes
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] [SemanticSifter] Add dependencie on SemanticMediaWiki - change (integration/config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [SemanticSifter] Add dependencie on SemanticMediaWiki
..


[SemanticSifter] Add dependencie on SemanticMediaWiki

20:20:57 No syntax errors detected in
/mnt/jenkins-workspace/workspace/mwext-testextension-php55-non-voting/src/LocalSettings.php
20:20:57 [mwext-testextension-php55-non-voting] $ /bin/bash -xe
/tmp/hudson6594842695402327737.sh
20:20:57 +
/srv/deployment/integration/slave-scripts/bin/mw-run-update-script.sh
20:20:57 SemanticSifter extension requires SemanticMediaWiki
20:20:57 Build step 'Execute shell' marked build as failure
20:20:57 Recording test results
20:20:57 ERROR: Step ‘Publish JUnit test result report’ failed: No test
report files were found. Configuration error?
20:20:57 [PostBuildScript] - Execution post build scripts.
20:20:57 [mwext-testextension-php55-non-voting] $ /bin/bash -xe
/tmp/hudson2671691361295237082.sh
20:20:57 +
/srv/deployment/integration/slave-scripts/bin/mw-teardown-mysql.sh

Change-Id: I70aca227bfaf09e236341bd313f3769294d9fc1b
---
M zuul/parameter_functions.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 206c966..3e315dd 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -92,6 +92,7 @@
 'RelatedArticles': ['BetaFeatures', 'Cards', 'MobileFrontend'],
 'Score': ['VisualEditor'],
 'SemanticFormsInputs': ['SemanticForms'],
+'SemanticSifter': ['SemanticMediaWiki'],
 'SimpleSurvey': ['PrefSwitch'],
 'SolrStore': ['SemanticMediaWiki'],
 'Spreadsheet': ['PHPExcel'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I70aca227bfaf09e236341bd313f3769294d9fc1b
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [SemanticDrilldown] Remove mw-checks-test template - change (integration/config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [SemanticDrilldown] Remove mw-checks-test template
..


[SemanticDrilldown] Remove mw-checks-test template

We now use the extension-unittests-generic template
so we don't need the mw-checks-test template.

Change-Id: I77fb9fe6e016551550bdf428d44c3b264e599056
---
M zuul/layout.yaml
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 8ee560c..46a6ae3 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -6878,7 +6878,6 @@
 
   - name: mediawiki/extensions/SemanticDrilldown
 template:
-  - name: mw-checks-test
   - name: composer-test
   - name: extension-unittests-generic
   - name: npm

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I77fb9fe6e016551550bdf428d44c3b264e599056
Gerrit-PatchSet: 6
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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 cross-namespace redirect scores - change (mediawiki...CirrusSearch)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix cross-namespace redirect scores
..


Fix cross-namespace redirect scores

Refactored multiple calls to indexData into a single call with a loop over the
source indices.  The previous construct led to many subtle and dangerous bugs.
SuggestBuilder holds various states that should not be changed during the update
process, i.e. if batchId is udpated then the script might delete (when
recycling) all the data indexed from content index while indexing data from
general index.

This patch fixes the following score components:
* max_docs (used to normalize some score components) should be set to the total
  number of docs being indexed and not only to #docs in the source index being 
read.
* crossnamespace suggestions should be discounted at least like normal
  redirects. (discount set to 0.005 which is more aggressive than classic
  redirects)

Bug: T130353
Change-Id: I782946a5fa60ab80dd9c990d6e82748da56040ac
---
M includes/BuildDocument/SuggestBuilder.php
M maintenance/updateSuggesterIndex.php
M tests/browser/features/suggest_api.feature
M tests/browser/features/support/hooks.rb
M tests/unit/SuggestBuilderTest.php
5 files changed, 119 insertions(+), 60 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/BuildDocument/SuggestBuilder.php 
b/includes/BuildDocument/SuggestBuilder.php
index c9e258a..9588610 100644
--- a/includes/BuildDocument/SuggestBuilder.php
+++ b/includes/BuildDocument/SuggestBuilder.php
@@ -45,6 +45,11 @@
const REDIRECT_DISCOUNT = 0.1;
 
/**
+* Discount suggestions based on crossnamespace redirects
+*/
+   const CROSSNS_DISCOUNT = 0.005;
+
+   /**
 * Redirect suggestion type
 */
const REDIRECT_SUGGESTION = 'r';
@@ -112,7 +117,13 @@
// Bad doc, nothing to do here.
continue;
}
-   if( $inputDoc['namespace'] != NS_MAIN ) {
+   if( $inputDoc['namespace'] == NS_MAIN ) {
+   if ( !isset( $inputDoc['title'] ) ) {
+   // Bad doc, nothing to do here.
+   continue;
+   }
+   $docs = array_merge( $docs, 
$this->buildNormalSuggestions( $id, $inputDoc ) );
+   } else {
if ( !isset( $inputDoc['redirect'] ) ) {
// Bad doc, nothing to do here.
continue;
@@ -127,8 +138,9 @@
if ( $redir['namespace'] != 
$this->targetNamespace ) {
continue;
}
-   // Should we discount the score?
$score = $this->scoringMethod->score( 
$inputDoc );
+   // Discount the score of these 
suggestions.
+   $score = (int) ($score * 
self::CROSSNS_DISCOUNT);
// We support only earth and the 
primary/first coordinates...
$location = 
$this->findPrimaryCoordinates( $inputDoc );
 
@@ -139,12 +151,6 @@
'location' => $location
);
}
-   } else {
-   if ( !isset( $inputDoc['title'] ) ) {
-   // Bad doc, nothing to do here.
-   continue;
-   }
-   $docs = array_merge( $docs, 
$this->buildNormalSuggestions( $id, $inputDoc ) );
}
}
 
diff --git a/maintenance/updateSuggesterIndex.php 
b/maintenance/updateSuggesterIndex.php
index 3d9c3b0..4a27003 100644
--- a/maintenance/updateSuggesterIndex.php
+++ b/maintenance/updateSuggesterIndex.php
@@ -216,13 +216,13 @@
}
} catch ( \Elastica\Exception\Connection\HttpException $e ) {
$message = $e->getMessage();
-   $this->output( "\nUnexpected Elasticsearch failure.\n" 
);
+   $this->log( "\nUnexpected Elasticsearch failure.\n" );
$this->error( "Http error communicating with 
Elasticsearch:  $message.\n", 1 );
} catch ( \Elastica\Exception\ExceptionInterface $e ) {
$type = get_class( $e );

[MediaWiki-commits] [Gerrit] Update uidenforcer to work with v1.2.0 release - change (operations...kubernetes)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Update uidenforcer to work with v1.2.0 release
..


Update uidenforcer to work with v1.2.0 release

Change-Id: I15e9be74579b368a5e87822c223e4927fb8d9ada
---
M plugin/pkg/admission/uidenforcer/admission.go
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/plugin/pkg/admission/uidenforcer/admission.go 
b/plugin/pkg/admission/uidenforcer/admission.go
index 30a3a39..669f14c 100644
--- a/plugin/pkg/admission/uidenforcer/admission.go
+++ b/plugin/pkg/admission/uidenforcer/admission.go
@@ -23,11 +23,11 @@
"k8s.io/kubernetes/pkg/admission"
"k8s.io/kubernetes/pkg/api"
apierrors "k8s.io/kubernetes/pkg/api/errors"
-   client "k8s.io/kubernetes/pkg/client/unversioned"
+   clientset 
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 )
 
 func init() {
-   admission.RegisterPlugin("UidEnforcer", func(client client.Interface, 
config io.Reader) (admission.Interface, error) {
+   admission.RegisterPlugin("UidEnforcer", func(client 
clientset.Interface, config io.Reader) (admission.Interface, error) {
return NewUidEnforcer(client), nil
})
 }
@@ -35,11 +35,11 @@
 // plugin contains the client used by the uidenforcer admin controller
 type plugin struct {
*admission.Handler
-   client client.Interface
+   client clientset.Interface
 }
 
 // NewSecurityContextDeny creates a new instance of the SecurityContextDeny 
admission controller
-func NewUidEnforcer(client client.Interface) admission.Interface {
+func NewUidEnforcer(client clientset.Interface) admission.Interface {
return {
Handler: admission.NewHandler(admission.Create, 
admission.Update),
client:  client,
@@ -48,7 +48,7 @@
 
 // Admit will deny pods that have a RunAsUser set that isn't the uid of the 
user requesting it
 func (p *plugin) Admit(a admission.Attributes) (err error) {
-   if a.GetResource() != string(api.ResourcePods) {
+   if a.GetResource() != api.Resource("Pods") {
return nil
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15e9be74579b368a5e87822c223e4927fb8d9ada
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/kubernetes
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Stop counting notifications objects on the client - change (mediawiki...Echo)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Stop counting notifications objects on the client
..


Stop counting notifications objects on the client

The flyout loads no more than 25 notifications
from a given source. Using those in-memory notification
objects to count how many are currently unread (and
update the badge) produces a result of at most 25.

This patch extracts the responsibility or counting the
unread from the Model/Item/Groupitem structure into
a new UnreadNotificationCounter class. It receives
estimated updates from other components and synchronizes
with the server after markRead/markUnread operations
have completed.

Bug: T129726
Change-Id: I9af4defc00dd491ed2b355eb4e85073476e08ce7
---
M Resources.php
M modules/api/mw.echo.api.LocalAPIHandler.js
M modules/ext.echo.init.js
M modules/ooui/mw.echo.ui.NotificationBadgeWidget.js
M modules/ooui/mw.echo.ui.NotificationsWrapper.js
M modules/viewmodel/mw.echo.dm.NotificationGroupItem.js
M modules/viewmodel/mw.echo.dm.NotificationList.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
A modules/viewmodel/mw.echo.dm.UnreadNotificationCounter.js
M tests/qunit/viewmodel/test_mw.echo.dm.NotificationsModel.js
10 files changed, 195 insertions(+), 133 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 26cf2ed..feea1c2 100644
--- a/Resources.php
+++ b/Resources.php
@@ -149,6 +149,7 @@
'viewmodel/mw.echo.dm.js',
'viewmodel/mw.echo.dm.List.js',
'viewmodel/mw.echo.dm.SortedList.js',
+   'viewmodel/mw.echo.dm.UnreadNotificationCounter.js',
'viewmodel/mw.echo.dm.NotificationItem.js',
'viewmodel/mw.echo.dm.NotificationGroupItem.js',
'viewmodel/mw.echo.dm.NotificationList.js',
diff --git a/modules/api/mw.echo.api.LocalAPIHandler.js 
b/modules/api/mw.echo.api.LocalAPIHandler.js
index 7da8778..737683e 100644
--- a/modules/api/mw.echo.api.LocalAPIHandler.js
+++ b/modules/api/mw.echo.api.LocalAPIHandler.js
@@ -96,7 +96,11 @@
 
return this.api.get( apiData )
.then( function ( result ) {
-   return OO.getProp( result.query, 
'notifications', normalizedType, 'rawcount' ) || 0;
+   if ( type === 'message' || type === 'alert' ) {
+   return OO.getProp( result.query, 
'notifications', normalizedType, 'rawcount' ) || 0;
+   } else {
+   return OO.getProp( result.query, 
'notifications', 'rawcount' ) || 0;
+   }
} );
};
 } )( mediaWiki );
diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index b2b664c..3d08677 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -41,8 +41,12 @@
 
// Load the ui
mw.loader.using( 'ext.echo.ui.desktop', function () {
-   var messageNotificationsModel, 
alertNotificationsModel,
-   momentOrigLocale = moment.locale();
+   var messageNotificationsModel,
+   alertNotificationsModel,
+   unreadMessageCounter,
+   unreadAlertCounter,
+   momentOrigLocale = moment.locale(),
+   maxNotificationCount = mw.config.get( 
'wgEchoMaxNotificationCount' );
 
// Set up new 'short relative time' locale 
strings for momentjs
moment.defineLocale( 'echo-shortRelativeTime', {
@@ -70,13 +74,15 @@
 
// Load message button and popup if messages 
exist
if ( $existingMessageLink.length ) {
+   unreadMessageCounter = new 
mw.echo.dm.UnreadNotificationCounter( echoApi, 'message', maxNotificationCount 
);
messageNotificationsModel = new 
mw.echo.dm.NotificationsModel(
echoApi,
+   unreadMessageCounter,
{
type: 'message'
}
);
-   mw.echo.ui.messageWidget = new 
mw.echo.ui.NotificationBadgeWidget( messageNotificationsModel, {
+   mw.echo.ui.messageWidget = new 

[MediaWiki-commits] [Gerrit] Hygiene: mobile.search.api should not be a parsed message mo... - change (mediawiki...MobileFrontend)

2016-03-25 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Hygiene: mobile.search.api should not be a parsed message module
..

Hygiene: mobile.search.api should not be a parsed message module

it doesn't use parsed messages.

Change-Id: I0135a466078f004efc51ddb10cebe240edf2c5d5
---
M extension.json
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 1ff58e3..e9ebffc 100644
--- a/extension.json
+++ b/extension.json
@@ -834,7 +834,10 @@
}
},
"mobile.search.api": {
-   "class": "MFResourceLoaderParsedMessageModule",
+   "targets": [
+   "mobile",
+   "desktop"
+   ],
"dependencies": [
"mobile.startup",
"mediawiki.Title"

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

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

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


[MediaWiki-commits] [Gerrit] Lower pcTTL in checkRedirect() to 30 - change (mediawiki/core)

2016-03-25 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Lower pcTTL in checkRedirect() to 30
..


Lower pcTTL in checkRedirect() to 30

The process cache does not see other purges, so lower this
for sanity in case of long-running scripts.

Change-Id: I545ce6b160bb10ffe1877284a397a247c960d885
---
M includes/filerepo/LocalRepo.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index d038d93..8248699 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -227,7 +227,7 @@
? Title::makeTitle( $row->rd_namespace, 
$row->rd_title )->getDBkey()
: ''; // negative cache
},
-   [ 'pcTTL' => $expiry ]
+   [ 'pcTTL' => 30 ]
);
 
// @note: also checks " " for b/c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I545ce6b160bb10ffe1877284a397a247c960d885
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Request-local caching of image_redirect - change (mediawiki/core)

2016-03-25 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Request-local caching of image_redirect
..


Request-local caching of image_redirect

LocalRepo::checkRedirect() cache image redirect checks in memory to avoid
unnecessary trips to memcached. Same idea as Idbd11637.

Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d
(cherry picked from commit d1c4eafef54f638ef025816b17502250a5be9e73)
---
M includes/filerepo/LocalRepo.php
M includes/libs/objectcache/WANObjectCache.php
M tests/phpunit/MediaWikiTestCase.php
3 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index d24aa24..d038d93 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -226,7 +226,8 @@
return ( $row && $row->rd_namespace == NS_FILE )
? Title::makeTitle( $row->rd_namespace, 
$row->rd_title )->getDBkey()
: ''; // negative cache
-   }
+   },
+   [ 'pcTTL' => $expiry ]
);
 
// @note: also checks " " for b/c
diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index e43d37b..b212e97 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -919,6 +919,15 @@
}
 
/**
+* Clear the in-process caches; useful for testing
+*
+* @since 1.27
+*/
+   public function clearProcessCache() {
+   $this->procCache->clear();
+   }
+
+   /**
 * Do the actual async bus purge of a key
 *
 * This must set the key to "PURGED::"
diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index dc69902..61e4c73 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -247,6 +247,7 @@
}
 
DeferredUpdates::clearPendingUpdates();
+   ObjectCache::getMainWANInstance()->clearProcessCache();
 
ob_start( 'MediaWikiTestCase::wfResetOutputBuffersBarrier' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.18
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] jscs: Enable checkParamNames and make pass - change (mediawiki...Echo)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: jscs: Enable checkParamNames and make pass
..


jscs: Enable checkParamNames and make pass

Change-Id: I50340b156b7c23483da1613eaabe8f40c559660a
---
M .jscsrc
M modules/api/mw.echo.api.EchoApi.js
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
M modules/ooui/mw.echo.ui.NotificationsWidget.js
4 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/.jscsrc b/.jscsrc
index ea5a127..48d4f4f 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -10,6 +10,7 @@
},
"requireParamTypes": true,
"checkReturnTypes": true,
+   "checkParamNames": true,
"checkTypes": "strictNativeCase",
"requireReturnTypes": true,
"checkRedundantAccess": true,
diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index 55436ac..18fe23d 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -27,7 +27,7 @@
/**
 * Fetch notifications from the server based on type
 *
-* @param {string} types An array of notification types to fetch: 
'alert', 'message', 'all'
+* @param {string} type Notification type to fetch: 'alert', 'message', 
or 'all'
 * @param {string} [source="local"] The source from which to fetch the 
notifications
 * @param {boolean} [isForced] Force a refresh on the fetch 
notifications promise
 * @return {jQuery.Promise} Promise that is resolved with all 
notifications for the
diff --git a/modules/ooui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
index fb8e3c8..81552ba 100644
--- a/modules/ooui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
@@ -7,6 +7,7 @@
 * @extends OO.ui.OptionWidget
 *
 * @constructor
+* @param {mw.echo.dm.NotificationItem} model Notification item model
 * @param {Object} [config] Configuration object
 * @cfg {boolean} [markReadWhenSeen=false] This option is marked as 
read when it is viewed
 * @cfg {jQuery} [$overlay] A jQuery element functioning as an overlay
diff --git a/modules/ooui/mw.echo.ui.NotificationsWidget.js 
b/modules/ooui/mw.echo.ui.NotificationsWidget.js
index 41b5b2c..517d451 100644
--- a/modules/ooui/mw.echo.ui.NotificationsWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWidget.js
@@ -98,7 +98,7 @@
/**
 * Respond to model add event
 *
-* @param {mw.echo.dm.NotificationItem} Added notification item
+* @param {mw.echo.dm.NotificationItem} notificationItem Added 
notification item
 * @param {number} index Index to add the item
 */
mw.echo.ui.NotificationsWidget.prototype.onModelNotificationAdd = 
function ( notificationItem, index ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50340b156b7c23483da1613eaabe8f40c559660a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WIP: Add {{#balance}} to opt-in to balanced templates - change (mediawiki/core)

2016-03-25 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: WIP: Add {{#balance}} to opt-in to balanced templates
..

WIP: Add {{#balance}} to opt-in to balanced templates

Allow templates to opt-in to balancing, which means (roughly) that the
output of the template will not contain any unclosed tags nor trigger
the HTML adoption agency algorithm when included in a page.  This
allows high-performance incremental update of page contents after
templates are modified, and ensures the safe editing of the template
using HTML-based tools such as VisualEditor or jsapi.

The RFC for {{#balance}} proposes three balance types: block, inline,
and table.  As a first step, this patch implements only the block
type, but the ground is laid for the future implementation of other
balance types.

Bug: T114445
Change-Id: I7216f6cffe1589e49336a53629b32b3264d7bc43
---
M includes/parser/CoreParserFunctions.php
M includes/parser/Parser.php
M includes/parser/Preprocessor.php
M includes/parser/Preprocessor_DOM.php
M includes/parser/Preprocessor_Hash.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M languages/messages/MessagesEn.php
8 files changed, 99 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/279670/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index a55ddf3..6b57e0d 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -70,6 +70,7 @@
$parser->setFunctionHook( 'speciale', [ __CLASS__, 'speciale' ] 
);
$parser->setFunctionHook( 'tag', [ __CLASS__, 'tagObj' ], 
Parser::SFH_OBJECT_ARGS );
$parser->setFunctionHook( 'formatdate', [ __CLASS__, 
'formatDate' ] );
+   $parser->setFunctionHook( 'balance', [ __CLASS__, 'balanceObj' 
], Parser::SFH_OBJECT_ARGS );
 
if ( $wgAllowDisplayTitle ) {
$parser->setFunctionHook(
@@ -1047,6 +1048,30 @@
}
 
/**
+* Parser function to mark the current template as balanced.
+* @param Parser $parser
+* @param PPFrame $frame
+* @param PPNode[] $args
+* @return string
+*/
+   public static function balanceObj( $parser, $frame, $args ) {
+   if ( !count( $args ) ) {
+   return '';
+   }
+   $type = strtolower( trim( $frame->expand( array_shift( $args ) 
) ) );
+   if ( $type === '' ) {
+   $type = "block"; # default {{#balance}} type is "block"
+   }
+   if ( $type === 'none' || $type === 'block' ) {
+   $frame->setBalanceType( $type );
+   return '';
+   }
+   return '' .
+   wfMessage( 'bad-balance', $type 
)->inContentLanguage()->text() .
+   '';
+   }
+
+   /**
 * Fetched the current revision of the given title and return this.
 * Will increment the expensive function count and
 * add a template link to get the value refreshed on changes.
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 5ee0c5a..b2a3fc7 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3446,6 +3446,8 @@
$isChildObj = false;
// $text is a DOM node needing expansion in the current frame
$isLocalObj = false;
+   // $text should be balanced before/after (unless is "none")
+   $balanceType = "none";
 
# Title object, where $text came from
$title = false;
@@ -3526,6 +3528,10 @@
# Parser functions
if ( !$found ) {
$colonPos = strpos( $part1, ':' );
+   if ( $part1 === '#balance' ) {
+   # Allow the #balance function to omit the 
trailing colon.
+   $colonPos = strlen( $part1 );
+   }
if ( $colonPos !== false ) {
$func = substr( $part1, 0, $colonPos );
$funcArgs = [ trim( substr( $part1, $colonPos + 
1 ) ) ];
@@ -3678,6 +3684,8 @@
# Uncached expansion
$text = $newFrame->expand( $text );
}
+   # Does the child template need balancing?
+   $balanceType = $newFrame->getBalanceType();
}
if ( $isLocalObj && $nowiki ) {
$text = $frame->expand( $text, PPFrame::RECOVER_ORIG );
diff --git a/includes/parser/Preprocessor.php b/includes/parser/Preprocessor.php
index 368d79e..015bf2a 100644
--- 

[MediaWiki-commits] [Gerrit] Update uidenforcer to work with v1.2.0 release - change (operations...kubernetes)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Update uidenforcer to work with v1.2.0 release
..

Update uidenforcer to work with v1.2.0 release

Change-Id: I15e9be74579b368a5e87822c223e4927fb8d9ada
---
M plugin/pkg/admission/uidenforcer/admission.go
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/kubernetes 
refs/changes/68/279668/1

diff --git a/plugin/pkg/admission/uidenforcer/admission.go 
b/plugin/pkg/admission/uidenforcer/admission.go
index 30a3a39..669f14c 100644
--- a/plugin/pkg/admission/uidenforcer/admission.go
+++ b/plugin/pkg/admission/uidenforcer/admission.go
@@ -23,11 +23,11 @@
"k8s.io/kubernetes/pkg/admission"
"k8s.io/kubernetes/pkg/api"
apierrors "k8s.io/kubernetes/pkg/api/errors"
-   client "k8s.io/kubernetes/pkg/client/unversioned"
+   clientset 
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 )
 
 func init() {
-   admission.RegisterPlugin("UidEnforcer", func(client client.Interface, 
config io.Reader) (admission.Interface, error) {
+   admission.RegisterPlugin("UidEnforcer", func(client 
clientset.Interface, config io.Reader) (admission.Interface, error) {
return NewUidEnforcer(client), nil
})
 }
@@ -35,11 +35,11 @@
 // plugin contains the client used by the uidenforcer admin controller
 type plugin struct {
*admission.Handler
-   client client.Interface
+   client clientset.Interface
 }
 
 // NewSecurityContextDeny creates a new instance of the SecurityContextDeny 
admission controller
-func NewUidEnforcer(client client.Interface) admission.Interface {
+func NewUidEnforcer(client clientset.Interface) admission.Interface {
return {
Handler: admission.NewHandler(admission.Create, 
admission.Update),
client:  client,
@@ -48,7 +48,7 @@
 
 // Admit will deny pods that have a RunAsUser set that isn't the uid of the 
user requesting it
 func (p *plugin) Admit(a admission.Attributes) (err error) {
-   if a.GetResource() != string(api.ResourcePods) {
+   if a.GetResource() != api.Resource("Pods") {
return nil
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15e9be74579b368a5e87822c223e4927fb8d9ada
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/kubernetes
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Integrate X-Wikimedia-Debug with Logstash - change (operations/mediawiki-config)

2016-03-25 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Integrate X-Wikimedia-Debug with Logstash
..

Integrate X-Wikimedia-Debug with Logstash

* When $wmgLogstashServers is non-empty, eagerly declare a handler for each log 
level.
* Allow $wmgDefaultMonologHandler to be an array of handler names.
* When the X-Wikimedia-Debug header is present and contains a 'log' attribute, 
log
  messages to both Logstash and fluorine.

Either the browser extensions or a JavaScript snippet could construct a link to
'https://logstash.wikimedia.org/#/dashboard/elasticsearch/request-id?id=' + 
mw.config.get( 'wgRequestId' )

Change-Id: Ibc96f9d3bde31b3809bfa9b0e56ba4507e58673a
---
M wmf-config/logging.php
1 file changed, 44 insertions(+), 39 deletions(-)


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

diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index e4c1303..97384ff 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -31,16 +31,18 @@
$wmgLogstashServers = false;
$wmgMonologChannels = array();
$wgDebugDumpSql = true;
+} elseif ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) && preg_match( 
'/\blog\b/i', $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) ) {
+   // Forward all log messages to logstash for debugging.
+   // See .
+   $wgDebugLogFile = "udp://{$wmfUdp2logDest}/XWikimediaDebug";
+   $wmgDefaultMonologHandler = [ 'wgDebugLogFile' ];
+   if ( $wmgLogstashServers ) {
+   $wmgDefaultMonologHandler[] = 'logstash-debug';
+   }
+   $wmgMonologChannels = [];
 }
 
-// When the X-Wikimedia-Debug header is present and contains a 'log' attribute,
-// forward log messages in all channels to a special log bucket set aside for
-// debugging. See .
-if ( isset( $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) &&
-   preg_match( '/\blog\b/i', $_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) 
) {
-   $wgDebugLogFile = "udp://{$wmfUdp2logDest}/XWikimediaDebug";
-   $wmgDefaultMonologHandler = 'wgDebugLogFile';
-}
+
 
 // Monolog logging configuration
 
@@ -87,6 +89,35 @@
),
 );
 
+$wmgMonologHandlers = [
+   'blackhole' => [
+   'class' => '\\Monolog\\Handler\\NullHandler',
+   ],
+   'wgDebugLogFile' => [
+   'class' => '\\MediaWiki\\Logger\\Monolog\\LegacyHandler',
+   'args'  => [ $wgDebugLogFile ],
+   'formatter' => 'line',
+   ],
+];
+
+if ( $wmgLogstashServers ) {
+   shuffle( $wmgLogstashServers );
+   foreach ( [ 'debug', 'info', 'warning', 'error' ] as $logLevel ) {
+   $wmgMonologHandlers[ "logstash-$logLevel" ] = [
+   'class' => 
'\\MediaWiki\\Logger\\Monolog\\SyslogHandler',
+   'formatter' => 'logstash',
+   'args'  => [
+   'mediawiki', // tag
+   $wmgLogstashServers[0],  // host
+   10514,   // port
+   LOG_USER,// facility
+   $logLevel,   // log level threshold
+   ],
+   ];
+   }
+}
+
+
 // Post construction calls to make for new Logger instances
 $wmgMonologLoggerCalls = array(
// T116550 - Requires Monolog > 1.17.2
@@ -97,7 +128,7 @@
'loggers' => array(
// Template for all undefined log channels
'@default' => array(
-   'handlers' => array( $wmgDefaultMonologHandler ),
+   'handlers' => (array) $wmgDefaultMonologHandler,
'processors' => array_keys( $wmgMonologProcessors ),
'calls' => $wmgMonologLoggerCalls,
),
@@ -105,16 +136,7 @@
 
'processors' => $wmgMonologProcessors,
 
-   'handlers' => array(
-   'blackhole' => array(
-   'class' => '\\Monolog\\Handler\\NullHandler',
-   ),
-   'wgDebugLogFile' => array(
-   'class' => 
'\\MediaWiki\\Logger\\Monolog\\LegacyHandler',
-   'args' => array( $wgDebugLogFile ),
-   'formatter' => 'line',
-   ),
-   ),
+   'handlers' => $wmgMonologHandlers,
 
'formatters' => array(
'line' => array(
@@ -228,27 +250,10 @@
 
// Configure Logstash handler
if ( $opts['logstash'] && $wmgLogstashServers ) {
-   $level = $opts['logstash'];
-   $logstashHandler = "logstash-{$level}";
-   if ( !isset( $wmgMonologConfig['handlers'][$logstashHandler] ) 
) {
-

[MediaWiki-commits] [Gerrit] Rename relevancylab -> relevanceforge - change (integration/config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rename relevancylab -> relevanceforge
..


Rename relevancylab -> relevanceforge

This repository has been renamed to reduce to proliferation
of projects named 'labs'. Patch updates zuul so it will vote
on the new repository.

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

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 29d93f0..4c7b52e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2146,7 +2146,7 @@
 test: *translatewiki_jobs
 gate-and-submit: *translatewiki_jobs
 
-  - name: wikimedia/discovery/relevancylab
+  - name: wikimedia/discovery/relevanceForge
 template:
   - name: tox-jessie
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia73434a5878bd88b5cefe14e7dcdfcaab0dd9b43
Gerrit-PatchSet: 3
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
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 -v to grunt command line - change (oojs/ui)

2016-03-25 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Add -v to grunt command line
..

Add -v to grunt command line

Reason since updating concat to 1.0.0 in one of the updates they changed
to using grunt.verbose, so now to see the log we have to either do
--verbose or -v

Per
https://github.com/gruntjs/grunt-contrib-concat/issues/153#issuecomment-201467255

Change-Id: Ie0fe0d669d478ea99aa72a5ac9bca70b598bdd55
---
M package.json
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/66/279666/1

diff --git a/package.json b/package.json
index 37b2b88..285b835 100644
--- a/package.json
+++ b/package.json
@@ -13,12 +13,12 @@
   },
   "license": "MIT",
   "scripts": {
-"test": "grunt test",
-"predoc": "grunt build",
+"test": "grunt -v test",
+"predoc": "grunt -v build",
 "doc": "jsduck",
-"postdoc": "grunt copy:jsduck",
-"publish-build": "grunt publish-build",
-"demos": "grunt publish-build && grunt demos"
+"postdoc": "grunt -v copy:jsduck",
+"publish-build": "grunt -v publish-build",
+"demos": "grunt -v publish-build && grunt -v demos"
   },
   "dependencies": {
 "es5-shim": "4.1.14",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0fe0d669d478ea99aa72a5ac9bca70b598bdd55
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] [ZeroPortal] and [ZeroBanner] Add extension dependencies - change (integration/config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [ZeroPortal] and [ZeroBanner] Add extension dependencies
..


[ZeroPortal] and [ZeroBanner] Add extension dependencies

This is copying them from mediawiki-extensions.yaml
so we can test using generic tests.

In addition Scribunto is added as dependency to
ZeroPortal. As ZeroPortal.git/includes/LuaLibrary.php
extends Scribunto_LuaLibraryBase.

If the generic jobs pass we will switch to them in a
follow up patch.

Change-Id: Ice040e9613c72fab603ce005714de2ce94d912c4
---
M zuul/parameter_functions.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index 525bdce..206c966 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -118,6 +118,9 @@
 'WikimediaEvents': ['EventLogging'],
 'WikimediaPageViewInfo': ['Graph'],
 'wikihiero': ['VisualEditor'],
+'ZeroBanner': ['Echo', 'JsonConfig', 'MobileFrontend', 'VisualEditor'],
+'ZeroPortal': ['Echo', 'JsonConfig', 'MobileFrontend', 'Scribunto',
+   'VisualEditor', 'ZeroBanner'],
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice040e9613c72fab603ce005714de2ce94d912c4
Gerrit-PatchSet: 6
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Archive ApiSandbox - change (integration/config)

2016-03-25 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Archive ApiSandbox
..

Archive ApiSandbox

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/65/279665/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 29d93f0..907f3e1 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2387,13 +2387,6 @@
 experimental:
   - mwext-mw-selenium-composer
 
-  - name: mediawiki/extensions/ApiSandbox
-template:
-  - name: extension-unittests-generic
-  - name: npm-legacy
-check:
-  - jsonlint
-
   - name: mediawiki/extensions/Arrays
 template:
   - name: jshint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e2719c729b2853b2fc378b9886036808b1862c6
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] Enforce $wgReadOnly for job queues - change (mediawiki/core)

2016-03-25 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Enforce $wgReadOnly for job queues
..

Enforce $wgReadOnly for job queues

Bug: T130795
Change-Id: I9d8cf919de80dbe855086b9c590c0a0f20dc33b9
---
M includes/jobqueue/JobQueue.php
M includes/jobqueue/JobQueueGroup.php
2 files changed, 45 insertions(+), 8 deletions(-)


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

diff --git a/includes/jobqueue/JobQueue.php b/includes/jobqueue/JobQueue.php
index 5b71938..15c57f7 100644
--- a/includes/jobqueue/JobQueue.php
+++ b/includes/jobqueue/JobQueue.php
@@ -31,18 +31,16 @@
 abstract class JobQueue {
/** @var string Wiki ID */
protected $wiki;
-
/** @var string Job type */
protected $type;
-
/** @var string Job priority for pop() */
protected $order;
-
/** @var int Time to live in seconds */
protected $claimTTL;
-
/** @var int Maximum number of times to try a job */
protected $maxTries;
+   /** @var string|bool Read only rationale (or false if r/w) */
+   protected $readOnlyReason;
 
/** @var BagOStuff */
protected $dupCache;
@@ -74,6 +72,9 @@
$this->aggr = isset( $params['aggregator'] )
? $params['aggregator']
: new JobQueueAggregatorNull( [] );
+   $this->readOnlyReason = isset( $params['readOnlyReason'] )
+   ? $params['readOnlyReason']
+   : false;
}
 
/**
@@ -96,6 +97,7 @@
 *  but not acknowledged as completed after this many 
seconds. Recycling
 *  of jobs simply means re-inserting them into the 
queue. Jobs can be
 *  attempted up to three times before being discarded.
+*   - readOnlyReason : Set this to a string to make the queue 
read-only.
 *
 * Queue classes should throw an exception if they do not support the 
options given.
 *
@@ -166,6 +168,14 @@
 */
final public function delayedJobsEnabled() {
return $this->supportsDelayedJobs();
+   }
+
+   /**
+* @return string|bool Read-only rational or false if r/w
+* @since 1.27
+*/
+   public function getReadOnlyReason() {
+   return $this->readOnlyReason;
}
 
/**
@@ -307,6 +317,8 @@
 * @throws MWException
 */
final public function batchPush( array $jobs, $flags = 0 ) {
+   $this->assertNotReadOnly();
+
if ( !count( $jobs ) ) {
return; // nothing to do
}
@@ -349,6 +361,7 @@
final public function pop() {
global $wgJobClasses;
 
+   $this->assertNotReadOnly();
if ( $this->wiki !== wfWikiID() ) {
throw new MWException( "Cannot pop '{$this->type}' job 
off foreign wiki queue." );
} elseif ( !isset( $wgJobClasses[$this->type] ) ) {
@@ -392,9 +405,11 @@
 * @throws MWException
 */
final public function ack( Job $job ) {
+   $this->assertNotReadOnly();
if ( $job->getType() !== $this->type ) {
throw new MWException( "Got '{$job->getType()}' job; 
expected '{$this->type}'." );
}
+
$this->doAck( $job );
}
 
@@ -436,12 +451,12 @@
 * @return bool
 */
final public function deduplicateRootJob( IJobSpecification $job ) {
+   $this->assertNotReadOnly();
if ( $job->getType() !== $this->type ) {
throw new MWException( "Got '{$job->getType()}' job; 
expected '{$this->type}'." );
}
-   $ok = $this->doDeduplicateRootJob( $job );
 
-   return $ok;
+   return $this->doDeduplicateRootJob( $job );
}
 
/**
@@ -524,6 +539,8 @@
 * @return void
 */
final public function delete() {
+   $this->assertNotReadOnly();
+
$this->doDelete();
}
 
@@ -673,6 +690,15 @@
}
 
/**
+* @throws JobQueueReadOnlyError
+*/
+   protected function assertNotReadOnly() {
+   if ( $this->readOnlyReason !== false ) {
+   throw new JobQueueReadOnlyError( "Job queue is 
read-only: {$this->readOnlyReason}" );
+   }
+   }
+
+   /**
 * Call wfIncrStats() for the queue overall and for the queue type
 *
 * @param string $key Event type
@@ -699,3 +725,7 @@
 
 class JobQueueConnectionError extends JobQueueError {
 }
+
+class JobQueueReadOnlyError extends JobQueueError {
+
+}
\ No newline at end of file
diff --git 

[MediaWiki-commits] [Gerrit] Declare charset with - change (mediawiki...parsoid)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Declare charset with 
..


Declare charset with 

Change-Id: Ic0746cfa0bf3f7a060cbbc45b7b174ba3dac4e1b
---
M lib/wt2html/DOMPostProcessor.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index b5cbce1..282ff85 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -250,6 +250,9 @@
 
// add  content based on page meta data:
 
+   // Set the charset first.
+   appendToHead(document, 'meta', { charset: 'utf-8' });
+
// collect all the page meta data (including revision metadata) in 1 
object
var m = new Map();
Object.keys(env.page.meta || {}).forEach(function(k) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0746cfa0bf3f7a060cbbc45b7b174ba3dac4e1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] djvutxt.py: specify Page ns in title when creating Page - change (pywikibot/core)

2016-03-25 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review.

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

Change subject: djvutxt.py: specify Page ns in title when creating Page
..

djvutxt.py: specify Page ns in title when creating Page

Construct target page title using explicitly Proofread Page namespace to
avoid errors when instantiating ProofreadPage object.

Bug: T130908
Change-Id: I1e138e694acb3523b8e3be1efa447ffaa681dd9b
---
M scripts/djvutext.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/62/279662/1

diff --git a/scripts/djvutext.py b/scripts/djvutext.py
index 806b99f..7a3589d 100644
--- a/scripts/djvutext.py
+++ b/scripts/djvutext.py
@@ -74,6 +74,7 @@
 self._djvu = djvu
 self._index = index
 self._prefix = self._index.title(withNamespace=False)
+self._page_ns = self.site._proofread_page_ns.custom_name
 
 if not pages:
 self._pages = (1, self._djvu.number_of_images())
@@ -99,8 +100,10 @@
 def gen(self):
 """Generate pages from specified page interval."""
 for page_number in self.page_number_gen():
-title = '{prefix}/{number}'.format(prefix=self._prefix,
-   number=page_number)
+title = '{page_ns}:{prefix}/{number}'.format(
+page_ns=self._page_ns,
+prefix=self._prefix,
+number=page_number)
 page = ProofreadPage(self._index.site, title)
 page.page_number = page_number  # remember page number in djvu file
 yield page

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e138e694acb3523b8e3be1efa447ffaa681dd9b
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 

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


[MediaWiki-commits] [Gerrit] Add html/dp version numbers in instead of full conten... - change (mediawiki...parsoid)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add html/dp version numbers in  instead of full content 
type
..


Add html/dp version numbers in  instead of full content type

* The full Accept: header content-type string makes for unnecessary
  parsing work and is not necessary in 

Change-Id: I849a98b2c0eb2eeb66a553e3ff945df865b232a7
---
M lib/api/apiUtils.js
M lib/api/routes.js
M lib/config/ParsoidConfig.js
M lib/wt2html/DOMPostProcessor.js
4 files changed, 29 insertions(+), 16 deletions(-)

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



diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 34ed694..8c914b1 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -474,6 +474,18 @@
return env.pipelineFactory.parse(env, ret.wikitext);
 };
 
+apiUtils.wikitextContentType = function(env) {
+   return 'text/plain; charset=utf-8; 
profile="mediawiki.org/specs/wikitext/' + env.conf.parsoid.WIKITEXT_VERSION + 
'"';
+};
+
+apiUtils.htmlContentType = function(env) {
+   return 'text/html; charset=utf-8; profile="mediawiki.org/specs/html/' + 
env.conf.parsoid.HTML_VERSION + '"';
+};
+
+apiUtils.dataParsoidContentType = function(env) {
+   return 'application/json; charset=utf-8; 
profile="mediawiki.org/specs/data-parsoid/' + 
env.conf.parsoid.DATA_PARSOID_VERSION + '"';
+};
+
 apiUtils.endWt2html = function(ret, doc, output) {
var env = ret.env;
var res = ret.res;
@@ -485,7 +497,7 @@
// in v3 api, just the children of the body
innerXML: res.locals.bodyOnly && res.locals.apiVersion 
> 2,
}).str;
-   apiUtils.setHeader(res, env, 'content-type', 
env.conf.parsoid.HTML_CONTENT_TYPE);
+   apiUtils.setHeader(res, env, 'content-type', 
apiUtils.htmlContentType(env));
apiUtils.sendResponse(res, env, output);
}
 
@@ -518,7 +530,7 @@
});
apiUtils.jsonResponse(res, env, {
html: {
-   headers: { 'content-type': 
env.conf.parsoid.HTML_CONTENT_TYPE },
+   headers: { 'content-type': 
apiUtils.htmlContentType(env) },
body: out.str,
},
'data-parsoid': {
diff --git a/lib/api/routes.js b/lib/api/routes.js
index ceb0db3..a415adc 100644
--- a/lib/api/routes.js
+++ b/lib/api/routes.js
@@ -445,7 +445,7 @@
var p = apiUtils.startHtml2wt(req, res, body.html || 
body.content || '')
.then(apiUtils.endHtml2wt)
.then(function(output) {
-   apiUtils.setHeader(res, env, 'content-type', 
env.conf.parsoid.WIKITEXT_CONTENT_TYPE);
+   apiUtils.setHeader(res, env, 'content-type', 
apiUtils.wikitextContentType(env));
apiUtils.sendResponse(res, env, output);
});
return apiUtils.cpuTimeout(p, res)
@@ -592,13 +592,13 @@
return ret;
}).then(apiUtils.endHtml2wt).then(function(output) {
if (res.locals.apiVersion > 2) {
-   apiUtils.setHeader(res, env, 
'content-type', env.conf.parsoid.WIKITEXT_CONTENT_TYPE);
+   apiUtils.setHeader(res, env, 
'content-type', apiUtils.wikitextContentType(env));
apiUtils.sendResponse(res, env, output);
} else {
// In API v2 we used to send a JSON 
object here
apiUtils.jsonResponse(res, env, {
wikitext: {
-   headers: { 
'content-type': env.conf.parsoid.WIKITEXT_CONTENT_TYPE },
+   headers: { 
'content-type': apiUtils.wikitextContentType(env) },
body: output,
},
});
diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js
index d8646a3..cbb99da 100644
--- a/lib/config/ParsoidConfig.js
+++ b/lib/config/ParsoidConfig.js
@@ -254,19 +254,19 @@
 ParsoidConfig.prototype.rtTestMode = false;
 
 /**
- * @property {string} WIKITEXT_CONTENT_TYPE
+ * @property {string} WIKITEXT_VERSION
  */
-ParsoidConfig.prototype.WIKITEXT_CONTENT_TYPE = 'text/plain; charset=utf-8; 
profile="mediawiki.org/specs/wikitext/1.0.0"';
+ParsoidConfig.prototype.WIKITEXT_VERSION = '1.0.0';
 
 /**
- * @property {string} HTML_CONTENT_TYPE
+ * @property 

[MediaWiki-commits] [Gerrit] Lower pcTTL in checkRedirect() to 30 - change (mediawiki/core)

2016-03-25 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Lower pcTTL in checkRedirect() to 30
..

Lower pcTTL in checkRedirect() to 30

The process cache does not see other purges, so lower this
for sanity in case of long-running scripts.

Change-Id: I545ce6b160bb10ffe1877284a397a247c960d885
---
M includes/filerepo/LocalRepo.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index d038d93..8248699 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -227,7 +227,7 @@
? Title::makeTitle( $row->rd_namespace, 
$row->rd_title )->getDBkey()
: ''; // negative cache
},
-   [ 'pcTTL' => $expiry ]
+   [ 'pcTTL' => 30 ]
);
 
// @note: also checks " " for b/c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I545ce6b160bb10ffe1877284a397a247c960d885
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Request-local caching of image_redirect - change (mediawiki/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Request-local caching of image_redirect
..


Request-local caching of image_redirect

LocalRepo::checkRedirect() cache image redirect checks in memory to avoid
unnecessary trips to memcached. Same idea as Idbd11637.

Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d
---
M includes/filerepo/LocalRepo.php
M includes/libs/objectcache/WANObjectCache.php
M tests/phpunit/MediaWikiTestCase.php
3 files changed, 12 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, but someone else must approve
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index d24aa24..d038d93 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -226,7 +226,8 @@
return ( $row && $row->rd_namespace == NS_FILE )
? Title::makeTitle( $row->rd_namespace, 
$row->rd_title )->getDBkey()
: ''; // negative cache
-   }
+   },
+   [ 'pcTTL' => $expiry ]
);
 
// @note: also checks " " for b/c
diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index e43d37b..b212e97 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -919,6 +919,15 @@
}
 
/**
+* Clear the in-process caches; useful for testing
+*
+* @since 1.27
+*/
+   public function clearProcessCache() {
+   $this->procCache->clear();
+   }
+
+   /**
 * Do the actual async bus purge of a key
 *
 * This must set the key to "PURGED::"
diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index 4d0e39c..a99b4b9 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -247,6 +247,7 @@
}
 
DeferredUpdates::clearPendingUpdates();
+   ObjectCache::getMainWANInstance()->clearProcessCache();
 
ob_start( 'MediaWikiTestCase::wfResetOutputBuffersBarrier' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaa12376382aaa0bd8cb988240ec1da0b688359d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mw:maintenance: add role to wasat - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mw:maintenance: add role to wasat
..

mw:maintenance: add role to wasat

Add the mediawiki::maintenance role to new host wasat
to replace mw2090.

The backup things have been included in the role,
so they are not removed by this.

Bug:T129930
Change-Id: I2ad3ece58f7435966beb7e6082a0e671a266b831
---
M manifests/site.pp
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/279659/1

diff --git a/manifests/site.pp b/manifests/site.pp
index e9b8e2b..a8fadcc 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2603,11 +2603,7 @@
 
 # mediawiki maintenance server (like terbium)
 node 'wasat.codfw.wmnet' {
-
-role backup::host
-backup::set {'home': }
-
-include standard
+role mediawiki::maintenance
 }
 
 # Wikidata query service

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ad3ece58f7435966beb7e6082a0e671a266b831
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] jscs: Add "checkTypes": "strictNativeCase" and make pass - change (mediawiki...Echo)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: jscs: Add "checkTypes": "strictNativeCase" and make pass
..


jscs: Add "checkTypes": "strictNativeCase" and make pass

Change-Id: I4be0d72ba192f0b79a92f5efa2f5a16fb0f327b5
---
M .jscsrc
M modules/api/mw.echo.api.EchoApi.js
M modules/logger/mw.echo.Logger.js
3 files changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/.jscsrc b/.jscsrc
index 7d200f2..ea5a127 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -10,6 +10,7 @@
},
"requireParamTypes": true,
"checkReturnTypes": true,
+   "checkTypes": "strictNativeCase",
"requireReturnTypes": true,
"checkRedundantAccess": true,
"requireNewlineAfterDescription": true
diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index ad54617..55436ac 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -30,7 +30,7 @@
 * @param {string} types An array of notification types to fetch: 
'alert', 'message', 'all'
 * @param {string} [source="local"] The source from which to fetch the 
notifications
 * @param {boolean} [isForced] Force a refresh on the fetch 
notifications promise
-* @return {[type]} Promise that is resolved with all notifications for 
the
+* @return {jQuery.Promise} Promise that is resolved with all 
notifications for the
 *  requested types.
 */
mw.echo.api.EchoApi.prototype.fetchNotifications = function ( type, 
source, isForced ) {
@@ -80,8 +80,8 @@
/**
 * Mark all notifications for a given type as read in the given source.
 *
-* @param {[type]} source Notifications source
-* @param {[type]} type Notifications type
+* @param {string} source Symbolic name of notifications source
+* @param {string} type Notifications type
 * @return {jQuery.Promise} A promise that is resolved when the 
operation
 *  is complete, with the number of unread notifications still remaining
 *  for that type in the given source
@@ -126,7 +126,7 @@
 *
 * @param {string} source Notification source.
 * @param {string} type Notification type
-* @return {Boolean} The API response for fetching notification has
+* @return {boolean} The API response for fetching notification has
 *  resolved in an error state, or is rejected.
 */
mw.echo.api.EchoApi.prototype.isFetchingErrorState = function ( source, 
type ) {
diff --git a/modules/logger/mw.echo.Logger.js b/modules/logger/mw.echo.Logger.js
index 84261cf..a23872a 100644
--- a/modules/logger/mw.echo.Logger.js
+++ b/modules/logger/mw.echo.Logger.js
@@ -38,7 +38,7 @@
 * is enabled
 *
 * @static
-* @property {[type]}
+* @property {boolean}
 */
mw.echo.Logger.static.clickThroughEnabled = OO.getProp(
mw.config.get( 'wgEchoConfig' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4be0d72ba192f0b79a92f5efa2f5a16fb0f327b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use Diffusion for default Git Viewer - change (mediawiki/core)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use Diffusion for default Git Viewer
..


Use Diffusion for default Git Viewer

- Provide new %R parameter for $wgGitRepositoryViewers that gives
  a non-URL-encoded version of the repo name.
- Don't force repos to end in .git. That's not required and never
  has been.
- Finally swap Gitblit urls for Diffusion equivalents

Change-Id: I7d2fb3eea1587be66b88acc6a9b9d17382cb01d5
---
M includes/DefaultSettings.php
M includes/GitInfo.php
2 files changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index c04602c..0a9a29a 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6238,14 +6238,15 @@
  * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
  * full SHA-1 of the HEAD revision.
  * %r will be replaced with a URL-encoded version of $1.
+ * %R will be replaced with $1 and no URL-encoding
  *
  * @since 1.20
  */
 $wgGitRepositoryViewers = [
'https://(?:[a-z0-9_]+@)?gerrit.wikimedia.org/r/(?:p/)?(.*)' =>
-   'https://git.wikimedia.org/tree/%r/%H',
+   'https://phabricator.wikimedia.org/r/revision/%R;%H',
'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' =>
-   'https://git.wikimedia.org/tree/%r/%H',
+   'https://phabricator.wikimedia.org/r/revision/%R;%H',
 ];
 
 /** @} */ # End of maintenance }
diff --git a/includes/GitInfo.php b/includes/GitInfo.php
index 29516ab..de7e8c2 100644
--- a/includes/GitInfo.php
+++ b/includes/GitInfo.php
@@ -257,9 +257,6 @@
if ( $url === false ) {
return false;
}
-   if ( substr( $url, -4 ) !== '.git' ) {
-   $url .= '.git';
-   }
foreach ( self::getViewers() as $repo => $viewer ) {
$pattern = '#^' . $repo . '$#';
if ( preg_match( $pattern, $url, $matches ) ) {
@@ -269,6 +266,7 @@
'%h' => substr( $headSHA1, 0, 7 ),
'%H' => $headSHA1,
'%r' => urlencode( $matches[1] ),
+   '%R' => $matches[1],
];
return strtr( $viewerUrl, $replacements );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d2fb3eea1587be66b88acc6a9b9d17382cb01d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Clarify comment - change (mediawiki...Flow)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Clarify comment
..


Clarify comment

Change-Id: If93ad7446e2bc5a45a65c5811e0b93ca45998d7d
---
M includes/SubmissionHandler.php
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/includes/SubmissionHandler.php b/includes/SubmissionHandler.php
index c2ff957..2ba98db 100644
--- a/includes/SubmissionHandler.php
+++ b/includes/SubmissionHandler.php
@@ -101,8 +101,11 @@
}
// I guess this is the "user block" meaning of 
'block'.  If
// so, this is misleading, since it could be 
protection,
-   // etc.  In theory, something could be using it 
since it's
-   // exposed to the API, but very unlikely...
+   // etc.  The specific error message (protect, 
block, etc.)
+   // will still be output, though.
+   //
+   // In theory, something could be relying on the 
string 'block',
+   // since it's exposed to the API, but probably 
not.
reset( $interestedBlocks )->addError( 'block', 
$msg );
}
return array();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If93ad7446e2bc5a45a65c5811e0b93ca45998d7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Time POST requests to API write modules - change (mediawiki/core)

2016-03-25 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Time POST requests to API write modules
..

Time POST requests to API write modules

This lets us capture some basic endpoint timing data that is
lacking now, such as upload API call time.

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


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

diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 5566d31..72264f9 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -397,7 +397,12 @@
if ( $this->mInternalMode ) {
$this->executeAction();
} else {
+   $start = microtime( true );
$this->executeActionWithErrorHandling();
+   if ( $this->isWriteMode() && 
$this->getRequest()->wasPosted() ) {
+   $timeMs = 1000 * max( 0, microtime( true ) - 
$start );
+   $this->getStats()->timing( 'api.' . 
$this->getModuleName(), $timeMs );
+   }
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0627e2d78d82b22ed6bdaaa0fa7fe5f20ef50b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki: maintenance servers should all have home backup - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mediawiki: maintenance servers should all have home backup
..


mediawiki: maintenance servers should all have home backup

It's part of the role "mediawiki::maintenance"-server to have
backups of the home directories.

This should be the case on all servers that include this role,
so move it out of the node level and into the role class.

Declutter site.pp and make sure maint servers are the same.

Bug:T129930
Change-Id: Ie74d7e29b657b39dd5107a31c4fec6b97860470a
---
M manifests/site.pp
M modules/role/manifests/mediawiki/maintenance.pp
2 files changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index eaf307a..e9b8e2b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2075,11 +2075,10 @@
 
 #mw2090 is terbium's equivalent
 node 'mw2090.codfw.wmnet' {
-role mariadb::maintenance, mediawiki::maintenance, backup::host
+role mariadb::maintenance, mediawiki::maintenance
 
 include ldap::role::client::labs
 
-backup::set {'home': }
 }
 
 #mw2091-mw2119 are appservers
@@ -2551,11 +2550,9 @@
 
 # https://wikitech.wikimedia.org/wiki/Terbium
 node 'terbium.eqiad.wmnet' {
-role mariadb::maintenance, mediawiki::maintenance, backup::host
+role mariadb::maintenance, mediawiki::maintenance
 
 include ldap::role::client::labs
-
-backup::set {'home': }
 }
 
 # deployment servers
diff --git a/modules/role/manifests/mediawiki/maintenance.pp 
b/modules/role/manifests/mediawiki/maintenance.pp
index 53f6509..08f0e88 100644
--- a/modules/role/manifests/mediawiki/maintenance.pp
+++ b/modules/role/manifests/mediawiki/maintenance.pp
@@ -26,6 +26,10 @@
 include mediawiki::maintenance::jobqueue_stats
 include mediawiki::maintenance::cirrussearch
 
+# backup home directories to bacula, people work on these
+include backup::host
+backup::set {'home': }
+
 # (T17434) Periodical run of currently disabled special pages
 include mediawiki::maintenance::updatequerypages
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie74d7e29b657b39dd5107a31c4fec6b97860470a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] jscs: Enable checkRedundantParams and make pass - change (mediawiki...Echo)

2016-03-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: jscs: Enable checkRedundantParams and make pass
..

jscs: Enable checkRedundantParams and make pass

Change-Id: I3182708b5ab5b127b7e4a32d875d390485370816
---
M .jscsrc
M modules/ooui/mw.echo.ui.NotificationsWidget.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
3 files changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
index 5ffb7e0..5077718 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -14,6 +14,7 @@
"checkTypes": "strictNativeCase",
"requireReturnTypes": true,
"checkRedundantAccess": true,
+   "checkRedundantParams": true,
"checkRedundantReturns": true,
"requireNewlineAfterDescription": true
}
diff --git a/modules/ooui/mw.echo.ui.NotificationsWidget.js 
b/modules/ooui/mw.echo.ui.NotificationsWidget.js
index 517d451..af0e9c8 100644
--- a/modules/ooui/mw.echo.ui.NotificationsWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWidget.js
@@ -134,8 +134,6 @@
 
/**
 * Respond to model add event
-*
-* @param {mw.echo.dm.NotificationItem[]} Removed notification items
 */
mw.echo.ui.NotificationsWidget.prototype.onModelNotificationClear = 
function () {
var i, len,
diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js 
b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
index 9d08160..9eadc6f 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
@@ -597,7 +597,6 @@
 * Update the unread and unseen tracking lists when we remove items
 *
 * @param {mw.echo.dm.NotificationItem[]} items Items to remove
-* @param {number} index Index to add items at
 */
mw.echo.dm.NotificationsModel.prototype.removeItems = function ( items 
) {
var i, len;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3182708b5ab5b127b7e4a32d875d390485370816
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] jscs: Enable checkRedundantReturns and make pass - change (mediawiki...Echo)

2016-03-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: jscs: Enable checkRedundantReturns and make pass
..

jscs: Enable checkRedundantReturns and make pass

Change-Id: I8013198fdb5852246a0f8360b931334740eaa147
---
M .jscsrc
M modules/api/mw.echo.api.APIHandler.js
M modules/viewmodel/mw.echo.dm.NotificationsModel.js
3 files changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
index 48d4f4f..5ffb7e0 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -14,6 +14,7 @@
"checkTypes": "strictNativeCase",
"requireReturnTypes": true,
"checkRedundantAccess": true,
+   "checkRedundantReturns": true,
"requireNewlineAfterDescription": true
}
 }
diff --git a/modules/api/mw.echo.api.APIHandler.js 
b/modules/api/mw.echo.api.APIHandler.js
index 59fe1dd..fb3b2d9 100644
--- a/modules/api/mw.echo.api.APIHandler.js
+++ b/modules/api/mw.echo.api.APIHandler.js
@@ -58,8 +58,6 @@
 * the cached promise.
 *
 * @param {string} type Notification type
-* @return {jQuery.Promise} A promise that resolves with an object 
containing the
-*  notification items
 */
mw.echo.api.APIHandler.prototype.createNewFetchNotificationPromise = 
function ( type ) {
var me = this,
diff --git a/modules/viewmodel/mw.echo.dm.NotificationsModel.js 
b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
index 82fa9e0..9d08160 100644
--- a/modules/viewmodel/mw.echo.dm.NotificationsModel.js
+++ b/modules/viewmodel/mw.echo.dm.NotificationsModel.js
@@ -412,8 +412,6 @@
 * don't want to mark specific notifications as automatically read 
(like external
 * group items)
 *
-* @return {jQuery.Promise} A promise that resolves when all 
notifications
-* were marked as read.
 * @fires empty
 */
mw.echo.dm.NotificationsModel.prototype.autoMarkAllRead = function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8013198fdb5852246a0f8360b931334740eaa147
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] jscs: Enable checkParamNames and make pass - change (mediawiki...Echo)

2016-03-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: jscs: Enable checkParamNames and make pass
..

jscs: Enable checkParamNames and make pass

Change-Id: I50340b156b7c23483da1613eaabe8f40c559660a
---
M .jscsrc
M modules/api/mw.echo.api.EchoApi.js
M modules/ooui/mw.echo.ui.NotificationItemWidget.js
M modules/ooui/mw.echo.ui.NotificationsWidget.js
4 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
index ea5a127..48d4f4f 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -10,6 +10,7 @@
},
"requireParamTypes": true,
"checkReturnTypes": true,
+   "checkParamNames": true,
"checkTypes": "strictNativeCase",
"requireReturnTypes": true,
"checkRedundantAccess": true,
diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index 55436ac..18fe23d 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -27,7 +27,7 @@
/**
 * Fetch notifications from the server based on type
 *
-* @param {string} types An array of notification types to fetch: 
'alert', 'message', 'all'
+* @param {string} type Notification type to fetch: 'alert', 'message', 
or 'all'
 * @param {string} [source="local"] The source from which to fetch the 
notifications
 * @param {boolean} [isForced] Force a refresh on the fetch 
notifications promise
 * @return {jQuery.Promise} Promise that is resolved with all 
notifications for the
diff --git a/modules/ooui/mw.echo.ui.NotificationItemWidget.js 
b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
index fb8e3c8..81552ba 100644
--- a/modules/ooui/mw.echo.ui.NotificationItemWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationItemWidget.js
@@ -7,6 +7,7 @@
 * @extends OO.ui.OptionWidget
 *
 * @constructor
+* @param {mw.echo.dm.NotificationItem} model Notification item model
 * @param {Object} [config] Configuration object
 * @cfg {boolean} [markReadWhenSeen=false] This option is marked as 
read when it is viewed
 * @cfg {jQuery} [$overlay] A jQuery element functioning as an overlay
diff --git a/modules/ooui/mw.echo.ui.NotificationsWidget.js 
b/modules/ooui/mw.echo.ui.NotificationsWidget.js
index 41b5b2c..517d451 100644
--- a/modules/ooui/mw.echo.ui.NotificationsWidget.js
+++ b/modules/ooui/mw.echo.ui.NotificationsWidget.js
@@ -98,7 +98,7 @@
/**
 * Respond to model add event
 *
-* @param {mw.echo.dm.NotificationItem} Added notification item
+* @param {mw.echo.dm.NotificationItem} notificationItem Added 
notification item
 * @param {number} index Index to add the item
 */
mw.echo.ui.NotificationsWidget.prototype.onModelNotificationAdd = 
function ( notificationItem, index ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50340b156b7c23483da1613eaabe8f40c559660a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Clarify comment - change (mediawiki...Flow)

2016-03-25 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Clarify comment
..

Clarify comment

Change-Id: If93ad7446e2bc5a45a65c5811e0b93ca45998d7d
---
M includes/SubmissionHandler.php
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/includes/SubmissionHandler.php b/includes/SubmissionHandler.php
index c2ff957..2ba98db 100644
--- a/includes/SubmissionHandler.php
+++ b/includes/SubmissionHandler.php
@@ -101,8 +101,11 @@
}
// I guess this is the "user block" meaning of 
'block'.  If
// so, this is misleading, since it could be 
protection,
-   // etc.  In theory, something could be using it 
since it's
-   // exposed to the API, but very unlikely...
+   // etc.  The specific error message (protect, 
block, etc.)
+   // will still be output, though.
+   //
+   // In theory, something could be relying on the 
string 'block',
+   // since it's exposed to the API, but probably 
not.
reset( $interestedBlocks )->addError( 'block', 
$msg );
}
return array();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If93ad7446e2bc5a45a65c5811e0b93ca45998d7d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] Fix AstroPay submethod unstaging - change (mediawiki...DonationInterface)

2016-03-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix AstroPay submethod unstaging
..

Fix AstroPay submethod unstaging

...grumble grumble needle, haystack grumble grumble...

Change-Id: I6a22a1fd141cdb46f493410fedd234eba2361983
---
M astropay_gateway/AstroPayMethodCodec.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/52/279652/1

diff --git a/astropay_gateway/AstroPayMethodCodec.php 
b/astropay_gateway/AstroPayMethodCodec.php
index e77362d..dfa455c 100644
--- a/astropay_gateway/AstroPayMethodCodec.php
+++ b/astropay_gateway/AstroPayMethodCodec.php
@@ -12,7 +12,7 @@
}
$filter = function( $submethod ) use ( $method, $bank ) {
$groups = (array) $submethod['group'];
-   return in_array( $groups, $method ) && 
$submethod['bank_code'] === $bank;
+   return in_array( $method, $groups ) && 
$submethod['bank_code'] === $bank;
};
$candidates = array_filter( $adapter->getPaymentSubmethods(), 
$filter );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a22a1fd141cdb46f493410fedd234eba2361983
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] varnish: Fix puppet in deployment-prep - change (operations/puppet)

2016-03-25 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: varnish: Fix puppet in deployment-prep
..


varnish: Fix puppet in deployment-prep

There are no deployment-prep instances in codfw, so we currently get undefined
going in here which breaks everything. labtest is hosted in codfw but it's not
integrated with labs and has no working network.

Bug: T129270
Change-Id: Ia0b006d82a9f8d6f159ea121288a09d58603137d
---
M modules/role/manifests/cache/instances.pp
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/modules/role/manifests/cache/instances.pp 
b/modules/role/manifests/cache/instances.pp
index 89ec386..548e83b 100644
--- a/modules/role/manifests/cache/instances.pp
+++ b/modules/role/manifests/cache/instances.pp
@@ -66,8 +66,12 @@
 },
 }
 
-# temporary hack for cache_maps, because it's not fully deployed T109162
-if $title == 'maps' {
+# the maps conditional here is a temporary hack for
+# cache_maps, because it's not fully deployed (T109162).
+# the production conditional is sad (vs using hiera), but I
+# don't know of a better way to factor this out at the moment,
+# and it may all change later...
+if $title == 'maps' or $::realm != 'production' {
 $becaches_filtered = hash_deselect_re('^cache_codfw', $backend_caches)
 } else {
 $becaches_filtered = $backend_caches

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0b006d82a9f8d6f159ea121288a09d58603137d
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Ottomata 
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 change-propagation to 969f049 - change (mediawiki...deploy)

2016-03-25 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Update change-propagation to 969f049
..


Update change-propagation to 969f049

List of changes:
077b8a4 Set the deploy targets to Debian and node 4.3
4da88e4 Fix: fix syntax in package.json
969f049 Deploy: Fix node version to 4.3.0
xxx Update node module dependencies

Change-Id: I746760d49f746eb348c8bb5a2d48fc2f7d15db43
---
M node_modules/ansi-regex/package.json
R node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE
R 
node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch
R 
node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
R 
node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json
R node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js
M node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json
R 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/.travis.yml
R 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js
R 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json
R 
node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js
R 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore
R 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE
R 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js
R 
node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json
R 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/LICENSE
R 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/browser.js
R 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/node.js
R 
node_modules/bl/node_modules/readable-stream/node_modules/util-deprecate/package.json
M node_modules/bl/node_modules/readable-stream/package.json
M node_modules/bluebird/package.json
M node_modules/cassandra-uuid/node_modules/long/package.json
M node_modules/cassandra-uuid/package.json
M node_modules/heapdump/build/Makefile
M node_modules/heapdump/build/Release/.deps/Release/addon.node.d
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/Release/addon.node
M node_modules/heapdump/build/Release/obj.target/addon.node
M node_modules/heapdump/build/Release/obj.target/addon/src/heapdump.o
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/binding.Makefile
M node_modules/heapdump/build/config.gypi
M node_modules/heapdump/package.json
M node_modules/hyperswitch/node_modules/ajv/node_modules/co/package.json
C 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown
C 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/index.js
C 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js
C 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js
R 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/package.json
C 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js
C 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js
M 
node_modules/hyperswitch/node_modules/ajv/node_modules/json-stable-stringify/package.json
M node_modules/hyperswitch/node_modules/ajv/package.json
M node_modules/hyperswitch/node_modules/busboy/lib/types/multipart.js
C 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/core-util-is/LICENSE
C 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/core-util-is/float.patch
C 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/core-util-is/lib/util.js
C 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/core-util-is/package.json
C 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/core-util-is/test.js
A 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/LICENSE
A 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/inherits.js
A 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
A 
node_modules/hyperswitch/node_modules/busboy/node_modules/readable-stream/node_modules/inherits/package.json
A 

[MediaWiki-commits] [Gerrit] jscs: Add "checkTypes": "strictNativeCase" and make pass - change (mediawiki...Echo)

2016-03-25 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: jscs: Add "checkTypes": "strictNativeCase" and make pass
..

jscs: Add "checkTypes": "strictNativeCase" and make pass

Change-Id: I4be0d72ba192f0b79a92f5efa2f5a16fb0f327b5
---
M .jscsrc
M modules/api/mw.echo.api.EchoApi.js
M modules/logger/mw.echo.Logger.js
3 files changed, 6 insertions(+), 5 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
index 7d200f2..ea5a127 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -10,6 +10,7 @@
},
"requireParamTypes": true,
"checkReturnTypes": true,
+   "checkTypes": "strictNativeCase",
"requireReturnTypes": true,
"checkRedundantAccess": true,
"requireNewlineAfterDescription": true
diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index ad54617..55436ac 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -30,7 +30,7 @@
 * @param {string} types An array of notification types to fetch: 
'alert', 'message', 'all'
 * @param {string} [source="local"] The source from which to fetch the 
notifications
 * @param {boolean} [isForced] Force a refresh on the fetch 
notifications promise
-* @return {[type]} Promise that is resolved with all notifications for 
the
+* @return {jQuery.Promise} Promise that is resolved with all 
notifications for the
 *  requested types.
 */
mw.echo.api.EchoApi.prototype.fetchNotifications = function ( type, 
source, isForced ) {
@@ -80,8 +80,8 @@
/**
 * Mark all notifications for a given type as read in the given source.
 *
-* @param {[type]} source Notifications source
-* @param {[type]} type Notifications type
+* @param {string} source Symbolic name of notifications source
+* @param {string} type Notifications type
 * @return {jQuery.Promise} A promise that is resolved when the 
operation
 *  is complete, with the number of unread notifications still remaining
 *  for that type in the given source
@@ -126,7 +126,7 @@
 *
 * @param {string} source Notification source.
 * @param {string} type Notification type
-* @return {Boolean} The API response for fetching notification has
+* @return {boolean} The API response for fetching notification has
 *  resolved in an error state, or is rejected.
 */
mw.echo.api.EchoApi.prototype.isFetchingErrorState = function ( source, 
type ) {
diff --git a/modules/logger/mw.echo.Logger.js b/modules/logger/mw.echo.Logger.js
index 84261cf..a23872a 100644
--- a/modules/logger/mw.echo.Logger.js
+++ b/modules/logger/mw.echo.Logger.js
@@ -38,7 +38,7 @@
 * is enabled
 *
 * @static
-* @property {[type]}
+* @property {boolean}
 */
mw.echo.Logger.static.clickThroughEnabled = OO.getProp(
mw.config.get( 'wgEchoConfig' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4be0d72ba192f0b79a92f5efa2f5a16fb0f327b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki: maintenance servers should all have home backup - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mediawiki: maintenance servers should all have home backup
..

mediawiki: maintenance servers should all have home backup

It's part of the role "mediawiki::maintenance"-server to have
backups of the home directories.

This should be the case on all servers that include this role,
so move it out of the node level and into the role class.

Declutter site.pp and make sure maint servers are the same.

Bug:T129930
Change-Id: Ie74d7e29b657b39dd5107a31c4fec6b97860470a
---
M manifests/site.pp
1 file changed, 2 insertions(+), 5 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index eaf307a..e9b8e2b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2075,11 +2075,10 @@
 
 #mw2090 is terbium's equivalent
 node 'mw2090.codfw.wmnet' {
-role mariadb::maintenance, mediawiki::maintenance, backup::host
+role mariadb::maintenance, mediawiki::maintenance
 
 include ldap::role::client::labs
 
-backup::set {'home': }
 }
 
 #mw2091-mw2119 are appservers
@@ -2551,11 +2550,9 @@
 
 # https://wikitech.wikimedia.org/wiki/Terbium
 node 'terbium.eqiad.wmnet' {
-role mariadb::maintenance, mediawiki::maintenance, backup::host
+role mariadb::maintenance, mediawiki::maintenance
 
 include ldap::role::client::labs
-
-backup::set {'home': }
 }
 
 # deployment servers

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie74d7e29b657b39dd5107a31c4fec6b97860470a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] tools: Add class that helps build kubernetes - change (operations/puppet)

2016-03-25 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Add class that helps build kubernetes
..

tools: Add class that helps build kubernetes

Bug: T129311
Change-Id: I3366fb861180f9b188baa147f0d515abbfb60248
---
M modules/role/manifests/toollabs/docker/builder.pp
A modules/toollabs/manifests/kubebuilder.pp
A modules/toollabs/templates/build-kubernetes.erb
3 files changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/279648/1

diff --git a/modules/role/manifests/toollabs/docker/builder.pp 
b/modules/role/manifests/toollabs/docker/builder.pp
index c2dcb44..9bdcf9e 100644
--- a/modules/role/manifests/toollabs/docker/builder.pp
+++ b/modules/role/manifests/toollabs/docker/builder.pp
@@ -5,4 +5,8 @@
 class { '::docker::engine': }
 
 class { '::docker::baseimages': }
+
+# Temporarily build kubernetes too! We'll eventually have this
+# be done somewhere else.
+include ::docker::kubebuilder
 }
diff --git a/modules/toollabs/manifests/kubebuilder.pp 
b/modules/toollabs/manifests/kubebuilder.pp
new file mode 100644
index 000..857fb4e
--- /dev/null
+++ b/modules/toollabs/manifests/kubebuilder.pp
@@ -0,0 +1,26 @@
+# Class to help building our own version of kubernetes
+class toollabs::kubebuilder(
+$tag='v1.2.0wmf1',
+) {
+require ::docker::engine
+
+file { '/srv/build':
+ensure => directory,
+owner  => 'root',
+group  => 'root',
+mode   => '0755',
+}
+git::clone { 'operations/software/kubernetes':
+ensure=> latest,
+branch=> $tag,
+directory => '/srv/build/kubernetes',
+require   => 
+}
+
+file { '/usr/local/bin/build-kubernetes':
+content => template('toollabs/build-kubernetes.erb'),
+owner   => 'root',
+group   => 'root',
+mode=> '0544',
+}
+}
diff --git a/modules/toollabs/templates/build-kubernetes.erb 
b/modules/toollabs/templates/build-kubernetes.erb
new file mode 100644
index 000..90349ff
--- /dev/null
+++ b/modules/toollabs/templates/build-kubernetes.erb
@@ -0,0 +1,8 @@
+#!/bin/bash
+TAG="<%= @tag %>"
+
+cd /srv/build/kubernetes
+git fetch
+git checkout ${TAG}
+
+KUBE_SKIP_CONFIRMATIONS=y ./build/release.sh

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3366fb861180f9b188baa147f0d515abbfb60248
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Fix fiscal number error messages - change (mediawiki...DonationInterface)

2016-03-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix fiscal number error messages
..

Fix fiscal number error messages

Bug: T124329
Change-Id: I03a44c54a9bb61dbefeacfec86df7e6993f6041f
---
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/ksh.json
M gateway_common/i18n/interface/pt-br.json
M gateway_common/i18n/interface/qqq.json
4 files changed, 21 insertions(+), 21 deletions(-)


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

diff --git a/gateway_common/i18n/interface/en.json 
b/gateway_common/i18n/interface/en.json
index 217ede6..9912050 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -209,14 +209,14 @@
"donate_interface-error-msg-genaricrequired": "This field is required",
"donate_interface-error-msg-country-calc": "Error - We are unable to 
accept your donation at this time.",
"donate_interface-error-msg-fiscal_number": "fiscal number",
-   "donate_interface-error-msg-fiscal_number-ar": "CUIT",
+   "donate_interface-error-msg-fiscal_number-ar": "DNI",
"donate_interface-error-msg-fiscal_number-bo": "NIT",
-   "donate_interface-error-msg-fiscal_number-br": "CPF",
+   "donate_interface-error-msg-fiscal_number-br": "CPF/CNPJ",
"donate_interface-error-msg-fiscal_number-cl": "RUT",
-   "donate_interface-error-msg-fiscal_number-co": "NIT",
-   "donate_interface-error-msg-fiscal_number-mx": "RFC",
-   "donate_interface-error-msg-fiscal_number-pe": "RUC",
-   "donate_interface-error-msg-fiscal_number-uy": "RUT",
+   "donate_interface-error-msg-fiscal_number-co": "CC",
+   "donate_interface-error-msg-fiscal_number-mx": "CURP/RFC/IFE",
+   "donate_interface-error-msg-fiscal_number-pe": "DNI",
+   "donate_interface-error-msg-fiscal_number-uy": "CI",
"donate_interface-donate-error-try-a-different-card": "Please [$1 try a 
different card] or one of our [$2 other ways to give] or contact us at $3",
"donate_interface-donate-error-try-a-different-card-html": "Please try 
a different card or one of our other ways to give, or 
contact us at mailto:$2\;>$2",
"donate_interface-donate-error-try-again-html": "Please try again, try one of our other ways to 
give, or contact us at mailto:$3\;>$3",
diff --git a/gateway_common/i18n/interface/ksh.json 
b/gateway_common/i18n/interface/ksh.json
index 1c8167d..0a27a03 100644
--- a/gateway_common/i18n/interface/ksh.json
+++ b/gateway_common/i18n/interface/ksh.json
@@ -206,14 +206,14 @@
"donate_interface-error-msg-genaricrequired": "Dat kamm_er nit 
fottlohße",
"donate_interface-error-msg-country-calc": "Fähler - mer künne Ding 
Schpände em Momang nit aannämme.",
"donate_interface-error-msg-fiscal_number": "de Steuernommer enn.",
-   "donate_interface-error-msg-fiscal_number-ar": "CUIT",
+   "donate_interface-error-msg-fiscal_number-ar": "DNI",
"donate_interface-error-msg-fiscal_number-bo": "NIT",
-   "donate_interface-error-msg-fiscal_number-br": "CPF",
+   "donate_interface-error-msg-fiscal_number-br": "CPF/CNPJ",
"donate_interface-error-msg-fiscal_number-cl": "RUT",
-   "donate_interface-error-msg-fiscal_number-co": "NIT",
-   "donate_interface-error-msg-fiscal_number-mx": "RFC",
-   "donate_interface-error-msg-fiscal_number-pe": "RUC",
-   "donate_interface-error-msg-fiscal_number-uy": "RUT",
+   "donate_interface-error-msg-fiscal_number-co": "CC",
+   "donate_interface-error-msg-fiscal_number-mx": "CURP/RFC/IFE",
+   "donate_interface-error-msg-fiscal_number-pe": "DNI",
+   "donate_interface-error-msg-fiscal_number-uy": "CI",
"donate_interface-donate-error-try-a-different-card": "Bess_esu jood_un 
donn et [$1 med en ander Kreditkaate probeere], uder [$2 nämm en ander 
Müjjeleschkeit zom Spände], uder schriiv ons_en e-mail aan 
di Adräß: $3.",
"donate_interface-donate-error-try-a-different-card-html": "Bes esu 
johd un versöhg et med ene annder Kaad udder donn obb enem 
anndere Wääsch jät jävve udder schriiv en e-mail aan mailto:$2\;>$2",
"donate_interface-donate-error-try-again-html": "Bes esu johd un versöhg norr-ens udder donn donn obb enem 
anndere Wääsch jät jävve udder schriiv en e-mail aan mailto:$3\;>$3",
diff --git a/gateway_common/i18n/interface/pt-br.json 
b/gateway_common/i18n/interface/pt-br.json
index d595eb3..52606fd 100644
--- a/gateway_common/i18n/interface/pt-br.json
+++ b/gateway_common/i18n/interface/pt-br.json
@@ -211,7 +211,7 @@
"donate_interface-error-msg-genaricrequired": "Este campo é 
obrigatório",
"donate_interface-error-msg-country-calc": "Erro- não foi possivel 
aceitar sua  doação neste momento",
"donate_interface-error-msg-fiscal_number": "Número 

[MediaWiki-commits] [Gerrit] mw:maintenance: move eventlogging from node to role - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mw:maintenance: move eventlogging from node to role
..


mw:maintenance: move eventlogging from node to role

Instead of directly including this in site.pp on the
node-level, move it to the mw maintenance role class,
so that it gets installed on all mw maint servers,
also the new terbium-equivalent in codfw.

Bug:T112660
Bug:T129930
Change-Id: I373153770e0a61a34c155065fbd9cb4a6c496401
---
M manifests/site.pp
M modules/role/manifests/mediawiki/maintenance.pp
2 files changed, 9 insertions(+), 7 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index ee31d12..eaf307a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2556,13 +2556,6 @@
 include ldap::role::client::labs
 
 backup::set {'home': }
-
-# The eventlogging code is useful for scripting
-# EventLogging consumers.  Install this but don't
-# run any daemons.  To use eventlogging code,
-# add /srv/deployment/eventlogging/eventlogging
-# to your PYTHONPATh or sys.path.
-include ::eventlogging::package
 }
 
 # deployment servers
diff --git a/modules/role/manifests/mediawiki/maintenance.pp 
b/modules/role/manifests/mediawiki/maintenance.pp
index 57e23ac..53f6509 100644
--- a/modules/role/manifests/mediawiki/maintenance.pp
+++ b/modules/role/manifests/mediawiki/maintenance.pp
@@ -34,4 +34,13 @@
 
 # T84075 - SUL audit / legoktm
 require_package('python-mysqldb')
+
+# T112660 - kafka support
+# The eventlogging code is useful for scripting
+# EventLogging consumers.  Install this but don't
+# run any daemons.  To use eventlogging code,
+# add /srv/deployment/eventlogging/eventlogging
+# to your PYTHONPATh or sys.path.
+include ::eventlogging::package
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I373153770e0a61a34c155065fbd9cb4a6c496401
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Ottomata 
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 variants to the list of preferred languages - change (mediawiki...MobileFrontend)

2016-03-25 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Add variants to the list of preferred languages
..

Add variants to the list of preferred languages

To test set `$wgLanguageCode = 'zh';` and check out the langauge overlay.

Bug: T130798
Change-Id: Ia59ebf85145193417287d794fcdb93a9d57b3e87
---
M resources/mobile.languages.structured/LanguageOverlay.js
M resources/mobile.languages.structured/util.js
M tests/qunit/mobile.languages.structured/test_util.js
3 files changed, 55 insertions(+), 7 deletions(-)


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

diff --git a/resources/mobile.languages.structured/LanguageOverlay.js 
b/resources/mobile.languages.structured/LanguageOverlay.js
index 5f9aab3..b2cd5df 100644
--- a/resources/mobile.languages.structured/LanguageOverlay.js
+++ b/resources/mobile.languages.structured/LanguageOverlay.js
@@ -13,7 +13,12 @@
var languages;
 
if ( options.languages && options.languages.length ) {
-   languages = util.getStructuredLanguages( 
options.languages, util.getFrequentlyUsedLanguages(), options.deviceLanguage );
+   languages = util.getStructuredLanguages(
+   options.languages,
+   options.variants,
+   util.getFrequentlyUsedLanguages(),
+   options.deviceLanguage
+   );
options.allLanguages = languages.all;
options.allLanguagesCount = languages.all.length;
options.preferredLanguages = languages.preferred;
diff --git a/resources/mobile.languages.structured/util.js 
b/resources/mobile.languages.structured/util.js
index 663a05b..70deb36 100644
--- a/resources/mobile.languages.structured/util.js
+++ b/resources/mobile.languages.structured/util.js
@@ -55,18 +55,21 @@
 * Preferred languages are the ones that the user has used before. This 
also
 * includes the user device's primary language. Preferred languages are 
ordered
 * by frequency in descending order. The device's language is always at 
the top.
+* This group also includes the variants.
 *
 * All languages are the languages that are not preferred.
 * Languages in this list are ordered in the lexicographical order of
 * their language names.
 *
 * @param {Object[]} languages list of language objects as returned by 
the API
+* @param {Array|Boolean} variants language variant objects or false if 
no variants exist
 * @param {Object} frequentlyUsedLanguages list of the frequently used 
languages
 * @param {String|undefined} deviceLanguage the device's primary 
language
 * @return {Object[]}
 */
-   util.getStructuredLanguages = function ( languages, 
frequentlyUsedLanguages, deviceLanguage ) {
+   util.getStructuredLanguages = function ( languages, variants, 
frequentlyUsedLanguages, deviceLanguage ) {
var maxFrequency = 0,
+   minFrequency = 0,
preferredLanguages = [],
allLanguages = [];
 
@@ -75,6 +78,7 @@
if ( deviceLanguage ) {
$.each( frequentlyUsedLanguages, function ( language, 
frequency ) {
maxFrequency = maxFrequency < frequency ? 
frequency : maxFrequency;
+   minFrequency = minFrequency > frequency ? 
frequency : minFrequency;
} );
 
// Make the device language the most frequently used 
one so that
@@ -92,6 +96,21 @@
}
} );
 
+   // Add variants to the preferred languages list and assign the 
lowest
+   // frequency because the variant hasn't been clicked on yet.
+   // Note that the variants data doesn't contain the article 
title, thus
+   // we cannot show it for the variants.
+   if ( variants ) {
+   $.each( variants, function ( i, variant ) {
+   if ( frequentlyUsedLanguages.hasOwnProperty( 
variant.lang ) ) {
+   variant.frequency =  
frequentlyUsedLanguages[variant.lang];
+   } else {
+   variant.frequency = minFrequency - 1;
+   }
+   preferredLanguages.push( variant );
+   } );
+   }
+
// sort preferred languages in descending order by frequency
preferredLanguages = preferredLanguages.sort( function ( a, b ) 
{

[MediaWiki-commits] [Gerrit] mw:maintenance: move eventlogging from node to role - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mw:maintenance: move eventlogging from node to role
..

mw:maintenance: move eventlogging from node to role

Instead of directly including this in site.pp on the
node-level, move it to the mw maintenance role class,
so that it gets installed on all mw maint servers,
also the new terbium-equivalent in codfw.

Bug:T112660
Bug:T129930
Change-Id: I373153770e0a61a34c155065fbd9cb4a6c496401
---
M modules/role/manifests/mediawiki/maintenance.pp
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/279643/1

diff --git a/modules/role/manifests/mediawiki/maintenance.pp 
b/modules/role/manifests/mediawiki/maintenance.pp
index 57e23ac..53f6509 100644
--- a/modules/role/manifests/mediawiki/maintenance.pp
+++ b/modules/role/manifests/mediawiki/maintenance.pp
@@ -34,4 +34,13 @@
 
 # T84075 - SUL audit / legoktm
 require_package('python-mysqldb')
+
+# T112660 - kafka support
+# The eventlogging code is useful for scripting
+# EventLogging consumers.  Install this but don't
+# run any daemons.  To use eventlogging code,
+# add /srv/deployment/eventlogging/eventlogging
+# to your PYTHONPATh or sys.path.
+include ::eventlogging::package
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I373153770e0a61a34c155065fbd9cb4a6c496401
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] jquery.ui.datepicker: Support sr-ec as user interface language - change (mediawiki/core)

2016-03-25 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: jquery.ui.datepicker: Support sr-ec as user interface language
..

jquery.ui.datepicker: Support sr-ec as user interface language

MediaWiki currently uses the language code sr-ec for Serbian written using the 
Cyrillic script.
The language code sr has as fallback sr-ec.
This change allows to use both sr and sr-ec as user interface language.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/279642/1

diff --git a/resources/Resources.php b/resources/Resources.php
index a63de2a..f82fb29 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -482,8 +482,8 @@
'sk' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sk.js',
'sl' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sl.js',
'sq' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sq.js',
+   'sr-ec' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr.js',
'sr-el' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr-SR.js',
-   'sr' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sr.js',
'sv' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-sv.js',
'ta' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-ta.js',
'th' => 
'resources/lib/jquery.ui/i18n/jquery.ui.datepicker-th.js',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf6d4db1e986baedb38f53d86a5990dca0cacfb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] mw:maintenance: move python-mysqldb from nodes to role - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: mw:maintenance: move python-mysqldb from nodes to role
..


mw:maintenance: move python-mysqldb from nodes to role

Instead of installing packages directly on the node level (meh),
and repeating it for the equivalent in codfw, move this package
install into the role class for mw maintenance hosts.

Also reopened T84075 to check if we still need this at all since
it was called a temporary solution. Not a problem to keep though
if we use it.

Bug:T84075
Bug:129930
Change-Id: I3529298c4427d8ba72dc36688e17237b2182c00f
---
M manifests/site.pp
M modules/role/manifests/mediawiki/maintenance.pp
2 files changed, 3 insertions(+), 8 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 4e3a124..ee31d12 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2079,10 +2079,6 @@
 
 include ldap::role::client::labs
 
-package { 'python-mysqldb':
-ensure => installed,
-}
-
 backup::set {'home': }
 }
 
@@ -2558,10 +2554,6 @@
 role mariadb::maintenance, mediawiki::maintenance, backup::host
 
 include ldap::role::client::labs
-
-package { 'python-mysqldb':
-ensure => installed,
-}
 
 backup::set {'home': }
 
diff --git a/modules/role/manifests/mediawiki/maintenance.pp 
b/modules/role/manifests/mediawiki/maintenance.pp
index ff2f438..57e23ac 100644
--- a/modules/role/manifests/mediawiki/maintenance.pp
+++ b/modules/role/manifests/mediawiki/maintenance.pp
@@ -31,4 +31,7 @@
 
 # Readline support for PHP maintenance scripts (T126262)
 require_package('php5-readline')
+
+# T84075 - SUL audit / legoktm
+require_package('python-mysqldb')
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3529298c4427d8ba72dc36688e17237b2182c00f
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] contint: increase tmpfs size to 384M (+128M) - change (operations/puppet)

2016-03-25 Thread Dduvall (Code Review)
Dduvall has uploaded a new change for review.

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

Change subject: contint: increase tmpfs size to 384M (+128M)
..

contint: increase tmpfs size to 384M (+128M)

There have been recent issues related to a full tmpfs and package
installation/compilation. This issue will be moot once we're fully moved
over to nodepool instances that make use of the package caching, but
let's increase the tmpfs size for now to accommodate jobs still running
on older instances.

Change-Id: Idc3c7a2ff0daec351d4269f425d811f1e06a30a3
---
M modules/role/manifests/ci/slave.pp
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/279640/1

diff --git a/modules/role/manifests/ci/slave.pp 
b/modules/role/manifests/ci/slave.pp
index 253aca8..05bc3cb 100644
--- a/modules/role/manifests/ci/slave.pp
+++ b/modules/role/manifests/ci/slave.pp
@@ -44,8 +44,9 @@
 
 contint::tmpfs { 'tmpfs for jenkins CI slave':
 mount_point => '/var/lib/jenkins-slave/tmpfs',
-size=> '256M',
+size=> '384M',
 }
+
 nrpe::monitor_service { 'ci_tmpfs':
 description  => 'CI tmpfs disk space',
 nrpe_command => '/usr/lib/nagios/plugins/check_disk -w 20% -c 5% -e -p 
/var/lib/jenkins-slave/tmpfs',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc3c7a2ff0daec351d4269f425d811f1e06a30a3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dduvall 

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


[MediaWiki-commits] [Gerrit] Fix regressions in insertables placement - change (mediawiki...Translate)

2016-03-25 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Fix regressions in insertables placement
..

Fix regressions in insertables placement

Most visible one is when opening untranslated message: the buttons
are 30 px too much down. Tweaked the places where the positioning
is updated and made sure the size of correct element is taken.

Change-Id: I065c5d8e5de03a19f0bdceea29cf267d2fba4c24
---
M resources/js/ext.translate.editor.js
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/resources/js/ext.translate.editor.js 
b/resources/js/ext.translate.editor.js
index 872bd46..139365d 100644
--- a/resources/js/ext.translate.editor.js
+++ b/resources/js/ext.translate.editor.js
@@ -581,7 +581,6 @@
 
if ( original !== '' ) {
$discardChangesButton.removeClass( 
'hide' );
-   translateEditor.resizeInsertables( 
$textarea );
}
 
/* Avoid Unsaved marking when translated 
message is not changed in content.
@@ -606,6 +605,8 @@
$saveButton.prop( 'disabled', true );
$pasteSourceButton.removeClass( 'hide' 
);
}
+
+   translateEditor.resizeInsertables( $textarea );
 
translateEditor.delayValidation( function () {
translateEditor.validateTranslation();
@@ -1053,6 +1054,7 @@
$textarea.focus();
 
autosize( $textarea );
+   this.resizeInsertables( $textarea );
 
this.shown = true;
this.$editTrigger.addClass( 'open' );
@@ -1181,7 +1183,7 @@
resizeInsertables: function ( $textarea ) {
var $buttonArea, buttonAreaHeight;
 
-   $buttonArea = $( '.tux-editor-insert-buttons' );
+   $buttonArea = this.$editor.find( 
'.tux-editor-insert-buttons' );
buttonAreaHeight = $buttonArea.height();
$textarea.css( 'padding-bottom', buttonAreaHeight + 10 
);
$buttonArea.css( 'top', -buttonAreaHeight - 5 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I065c5d8e5de03a19f0bdceea29cf267d2fba4c24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] scap::target: Add the $deploy_user group ID - change (operations/puppet)

2016-03-25 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: scap::target: Add the $deploy_user group ID
..


scap::target: Add the $deploy_user group ID

Change-Id: I7ef252516ab54b9a6886058e5fc17321dae9b313
---
M modules/scap/manifests/target.pp
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/scap/manifests/target.pp b/modules/scap/manifests/target.pp
index 7e3a51e..2586c15 100644
--- a/modules/scap/manifests/target.pp
+++ b/modules/scap/manifests/target.pp
@@ -49,6 +49,16 @@
 include scap
 include scap::ferm
 
+if $manage_user and !defined(Group[$deploy_user]) {
+group { $deploy_user:
+ensure => present,
+system => true,
+before => User[$deploy_user],
+}
+} else {
+Group[$deploy_user] -> Scap::Target[$title]
+}
+
 if $manage_user and !defined(User[$deploy_user]) {
 user { $deploy_user:
 ensure => present,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ef252516ab54b9a6886058e5fc17321dae9b313
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mw:maintenance: move python-mysqldb from nodes to role - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: mw:maintenance: move python-mysqldb from nodes to role
..

mw:maintenance: move python-mysqldb from nodes to role

Instead of installing packages directly on the node level (meh),
and repeating it for the equivalent in codfw, move this package
install into the role class for mw maintenance hosts.

Also reopened T84075 to check if we still need this at all since
it was called a temporary solution. Not a problem to keep though
if we use it.

Bug:T84075
Bug:129930
Change-Id: I3529298c4427d8ba72dc36688e17237b2182c00f
---
M manifests/site.pp
M modules/role/manifests/mediawiki/maintenance.pp
2 files changed, 3 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/279637/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 4e3a124..ee31d12 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2079,10 +2079,6 @@
 
 include ldap::role::client::labs
 
-package { 'python-mysqldb':
-ensure => installed,
-}
-
 backup::set {'home': }
 }
 
@@ -2558,10 +2554,6 @@
 role mariadb::maintenance, mediawiki::maintenance, backup::host
 
 include ldap::role::client::labs
-
-package { 'python-mysqldb':
-ensure => installed,
-}
 
 backup::set {'home': }
 
diff --git a/modules/role/manifests/mediawiki/maintenance.pp 
b/modules/role/manifests/mediawiki/maintenance.pp
index ff2f438..57e23ac 100644
--- a/modules/role/manifests/mediawiki/maintenance.pp
+++ b/modules/role/manifests/mediawiki/maintenance.pp
@@ -31,4 +31,7 @@
 
 # Readline support for PHP maintenance scripts (T126262)
 require_package('php5-readline')
+
+# T84075 - SUL audit / legoktm
+require_package('python-mysqldb')
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3529298c4427d8ba72dc36688e17237b2182c00f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Add a grid with the marks on tested values for engineScore.py - change (wikimedia...relevanceForge)

2016-03-25 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Add a grid with the marks on tested values for engineScore.py
..

Add a grid with the marks on tested values for engineScore.py

Change-Id: I23b749ca757a007f75773ae149db6c16a77dd365
---
M engineScore.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge 
refs/changes/36/279636/1

diff --git a/engineScore.py b/engineScore.py
index 4048288..6262389 100644
--- a/engineScore.py
+++ b/engineScore.py
@@ -306,12 +306,19 @@
 plt.ylabel('engine score')
 plt.show()
 elif dim == 2:
+fig = plt.figure()
+ax = fig.add_subplot(1,1,1)
+
 vmin = config.getfloat('optimize', 'zmin')
 vmax = config.getfloat('optimize', 'zmax')
 
 CS = plt.contourf(grid[0], grid[1], jout, vmin=vmin, vmax=vmax)
 cbar = plt.colorbar(CS)
 cbar.ax.set_ylabel('engine score')
+
+ax.set_xticks(grid[0][:,0])
+ax.set_yticks(grid[1][0])
+plt.grid(linewidth=4)
 else:
 print("Can't plot %d dimensional graph" % (dim))
 return

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23b749ca757a007f75773ae149db6c16a77dd365
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/relevanceForge
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Make sure MessageUpdateJobs are run before TranslateRenderJo... - change (mediawiki...Translate)

2016-03-25 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

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

Change subject: Make sure MessageUpdateJobs are run before TranslateRenderJobs 
when marking
..

Make sure MessageUpdateJobs are run before TranslateRenderJobs when marking

The changes made by MessageUpdateJobs are needed for the TranslateRenderJobs
so add a new job which runs the MessageUpdateJobs first and then push the
TranslateRenderJobs to the job queue once the MessageUpdateJobs are complete.

Bug: T53731
Change-Id: Ia92e726879e44d0b24e39abe8f48584905a841f2
---
M Autoload.php
M Translate.php
M tag/SpecialPageTranslation.php
A utils/TranslationsUpdateJob.php
4 files changed, 41 insertions(+), 5 deletions(-)


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

diff --git a/Autoload.php b/Autoload.php
index 3fa0f78..2ffb7be 100644
--- a/Autoload.php
+++ b/Autoload.php
@@ -107,6 +107,7 @@
 $al['TranslationStats'] = "$dir/utils/TranslationStats.php";
 $al['TranslationStatsBase'] = "$dir/specials/SpecialTranslationStats.php";
 $al['TranslationStatsInterface'] = "$dir/specials/SpecialTranslationStats.php";
+$al['TranslationsUpdateJob']= "$dir/utils/TranslationsUpdateJob.php";
 $al['TuxMessageTable'] = "$dir/utils/TuxMessageTable.php";
 /**@}*/
 
diff --git a/Translate.php b/Translate.php
index 9b02e73..0a24775 100644
--- a/Translate.php
+++ b/Translate.php
@@ -196,6 +196,7 @@
 $wgJobClasses['MessageUpdateJob'] = 'MessageUpdateJob';
 $wgJobClasses['MessageGroupStatesUpdaterJob'] = 'MessageGroupStatesUpdaterJob';
 $wgJobClasses['TTMServerMessageUpdateJob'] = 'TTMServerMessageUpdateJob';
+$wgJobClasses['TranslationsUpdateJob'] = 'TranslationsUpdateJob';
 
 $wgParserTestFiles[] = "$dir/tests/parser/translateParserTests.txt";
 
diff --git a/tag/SpecialPageTranslation.php b/tag/SpecialPageTranslation.php
index fc024cf..00e31c0 100644
--- a/tag/SpecialPageTranslation.php
+++ b/tag/SpecialPageTranslation.php
@@ -886,11 +886,12 @@
$page->addMarkedTag( $newrevision );
MessageGroups::singleton()->recache();
 
-   $jobs = self::getRenderJobs( $page );
-   JobQueueGroup::singleton()->push( $jobs );
-
-   $jobs = self::getTranslationUnitJobs( $page, $sections );
-   JobQueueGroup::singleton()->push( $jobs );
+   $jobParams = array(
+   'page' => $page,
+   'sections' => $sections
+   );
+   $job = new TranslationsUpdateJob( $page->getTitle(), $jobParams 
);
+   JobQueueGroup::singleton()->push( $job );
 
// Logging
$this->handlePriorityLanguages( $this->getRequest(), $page );
diff --git a/utils/TranslationsUpdateJob.php b/utils/TranslationsUpdateJob.php
new file mode 100644
index 000..d13326a
--- /dev/null
+++ b/utils/TranslationsUpdateJob.php
@@ -0,0 +1,33 @@
+page = $params['page'];
+   $this->sections = $params['sections'];
+   }
+
+   public function run() {
+   // Units should be updated before the render jobs are run
+   $unitJobs = SpecialPageTranslation::getTranslationUnitJobs( 
$this->page, $this->sections );
+   foreach( $unitJobs as $job ) {
+   $job->run();
+   }
+
+   $renderJobs = SpecialPageTranslation::getRenderJobs( 
$this->page );
+   JobQueueGroup::singleton()->push( $renderJobs );
+   return true;
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia92e726879e44d0b24e39abe8f48584905a841f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] site.pp - introduce wasat, backup home dirs - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: site.pp - introduce wasat, backup home dirs
..


site.pp - introduce wasat, backup home dirs

Add the new mw maintenance host for codfw, wasat.
Make sure home dirs are backed up in Bacula like
we do for its equivalent terbium in eqiad.

Bug:T129930
Change-Id: I807aac9cb5560428f7db70ae49b449d089e3476a
---
M manifests/site.pp
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 0fded9d..4e3a124 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2619,6 +2619,15 @@
 include standard
 }
 
+# mediawiki maintenance server (like terbium)
+node 'wasat.codfw.wmnet' {
+
+role backup::host
+backup::set {'home': }
+
+include standard
+}
+
 # Wikidata query service
 node /^wdqs100[1-2]\.eqiad\.wmnet$/ {
 role wdqs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I807aac9cb5560428f7db70ae49b449d089e3476a
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use the deploy-service user for Scap3 operations - change (mediawiki...deploy)

2016-03-25 Thread Mobrovac (Code Review)
Mobrovac has uploaded a new change for review.

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

Change subject: Use the deploy-service user for Scap3 operations
..

Use the deploy-service user for Scap3 operations

Change-Id: Idad160d7fd8d50a473760190c6bd86deed12fe12
---
M scap/scap.cfg
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid/deploy 
refs/changes/33/279633/1

diff --git a/scap/scap.cfg b/scap/scap.cfg
index 42b3361..ed1755d 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -1,8 +1,8 @@
 [global]
 git_repo: citoid/deploy
 git_deploy_dir: /srv/deployment
-git_repo_user: citoid
-ssh_user: citoid
+git_repo_user: deploy-service
+ssh_user: deploy-service
 server_groups: canary, default
 canary_dsh_targets: citoid-canary
 dsh_targets: citoid

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idad160d7fd8d50a473760190c6bd86deed12fe12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 

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


[MediaWiki-commits] [Gerrit] Use the deploy-service user for Scap3 operations - change (mediawiki...deploy)

2016-03-25 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Use the deploy-service user for Scap3 operations
..


Use the deploy-service user for Scap3 operations

Change-Id: Idad160d7fd8d50a473760190c6bd86deed12fe12
---
M scap/scap.cfg
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/scap/scap.cfg b/scap/scap.cfg
index 42b3361..ed1755d 100644
--- a/scap/scap.cfg
+++ b/scap/scap.cfg
@@ -1,8 +1,8 @@
 [global]
 git_repo: citoid/deploy
 git_deploy_dir: /srv/deployment
-git_repo_user: citoid
-ssh_user: citoid
+git_repo_user: deploy-service
+ssh_user: deploy-service
 server_groups: canary, default
 canary_dsh_targets: citoid-canary
 dsh_targets: citoid

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idad160d7fd8d50a473760190c6bd86deed12fe12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] site.pp - introduce wasat, backup home dirs - change (operations/puppet)

2016-03-25 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: site.pp - introduce wasat, backup home dirs
..

site.pp - introduce wasat, backup home dirs

Add the new mw maintenance host for codfw, wasat.
Make sure home dirs are backed up in Bacula like
we do for its equivalent terbium in eqiad.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/279632/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 0fded9d..6733210 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2619,11 +2619,13 @@
 include standard
 }
 
-# Wikidata query service
-node /^wdqs100[1-2]\.eqiad\.wmnet$/ {
-role wdqs
+# mediawiki maintenance server (like terbium)
+node 'wasat.codfw.wmnet' {
 
-$nagios_contact_group = 'admins,wdqs-admins'
+role backup::host
+backup::set {'home'}
+
+include standard
 }
 
 # https://www.mediawiki.org/wiki/Parsoid

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I807aac9cb5560428f7db70ae49b449d089e3476a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] Update logging config for request IDs - change (operations/mediawiki-config)

2016-03-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update logging config for request IDs
..


Update logging config for request IDs

Update logging config for Iaf90c20c330:

* Add unique request ID to the template string used by "line" formatter.
* Remove UidProcessor, which is obsoleted by reqId.
* While we're here, remove PidProcessor, since it's not useful for us (both
  Apache and HHVM are multithreaded)

Change-Id: Ia2cd5daaf3ffdce8a8bb775cf4a0bc8ade5b3407
---
M wmf-config/logging.php
1 file changed, 1 insertion(+), 7 deletions(-)

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



diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 6572928..e4c1303 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -54,12 +54,6 @@
'psr' => array(
'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor',
),
-   'pid' => array(
-   'class' => '\\Monolog\\Processor\\ProcessIdProcessor',
-   ),
-   'uid' => array(
-   'class' => '\\Monolog\\Processor\\UidProcessor',
-   ),
'web' => array(
'class' => '\\Monolog\\Processor\\WebProcessor',
),
@@ -126,7 +120,7 @@
'line' => array(
'class' => 
'\\MediaWiki\\Logger\\Monolog\\LineFormatter',
'args' => array(
-   "%datetime% %extra.host% %extra.wiki% 
%extra.mwversion% %channel% %level_name%: %message% %context% %exception%\n",
+   "%datetime% [%extra.reqId%] %extra.host% 
%extra.wiki% %extra.mwversion% %channel% %level_name%: %message% %context% 
%exception%\n",
'Y-m-d H:i:s',
true, // allowInlineLineBreaks
true, // ignoreEmptyContextAndExtra

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2cd5daaf3ffdce8a8bb775cf4a0bc8ade5b3407
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   >