[MediaWiki-commits] [Gerrit] Improve color contrast further - change (mediawiki...Popups)

2014-02-20 Thread Jorm (Code Review)
Jorm has submitted this change and it was merged.

Change subject: Improve color contrast further
..


Improve color contrast further

Bug: 61411
Change-Id: I91916ce44d6ef6f823432b089e0aef4e513292ad
---
M resources/ext.popups.core.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 084da02..1eee112 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -74,7 +74,7 @@
}
 
> div.mwe-popups-timestamp-older{
-   color: #777;
+   color: #555;
}
 
> div.mwe-popups-timestamp-recent{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91916ce44d6ef6f823432b089e0aef4e513292ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Jorm 

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


[MediaWiki-commits] [Gerrit] Improve color contrast further - change (mediawiki...Popups)

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

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

Change subject: Improve color contrast further
..

Improve color contrast further

Bug: 61411
Change-Id: I91916ce44d6ef6f823432b089e0aef4e513292ad
---
M resources/ext.popups.core.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 084da02..1eee112 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -74,7 +74,7 @@
}
 
> div.mwe-popups-timestamp-older{
-   color: #777;
+   color: #555;
}
 
> div.mwe-popups-timestamp-recent{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91916ce44d6ef6f823432b089e0aef4e513292ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Add role for cite extension - change (mediawiki/vagrant)

2014-02-20 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Add role for cite extension
..

Add role for cite extension

Change-Id: I032021c5d572d43ef4c2c6c0b23811f619abbc9f
---
A puppet/manifests/roles/cite.pp
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/07/114707/1

diff --git a/puppet/manifests/roles/cite.pp b/puppet/manifests/roles/cite.pp
new file mode 100644
index 000..f6a42e8
--- /dev/null
+++ b/puppet/manifests/roles/cite.pp
@@ -0,0 +1,10 @@
+# == Class: role::cite
+# The cite extension adds support for citations and references
+class role::cite {
+mediawiki::extension { 'Cite':
+needs_update => true,
+settings => {
+wgCiteEnablePopups => true
+}
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I032021c5d572d43ef4c2c6c0b23811f619abbc9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
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] Improve contrast of old timestamps - change (mediawiki...Popups)

2014-02-20 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Improve contrast of old timestamps
..


Improve contrast of old timestamps

Bug: 61411
Change-Id: If9c3517e49ed81f7d758dfa08967a3af9125956e
---
M resources/ext.popups.core.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 097cb07..084da02 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -74,7 +74,7 @@
}
 
> div.mwe-popups-timestamp-older{
-   color: #bbb;
+   color: #777;
}
 
> div.mwe-popups-timestamp-recent{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9c3517e49ed81f7d758dfa08967a3af9125956e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Improve contrast of old timestamps - change (mediawiki...Popups)

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

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

Change subject: Improve contrast of old timestamps
..

Improve contrast of old timestamps

Bug: 61411
Change-Id: If9c3517e49ed81f7d758dfa08967a3af9125956e
---
M resources/ext.popups.core.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/ext.popups.core.less b/resources/ext.popups.core.less
index 097cb07..084da02 100644
--- a/resources/ext.popups.core.less
+++ b/resources/ext.popups.core.less
@@ -74,7 +74,7 @@
}
 
> div.mwe-popups-timestamp-older{
-   color: #bbb;
+   color: #777;
}
 
> div.mwe-popups-timestamp-recent{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9c3517e49ed81f7d758dfa08967a3af9125956e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] Actually log the remote IP from XFF chain - change (wikimedia...SmashPig)

2014-02-20 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Actually log the remote IP from XFF chain
..


Actually log the remote IP from XFF chain

Change-Id: I1de9ccd213f932c391a97bcc3346614d9101f957
---
M Core/Listeners/RestListener.php
M Core/Listeners/SoapListener.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/Core/Listeners/RestListener.php b/Core/Listeners/RestListener.php
index 3cb5e5f..f8e5a7d 100644
--- a/Core/Listeners/RestListener.php
+++ b/Core/Listeners/RestListener.php
@@ -9,7 +9,7 @@
public function execute( Request $request, Response $response, 
$pathParts ) {
parent::execute( $request, $response, $pathParts );
 
-   Logger::info( "Starting processing of listener request from 
{$_SERVER[ 'REMOTE_ADDR' ]}" );
+   Logger::info( "Starting processing of listener request from 
{$this->request->getClientIP()}" );
 
try {
$this->doIngressSecurity();
diff --git a/Core/Listeners/SoapListener.php b/Core/Listeners/SoapListener.php
index cf9017c..0e5741f 100644
--- a/Core/Listeners/SoapListener.php
+++ b/Core/Listeners/SoapListener.php
@@ -30,7 +30,7 @@
public function execute( Request $request, Response $response, 
$pathParts ) {
parent::execute( $request, $response, $pathParts );
 
-   Logger::info( "Starting processing of listener request from 
{$_SERVER[ 'REMOTE_ADDR' ]}" );
+   Logger::info( "Starting processing of listener request from 
{$this->request->getClientIP()}" );
 
try {
$this->doIngressSecurity();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1de9ccd213f932c391a97bcc3346614d9101f957
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Mwalker 
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 new mediawiki/skins repos: - change (mediawiki/skins)

2014-02-20 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged.

Change subject: Add new mediawiki/skins repos:
..


Add new mediawiki/skins repos:

* Mask
* Splash

Change-Id: If102926c9ce585eb7830a97eb7ecaa02b486319c
---
M .gitmodules
A Mask
A Splash
3 files changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index d5c7a15..3ee5e9a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,9 +2,21 @@
path = BlueSpiceSkin
url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/BlueSpiceSkin.git
branch = .
+[submodule "GreyStuff"]
+   path = GreyStuff
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/GreyStuff.git
+   branch = .
+[submodule "Mask"]
+   path = Mask
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Mask.git
+   branch = .
 [submodule "Nimbus"]
path = Nimbus
url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Nimbus.git
+   branch = .
+[submodule "Splash"]
+   path = Splash
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Splash.git
branch = .
 [submodule "chameleon"]
path = chameleon
@@ -21,8 +33,4 @@
 [submodule "webplatform"]
path = webplatform
url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/webplatform.git
-   branch = .
-[submodule "GreyStuff"]
-   path = GreyStuff
-   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/GreyStuff.git
branch = .
diff --git a/Mask b/Mask
new file mode 16
index 000..78f4aba
--- /dev/null
+++ b/Mask
+Subproject commit 78f4abaffeae630a04ce8c6d7206a5b878055f89
diff --git a/Splash b/Splash
new file mode 16
index 000..86fcbb2
--- /dev/null
+++ b/Splash
+Subproject commit 86fcbb22d617f46ec18f9831c3f47545a58a8bee

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If102926c9ce585eb7830a97eb7ecaa02b486319c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Isarra 

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


[MediaWiki-commits] [Gerrit] Add sync-with-gerrit.py script, taken from mediawiki/extensions - change (mediawiki/skins)

2014-02-20 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged.

Change subject: Add sync-with-gerrit.py script, taken from mediawiki/extensions
..


Add sync-with-gerrit.py script, taken from mediawiki/extensions

Bug: 61732
Change-Id: I9f589bb5cf018c4e1130a3edb8294fcb319fa5fa
---
A sync-with-gerrit.py
1 file changed, 97 insertions(+), 0 deletions(-)

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



diff --git a/sync-with-gerrit.py b/sync-with-gerrit.py
new file mode 100755
index 000..e38475f
--- /dev/null
+++ b/sync-with-gerrit.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+
+import logging
+import os.path
+import subprocess
+
+# Configuration
+basepath = "mediawiki/skins/"
+gerrit_conf = {
+'host': 'gerrit.wikimedia.org',
+'port': '29418',
+'url': 'https://{host}/r/p/{project}.git'
+}
+
+# Global logger
+logging.basicConfig(level=logging.DEBUG)
+log = logging.getLogger()
+
+
+def main():
+log.info("Fetching projects from gerrit (prefix: %s)" % basepath)
+projects = gerrit('ls-projects', ['-p', basepath]).splitlines()
+
+# strip out subprojects in extensions
+projects = [p for p in projects if '/' not in project_basename(p)]
+
+projects.sort()
+
+log.info("Checking modules")
+for p in projects:
+basename = project_basename(p)
+if not os.path.isdir(basename):
+log.info("Adding submodule for %s" % p)
+try:
+submodule_add(p)
+except subprocess.CalledProcessError:
+log.error("Git reported an issue adding module %s" % p)
+
+log.info("Rewriting .gitmodules")
+f = open('.gitmodules', 'w')
+f.write(generate_gitmodules(projects))
+f.close()
+
+log.info("Review change and submit!\nDone")
+
+
+def submodule_add(project):
+cmd = 'git submodule add'.split(' ') + [
+gerrit_url(project),
+project_basename(project)
+]
+subprocess.check_call(cmd)
+
+
+def generate_gitmodules(projects):
+"Create a .gitmodules file with branch=."
+gitmodules = ''
+for project in projects:
+p_url = gerrit_url(project)
+gitmodules += (
+"[submodule \"{name}\"]\n"
+"\tpath = {name}\n"
+"\turl = {url}\n"
+"\tbranch = .\n"
+).format(
+name=project_basename(project),
+url=p_url
+)
+
+return gitmodules
+
+
+def gerrit(gerrit_cmd, args=[], gerrit_conf=gerrit_conf):
+"Helper to execute a gerrit command."
+ssh = [
+'/usr/bin/ssh',
+'-p', gerrit_conf['port'],
+gerrit_conf['host'],
+]
+
+cmd = ssh + ['gerrit {gerrit_cmd} {args}\''.format(
+ssh=ssh, gerrit_cmd=gerrit_cmd, args=' '.join(args))]
+
+return subprocess.check_output(cmd)
+
+
+def gerrit_url(project):
+return gerrit_conf['url'].format(
+host=gerrit_conf['host'], project=project)
+
+
+def project_basename(project):
+return project[len(basepath):]
+
+
+if __name__ == '__main__':
+main()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f589bb5cf018c4e1130a3edb8294fcb319fa5fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Isarra 

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


[MediaWiki-commits] [Gerrit] Include section titles also in segmentation - change (mediawiki...ContentTranslation)

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

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

Change subject: Include section titles also in segmentation
..

Include section titles also in segmentation

Change-Id: I77e1d228c2b5f823d664b60ea87be444361bb7eb
---
M server/segmentation/paragraphSegmenter.js
M server/segmentation/sentenceSegmenter.js
2 files changed, 13 insertions(+), 15 deletions(-)


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

diff --git a/server/segmentation/paragraphSegmenter.js 
b/server/segmentation/paragraphSegmenter.js
index dcae4f5..149eb63 100644
--- a/server/segmentation/paragraphSegmenter.js
+++ b/server/segmentation/paragraphSegmenter.js
@@ -17,7 +17,6 @@
 
 function ParagraphSegmenter( content ) {
Segmenter.call( this, content );
-   this.paragraphs = [];
this.links = {};
 }
 
@@ -28,17 +27,22 @@
var segmenter = this,
$container = $( '' ).html( this.content );
 
-   $container.find( 'p' ).each( function ( index, paragraph ) {
-   var $paragraph = $( paragraph ),
-   sentenceSegments,
-   sentenceSegmenter = new SentenceSegmenter( 
$paragraph.html() );
+   segmenter.segmentedContent = '';
+   // TODO: Following line effectively filters the page content.
+   // We take only paragraphs and section titles. Will require a better
+   // strategy for preprocessing article content.
+   $container.find( 'p, h1, h2, h3, h4, h5, h6' ).each( function ( index, 
section ) {
+   var $section = $( section ), sentenceSegments, 
sentenceSegmenter;
 
+   sentenceSegmenter = new SentenceSegmenter( $section.html() );
sentenceSegmenter.segment();
sentenceSegments = sentenceSegmenter.getSegments();
segmenter.segments = $.extend( segmenter.segments, 
sentenceSegments );
+   // TODO: do we need segmentCount?
segmenter.segmentCount += sentenceSegmenter.getSegmentCount();
segmenter.links = $.extend( segmenter.links, 
sentenceSegmenter.getLinks() );
-   segmenter.paragraphs.push( sentenceSegmenter.toHTML() );
+   $section.html( sentenceSegmenter.toHTML() );
+   segmenter.segmentedContent +=  $section[0].outerHTML;
} );
 };
 
@@ -47,14 +51,7 @@
 };
 
 ParagraphSegmenter.prototype.toHTML = function () {
-   var i, paragraph, paragraphs = '';
-
-   for ( i = 0; i< this.paragraphs.length; i++ ) {
-   paragraph = $( this.paragraphs[i] );
-   paragraphs += $( '' ).append( paragraph ).prop( 'outerHTML' 
);
-   }
-
-   return paragraphs;
+   return this.segmentedContent;
 };
 
 module.exports.ParagraphSegmenter = ParagraphSegmenter;
diff --git a/server/segmentation/sentenceSegmenter.js 
b/server/segmentation/sentenceSegmenter.js
index 77955a3..96f3785 100644
--- a/server/segmentation/sentenceSegmenter.js
+++ b/server/segmentation/sentenceSegmenter.js
@@ -37,7 +37,8 @@
linkSegmenter.segment();
this.links = $.extend( this.links, linkSegmenter.getSegments() 
);
this.segments[segmentId] = {
-   source: linkSegmenter.toHTML() + '. '
+   source: linkSegmenter.toHTML() +
+   ( ( i+1 !== this.segmentCount )? '. ': '' ) // 
XXX
};
// We need this lookup to keep the order of segments
// while constructing the segmented content using

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77e1d228c2b5f823d664b60ea87be444361bb7eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Move GettingStartedNavbarNoArticle logging to server, rename - change (mediawiki...GettingStarted)

2014-02-20 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Move GettingStartedNavbarNoArticle logging to server, rename
..

Move GettingStartedNavbarNoArticle logging to server, rename

* Rename to GettingStartedNoSuggestedArticle
* Bump version to 2
* Move to server-side API module
* Log requestedCount and returnedCount so we can determine how many
  were missing

Change-Id: I8f1b5e9f27ba06e272ce89b242efd7eee2e8
---
M GettingStarted.php
M api/ApiGettingStartedGetPages.php
M resources/ext.gettingstarted.return.js
3 files changed, 23 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/04/114704/1

diff --git a/GettingStarted.php b/GettingStarted.php
index 2cdfcb2..7b24e11 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -95,12 +95,6 @@
'remoteExtPath' => 'GettingStarted/resources',
 );
 
-$wgResourceModules[ 'schema.GettingStartedNavbarNoArticle' ] = array(
-   'class'=> 'ResourceLoaderSchemaModule',
-   'schema'   => 'GettingStartedNavbarNoArticle',
-   'revision' => 5483117
-);
-
 $wgResourceModules[ 'schema.GettingStartedRedirectImpression' ] = array(
'class'=> 'ResourceLoaderSchemaModule',
'schema'   => 'GettingStartedRedirectImpression',
@@ -233,7 +227,6 @@
'dependencies' => array(
'ext.gettingstarted.api',
'ext.gettingstarted.logging',
-   'schema.GettingStartedNavbarNoArticle',
'schema.GettingStartedRedirectImpression',
// Needed for isEditing() and tour launching.
'ext.guidedTour.lib',
diff --git a/api/ApiGettingStartedGetPages.php 
b/api/ApiGettingStartedGetPages.php
index 7c6b4e4..e6225a1 100644
--- a/api/ApiGettingStartedGetPages.php
+++ b/api/ApiGettingStartedGetPages.php
@@ -7,6 +7,22 @@
 class ApiGettingStartedGetPages extends ApiBase {
const MAX_ATTEMPTS = 100;
 
+   /**
+* Logs a failure to select the requested number of random articles
+*
+* @param string $unprefixedTaskType task type, such as 'copyedit'
+* @param int $requestedCount count requested by API caller
+* @param int $returnedCount count we are returning
+*/
+   protected function logSelectionFailure( $unprefixedTaskType, 
$requestedCount, $returnedCount ) {
+   efLogServerSideEvent( 'GettingStartedNoSuggestedArticle', 
7578362, array(
+   'version' => 2,
+   'funnel' => 'gettingstarted-' . $unprefixedTaskType,
+   'requestedCount' => $requestedCount,
+   'returnedCount' => $returnedCount,
+   ) );
+   }
+
public function execute() {
global $wgGettingStartedCategoriesForTaskTypes;
 
@@ -17,7 +33,7 @@
 
$taskName = $this->getParameter( 'taskname' );
$excludedTitle = Title::newFromText( $this->getParameter( 
'excludedtitle' ) );
-   $count = $this->getParameter( 'count' );
+   $requestedCount = $this->getParameter( 'count' );
$data = array(
'titles' => array()
);
@@ -25,13 +41,15 @@
if ( isset( $wgGettingStartedCategoriesForTaskTypes[ $taskName 
] ) ) {
$category = Category::newFromName( 
$wgGettingStartedCategoriesForTaskTypes[ $taskName ] );
$pageFilter = new PageFilter( $user, $excludedTitle );
-   $titles = self::getRandomArticles( $count, $category, 
$pageFilter );
+   $titles = self::getRandomArticles( $requestedCount, 
$category, $pageFilter );
foreach ( $titles as $title ) {
$data['titles'][] = $title->getPrefixedText();
}
-   } else {
-   // TODO (phuedx 2014-02-05): This is technically a
-   // failure and should be logged.
+   }
+
+   $returnedCount = count( $data['titles'] );
+   if ( $returnedCount < $requestedCount ) {
+   $this->logSelectionFailure( $taskName, $requestedCount, 
$returnedCount );
}
 
$result->setIndexedTagName( $data['titles'], 'title' );
diff --git a/resources/ext.gettingstarted.return.js 
b/resources/ext.gettingstarted.return.js
index 3e5e867..3786c3f 100644
--- a/resources/ext.gettingstarted.return.js
+++ b/resources/ext.gettingstarted.return.js
@@ -20,13 +20,6 @@
CTA_TYPE_EDIT_CURRENT = 'edit current',
CTA_TYPE_EDIT_CURRENT_OR_SUGGESTED = 'edit current or 
suggested';
 
-   function logMissingSuggestedArticle() {
-   mw.eventLog.logEvent( 'GettingStartedNavbarNoArticle', {
-

[MediaWiki-commits] [Gerrit] Makefile command to run phpstorm inspections - change (mediawiki...Flow)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Makefile command to run phpstorm inspections
..

Makefile command to run phpstorm inspections

Change-Id: Ic92b33b8d0f3e468e205be866cd60a97b992f307
---
M Makefile
M includes/Block/Block.php
M includes/Formatter/CheckUser.php
M includes/Model/Definition.php
A scripts/analyze-phpstorm.sh
A scripts/analyze-phpstorm.xml
6 files changed, 86 insertions(+), 4 deletions(-)


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

diff --git a/Makefile b/Makefile
index a721ffe..438b99c 100644
--- a/Makefile
+++ b/Makefile
@@ -60,14 +60,19 @@
 ###
 # Static analysis
 ###
-install-analyze:
+install-analyze-hhbm:
wget -O scripts/hhvm-wrapper.phar 
https://phar.phpunit.de/hhvm-wrapper.phar
@which hhvm >/dev/null || which ${HHVM_HOME} >/dev/null || (echo Could 
not locate hhvm && false)
 
-analyze:
+analyze-hhvm:
@test -f scripts/hhvm-wrapper.phar || (echo Run \`make 
install-analyze\` first && false)
php scripts/hhvm-wrapper.phar analyze ${ANALYZE} ${ANALYZE_EXTRA}
 
+analyze-phpstorm:
+   @scripts/analyze-phpstorm.sh
+
+analyze: anayze-hhvm analyze-phpstorm
+
 ###
 # Update this repository
 ###
diff --git a/includes/Block/Block.php b/includes/Block/Block.php
index 868757e..a407ba1 100644
--- a/includes/Block/Block.php
+++ b/includes/Block/Block.php
@@ -6,7 +6,6 @@
 use Flow\Model\Workflow;
 use Flow\NotificationController;
 use Flow\Data\ManagerGroup;
-use Flow\Exception\DataModelException;
 use Flow\SpamFilter\Controller as SpamFilterController;
 use Flow\Templating;
 use Flow\Model\AbstractRevision;
diff --git a/includes/Formatter/CheckUser.php b/includes/Formatter/CheckUser.php
index 8010e12..b73c736 100644
--- a/includes/Formatter/CheckUser.php
+++ b/includes/Formatter/CheckUser.php
@@ -27,7 +27,8 @@
$data = explode( ',', $row->cuc_comment );
$post = null;
switch( count( $data ) ) {
-   case 3:
+/** @noinspection PhpMissingBreakStatementInspection */
+case 3:
$post = UUID::create( $data[2] );
// fall-through to 2 parameter case
case 2:
diff --git a/includes/Model/Definition.php b/includes/Model/Definition.php
index 0bb778a..853eda7 100644
--- a/includes/Model/Definition.php
+++ b/includes/Model/Definition.php
@@ -121,6 +121,8 @@
}
 
/**
+* @param string $key
+* @param mixed $default
 * @return mixed
 */
public function getOption( $key, $default = null ) {
diff --git a/scripts/analyze-phpstorm.sh b/scripts/analyze-phpstorm.sh
new file mode 100755
index 000..ec2672e
--- /dev/null
+++ b/scripts/analyze-phpstorm.sh
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+
+# the realpath executable isn't guaranteed, so define one.
+# FIXME: path with ' in it will break
+realpath() {
+   php -r "echo realpath('$1'), \"\\n\";"
+}
+
+
+if [ ! -x "$(which xmllint)" ]; then
+   echo xmllint is required to filter results
+   exit 1
+fi
+
+# specifying directly kinda sucks
+PHPSTORM_BIN_HOME="/home/guy/Projects/PhpStorm-133.803/bin"
+
+# all paths must be absolute
+EXTENSION="$(dirname $(dirname $(realpath $0)))"
+
+# Path to the main project
+MEDIAWIKI="$(realpath $EXTENSION/../..)"
+
+# Output path
+OUTPUT="/tmp/phpstorm-inspect.$$"
+
+$PHPSTORM_BIN_HOME/inspect.sh $MEDIAWIKI 
$EXTENSION/scripts/analyze-phpstorm.xml $OUTPUT -d $EXTENSION/includes -v2
+
+EXIT=0
+if [ $(find $OUTPUT | wc -l) -gt 1 ]; then
+   # @todo format the xml
+   for i in $OUTPUT/*; do
+   # Filter errors in api, its currently just a stub
+   xmllint --xpath "//problem[not(file[contains(text(), 
'/Flow/includes/api/')])]" "$i" 2>/dev/null > "$OUTPUT/tmp.out"
+   if [ -s "$OUTPUT/tmp.out" ]; then
+   EXIT=1
+   echo $i
+   echo
+   cat "$OUTPUT/tmp.out"
+   echo
+   echo
+   fi
+   done
+   test -f "$OUTPUT/tmp.out" && rm "$OUTPUT/tmp.out"
+fi
+
+if [ $EXIT -eq 0 ]; then
+   rm -rf $OUTPUT
+else
+   echo XML output stored in $OUTPUT
+fi
+
+exit $EXIT
diff --git a/scripts/analyze-phpstorm.xml b/scripts/analyze-phpstorm.xml
new file mode 100644
index 000..f1295f0
--- /dev/null
+++ b/scripts/analyze-phpstorm.xml
@@ -0,0 +1,21 @@
+
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+  
+  
+  
+
+
+
+  
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic92b33b8d0f3e468e205be866cd60a97b992f307
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: 

[MediaWiki-commits] [Gerrit] pre-review script to run check-i18n and analyze-phpstorm whe... - change (mediawiki...Flow)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: pre-review script to run check-i18n and analyze-phpstorm when 
appropriate
..

pre-review script to run check-i18n and analyze-phpstorm when appropriate

Change-Id: I3be61aba460ae3d1837773a1e71d6c42a2de01cb
---
M Makefile
A scripts/pre-review
2 files changed, 39 insertions(+), 0 deletions(-)


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

diff --git a/Makefile b/Makefile
index ecfe5ac..c53105e 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@
 ###
 installhooks:
ln -sf ${PWD}/scripts/pre-commit .git/hooks/pre-commit
+   ln -sf ${PWD}/scripts/pre-review .git/hooks/pre-review
 
 ###
 # Lints
diff --git a/scripts/pre-review b/scripts/pre-review
new file mode 100755
index 000..beb8c59
--- /dev/null
+++ b/scripts/pre-review
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# TODO: share is_vagrant and make functions between scripts
+is_vagrant() {
+DEST='.'
+while [ "$(realpath $DEST)" != "/" ]; do
+if [ -f $DEST/Vagrantfile ]; then
+return 0;
+fi
+DEST="$DEST/.."
+done
+return 1
+}
+
+make() {
+if is_vagrant; then
+vagrant ssh -- cd /vagrant/mediawiki/extensions/Flow '&&' make 
$* || exit 1
+else
+/usr/bin/env make $* || exit 1
+fi
+}
+
+# only checks top commit for changes
+
+if git diff-tree --no-commit-id --name-only -r HEAD | grep -P '\.php$'; then
+   # bit of a hack ... other things run inside vagrant but phpstorm is 
probably
+   # installed external to vagrant
+   /usr/bin/env make analyze-phpstorm
+fi
+
+if git diff-tree --no-commit-id --name-only -r HEAD | grep -P '\.i18n\.php$'; 
then
+   COMMANDS="check-i18n $COMMANDS"
+fi
+
+if [ "$COMMANDS" != "" ]; then
+   make $COMMANDS || exit 1
+fi
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3be61aba460ae3d1837773a1e71d6c42a2de01cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] Makefile command to check i18n for matching en and qqq keys - change (mediawiki...Flow)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Makefile command to check i18n for matching en and qqq keys
..

Makefile command to check i18n for matching en and qqq keys

Change-Id: I43ed7ff52a9887a1e8649dc842e7cf2adcd82f51
---
M Makefile
A scripts/check-i18n.php
2 files changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/Makefile b/Makefile
index 438b99c..ecfe5ac 100644
--- a/Makefile
+++ b/Makefile
@@ -57,6 +57,9 @@
 vagrant-browsertests:
@vagrant ssh -- -X cd /srv/browsertests '&&' 
MEDIAWIKI_URL=http://localhost/wiki/ MEDIAWIKI_USER=Admin 
MEDIAWIKI_PASSWORD=vagrant bundle exec cucumber 
/vagrant/mediawiki/extensions/Flow/tests/browser/features/ -f pretty
 
+check-i18n:
+   @php scripts/check-i18n.php
+
 ###
 # Static analysis
 ###
diff --git a/scripts/check-i18n.php b/scripts/check-i18n.php
new file mode 100644
index 000..9b64641
--- /dev/null
+++ b/scripts/check-i18n.php
@@ -0,0 +1,17 @@
+https://gerrit.wikimedia.org/r/114702
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43ed7ff52a9887a1e8649dc842e7cf2adcd82f51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] Add sync-with-gerrit.py script, taken from mediawiki/extensions - change (mediawiki/skins)

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

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

Change subject: Add sync-with-gerrit.py script, taken from mediawiki/extensions
..

Add sync-with-gerrit.py script, taken from mediawiki/extensions

Bug: 61732
Change-Id: I9f589bb5cf018c4e1130a3edb8294fcb319fa5fa
---
A sync-with-gerrit.py
1 file changed, 97 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins 
refs/changes/00/114700/1

diff --git a/sync-with-gerrit.py b/sync-with-gerrit.py
new file mode 100755
index 000..e38475f
--- /dev/null
+++ b/sync-with-gerrit.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+
+import logging
+import os.path
+import subprocess
+
+# Configuration
+basepath = "mediawiki/skins/"
+gerrit_conf = {
+'host': 'gerrit.wikimedia.org',
+'port': '29418',
+'url': 'https://{host}/r/p/{project}.git'
+}
+
+# Global logger
+logging.basicConfig(level=logging.DEBUG)
+log = logging.getLogger()
+
+
+def main():
+log.info("Fetching projects from gerrit (prefix: %s)" % basepath)
+projects = gerrit('ls-projects', ['-p', basepath]).splitlines()
+
+# strip out subprojects in extensions
+projects = [p for p in projects if '/' not in project_basename(p)]
+
+projects.sort()
+
+log.info("Checking modules")
+for p in projects:
+basename = project_basename(p)
+if not os.path.isdir(basename):
+log.info("Adding submodule for %s" % p)
+try:
+submodule_add(p)
+except subprocess.CalledProcessError:
+log.error("Git reported an issue adding module %s" % p)
+
+log.info("Rewriting .gitmodules")
+f = open('.gitmodules', 'w')
+f.write(generate_gitmodules(projects))
+f.close()
+
+log.info("Review change and submit!\nDone")
+
+
+def submodule_add(project):
+cmd = 'git submodule add'.split(' ') + [
+gerrit_url(project),
+project_basename(project)
+]
+subprocess.check_call(cmd)
+
+
+def generate_gitmodules(projects):
+"Create a .gitmodules file with branch=."
+gitmodules = ''
+for project in projects:
+p_url = gerrit_url(project)
+gitmodules += (
+"[submodule \"{name}\"]\n"
+"\tpath = {name}\n"
+"\turl = {url}\n"
+"\tbranch = .\n"
+).format(
+name=project_basename(project),
+url=p_url
+)
+
+return gitmodules
+
+
+def gerrit(gerrit_cmd, args=[], gerrit_conf=gerrit_conf):
+"Helper to execute a gerrit command."
+ssh = [
+'/usr/bin/ssh',
+'-p', gerrit_conf['port'],
+gerrit_conf['host'],
+]
+
+cmd = ssh + ['gerrit {gerrit_cmd} {args}\''.format(
+ssh=ssh, gerrit_cmd=gerrit_cmd, args=' '.join(args))]
+
+return subprocess.check_output(cmd)
+
+
+def gerrit_url(project):
+return gerrit_conf['url'].format(
+host=gerrit_conf['host'], project=project)
+
+
+def project_basename(project):
+return project[len(basepath):]
+
+
+if __name__ == '__main__':
+main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f589bb5cf018c4e1130a3edb8294fcb319fa5fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] Add new skins/ repos - change (mediawiki/skins)

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

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

Change subject: Add new skins/ repos
..

Add new skins/ repos

* Mask
* Splash
* Truglass
* apex

Change-Id: If102926c9ce585eb7830a97eb7ecaa02b486319c
---
M .gitmodules
1 file changed, 20 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins 
refs/changes/99/114699/1

diff --git a/.gitmodules b/.gitmodules
index d5c7a15..869e527 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,9 +2,29 @@
path = BlueSpiceSkin
url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/BlueSpiceSkin.git
branch = .
+[submodule "GreyStuff"]
+   path = GreyStuff
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/GreyStuff.git
+   branch = .
+[submodule "Mask"]
+   path = Mask
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Mask.git
+   branch = .
 [submodule "Nimbus"]
path = Nimbus
url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Nimbus.git
+   branch = .
+[submodule "Splash"]
+   path = Splash
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Splash.git
+   branch = .
+[submodule "Truglass"]
+   path = Truglass
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/Truglass.git
+   branch = .
+[submodule "apex"]
+   path = apex
+   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/apex.git
branch = .
 [submodule "chameleon"]
path = chameleon
@@ -21,8 +41,4 @@
 [submodule "webplatform"]
path = webplatform
url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/webplatform.git
-   branch = .
-[submodule "GreyStuff"]
-   path = GreyStuff
-   url = https://gerrit.wikimedia.org/r/p/mediawiki/skins/GreyStuff.git
branch = .

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If102926c9ce585eb7830a97eb7ecaa02b486319c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] Use VisualEditor configuration for appendices (e.g. beta). - change (mediawiki...GuidedTour)

2014-02-20 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Use VisualEditor configuration for appendices (e.g. beta).
..

Use VisualEditor configuration for appendices (e.g. beta).

Determine which to quote (if any) in firsteditve, based on
wgVisualEditorTabMessages.

Bug: 61321
Change-Id: Idd06e29fdbc1e38116cdab0e50b15f9f13545b33
---
M GuidedTour.i18n.php
M GuidedTour.php
M GuidedTourHooks.php
M modules/tours/firsteditve.js
4 files changed, 56 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GuidedTour 
refs/changes/98/114698/1

diff --git a/GuidedTour.i18n.php b/GuidedTour.i18n.php
index 3ad97bd..7065328 100644
--- a/GuidedTour.i18n.php
+++ b/GuidedTour.i18n.php
@@ -48,8 +48,8 @@
'guidedtour-tour-firstedit-save-title' => 'You\'re almost done!',
'guidedtour-tour-firstedit-save-description' => 'When you\'re ready, 
clicking "{{int:savearticle}}" will make your changes visible for everyone.',
 
-   'guidedtour-tour-firsteditve-edit-page-description' => 'Click the 
"{{int:vector-view-edit}} {{int:visualeditor-beta-appendix}}" button to make 
your changes.',
-   'guidedtour-tour-firsteditve-edit-section-description' => 'There are 
"{{int:editsection}} {{int:visualeditor-beta-appendix}}" links for each major 
section in a page, so you can focus on just that part.',
+   'guidedtour-tour-firsteditve-edit-page-description' => 'Click the "$1" 
button to make your changes.',
+   'guidedtour-tour-firsteditve-edit-section-description' => 'There are 
"$1" links for each major section in a page, so you can focus on just that 
part.',
'guidedtour-tour-firsteditve-save-description' => 'When you\'re ready, 
clicking "{{int:visualeditor-toolbar-savedialog}}" will make your changes 
visible for everyone.',
 );
 
@@ -123,11 +123,15 @@
 * {{msg-mw|savearticle}}',
'guidedtour-tour-firsteditve-edit-page-description' => 'Description of 
the step of the firsteditve tour pointing to the VisualEditor edit button.
 
+$1 - Text of VisualEditor edit tab
+
 Refers to:
 * {{msg-mw|Vector-view-edit}}
 * {{msg-mw|Visualeditor-beta-appendix}}',
'guidedtour-tour-firsteditve-edit-section-description' => 'Description 
of the step of the firsteditve tour pointing to the VE section edit button
 
+$1 - Text of VisualEditor section edit link
+
 Refers to:
 * {{msg-mw|Editsection}}
 * {{msg-mw|Visualeditor-beta-appendix}}',
diff --git a/GuidedTour.php b/GuidedTour.php
index 8d6ef53..d83b033 100644
--- a/GuidedTour.php
+++ b/GuidedTour.php
@@ -158,7 +158,6 @@
'messages' => array(
'editsection',
'vector-view-edit',
-   'visualeditor-beta-appendix',
'visualeditor-toolbar-savedialog',
'guidedtour-tour-firstedit-edit-page-title',
'guidedtour-tour-firsteditve-edit-page-description',
@@ -195,3 +194,6 @@
 $wgExtensionMessagesFiles += array(
'GuidedTour' => $dir . 'GuidedTour.i18n.php',
 );
+
+// Extension function
+$wgExtensionFunctions[] = 'GuidedTourHooks::onSetup';
\ No newline at end of file
diff --git a/GuidedTourHooks.php b/GuidedTourHooks.php
index c603956..38c7ac2 100644
--- a/GuidedTourHooks.php
+++ b/GuidedTourHooks.php
@@ -17,6 +17,32 @@
 
const TOUR_PARAM = 'tour';
 
+   /**
+* Add dynamic VE messages we care about to firsteditve tour.
+*
+* Extension function ($wgExtensionFunctions)
+*
+* @see VisualEditorHooks::onSetup
+*/
+   public static function onSetup() {
+   global $wgResourceModules, $wgVisualEditorTabMessages;
+
+   // This can be extended if we need to support customization of
+   // additional types, such as 'edit' or 'editsection'.
+   $firstEditVeTabAppendixTypes = array(
+   'editappendix',
+   'editsectionappendix',
+   );
+
+   foreach( $firstEditVeTabAppendixTypes as $messageType ) {
+   $messageKey = $wgVisualEditorTabMessages[$messageType];
+   if ( $messageKey !== null ) {
+   // ResourceLoaderFileModule strips duplicates
+   
$wgResourceModules['ext.guidedTour.tour.firsteditve']['messages'][] = 
$messageKey;
+   }
+   }
+   }
+
/*
   XXX (mattflaschen, 2012-01-02):
 
diff --git a/modules/tours/firsteditve.js b/modules/tours/firsteditve.js
index 0f0a5da..51951d0 100644
--- a/modules/tours/firsteditve.js
+++ b/modules/tours/firsteditve.js
@@ -2,7 +2,9 @@
 // Designed to work on any Wikipedia article, and can work for other sites 
with minor message changes.
 
 ( function ( window, document, $, mw, gt ) {
-   var hasEditSectionAtLoadTime, editSectionSelector = 
'.mw-editsection-

[MediaWiki-commits] [Gerrit] Removed "|other_fields=" from default {{Information}} template - change (mediawiki...UploadWizard)

2014-02-20 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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

Change subject: Removed "|other_fields=" from default {{Information}} template
..

Removed "|other_fields=" from default {{Information}} template

The default upload by the UploadWizard should not include
"|other_fields=" field, as it can cause inexperienced users to use
the field in a manner not intended and break the HTML structure
of the page.

Bug: 61536
Change-Id: If899493707e63647bad82335819fb6e104cd1a04
---
M resources/mw.UploadWizardDetails.js
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/97/114697/1

diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index 90b8d79..bef8b9c 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -1239,7 +1239,6 @@
'author' : '',  // any 
wikitext, but particularly {{Creator:Name Surname}}   required
'permission' : '',  // leave blank 
unless OTRS pending; by default will be "see below"   optional
'other_versions' : '',  // pipe separated list, 
other versions optional
-   'other_fields' : '' // ??? 
additional table fields
};
 
// sanity check the descriptions -- do not have two in 
the same lang

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If899493707e63647bad82335819fb6e104cd1a04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] 'Add Documentation' link now changes to 'Edit Documentation'... - change (mediawiki...Translate)

2014-02-20 Thread BPositive (Code Review)
BPositive has uploaded a new change for review.

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

Change subject: 'Add Documentation' link now changes to 'Edit Documentation' on 
adding the Documentation
..

'Add Documentation' link now changes to 'Edit Documentation' on adding the 
Documentation

Bug: 50954
Change-Id: I3c3e370c0320b6981c19b3f8684a1964d5451b8c
---
M resources/js/ext.translate.editor.helpers.js
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/resources/js/ext.translate.editor.helpers.js 
b/resources/js/ext.translate.editor.helpers.js
index 75bf452..a557693 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -51,6 +51,12 @@
 * Save the documentation
 */
saveDocumentation: function () {
+
+   var $messageDescViewer, $descEditLink;
+
+   $messageDescViewer = this.$editor.find( 
'.message-desc-viewer' );
+$descEditLink = $messageDescViewer.find( 
'.message-desc-edit' );
+
var translateEditor = this,
api = new mw.Api(),
newDocumentation = 
translateEditor.$editor.find( '.tux-textarea-documentation' ).val();
@@ -74,7 +80,7 @@
mw.log( 'Error parsing 
documentation ' + errorCode + ' ' + results.error.info );
}
);
-
+   $descEditLink.text( mw.msg( 
'tux-editor-edit-desc' ) );
// A collapsible element may have been 
added
$( '.mw-identical-title' 
).makeCollapsible();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c3e370c0320b6981c19b3f8684a1964d5451b8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: BPositive 

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


[MediaWiki-commits] [Gerrit] Use verbs in function names - change (mediawiki...scap)

2014-02-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Use verbs in function names
..

Use verbs in function names

Make the command building functions have active names rather than weird
noun phrases.

Change-Id: I312923c5ec818f2c0b420b1ec033cf152abefda4
---
M scap/tasks.py
M scap/utils.py
2 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap 
refs/changes/95/114695/1

diff --git a/scap/tasks.py b/scap/tasks.py
index 09c41cd..e02f82a 100644
--- a/scap/tasks.py
+++ b/scap/tasks.py
@@ -82,7 +82,7 @@
 logger.debug('Copying to %s from %s', socket.getfqdn(), server)
 stats = log.Stats(cfg['MW_STATSD_HOST'], cfg['MW_STATSD_PORT'])
 with log.Timer('rsync common', stats):
-subprocess.check_call(utils.sudo_args(rsync, user='mwdeploy'))
+subprocess.check_call(utils.build_sudo(rsync, user='mwdeploy'))
 
 
 def scap(args):
@@ -109,7 +109,7 @@
 def run_on_cluster(description, hosts, command, env=None, user=None):
 """Run a command on the cluster via ssh."""
 if user is not None:
-command = utils.sudo_args(command, user, env)
+command = utils.build_sudo(command, user, env)
 else:
 command = utils.build_command(command, env)
 
diff --git a/scap/utils.py b/scap/utils.py
index 065680b..5110cf2 100644
--- a/scap/utils.py
+++ b/scap/utils.py
@@ -19,12 +19,12 @@
 import subprocess
 
 
-def shell_map(mapping):
+def build_exports(mapping):
 """Convert a dict to a list of KEY=VALUE pairs.
 
->>> shell_map({'a':'b'})
+>>> build_exports({'a':'b'})
 ['a=b']
->>> shell_map({'a':'1', 'b':'2 or 3'})
+>>> build_exports({'a':'1', 'b':'2 or 3'})
 ['a=1', "b='2 or 3'"]
 """
 return ['%s=%s' % (k, pipes.quote(v)) for k, v in mapping.items()]
@@ -86,7 +86,7 @@
 def dsh(command, group, exports=None):
 """Run a command on multiple hosts via DSH."""
 if exports:
-command = '%s %s' % (' '.join(shell_map(exports)), command)
+command = '%s %s' % (' '.join(build_exports(exports)), command)
 group_file = os.path.join('/etc/dsh/group', group)
 return subprocess.call(['/usr/bin/dsh', '-F40', '-cM', '-f',
 group_file, '-o', '-oSetupTimeout=10', '--',
@@ -122,7 +122,7 @@
 """
 args = []
 if exports:
-args.extend(shell_map(exports))
+args.extend(build_exports(exports))
 try:
 command = shlex.split(command)
 except AttributeError:
@@ -132,20 +132,20 @@
 return args
 
 
-def sudo_args(command, user=None, exports=None):
+def build_sudo(command, user=None, exports=None):
 """Build an argument list for running a command under sudo.
 
 The command and optional exports will be processed by
 :func:`build_command` and then used as the object of a ``sudo``
 invocation.
 
->>> sudo_args('hello')
+>>> build_sudo('hello')
 ['sudo', 'hello']
->>> sudo_args(['hello'])
+>>> build_sudo(['hello'])
 ['sudo', 'hello']
->>> sudo_args(['hello'] + 'foo bar baz'.split())
+>>> build_sudo(['hello'] + 'foo bar baz'.split())
 ['sudo', 'hello', 'foo', 'bar', 'baz']
->>> sudo_args(['scap-2', 'tin'], 'wmdeploy', {'FOO':'bar baz'})
+>>> build_sudo(['scap-2', 'tin'], 'wmdeploy', {'FOO':'bar baz'})
 ['sudo', '-u', 'wmdeploy', "FOO='bar baz'", 'scap-2', 'tin']
 
 :param command: Command to execute

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I312923c5ec818f2c0b420b1ec033cf152abefda4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Pass page URL instead of content to get the data model - change (mediawiki...ContentTranslation)

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

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

Change subject: Pass page URL instead of content to get the data model
..

Pass page URL instead of content to get the data model

Change-Id: I3fdb99732b94a9b593d426e7f87c7607e6944402
---
M server/ContentTranslationService.js
M server/pageloader/PageLoader.js
M server/public/index.html
M server/public/js/main.js
4 files changed, 55 insertions(+), 38 deletions(-)


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

diff --git a/server/ContentTranslationService.js 
b/server/ContentTranslationService.js
index a0d2f50..ea87685 100644
--- a/server/ContentTranslationService.js
+++ b/server/ContentTranslationService.js
@@ -26,20 +26,27 @@
 // socket.io connection establishment
 io.sockets.on( 'connection', function ( socket ) {
var datamodelManager,
+   PageLoader,
CXDataModelManager;
console.log( '[CX] Client connected to worker(' + process.pid + '). 
Socket: ' + socket.id );
socket.on( 'cx.init', function ( data ) {
+   var pageloader;
CXDataModelManager = require(  __dirname + 
'/models/dataModelManager.js').CXDataModelManager;
context = {
sourceLanguage: data.sourceLanguage,
targetLanguage: data.targetLanguage,
-   sourceText: data.sourceText,
+   sourcePage: data.sourcePage,
socket: socket
};
-   // Inject the session context to dataModelManager
-   // It should take care of managing the data model and pushing
-   // it to the client through socket.
-   datamodelManager = new CXDataModelManager( context );
+   PageLoader  = require(  __dirname + 
'/pageloader/PageLoader.js').PageLoader;
+   pageloader = new PageLoader( context.sourcePage );
+   pageloader.load().done( function ( data ) {
+   context.sourceText = data;
+   // Inject the session context to dataModelManager
+   // It should take care of managing the data model and 
pushing
+   // it to the client through socket.
+   datamodelManager = new CXDataModelManager( context );
+   } );
} );
 } );
 
diff --git a/server/pageloader/PageLoader.js b/server/pageloader/PageLoader.js
index 3165b21..fe53526 100644
--- a/server/pageloader/PageLoader.js
+++ b/server/pageloader/PageLoader.js
@@ -8,9 +8,7 @@
 
 'use strict';
 
-var request = require( 'request' ),
-   Q = require( 'q' ),
-   config;
+var config;
 
 try {
// TODO: Have an example configuration file.
@@ -36,7 +34,7 @@
this.page = page;
 }
 
-PageLoader.prototype.load = function ( documentId ) {
+PageLoader.prototype.load = function () {
var loader, promise, ParsoidPageLoader, MediaWikiApiPageLoader, title;
 
title = this.page.split( '/' ).pop();
diff --git a/server/public/index.html b/server/public/index.html
index da8c352..7a8351d 100644
--- a/server/public/index.html
+++ b/server/public/index.html
@@ -8,20 +8,25 @@
width: 80%;
margin-left: 10%;
}
+
label {
-   float: left;
width: 20%;
}
+
input {
+   width: 40%;
+   padding: 5px;
+   }
+
+   .lang {
+   width: 5%;
+   }
+
+   button {
width: 10%;
padding: 5px;
}
-   button {
-   width: 10%;
-   margin-left: 40%;
-   padding: 10px;
-   margin-bottom: 20px;
-   }
+
.status {
position: fixed;
bottom: 0;
@@ -33,6 +38,7 @@
color: green;
font-size: 0.8em;
}
+
.cx-segment:hover {
background-color: #ccc;
}
@@ -41,28 +47,32 @@
background-color: #aaa;
}
 
-   .sourceText {
-   clear: both;
+   .form {
+   border: 1px solid #000;
+   padding: 10px;
+   }
+
+   .info {
+   color: #555;
}

 
 
 
Content Translation Server
-   
-   Translate from
-   
-   
-   Translate to
-   
-   
-   
-   

[MediaWiki-commits] [Gerrit] Wrapper for page loader to choose one based on configuration - change (mediawiki...ContentTranslation)

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

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

Change subject: Wrapper for page loader to choose one based on configuration
..

Wrapper for page loader to choose one based on configuration

Change-Id: I4a0434b5c77f23fe16831799c19ed88de8dfd93b
---
A server/pageloader/PageLoader.js
1 file changed, 56 insertions(+), 0 deletions(-)


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

diff --git a/server/pageloader/PageLoader.js b/server/pageloader/PageLoader.js
new file mode 100644
index 000..3165b21
--- /dev/null
+++ b/server/pageloader/PageLoader.js
@@ -0,0 +1,56 @@
+/**
+ * Loads html for pages to translate
+ *
+ * @file
+ * @copyright See AUTHORS.txt
+ * @license GPL-2.0+
+ */
+
+'use strict';
+
+var request = require( 'request' ),
+   Q = require( 'q' ),
+   config;
+
+try {
+   // TODO: Have an example configuration file.
+   config = require( __dirname + '/../config.js' );
+} catch ( e ) {
+   // TODO: define this configuration in betterway
+   config = {
+   pageloaderservice: 'parsoid',
+   parsoid: {
+   api: 'http://parsoid.wmflabs.org'
+   },
+   mediawiki: {
+   api: 'http://en.wikipedia.org/w/api.php'
+   }
+   };
+}
+
+/**
+/**
+ * @class ParsoidPageLoader
+ */
+function PageLoader( page ) {
+   this.page = page;
+}
+
+PageLoader.prototype.load = function ( documentId ) {
+   var loader, promise, ParsoidPageLoader, MediaWikiApiPageLoader, title;
+
+   title = this.page.split( '/' ).pop();
+   if ( config.pageloaderservice === 'parsoid' ) {
+   ParsoidPageLoader = require( __dirname + 
'/ParsoidPageLoader.js' ).ParsoidPageLoader;
+   loader = new ParsoidPageLoader( config.parsoid.api, 'enwiki' ); 
//FIXME
+   promise = loader.load( title );
+   }
+   if ( config.pageloaderservice === 'mediawiki' ) {
+   MediaWikiApiPageLoader = require( __dirname + 
'/MediaWikiApiPageLoader.js' ).MediaWikiApiPageLoader;
+   loader = new MediaWikiApiPageLoader( config.mediawiki.api );
+   promise = loader.load( title );
+   }
+   return promise;
+};
+
+module.exports.PageLoader = PageLoader;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a0434b5c77f23fe16831799c19ed88de8dfd93b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Replace usage of dsh with scap.ssh - change (mediawiki...scap)

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

Change subject: Replace usage of dsh with scap.ssh
..


Replace usage of dsh with scap.ssh

Use the new scap.ssh module instead of DSH in scap.tasks.scap. This
allows displaying a readable progress message during the execution of
a command on the cluster hosts. Host, exit status and command output
will be logged for failures as they occur.

Bug: 59922
Change-Id: Ia3a99755ae5ef413cc61845ddc5939ff68c10cf2
---
M scap/tasks.py
1 file changed, 33 insertions(+), 25 deletions(-)

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



diff --git a/scap/tasks.py b/scap/tasks.py
index 859f746..09c41cd 100644
--- a/scap/tasks.py
+++ b/scap/tasks.py
@@ -10,10 +10,10 @@
 import random
 import socket
 import subprocess
-import tempfile
 
 from . import utils
 from . import log
+from . import ssh
 
 
 DEFAULT_RSYNC_ARGS = (
@@ -91,11 +91,11 @@
 1. Validate php syntax of wmf-config and multiversion
 2. Sync MW_COMMON on localhost with staging area
 3. Update l10n files in staging area
-4. Dsh to scap proxies and sync with localhost
-5. Dsh to apaches and sync with fastest rsync server
-6. Dsh to apaches and rebuild l10n CDB files
+4. Ask scap proxies to sync with master server
+5. Ask apaches to sync with fastest rsync server
+6. Ask apaches to rebuild l10n CDB files
 7. Update wikiversions.cdb on localhost
-8. Dsh to apaches and rsync wikiversions.cdb
+8. Ask apaches to sync wikiversions.cdb
 
 :param args: Command line arguments and configuration
 :type args: argparse.Namespace
@@ -105,6 +105,18 @@
 env = {}
 if args.versions:
 env['MW_VERSIONS_SYNC'] = ' '.join(args.versions)
+
+def run_on_cluster(description, hosts, command, env=None, user=None):
+"""Run a command on the cluster via ssh."""
+if user is not None:
+command = utils.sudo_args(command, user, env)
+else:
+command = utils.build_command(command, env)
+
+(good, bad) = ssh.cluster_monitor(description, hosts, command)
+
+if bad:
+logger.error('%s failed on %d hosts', description, len(bad))
 
 with utils.lock('/var/lock/scap'):
 logger.info('Started scap: %s', args.message)
@@ -123,37 +135,33 @@
 with log.Timer('mw-update-l10n', stats):
 subprocess.check_call('/usr/local/bin/mw-update-l10n')
 
-with log.Timer('scap-1 to proxies', stats):
-utils.dsh('/usr/local/bin/scap-1', 'scap-proxies', env)
-
+# Update rsync proxies
 scap_proxies = utils.read_dsh_hosts_file('scap-proxies')
+with log.Timer('scap-1 to proxies', stats):
+run_on_cluster('scap-1', scap_proxies,
+'/usr/local/bin/scap-1', env)
 
 # Randomize the order of target machines.
 mw_install_hosts = utils.read_dsh_hosts_file('mediawiki-installation')
 random.shuffle(mw_install_hosts)
-with tempfile.NamedTemporaryFile(delete=False, prefix='scap') as tmp:
-try:
-tmp.write('\n'.join(mw_install_hosts))
-tmp.flush()
 
-with log.Timer('update apaches', stats) as t:
-utils.dsh(
-'/usr/local/bin/scap-1 %s' % ' '.join(scap_proxies),
-tmp.name, env)
-t.mark('scap-1 to apaches')
+with log.Timer('update apaches', stats) as t:
+run_on_cluster('scap-1', mw_install_hosts,
+['/usr/local/bin/scap-1'] + scap_proxies, env)
+t.mark('scap-1 to apaches')
 
-utils.dsh('/usr/local/bin/scap-rebuild-cdbs',
-tmp.name, env)
-t.mark('scap-rebuild-cdbs')
-finally:
-os.remove(tmp.name)
+run_on_cluster('scap-rebuild-cdbs', mw_install_hosts,
+'/usr/local/bin/scap-rebuild-cdbs', env)
+t.mark('scap-rebuild-cdbs')
 
 with log.Timer('syncing wikiversions.cdb', stats) as t:
 subprocess.check_call('%(MW_COMMON_SOURCE)s/multiversion/'
 'refreshWikiversionsCDB' % args.cfg)
 t.mark('refreshWikiversionsCDB')
 
-utils.dsh('sudo -u mwdeploy rsync -l %(MW_RSYNC_HOST)s::common/'
-'wikiversions.{json,cdb} %(MW_COMMON)s' % args.cfg,
-'mediawiki-installation')
+run_on_cluster('rsync wikiversions', mw_install_hosts,
+['rsync', '-l', '%(MW_RSYNC_HOST)s::common/'
+'wikiversions.{json,cdb}' % args.cfg,
+'%(MW_COMMON)s' % args.cfg],
+user='mwdeploy')
 t.mark('rsync wikiversions')

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

Gerrit-MessageType: merged
Gerrit

[MediaWiki-commits] [Gerrit] Add cluster_monitor ssh wrapper - change (mediawiki...scap)

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

Change subject: Add cluster_monitor ssh wrapper
..


Add cluster_monitor ssh wrapper

Add scap.ssh.cluster_monitor function to run a command on the cluster
via ssh and monitor progress with a live updating progress message and
real-time error logging. Progress messages are sent to stderr. Failed
commands will be logged as warnings as they occur. Returns the count of
successful and failed commands.

Bug: 59922
Change-Id: I0ddefc136ce3d136599571288e8ab056a5a889ef
---
M scap/ssh.py
1 file changed, 49 insertions(+), 1 deletion(-)

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



diff --git a/scap/ssh.py b/scap/ssh.py
index 231ddf6..aadfa81 100644
--- a/scap/ssh.py
+++ b/scap/ssh.py
@@ -6,9 +6,11 @@
 via SSH.
 
 """
+import logging
 import os
 import select
 import subprocess
+import sys
 
 
 SSH = ('/usr/bin/ssh', '-oBatchMode=yes', '-oSetupTimeout=10')
@@ -24,7 +26,7 @@
 while hosts or procs:
 if hosts and len(procs) < limit:
 host = hosts.pop()
-ssh_command = SSH + (host, command)
+ssh_command = SSH + (host,) + tuple(command)
 proc = subprocess.Popen(ssh_command, stdout=subprocess.PIPE,
 stderr=subprocess.STDOUT, preexec_fn=os.setsid)
 procs[proc.pid] = (proc, host)
@@ -60,3 +62,49 @@
 if len(failed) > max_fails:
 raise RuntimeError(command, failed)
 return ok, failed
+
+
+def cluster_monitor(description, hosts, command):
+"""Monitor execution of a command on the cluster.
+
+Run a command on the cluster via ssh and monitor progress with a live
+updating progress message and real-time error logging. Progress messages
+are sent to stderr. Failed commands will be logged as warnings as they
+occur. Returns the count of successful and failed commands.
+
+:param description: Short description of the command being run
+:type description: str
+:param hosts: Hosts to execute command on
+:type host: sequence
+:param command: Command to execute
+:type command: str or sequence
+:returns: tuple (count of successful responses, count of failed responses)
+"""
+logger = logging.getLogger('ssh')
+expect = len(hosts)
+ok = 0
+failed = 0
+done = 0
+
+try:
+for done, (host, status, output) in \
+enumerate(cluster_ssh(hosts, command)):
+if status == 0:
+ok += 1
+else:
+failed += 1
+# Start a new console line on the assumption that logger will
+# be appending to console as well.
+sys.stderr.write('\n')
+logger.warning('%s on %s returned [%d]: %s',
+description, host, status, output)
+
+# Jump cursor back to position 0 and write status message.
+sys.stderr.write('\r%s: %.0f%% (ok: %d; fail: %d; left: %d)' % (
+description, 100.0 * (float(done) / expect), ok, failed,
+expect - done))
+
+finally:
+sys.stderr.write('\n')
+
+return (ok, failed)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ddefc136ce3d136599571288e8ab056a5a889ef
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Ori.livneh 
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] Rename scap.main functions to avoid duplication - change (mediawiki...scap)

2014-02-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Rename scap.main functions to avoid duplication
..

Rename scap.main functions to avoid duplication

I had managed to create two functions named `scap` and two others named
`sync_common` which is confusing on many levels. The scap.tasks
functions retain the simple names while the scap.main versions have
`_command` appended.

Change-Id: Ib0878fbf9396c032055c2de3df9cbc04c9eaf031
---
M bin/scap
M bin/scap-1
M scap/__init__.py
M scap/main.py
4 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap 
refs/changes/92/114692/1

diff --git a/bin/scap b/bin/scap
index 6487e29..1ed7dc6 100755
--- a/bin/scap
+++ b/bin/scap
@@ -14,4 +14,4 @@
 sys.path.append(scap_src)
 
 import scap
-sys.exit(scap.scap())
+sys.exit(scap.scap_command())
diff --git a/bin/scap-1 b/bin/scap-1
index 26835e5..3479dcf 100755
--- a/bin/scap-1
+++ b/bin/scap-1
@@ -14,4 +14,4 @@
 sys.path.append(scap_src)
 
 import scap
-sys.exit(scap.sync_common())
+sys.exit(scap.sync_common_command())
diff --git a/scap/__init__.py b/scap/__init__.py
index e26c681..2711838 100644
--- a/scap/__init__.py
+++ b/scap/__init__.py
@@ -6,15 +6,15 @@
 configuration to a group of servers via SSH and rsync.
 
 """
-from .main import scap
-from .main import sync_common
+from .main import scap_command
+from .main import sync_common_command
 from . import log
 
 __all__ = (
-'scap',
-'sync_common',
+'scap_command',
+'sync_common_command',
 )
 
-any((scap, sync_common))  # Ignore unused import warning
+any((scap_command, sync_common_command))  # Ignore unused import warning
 
 log.setup_loggers()
diff --git a/scap/main.py b/scap/main.py
index 70e2695..137f446 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -15,7 +15,7 @@
 from . import utils
 
 
-def sync_common():
+def sync_common_command():
 """Command wrapper for :func:`tasks.sync_common`
 
 :returns: Integer exit status suitable for use with ``sys.exit``
@@ -53,7 +53,7 @@
 return 1
 
 
-def scap():
+def scap_command():
 """Command wrapper for :func:`tasks.scap`
 
 :returns: Integer exit status suitable for use with ``sys.exit``

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0878fbf9396c032055c2de3df9cbc04c9eaf031
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Correction in dummy sentence segmenter - change (mediawiki...ContentTranslation)

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

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

Change subject: Correction in dummy sentence segmenter
..

Correction in dummy sentence segmenter

Split using period+space instead of period.

Change-Id: I2eabba15bd616f0777ded4332fe8d177bbfeb112
---
M server/segmentation/sentenceSegmenter.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/server/segmentation/sentenceSegmenter.js 
b/server/segmentation/sentenceSegmenter.js
index 2500104..77955a3 100644
--- a/server/segmentation/sentenceSegmenter.js
+++ b/server/segmentation/sentenceSegmenter.js
@@ -27,7 +27,7 @@
 
 SentenceSegmenter.prototype.segment = function () {
var i, segmentId, linkSegmenter,
-   sentences = this.content.split( '.' );
+   sentences = this.content.split( '. ' );
 
this.segmentCount += sentences.length;
for ( i = 0; i< this.segmentCount; i++ ) {
@@ -37,7 +37,7 @@
linkSegmenter.segment();
this.links = $.extend( this.links, linkSegmenter.getSegments() 
);
this.segments[segmentId] = {
-   source: linkSegmenter.toHTML() + '.'
+   source: linkSegmenter.toHTML() + '. '
};
// We need this lookup to keep the order of segments
// while constructing the segmented content using

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2eabba15bd616f0777ded4332fe8d177bbfeb112
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] Add generic command argument generation function - change (mediawiki...scap)

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

Change subject: Add generic command argument generation function
..


Add generic command argument generation function

Add scap.utils.build_command to centralize the logic needed to create
a safe command description with optional runtime environment
modifications. This lays the ground work for moving command execution
from dsh to our scap.ssh module.

Change-Id: If7f583dcdf712fb001f07b639d79de7c2b6fce0e
---
M scap/utils.py
1 file changed, 53 insertions(+), 14 deletions(-)

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



diff --git a/scap/utils.py b/scap/utils.py
index 3bf1b56..065680b 100644
--- a/scap/utils.py
+++ b/scap/utils.py
@@ -13,20 +13,21 @@
 import pipes
 import random
 import re
+import shlex
 import socket
 import struct
 import subprocess
 
 
 def shell_map(mapping):
-"""Convert a map to a string of space-separated KEY=VALUE pairs.
+"""Convert a dict to a list of KEY=VALUE pairs.
 
 >>> shell_map({'a':'b'})
-'a=b'
+['a=b']
 >>> shell_map({'a':'1', 'b':'2 or 3'})
-"a=1 b='2 or 3'"
+['a=1', "b='2 or 3'"]
 """
-return ' '.join('%s=%s' % (k, pipes.quote(v)) for k, v in mapping.items())
+return ['%s=%s' % (k, pipes.quote(v)) for k, v in mapping.items()]
 
 
 def read_dsh_hosts_file(path):
@@ -85,15 +86,58 @@
 def dsh(command, group, exports=None):
 """Run a command on multiple hosts via DSH."""
 if exports:
-command = '%s %s' % (shell_map(exports), command)
+command = '%s %s' % (' '.join(shell_map(exports)), command)
 group_file = os.path.join('/etc/dsh/group', group)
 return subprocess.call(['/usr/bin/dsh', '-F40', '-cM', '-f',
 group_file, '-o', '-oSetupTimeout=10', '--',
 command.strip()])
 
 
+def build_command(command, exports=None):
+"""Build an argument list for running a command.
+
+If the command is a string rather than a sequence it will be split using
+``shlex.split`` as recommended by the ``subprocess`` documentation. If
+a dict of environment exports is provided it will be converted into
+VAR=VALUE statements and prepended to the command.
+
+>>> build_command('hello')
+['hello']
+>>> build_command(['hello'])
+['hello']
+>>> build_command(['hello'] + 'foo bar baz'.split())
+['hello', 'foo', 'bar', 'baz']
+>>> build_command('hello --who world')
+['hello', '--who', 'world']
+>>> build_command('echo "hello world"')
+['echo', 'hello world']
+>>> build_command(['scap-2', 'tin'], {'FOO':'bar baz'})
+["FOO='bar baz'", 'scap-2', 'tin']
+
+:param command: Command to execute
+:type command: str or sequence
+:param exports: Environment variables to export to the command
+:type exports: dict
+:returns: List of arguments suitable for use with subprocess methods
+"""
+args = []
+if exports:
+args.extend(shell_map(exports))
+try:
+command = shlex.split(command)
+except AttributeError:
+# Command is already a sequence
+pass
+args.extend(command)
+return args
+
+
 def sudo_args(command, user=None, exports=None):
 """Build an argument list for running a command under sudo.
+
+The command and optional exports will be processed by
+:func:`build_command` and then used as the object of a ``sudo``
+invocation.
 
 >>> sudo_args('hello')
 ['sudo', 'hello']
@@ -105,24 +149,19 @@
 ['sudo', '-u', 'wmdeploy', "FOO='bar baz'", 'scap-2', 'tin']
 
 :param command: Command to execute
-:type command: str or list
+:type command: str or sequence
 :param user: User to execute as
 :type user: str
 :param exports: Environment variables to export to the command
 :type exports: dict
 :returns: List of arguments suitable for use with subprocess methods
+
+.. seealso:: :func:`build_command`
 """
 args = ['sudo']
 if user is not None:
 args.extend(['-u', user])
-if exports is not None:
-args.extend('%s=%s' % (k, pipes.quote(v)) for k, v in exports.items())
-if isinstance(command, basestring):
-func = args.append
-command = command.strip()
-else:
-func = args.extend
-func(command)
+args.extend(build_command(command, exports))
 return args
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7f583dcdf712fb001f07b639d79de7c2b6fce0e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.w

[MediaWiki-commits] [Gerrit] Remove remnants of "extended version" config - change (operations/mediawiki-config)

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

Change subject: Remove remnants of "extended version" config
..


Remove remnants of "extended version" config

Change-Id: Iac5b021c61201cf4eb95addae884e63f786c97b1
---
M multiversion/MWMultiVersion.php
M multiversion/refreshWikiversionsCDB
2 files changed, 3 insertions(+), 35 deletions(-)

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



diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 3dc271b..42f373a 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -24,10 +24,6 @@
 */
private $version;
/**
-* @var string
-*/
-   private $extVersion;
-   /**
 * @var bool
 */
private $versionLoaded = false;
@@ -265,8 +261,7 @@
 
/**
 * Get the space-seperated list of version params for this wiki.
-* The first item is the MW version and the optional second item
-* an extra version parameter to use for builds and caches.
+* The first item is the MW version
 */
private function loadVersionInfo() {
if ( $this->versionLoaded ) {
@@ -284,16 +279,8 @@
 
if ( $db ) {
$version = $db->get( "ver:{$this->db}" );
-   if ( $version === false ) {
-   $extraVersion = false;
-   } else {
-   if ( strpos( $version, 'php-' ) !== 0 ) {
-   self::error( "$cdbFilename version 
entry does not start with `php-` (got `$version`).\n" );
-   }
-   $extraVersion = $db->get( "ext:{$this->db}" );
-   if ( $extraVersion === false ) {
-   self::error( "$cdbFilename has no extra 
version entry for `$db`.\n" );
-   }
+   if ( $version !== false && strpos( $version, 'php-' ) 
!== 0 ) {
+   self::error( "$cdbFilename version entry does 
not start with `php-` (got `$version`).\n" );
}
$db->close();
} else {
@@ -301,7 +288,6 @@
}
 
$this->version = $version;
-   $this->extVersion = $extraVersion;
}
 
/**
@@ -349,23 +335,6 @@
$this->loadVersionInfo();
$this->assertNotMissing(); // caller should have checked 
isMissing()
return substr( $this->version, 4 ); // remove "php-"
-   }
-
-   /**
-* Get the version number to use for building caches & binaries for 
this wiki.
-* Like getVersionNumber() but may have a dash with another string 
appended.
-* Some wikis may share core MW versions but be using different 
extension versions.
-* We need to keep the caches and binary builds separate for such wikis.
-* @return String
-*/
-   public function getExtendedVersionNumber() {
-   $this->loadVersionInfo();
-   $this->assertNotMissing(); // caller should have checked 
isMissing()
-   $ver = $this->getVersionNumber();
-   if ( $this->extVersion !== '' && $this->extVersion !== '*' ) {
-   $ver .= "-{$this->extVersion}";
-   }
-   return $ver;
}
 
/**
diff --git a/multiversion/refreshWikiversionsCDB 
b/multiversion/refreshWikiversionsCDB
index 3d8cfd9..cf3fb96 100755
--- a/multiversion/refreshWikiversionsCDB
+++ b/multiversion/refreshWikiversionsCDB
@@ -54,7 +54,6 @@
}
foreach ( $rows as $dbName => $version ) {
$db->set( "ver:$dbName", $version );
-   $db->set( "ext:$dbName", '' );
}
$db->close();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac5b021c61201cf4eb95addae884e63f786c97b1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] Add cluster_monitor ssh ssh wrapper - change (mediawiki...scap)

2014-02-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Add cluster_monitor ssh ssh wrapper
..

Add cluster_monitor ssh ssh wrapper

Add scap.ssh.cluster_monitor function to run a command on the cluster
via ssh and monitor progress with a live updating progress message and
real-time error logging. Progress messages are sent to stderr. Failed
commands will be logged as warnings as they occur. Returns the count of
successful and failed commands.

Bug: 59922
Change-Id: I0ddefc136ce3d136599571288e8ab056a5a889ef
---
M scap/ssh.py
1 file changed, 53 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap 
refs/changes/90/114690/1

diff --git a/scap/ssh.py b/scap/ssh.py
index 231ddf6..2739a29 100644
--- a/scap/ssh.py
+++ b/scap/ssh.py
@@ -6,9 +6,11 @@
 via SSH.
 
 """
+import logging
 import os
 import select
 import subprocess
+import sys
 
 
 SSH = ('/usr/bin/ssh', '-oBatchMode=yes', '-oSetupTimeout=10')
@@ -24,7 +26,7 @@
 while hosts or procs:
 if hosts and len(procs) < limit:
 host = hosts.pop()
-ssh_command = SSH + (host, command)
+ssh_command = SSH + (host,) + tuple(command)
 proc = subprocess.Popen(ssh_command, stdout=subprocess.PIPE,
 stderr=subprocess.STDOUT, preexec_fn=os.setsid)
 procs[proc.pid] = (proc, host)
@@ -60,3 +62,53 @@
 if len(failed) > max_fails:
 raise RuntimeError(command, failed)
 return ok, failed
+
+
+def cluster_monitor(description, hosts, command):
+"""Monitor execution of a command on the cluster.
+
+Run a command on the cluster via ssh and monitor progress with a live
+updating progress message and real-time error logging. Progress messages
+are sent to stderr. Failed commands will be logged as warnings as they
+occur. Returns the count of successful and failed commands.
+
+:param description: Short description of the command being run
+:type description: str
+:param hosts: Hosts to execute command on
+:type host: sequence
+:param command: Command to execute
+:type command: str or sequence
+:returns: tuple (count of successful responses, count of failed responses)
+"""
+logger = logging.getLogger('ssh')
+expect = len(hosts)
+ok = 0
+failed = 0
+done = 0
+
+try:
+for done, (host, status, output) in \
+enumerate(cluster_ssh(hosts, command)):
+if status == 0:
+ok += 1
+else:
+failed += 1
+# Start a new console line on the assumption that logger will
+# be appending to console as well.
+sys.stderr.write('\n')
+logger.warning('%s on %s returned [%d]: %s',
+description, host, status, output)
+
+# Write progess to console
+percent = 100.0 * (float(done) / expect)
+status = '%s: %.0f%% (ok: %d; fail: %d; left: %d)' % (
+description, percent, ok, failed, expect - done)
+# Jump cursor back to position 0 and write status message.
+# Pad to assumed end of line with spaces to overwrite possible
+# tail of prior message.
+sys.stderr.write('\r%s%s' % (status, ' ' * (80 - len(status
+
+finally:
+sys.stderr.write('\n')
+
+return (ok, failed)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ddefc136ce3d136599571288e8ab056a5a889ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
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 usages of wikiversions.dat to wikiversions.json - change (mediawiki...scap)

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

Change subject: Update usages of wikiversions.dat to wikiversions.json
..


Update usages of wikiversions.dat to wikiversions.json

Depends on Ic804421a6f

Change-Id: Ie1bb434126e62dae137df1f5d85e8bb7c5c4a014
---
M bin/scap-old
M bin/scap-recompile
M bin/sync-wikiversions
M scap/tasks.py
4 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/bin/scap-old b/bin/scap-old
index d43c97c..1b83fe5 100755
--- a/bin/scap-old
+++ b/bin/scap-old
@@ -67,7 +67,7 @@
 echo " done"
 
 # Update the current machine so that serialization works.
-# Push wikiversions.dat changes so mwversionsinuse, set-group-write,
+# Push wikiversions.json changes so mwversionsinuse, set-group-write,
 # and mwscript work with the right version of the files.
 /usr/local/bin/sync-common || die
 
diff --git a/bin/scap-recompile b/bin/scap-recompile
index 60a1d4c..3a08032 100644
--- a/bin/scap-recompile
+++ b/bin/scap-recompile
@@ -3,10 +3,10 @@
 PATH=/bin:/usr/bin:/sbin:/usr/sbin:
 TERM=dumb
 
-# wikiversions.dat just synced above
+# wikiversions.json just synced above
 mwVersionNums=$(mwversionsinuse)
 if [ -z "$mwVersionNums" ]; then
-   echo "Unable to read wikiversions.dat or it is empty"
+   echo "Unable to read wikiversions.json or it is empty"
exit 1
 fi
 
diff --git a/bin/sync-wikiversions b/bin/sync-wikiversions
index a7b9102..8eb34d0 100755
--- a/bin/sync-wikiversions
+++ b/bin/sync-wikiversions
@@ -20,7 +20,7 @@
 
 # Copy files to apaches
 echo -n 'Copying wikiversions dat and cdb files to apaches...'
-dsh -cM -g mediawiki-installation -o -oSetupTimeout=10 -- "sudo -u mwdeploy 
rsync -l $MW_RSYNC_HOST::common/wikiversions.{dat,cdb} $MW_COMMON"
+dsh -cM -g mediawiki-installation -o -oSetupTimeout=10 -- "sudo -u mwdeploy 
rsync -l $MW_RSYNC_HOST::common/wikiversions.{json,cdb} $MW_COMMON"
 
 echo 'Finished'
 
diff --git a/scap/tasks.py b/scap/tasks.py
index 4377adb..859f746 100644
--- a/scap/tasks.py
+++ b/scap/tasks.py
@@ -114,7 +114,7 @@
 check_php_syntax('%(MW_COMMON_SOURCE)s/multiversion' % args.cfg)
 
 # Update the current machine so that serialization works. Push
-# wikiversions.dat changes so mwversionsinuse, set-group-write,
+# wikiversions.json changes so mwversionsinuse, set-group-write,
 # and mwscript work with the right version of the files.
 sync_common(dict(args.cfg.items() + env.items()))
 
@@ -154,6 +154,6 @@
 t.mark('refreshWikiversionsCDB')
 
 utils.dsh('sudo -u mwdeploy rsync -l %(MW_RSYNC_HOST)s::common/'
-'wikiversions.{dat,cdb} %(MW_COMMON)s' % args.cfg,
+'wikiversions.{json,cdb} %(MW_COMMON)s' % args.cfg,
 'mediawiki-installation')
 t.mark('rsync wikiversions')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1bb434126e62dae137df1f5d85e8bb7c5c4a014
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: BryanDavis 
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] Show wikiversions json files in noc conf - change (operations/mediawiki-config)

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

Change subject: Show wikiversions json files in noc conf
..


Show wikiversions json files in noc conf

Change-Id: I1558ec267821d4a1dcc9c6fa128fc51287e1005d
---
M docroot/noc/conf/index.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/docroot/noc/conf/index.php b/docroot/noc/conf/index.php
index 40c1bad..9822f71 100644
--- a/docroot/noc/conf/index.php
+++ b/docroot/noc/conf/index.php
@@ -58,7 +58,7 @@
 https://gerrit.wikimedia.org/r/114689
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1558ec267821d4a1dcc9c6fa128fc51287e1005d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] Show wikiversions json files in noc conf - change (operations/mediawiki-config)

2014-02-20 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Show wikiversions json files in noc conf
..

Show wikiversions json files in noc conf

Change-Id: I1558ec267821d4a1dcc9c6fa128fc51287e1005d
---
M docroot/noc/conf/index.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/docroot/noc/conf/index.php b/docroot/noc/conf/index.php
index 40c1bad..9822f71 100644
--- a/docroot/noc/conf/index.php
+++ b/docroot/noc/conf/index.php
@@ -58,7 +58,7 @@
 https://gerrit.wikimedia.org/r/114689
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1558ec267821d4a1dcc9c6fa128fc51287e1005d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Remove remnants of "extended version" config - change (operations/mediawiki-config)

2014-02-20 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Remove remnants of "extended version" config
..

Remove remnants of "extended version" config

Change-Id: Iac5b021c61201cf4eb95addae884e63f786c97b1
---
M multiversion/MWMultiVersion.php
M multiversion/refreshWikiversionsCDB
2 files changed, 3 insertions(+), 35 deletions(-)


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

diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 3dc271b..42f373a 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -24,10 +24,6 @@
 */
private $version;
/**
-* @var string
-*/
-   private $extVersion;
-   /**
 * @var bool
 */
private $versionLoaded = false;
@@ -265,8 +261,7 @@
 
/**
 * Get the space-seperated list of version params for this wiki.
-* The first item is the MW version and the optional second item
-* an extra version parameter to use for builds and caches.
+* The first item is the MW version
 */
private function loadVersionInfo() {
if ( $this->versionLoaded ) {
@@ -284,16 +279,8 @@
 
if ( $db ) {
$version = $db->get( "ver:{$this->db}" );
-   if ( $version === false ) {
-   $extraVersion = false;
-   } else {
-   if ( strpos( $version, 'php-' ) !== 0 ) {
-   self::error( "$cdbFilename version 
entry does not start with `php-` (got `$version`).\n" );
-   }
-   $extraVersion = $db->get( "ext:{$this->db}" );
-   if ( $extraVersion === false ) {
-   self::error( "$cdbFilename has no extra 
version entry for `$db`.\n" );
-   }
+   if ( $version !== false && strpos( $version, 'php-' ) 
!== 0 ) {
+   self::error( "$cdbFilename version entry does 
not start with `php-` (got `$version`).\n" );
}
$db->close();
} else {
@@ -301,7 +288,6 @@
}
 
$this->version = $version;
-   $this->extVersion = $extraVersion;
}
 
/**
@@ -349,23 +335,6 @@
$this->loadVersionInfo();
$this->assertNotMissing(); // caller should have checked 
isMissing()
return substr( $this->version, 4 ); // remove "php-"
-   }
-
-   /**
-* Get the version number to use for building caches & binaries for 
this wiki.
-* Like getVersionNumber() but may have a dash with another string 
appended.
-* Some wikis may share core MW versions but be using different 
extension versions.
-* We need to keep the caches and binary builds separate for such wikis.
-* @return String
-*/
-   public function getExtendedVersionNumber() {
-   $this->loadVersionInfo();
-   $this->assertNotMissing(); // caller should have checked 
isMissing()
-   $ver = $this->getVersionNumber();
-   if ( $this->extVersion !== '' && $this->extVersion !== '*' ) {
-   $ver .= "-{$this->extVersion}";
-   }
-   return $ver;
}
 
/**
diff --git a/multiversion/refreshWikiversionsCDB 
b/multiversion/refreshWikiversionsCDB
index 3d8cfd9..cf3fb96 100755
--- a/multiversion/refreshWikiversionsCDB
+++ b/multiversion/refreshWikiversionsCDB
@@ -54,7 +54,6 @@
}
foreach ( $rows as $dbName => $version ) {
$db->set( "ver:$dbName", $version );
-   $db->set( "ext:$dbName", '' );
}
$db->close();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac5b021c61201cf4eb95addae884e63f786c97b1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Fix CDB file generation - change (operations/mediawiki-config)

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

Change subject: Fix CDB file generation
..


Fix CDB file generation

- readWikiVersionsFile returns an associative array, not an array of arrays.
- readWikiVersionsFile should sort keys to make repeated runs on the same input
  deterministic.

Change-Id: Ic27cb9581a99cf18fc703b0d3d60e95a7bbc08a2
---
M multiversion/MWWikiversions.php
M multiversion/refreshWikiversionsCDB
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/multiversion/MWWikiversions.php b/multiversion/MWWikiversions.php
index a4f3b08..2b77a18 100644
--- a/multiversion/MWWikiversions.php
+++ b/multiversion/MWWikiversions.php
@@ -20,6 +20,7 @@
if ( !is_array( $verList ) || array_values( $verList ) === 
$verList ) {
throw new Exception( "$srcPath did not decode to an 
associative array.\n" );
}
+   asort( $verList );
return $verList;
}
 
diff --git a/multiversion/refreshWikiversionsCDB 
b/multiversion/refreshWikiversionsCDB
index 7a5e041..3d8cfd9 100755
--- a/multiversion/refreshWikiversionsCDB
+++ b/multiversion/refreshWikiversionsCDB
@@ -52,8 +52,7 @@
print "Unable to create {$tmpDBPath}.\n";
exit( 1 );
}
-   foreach ( $rows as $row ) {
-   list( $dbName, $version ) = $row;
+   foreach ( $rows as $dbName => $version ) {
$db->set( "ver:$dbName", $version );
$db->set( "ext:$dbName", '' );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic27cb9581a99cf18fc703b0d3d60e95a7bbc08a2
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
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] Fix CDB file generation - change (operations/mediawiki-config)

2014-02-20 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Fix CDB file generation
..

Fix CDB file generation

- readWikiVersionsFile returns an associative array, not an array of arrays.
- readWikiVersionsFile should sort keys to make repeated runs on the same input
  deterministic.

Change-Id: Ic27cb9581a99cf18fc703b0d3d60e95a7bbc08a2
---
M multiversion/MWWikiversions.php
M multiversion/refreshWikiversionsCDB
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/multiversion/MWWikiversions.php b/multiversion/MWWikiversions.php
index a4f3b08..2b77a18 100644
--- a/multiversion/MWWikiversions.php
+++ b/multiversion/MWWikiversions.php
@@ -20,6 +20,7 @@
if ( !is_array( $verList ) || array_values( $verList ) === 
$verList ) {
throw new Exception( "$srcPath did not decode to an 
associative array.\n" );
}
+   asort( $verList );
return $verList;
}
 
diff --git a/multiversion/refreshWikiversionsCDB 
b/multiversion/refreshWikiversionsCDB
index 7a5e041..3d8cfd9 100755
--- a/multiversion/refreshWikiversionsCDB
+++ b/multiversion/refreshWikiversionsCDB
@@ -52,8 +52,7 @@
print "Unable to create {$tmpDBPath}.\n";
exit( 1 );
}
-   foreach ( $rows as $row ) {
-   list( $dbName, $version ) = $row;
+   foreach ( $rows as $dbName => $version ) {
$db->set( "ver:$dbName", $version );
$db->set( "ext:$dbName", '' );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic27cb9581a99cf18fc703b0d3d60e95a7bbc08a2
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] vmbuilder: Havana uses /dev/vda* for block devices - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: vmbuilder: Havana uses /dev/vda* for block devices
..


vmbuilder: Havana uses /dev/vda* for block devices

Change-Id: I0712365343b7ef1129573cc359c80957f496b347
---
M modules/labs_vmbuilder/files/postinst.sh
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/labs_vmbuilder/files/postinst.sh 
b/modules/labs_vmbuilder/files/postinst.sh
index f3c90c9..4adc0aa 100644
--- a/modules/labs_vmbuilder/files/postinst.sh
+++ b/modules/labs_vmbuilder/files/postinst.sh
@@ -27,6 +27,7 @@
   mv /etc/puppet/puppet.conf.install /etc/puppet/puppet.conf
   mv /etc/default/puppet.install /etc/default/puppet
   rm /etc/ssh/ssh_host*key*
+  sed -i 's/\/dev\/sda/\/dev\/vda/' /etc/fstab
   sed -i '/^kernel/s/$/ console=ttyS0/' /boot/grub/menu.lst
   sed -i 's/console=hvc0/xencons=hvc0 console=hvc0/' /boot/grub/menu.lst
   rm -f /etc/sudo-ldap.conf

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0712365343b7ef1129573cc359c80957f496b347
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Change wikiversions to use json - change (operations/mediawiki-config)

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

Change subject: Change wikiversions to use json
..


Change wikiversions to use json

- wikiversions.dat -> wikiversions.json
- Rename switchAllMediaWikis to updateWikiversions
- Remove half-assed $oldVersion validation
- Get rid of populateWikiversions, since it is now served by
  updateWikiversions.

Change-Id: Ic804421a6fffd044d93d180edee974b900820daa
---
M docroot/noc/createTxtFileSymlinks.sh
A multiversion/FormatJson.php
M multiversion/MWWikiversions.php
M multiversion/activeMWVersions.php
D multiversion/populateWikiversions
M multiversion/refreshWikiversionsCDB
D multiversion/switchAllMediaWikis.php
R multiversion/updateWikiversions
A multiversion/updateWikiversions.php
9 files changed, 340 insertions(+), 208 deletions(-)

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



diff --git a/docroot/noc/createTxtFileSymlinks.sh 
b/docroot/noc/createTxtFileSymlinks.sh
index 782a66a..24345c4 100755
--- a/docroot/noc/createTxtFileSymlinks.sh
+++ b/docroot/noc/createTxtFileSymlinks.sh
@@ -86,7 +86,8 @@
wikipedia.dblist
wikiquote.dblist
wikisource.dblist
-   wikiversions.dat
+   wikiversions.json
+   wikiversions-labs.json
wikiversity.dblist
wikivoyage.dblist
wiktionary.dblist
diff --git a/multiversion/FormatJson.php b/multiversion/FormatJson.php
new file mode 100644
index 000..83718c3
--- /dev/null
+++ b/multiversion/FormatJson.php
@@ -0,0 +1,239 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * JSON formatter wrapper class
+ */
+class FormatJson {
+   /**
+* Skip escaping most characters above U+007F for readability and 
compactness.
+* This encoding option saves 3 to 8 bytes (uncompressed) for each such 
character;
+* however, it could break compatibility with systems that incorrectly 
handle UTF-8.
+*
+* @since 1.22
+*/
+   const UTF8_OK = 1;
+
+   /**
+* Skip escaping the characters '<', '>', and '&', which have special 
meanings in
+* HTML and XML.
+*
+* @warning Do not use this option for JSON that could end up in inline 
scripts.
+* - HTML5, §4.3.1.2 Restrictions for contents of script elements
+* - XML 1.0 (5th Ed.), §2.4 Character Data and Markup
+*
+* @since 1.22
+*/
+   const XMLMETA_OK = 2;
+
+   /**
+* Skip escaping as many characters as reasonably possible.
+*
+* @warning When generating inline script blocks, use 
FormatJson::UTF8_OK instead.
+*
+* @since 1.22
+*/
+   const ALL_OK = 3;
+
+   /**
+* Regex that matches whitespace inside empty arrays and objects.
+*
+* This doesn't affect regular strings inside the JSON because those 
can't
+* have a real line break (\n) in them, at this point they are already 
escaped
+* as the string "\n" which this doesn't match.
+*
+* @private
+*/
+   const WS_CLEANUP_REGEX = '/(?<=[\[{])\n\s*+(?=[\]}])/';
+
+   /**
+* Characters problematic in JavaScript.
+*
+* @note These are listed in ECMA-262 (5.1 Ed.), §7.3 Line Terminators 
along with U+000A (LF)
+*   and U+000D (CR). However, PHP already escapes LF and CR 
according to RFC 4627.
+*/
+   private static $badChars = array(
+   "\xe2\x80\xa8", // U+2028 LINE SEPARATOR
+   "\xe2\x80\xa9", // U+2029 PARAGRAPH SEPARATOR
+   );
+
+   /**
+* Escape sequences for characters listed in FormatJson::$badChars.
+*/
+   private static $badCharsEscaped = array(
+   '\u2028', // U+2028 LINE SEPARATOR
+   '\u2029', // U+2029 PARAGRAPH SEPARATOR
+   );
+
+   /**
+* Returns the JSON representation of a value.
+*
+* @note Empty arrays are encoded as numeric arrays, not as objects, so 
cast any associative
+*   array that might be empty to an object before encoding it.
+*
+* @note In pre-1.22 versions of MediaWiki, using this function for 
generating inline script
+*   blocks may result in an XSS vulnerability, and quite likely 
will in XML documents
+*   (cf. FormatJson::XMLMETA_OK). Use Xml::encodeJsVar() instead 
in such cases.
+*
+* @param mixed $value The value to encode. Can be any type except a 
resource.
+* @param bool $pretty If true, add non-significant whitespace to 
improve readability.
+* @param int $escaping Bitfield consisting of _OK class constants
+* @return string|bool: String if successful; false upon failure
+*/
+   public static function encode( $value, $pretty = false, $escaping = 0 ) 
{
+   if ( defined( 'JSON_UNESCAPED_UNICODE' ) ) {
+  

[MediaWiki-commits] [Gerrit] vmbuilder: Havana uses /dev/vda* for block devices - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: vmbuilder: Havana uses /dev/vda* for block devices
..

vmbuilder: Havana uses /dev/vda* for block devices

Change-Id: I0712365343b7ef1129573cc359c80957f496b347
---
M modules/labs_vmbuilder/files/postinst.sh
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/114685/1

diff --git a/modules/labs_vmbuilder/files/postinst.sh 
b/modules/labs_vmbuilder/files/postinst.sh
index f3c90c9..4adc0aa 100644
--- a/modules/labs_vmbuilder/files/postinst.sh
+++ b/modules/labs_vmbuilder/files/postinst.sh
@@ -27,6 +27,7 @@
   mv /etc/puppet/puppet.conf.install /etc/puppet/puppet.conf
   mv /etc/default/puppet.install /etc/default/puppet
   rm /etc/ssh/ssh_host*key*
+  sed -i 's/\/dev\/sda/\/dev\/vda/' /etc/fstab
   sed -i '/^kernel/s/$/ console=ttyS0/' /boot/grub/menu.lst
   sed -i 's/console=hvc0/xencons=hvc0 console=hvc0/' /boot/grub/menu.lst
   rm -f /etc/sudo-ldap.conf

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

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

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


[MediaWiki-commits] [Gerrit] UUID models are immutable, so cache them - change (mediawiki...Flow)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: UUID models are immutable, so cache them
..

UUID models are immutable, so cache them

Converting to and from base 36 for getAlphadecimal() is > 20x
more expensive than getHex().  Calculating cache keys, due to
their use of getAlphadecimal, was showing up as a hotspot in
profiling due to this.

This is still more expensive than i would prefer, we should
consider making getHex public again and only using
getAlphadecimal for display purposes.

Change-Id: I87c8a76d44b918d2f80b256e56e41a759ad853a1
---
M includes/Data/ObjectManager.php
M includes/Model/UUID.php
2 files changed, 18 insertions(+), 3 deletions(-)


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

diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php
index 18598ee..b1a403e 100644
--- a/includes/Data/ObjectManager.php
+++ b/includes/Data/ObjectManager.php
@@ -1459,8 +1459,7 @@
if ( $attr instanceof UUID ) {
$attributes[$key] = $attr->getAlphadecimal();
} elseif ( strlen( $attr ) === UUID::BIN_LEN && substr( 
$key, -3 ) === '_id' ) {
-   $uuid = new UUID( $attr );
-   $attributes[$key] = $uuid->getAlphadecimal();
+   $attributes[$key] = UUID::create( $uuid 
)->getAlphadecimal();
}
}
 
diff --git a/includes/Model/UUID.php b/includes/Model/UUID.php
index af7e8da..d0479be 100644
--- a/includes/Model/UUID.php
+++ b/includes/Model/UUID.php
@@ -8,7 +8,18 @@
 use Language;
 use MWTimestamp;
 
+/**
+ * Immutable class modeling timestamped UUID's from
+ * the core UIDGenerator.
+ *
+ * @todo probably should be UID since these dont match the UUID standard
+ */
 class UUID {
+   /**
+* @var UUID[] Keyed by UUID binary value.  
+*/
+   protected static $cache;
+
/**
 * Provided binary UUID
 *
@@ -120,7 +131,12 @@
$binaryValue = pack( 'H*', $hexValue );
}
 
-   $uuid = new self( $binaryValue );
+   // uuid's are immutable
+   if ( isset( self::$cache[$binaryValue] ) ) {
+   return self::$cache[$binaryValue];
+   }
+
+   $uuid = self::$cache[$binaryValue] = new self( $binaryValue );
$uuid->hexValue = $hexValue;
$uuid->alphadecimalValue = $alphadecimalValue;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87c8a76d44b918d2f80b256e56e41a759ad853a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] Prevent double email notifications on talk page edit - change (mediawiki...Echo)

2014-02-20 Thread Bsitu (Code Review)
Bsitu has uploaded a new change for review.

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

Change subject: Prevent double email notifications on talk page edit
..

Prevent double email notifications on talk page edit

If a user is watching his/her own talk, an edit to the talk page
may trigger an echo notification and watchlist notification.  We
only want to send one of them

Bug: 53569
Change-Id: Ib1bb71e047789d3a857f028aaa45384022bb35c7
---
M Echo.php
M Hooks.php
2 files changed, 24 insertions(+), 0 deletions(-)


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

diff --git a/Echo.php b/Echo.php
index 721c84a..c5942dc 100644
--- a/Echo.php
+++ b/Echo.php
@@ -239,6 +239,7 @@
 
 // Disable ordinary user talk page email notifications
 $wgHooks['AbortTalkPageEmailNotification'][] = 
'EchoHooks::onAbortTalkPageEmailNotification';
+$wgHooks['SendWatchlistEmailNotification'][] = 
'EchoHooks::onSendWatchlistEmailNotification';
 // Disable the yellow bar of death
 $wgHooks['GetNewMessagesAlert'][] = 'EchoHooks::abortNewMessagesAlert';
 $wgHooks['LinksUpdateAfterInsert'][] = 'EchoHooks::onLinksUpdateAfterInsert';
diff --git a/Hooks.php b/Hooks.php
index b2637a1..78c6c18 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -714,6 +714,29 @@
}
 
/**
+* Handler for AbortWatchlistEmailNotification hook.
+* @see 
http://www.mediawiki.org/wiki/Manual:Hooks/AbortWatchlistEmailNotification
+* @param $targetUser User
+* @param $title Title
+* @return bool
+*/
+   static function onSendWatchlistEmailNotification( $targetUser, $title ) 
{
+   // If a user is watching his/her own talk page, do not send 
talk page watchlist
+   // email notification if the user is receiving Echo talk page 
notification
+   if ( $title->isTalkPage() && 
$targetUser->getTalkPage()->equals( $title ) ) {
+   if (
+   !self::isEchoDisabled( $targetUser )
+   && in_array( 'edit-user-talk', 
EchoNotificationController::getUserEnabledEvents( $targetUser, 'email' ) )
+   ) {
+   // Do not send watchlist email notification, 
the user will receive an Echo notification
+   return false;
+   }
+   }
+   // Proceed to send watchlist email notification
+   return true;
+   }
+
+   /**
 * Handler for MakeGlobalVariablesScript hook.
 * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/MakeGlobalVariablesScript
 * @param &$vars array Variables to be added into the output

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

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

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


[MediaWiki-commits] [Gerrit] Add new Hook 'SendWatchlistEmailNotification' - change (mediawiki/core)

2014-02-20 Thread Bsitu (Code Review)
Bsitu has uploaded a new change for review.

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

Change subject: Add new Hook 'SendWatchlistEmailNotification'
..

Add new Hook 'SendWatchlistEmailNotification'

Bug: 53569
Change-Id: I73d5eef9a18d59b022c353c4b7d2aee18bfa6591
---
M RELEASE-NOTES-1.23
M docs/hooks.txt
M includes/UserMailer.php
3 files changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/114682/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 64c2b3b..aa6d11d 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -105,6 +105,8 @@
 * HTMLForm 'select', 'selectandother', 'selectorother', 'multiselect', and
   'radio' fields can now use message keys as labels via the 'options-messages'
   parameter, which overrides the 'options' parameter.
+* Add new hook SendWatchlistEmailNotification, this will be used to determine
+  whether to send a watchlist email notification
 
 === Bug fixes in 1.23 ===
 * (bug 41759) The "updated since last visit" markers (on history pages, recent
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 9268f83..ad8c6db 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -277,6 +277,10 @@
 $targetUser: the user whom to send talk page email notification
 $title: the page title
 
+'SendWatchlistEmailNotification': Return true to send watchlist email 
notification
+$targetUser: the user whom to send watchlist email notification
+$title: the page title
+
 'AbortChangePassword': Return false to cancel password change.
 $user: the User object to which the password change is occuring
 $mOldpass: the old password provided by the user
diff --git a/includes/UserMailer.php b/includes/UserMailer.php
index e1d00d3..6d1b5e9 100644
--- a/includes/UserMailer.php
+++ b/includes/UserMailer.php
@@ -649,7 +649,9 @@
&& 
$watchingUser->isEmailConfirmed()
&& $watchingUser->getID() != 
$userTalkId
) {
-   $this->compose( $watchingUser );
+   if ( wfRunHooks( 
'SendWatchlistEmailNotification', array( $watchingUser, $title ) ) ) {
+   $this->compose( 
$watchingUser );
+   }
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73d5eef9a18d59b022c353c4b7d2aee18bfa6591
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bsitu 

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


[MediaWiki-commits] [Gerrit] Use EditorApi in PhotoApi to add image to page - change (mediawiki...MobileFrontend)

2014-02-20 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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

Change subject: Use EditorApi in PhotoApi to add image to page
..

Use EditorApi in PhotoApi to add image to page

Also, make error messages on HTTP errors follow the same pattern in both
upload and edit step.

Change-Id: I4322f190f69fa9c6939038cd0005dbb9943e283d
---
M includes/Resources.php
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/uploads/PhotoApi.js
M javascripts/modules/uploads/PhotoUploadOverlay.js
M tests/javascripts/modules/editor/test_EditorApi.js
M tests/javascripts/modules/uploads/test_PhotoApi.js
6 files changed, 73 insertions(+), 69 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index 8d2fc6f..10a21ed 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -282,14 +282,23 @@
),
),
 
+   'mobile.editor.api' => $wgMFMobileResourceBoilerplate + array(
+   'dependencies' => array(
+   'mobile.stable',
+   ),
+   'scripts' => array(
+   'javascripts/modules/editor/EditorApi.js',
+   ),
+   ),
+
'mobile.editor.common' => $wgMFMobileResourceBoilerplate + array(
'dependencies' => array(
'mobile.stable',
'mobile.templates',
+   'mobile.editor.api',
'jquery.cookie',
),
'scripts' => array(
-   'javascripts/modules/editor/EditorApi.js',
'javascripts/modules/editor/EditorOverlayBase.js',
),
'styles' => array(
@@ -371,6 +380,7 @@
'dependencies' => array(
'mobile.stable',
'mobile.templates',
+   'mobile.editor.api',
),
'scripts' => array(
'javascripts/loggingSchemas/mobileWebUploads.js',
diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index 5c0590d..0bda6f0 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -161,7 +161,7 @@
} else {
result.reject( { type: 'error', 
details: 'unknown' } );
}
-   } ).fail( $.proxy( result, 'reject', { type: 
'error', details: 'HTTP error' } ) );
+   } ).fail( $.proxy( result, 'reject', { type: 
'error', details: 'http' } ) );
}
 
this.getToken().done( saveContent ).fail( $.proxy( 
result, 'reject' ) );
diff --git a/javascripts/modules/uploads/PhotoApi.js 
b/javascripts/modules/uploads/PhotoApi.js
index cc0ccf4..d2e2074 100644
--- a/javascripts/modules/uploads/PhotoApi.js
+++ b/javascripts/modules/uploads/PhotoApi.js
@@ -81,17 +81,10 @@
PhotoApi = Api.extend( {
useCentralAuthToken: mw.config.get( 'wgMFUseCentralAuthToken' ),
 
-   updatePage: function( options, callback ) {
-   var self = this;
-   self.getToken().done( function( token ) {
-   self.post( {
-   action: 'edit',
-   title: options.pageTitle,
-   token: token,
-   summary: mw.msg( 
'mobile-frontend-photo-upload-comment' ),
-   prependtext: '[[File:' + 
options.fileName + '|thumbnail|' + options.description + ']]\n\n'
-   } ).done( callback );
-   } );
+   initialize: function( options ) {
+   this._super();
+   options = options || {};
+   this.editorApi = options.editorApi;
},
 
// FIXME: See UploadBase::checkWarnings - why these are not 
errors only the MediaWiki Gods know See Bug 48261
@@ -157,6 +150,7 @@
var descriptionUrl = '',
warnings = data.upload ? 
data.upload.warnings : false,
err = 'upload/error';
+
if ( !data || !data.upload ) {
// error uploading image
if ( data.error ) {
@@ -170,7 +164,9 @@
result.reject( err );
 

[MediaWiki-commits] [Gerrit] (FR #1262) Delete empty downloaded files - change (wikimedia...tools)

2014-02-20 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: (FR #1262) Delete empty downloaded files
..


(FR #1262) Delete empty downloaded files

This forces a fresh download when the upstream system is feeling healthier.

Change-Id: Ib8522c335e6c2ce9ee36b3193164f37be6c6f6ac
---
M audit/paypal/download_nightly
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Mwalker: Looks good to me, approved



diff --git a/audit/paypal/download_nightly b/audit/paypal/download_nightly
index 0a0fa4c..3485fed 100755
--- a/audit/paypal/download_nightly
+++ b/audit/paypal/download_nightly
@@ -53,6 +53,7 @@
 dest_path = os.path.join(config.incoming_path, filename)
 remote.get(os.path.join(remote_root, filename), dest_path)
 if os.path.getsize(dest_path) == 0:
+os.unlink(dest_path)
 raise RuntimeError("Stupid file did not download correctly.")
 
 lock.end()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8522c335e6c2ce9ee36b3193164f37be6c6f6ac
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] OBOD should be cleared when visiting Flow-enabled talk page - change (mediawiki...Flow)

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

Change subject: OBOD should be cleared when visiting Flow-enabled talk page
..


OBOD should be cleared when visiting Flow-enabled talk page

Bug: 55650
Change-Id: I3491b4f221bfd667cf02a7c94cc575c025c566a4
---
M includes/View.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/includes/View.php b/includes/View.php
index ffb11c5..dce0c95 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -74,6 +74,12 @@
$block->render( $this->templating, 
$parameters[$block->getName()] );
}
$out->addHTML( "" );
+   // Update newtalk and watchlist notification status on view 
action of any workflow
+   // since the normal page view that resets notification status 
is not accessiable
+   // anymore due to Flow occupation
+   if ( $action === 'view' ) {
+   $user->clearNotification( $title );
+   }
}
 
protected function redirect( Workflow $workflow, $action = 'view', 
array $query = array() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3491b4f221bfd667cf02a7c94cc575c025c566a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Labs: actually include idmapd.conf - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: actually include idmapd.conf
..


Labs: actually include idmapd.conf

... which helps if you want puppet to manage it.

Change-Id: Iaca5b6870a46a1b6f5473427d1c19e8d344b05bd
---
A files/nfs/idmapd.conf
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/files/nfs/idmapd.conf b/files/nfs/idmapd.conf
new file mode 100644
index 000..88a7167
--- /dev/null
+++ b/files/nfs/idmapd.conf
@@ -0,0 +1,14 @@
+##
+## THIS FILE IS MANAGED BY PUPPET
+## files/nfs/idmapd.conf
+## managed by role::labs::instance
+##
+
+[General]
+Verbosity = 0
+Pipefs-Directory = /run/rpc_pipefs
+domain = wmflabs
+
+[Mapping]
+Nobody-User = nobody
+Nobody-Group = nogroup

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaca5b6870a46a1b6f5473427d1c19e8d344b05bd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Labs: actually include idmapd.conf - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: actually include idmapd.conf
..

Labs: actually include idmapd.conf

... which helps if you want puppet to manage it.

Change-Id: Iaca5b6870a46a1b6f5473427d1c19e8d344b05bd
---
A files/nfs/idmapd.conf
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/80/114680/1

diff --git a/files/nfs/idmapd.conf b/files/nfs/idmapd.conf
new file mode 100644
index 000..88a7167
--- /dev/null
+++ b/files/nfs/idmapd.conf
@@ -0,0 +1,14 @@
+##
+## THIS FILE IS MANAGED BY PUPPET
+## files/nfs/idmapd.conf
+## managed by role::labs::instance
+##
+
+[General]
+Verbosity = 0
+Pipefs-Directory = /run/rpc_pipefs
+domain = wmflabs
+
+[Mapping]
+Nobody-User = nobody
+Nobody-Group = nogroup

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

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

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


[MediaWiki-commits] [Gerrit] (Bug 61715) Make history entries look at most recent revision - change (mediawiki...Flow)

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

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

Change subject: (Bug 61715) Make history entries look at most recent revision
..

(Bug 61715) Make history entries look at most recent revision

@todo: this is WIP
The problem with history thingies is that "restore" should not show up for users
that can not view the permissions for what is restored.
isAllowed will check the most recent revision to get some sort of "global
allowed state" for a revision. Combined with the above, this would make any
revision of a just-restored post be invisible.
For that reason, I made history (and RC) permission checks only do
isRevisionAllowed. That's incorrect; they should also check last revision (but
in a way that is actually correct)
Still working on that, but wanted to get a (currently failing) test in already

Bug: 61715
Change-Id: Ia27c94176bb8f40f2fe683a54ab9ddafb4f98fc0
---
M includes/Block/Topic.php
M includes/RevisionActionPermissions.php
M tests/RevisionCollectionPermissionsTest.php
3 files changed, 14 insertions(+), 1 deletion(-)


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

diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index 40534ab..0fcaddb 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -869,6 +869,8 @@
if ( $history ) {
// get rid of history entries user doesn't have 
sufficient permissions for
foreach ( $history as $i => $revision ) {
+   /** @var PostRevision $revision */
+
// only check against the specific revision, 
ignoring the most recent
if ( !$this->permissions->isRevisionAllowed( 
$revision, 'topic-history' ) ) {
unset( $history[$i] );
diff --git a/includes/RevisionActionPermissions.php 
b/includes/RevisionActionPermissions.php
index 2d59074..279285d 100644
--- a/includes/RevisionActionPermissions.php
+++ b/includes/RevisionActionPermissions.php
@@ -73,7 +73,7 @@
$isLastRevision = $last->getRevisionId()->equals( 
$revision->getRevisionId() );
return $allowed && ( $isLastRevision || 
$this->isAllowed( $last, $action ) );
 
-   // If data is not in storage, just return that 
revision's status
+   // If data is not in storage, just return that revision's status
} catch ( InvalidDataException $e ) {
return $allowed;
}
diff --git a/tests/RevisionCollectionPermissionsTest.php 
b/tests/RevisionCollectionPermissionsTest.php
index 62637af..6526f5e 100644
--- a/tests/RevisionCollectionPermissionsTest.php
+++ b/tests/RevisionCollectionPermissionsTest.php
@@ -147,6 +147,17 @@
array( 'restore-post' => true ),
array( 'suppress-post' => true ),
) ),
+
+   // bug 61715
+   array( $this->confirmedUser(), 'topic-history', array(
+   array( 'new-post' => false ),
+   array( 'suppress-post' => false ),
+   ) ),
+   array( $this->confirmedUser(), 'topic-history', array(
+   array( 'new-post' => true ),
+   array( 'suppress-post' => false ),
+   array( 'restore-post' => false ),
+   ) ),
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia27c94176bb8f40f2fe683a54ab9ddafb4f98fc0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: e2f06d4..4ab10a3 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: e2f06d4..4ab10a3
..


Syncronize VisualEditor: e2f06d4..4ab10a3

Change-Id: I5d91f5a7fde07fef8ea40ce068b30304006ad18b
---
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 e2f06d4..4ab10a3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit e2f06d487503ff9bc94d7f9c945c695130681a78
+Subproject commit 4ab10a377efc247973da00e3f563ed255f0357ab

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d91f5a7fde07fef8ea40ce068b30304006ad18b
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: e2f06d4..4ab10a3 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: e2f06d4..4ab10a3
..

Syncronize VisualEditor: e2f06d4..4ab10a3

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


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

diff --git a/VisualEditor b/VisualEditor
index e2f06d4..4ab10a3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit e2f06d487503ff9bc94d7f9c945c695130681a78
+Subproject commit 4ab10a377efc247973da00e3f563ed255f0357ab

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d91f5a7fde07fef8ea40ce068b30304006ad18b
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] CONTRIBUTING: Refer to VisualEditor contribution guidelines - change (mediawiki...VisualEditor)

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

Change subject: CONTRIBUTING: Refer to VisualEditor contribution guidelines
..


CONTRIBUTING: Refer to VisualEditor contribution guidelines

Except for the part about running QUnit tests within MediaWiki.

Change-Id: I98db2aff467a384d89bb3a84e3d65d56bde416de
---
M CONTRIBUTING.md
1 file changed, 6 insertions(+), 163 deletions(-)

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



diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 25f8d0f..4acbc0c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,44 +2,17 @@
 
 Thank you for helping us develop VisualEditor!
 
-This document describes how to report bugs, set up your development
-environment, run tests, and build documentation. It also provides the coding
-conventions we use in the project.
+We inherit the contribution guidelines from VisualEditor core. Be sure to read 
the
+[Contribution 
guidelines](https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FVisualEditor.git/master/CONTRIBUTING.md)
+in the VisualEditor repository.
 
-## Bug reports
-
-Please report bugs to 
[bugzilla.wikimedia.org](https://bugzilla.wikimedia.org/enter_bug.cgi?product=VisualEditor&component=General)
-using the `VisualEditor` product.  Feel free to use the `General`
-component if you don't know where else your bug might belong. Don't
-worry about specifying version, severity, hardware, or OS.
 
 ## Running tests
 
-VisualEditor's build scripts use the [Grunt](http://gruntjs.com/) task runner.
-To install it make sure you have [node and npm](http://nodejs.org/download/)
-installed, then run:
+The VisualEditor plugins for MediaWiki can be tested within your MediaWiki 
install.
 
-```sh
-# Install Grunt command-line utility
-$ npm install -g grunt-cli
-
-# Install VisualEditor's dev dependencies
-$ npm install
-```
-
-To run the tests, use:
-```sh
-$ grunt test
-```
-
-For other grunt tasks, see:
-```sh
-$ grunt --help
-```
-
-To run the tests in a web browser, make sure your MediaWiki install is
-[configured](https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing) to
-allow running of tests. Set in `LocalSettings.php`:
+[Configure your 
wiki](https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing) to
+allow running of tests. In `LocalSettings.php`, set:
 ```php
 // https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing
 $wgEnableJavaScriptTest = true;
@@ -47,133 +20,3 @@
 
 Then open `http://URL_OF_MEDIAWIKI/index.php/Special:JavaScriptTest/qunit`
 (for example, ).
-
-## Building documentation
-
-VisualEditor uses [JSDuck](https://github.com/senchalabs/jsduck) to process
-documentation comments embedded in the code.  To build the documentation, you
-will need `ruby`, `gem`, and `jsduck` installed.
-
-### Installing ruby and gem
-
-You're mostly on your own here, but we can give some hints for Mac OS X.
-
-# Installing Gem in Mac OS X
-Ruby ships with OSX but may be outdated. Use 
[Homebrew](http://mxcl.github.com/homebrew/):
-```sh
-$ brew install ruby
-```
-
-If you've never used `gem` before, don't forget to add the gem's bin to your
-`PATH` ([howto](http://stackoverflow.com/a/14138490/319266)).
-
-### Installing jsduck
-
-Once you have gem, installing [JSDuck](https://github.com/senchalabs/jsduck) 
is easy:
-```sh
-$ gem install --user-install jsduck
-```
-
-### Running jsduck
-
-Creating the documentation is easy:
-```sh
-$ cd VisualEditor
-$ .docs/generate.sh
-```
-
-You may need to set `MW_INSTALL_PATH` in your environment to the location of
-your mediawiki installation if VisualEditor is not checked out directly in the
-mediawiki extensions folder (for example, if you're using a symlink).
-
-The generated documentation is in the `docs/` subdirectory.  View the
-documentation at
-`http://URL_OF_MEDIAWIKI/extensions/VisualEditor/docs/`
-(for example, ).
-
-Note that `jsduck` doesn't support browsing vis the `file:` protocol.
-
-## VisualEditor Code Guidelines
-
-We inherit the code structure (about whitespace, naming and comments) 
conventions
-from MediaWiki. See [Manual:Coding 
conventions/JavaScript](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript)
-on mediawiki.org.
-
-Git commit messages should follow the conventions described in
-.
-
-### Documentation comments
-
-* End sentences in a full stop.
-* Continue sentences belonging to an annotation on the next line, indented 
with an
-  additional space.
-* Types in documentation comments should be separated by a pipe character. Use 
types
-  that are listed in the Types section of this document, otherwise use the 
identifier
-  (full path from the global scope) of the constructor function (e.g. 
`{ve.dm.BranchNode}`).
-
-### Annotations
-
-We use the

[MediaWiki-commits] [Gerrit] CONTRIBUTING: Refer to MediaWiki conventions for jsduck - change (VisualEditor/VisualEditor)

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

Change subject: CONTRIBUTING: Refer to MediaWiki conventions for jsduck
..


CONTRIBUTING: Refer to MediaWiki conventions for jsduck

Except for our custom annotations (hereafter called "tags" for
consistency with upstream jsduck and MediaWiki core), which are
still listed here.

Change-Id: If8b9339b075ca5367fc836252a68c276339d1099
---
M CONTRIBUTING.md
1 file changed, 12 insertions(+), 49 deletions(-)

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



diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3d0da4c..194f852 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -90,63 +90,26 @@
 
 ### Documentation comments
 
-* End sentences in a full stop.
-* Continue sentences belonging to an annotation on the next line, indented 
with an
-  additional space.
-* Types in documentation comments should be separated by a pipe character. Use 
types
-  that are listed in the Types section of this document, otherwise use the 
identifier
-  (full path from the global scope) of the constructor function (e.g. 
`{ve.dm.BranchNode}`).
+In addition to the [MediaWiki conventions for 
JSDuck](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Documentation):
 
-### Annotations
+We have the following custom tags:
 
-We use the following annotations. They should be used in the order as they are 
described
-here, for consistency. See 
[JSDuck/Tags](https://github.com/senchalabs/jsduck/wiki/Tags) for more 
elaborate documentation.
+* @until Text: Optional text.
+* @source Text
+* @context {Type} Optional text.
+* @fires name
 
-* @class Name (optional, guessed)
-* @abstract
-* @extends ClassName
-* @mixins ClassName
-* @constructor
-* @private
-* @static
-* @method name (optional, guessed)
-* @template
-* @property name (optional, guessed)
+They should be used in the order as they are described here. Here's a slightly 
more complete list
+indicating their order between the standard tags.
+
+* @property
 * @until Text: Optional text.
 * @source Text
 * @context {Type} Optional text.
 * @inheritable
-* @param {Type} name Optional text.
+* @param
 * @fires name
-* @returns {Type} Optional text.
-* @chainable
-* @throws {Type}
-
-### Types
-
-Special values:
-* undefined
-* null
-* this
-
-Primitive types:
-* boolean
-* number
-* string
-
-Built-in classes:
-* Array
-* Date
-* Function
-* RegExp
-* Object
-
-Browser classes:
-* HTMLElement
-
-jQuery classes:
-* jQuery
-* jQuery.Event
+* @returns
 
 ## Add a new javascript class
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8b9339b075ca5367fc836252a68c276339d1099
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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] CONTRIBUTING: Refer to VisualEditor contribution guidelines - change (mediawiki...VisualEditor)

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

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

Change subject: CONTRIBUTING: Refer to VisualEditor contribution guidelines
..

CONTRIBUTING: Refer to VisualEditor contribution guidelines

Except for the part about running QUnit tests within MediaWiki.

Change-Id: I98db2aff467a384d89bb3a84e3d65d56bde416de
---
M CONTRIBUTING.md
1 file changed, 6 insertions(+), 163 deletions(-)


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

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 25f8d0f..c1324d2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,44 +2,17 @@
 
 Thank you for helping us develop VisualEditor!
 
-This document describes how to report bugs, set up your development
-environment, run tests, and build documentation. It also provides the coding
-conventions we use in the project.
+We inherit the contribution guidelines from VisualEditor core. Be sure to read 
the
+[Contribution 
guidelines](https://github.com/wikimedia/VisualEditor/blob/master/CONTRIBUTING.md#file)
 =
+in the VisualEditor repository.
 
-## Bug reports
-
-Please report bugs to 
[bugzilla.wikimedia.org](https://bugzilla.wikimedia.org/enter_bug.cgi?product=VisualEditor&component=General)
-using the `VisualEditor` product.  Feel free to use the `General`
-component if you don't know where else your bug might belong. Don't
-worry about specifying version, severity, hardware, or OS.
 
 ## Running tests
 
-VisualEditor's build scripts use the [Grunt](http://gruntjs.com/) task runner.
-To install it make sure you have [node and npm](http://nodejs.org/download/)
-installed, then run:
+The VisualEditor plugins for MediaWiki can be tested within your MediaWiki 
install.
 
-```sh
-# Install Grunt command-line utility
-$ npm install -g grunt-cli
-
-# Install VisualEditor's dev dependencies
-$ npm install
-```
-
-To run the tests, use:
-```sh
-$ grunt test
-```
-
-For other grunt tasks, see:
-```sh
-$ grunt --help
-```
-
-To run the tests in a web browser, make sure your MediaWiki install is
-[configured](https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing) to
-allow running of tests. Set in `LocalSettings.php`:
+[Configure your 
wiki](https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing) to
+allow running of tests. In `LocalSettings.php`, set:
 ```php
 // https://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing
 $wgEnableJavaScriptTest = true;
@@ -47,133 +20,3 @@
 
 Then open `http://URL_OF_MEDIAWIKI/index.php/Special:JavaScriptTest/qunit`
 (for example, ).
-
-## Building documentation
-
-VisualEditor uses [JSDuck](https://github.com/senchalabs/jsduck) to process
-documentation comments embedded in the code.  To build the documentation, you
-will need `ruby`, `gem`, and `jsduck` installed.
-
-### Installing ruby and gem
-
-You're mostly on your own here, but we can give some hints for Mac OS X.
-
-# Installing Gem in Mac OS X
-Ruby ships with OSX but may be outdated. Use 
[Homebrew](http://mxcl.github.com/homebrew/):
-```sh
-$ brew install ruby
-```
-
-If you've never used `gem` before, don't forget to add the gem's bin to your
-`PATH` ([howto](http://stackoverflow.com/a/14138490/319266)).
-
-### Installing jsduck
-
-Once you have gem, installing [JSDuck](https://github.com/senchalabs/jsduck) 
is easy:
-```sh
-$ gem install --user-install jsduck
-```
-
-### Running jsduck
-
-Creating the documentation is easy:
-```sh
-$ cd VisualEditor
-$ .docs/generate.sh
-```
-
-You may need to set `MW_INSTALL_PATH` in your environment to the location of
-your mediawiki installation if VisualEditor is not checked out directly in the
-mediawiki extensions folder (for example, if you're using a symlink).
-
-The generated documentation is in the `docs/` subdirectory.  View the
-documentation at
-`http://URL_OF_MEDIAWIKI/extensions/VisualEditor/docs/`
-(for example, ).
-
-Note that `jsduck` doesn't support browsing vis the `file:` protocol.
-
-## VisualEditor Code Guidelines
-
-We inherit the code structure (about whitespace, naming and comments) 
conventions
-from MediaWiki. See [Manual:Coding 
conventions/JavaScript](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript)
-on mediawiki.org.
-
-Git commit messages should follow the conventions described in
-.
-
-### Documentation comments
-
-* End sentences in a full stop.
-* Continue sentences belonging to an annotation on the next line, indented 
with an
-  additional space.
-* Types in documentation comments should be separated by a pipe character. Use 
types
-  that are listed in the Types section of this document, otherwise use the 
identifier
-  (full path from the global scope) of the constructor function (e.g. 
`{ve.dm.BranchNod

[MediaWiki-commits] [Gerrit] CONTRIBUTING: Refer to MediaWiki conventions for jsduck - change (VisualEditor/VisualEditor)

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

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

Change subject: CONTRIBUTING: Refer to MediaWiki conventions for jsduck
..

CONTRIBUTING: Refer to MediaWiki conventions for jsduck

Except for our custom annotations (hereafter called "tags" for
consistency with upstream jsduck and MediaWiki core), which are
still listed here.

Change-Id: If8b9339b075ca5367fc836252a68c276339d1099
---
M CONTRIBUTING.md
1 file changed, 12 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/76/114676/1

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3d0da4c..194f852 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -90,63 +90,26 @@
 
 ### Documentation comments
 
-* End sentences in a full stop.
-* Continue sentences belonging to an annotation on the next line, indented 
with an
-  additional space.
-* Types in documentation comments should be separated by a pipe character. Use 
types
-  that are listed in the Types section of this document, otherwise use the 
identifier
-  (full path from the global scope) of the constructor function (e.g. 
`{ve.dm.BranchNode}`).
+In addition to the [MediaWiki conventions for 
JSDuck](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Documentation):
 
-### Annotations
+We have the following custom tags:
 
-We use the following annotations. They should be used in the order as they are 
described
-here, for consistency. See 
[JSDuck/Tags](https://github.com/senchalabs/jsduck/wiki/Tags) for more 
elaborate documentation.
+* @until Text: Optional text.
+* @source Text
+* @context {Type} Optional text.
+* @fires name
 
-* @class Name (optional, guessed)
-* @abstract
-* @extends ClassName
-* @mixins ClassName
-* @constructor
-* @private
-* @static
-* @method name (optional, guessed)
-* @template
-* @property name (optional, guessed)
+They should be used in the order as they are described here. Here's a slightly 
more complete list
+indicating their order between the standard tags.
+
+* @property
 * @until Text: Optional text.
 * @source Text
 * @context {Type} Optional text.
 * @inheritable
-* @param {Type} name Optional text.
+* @param
 * @fires name
-* @returns {Type} Optional text.
-* @chainable
-* @throws {Type}
-
-### Types
-
-Special values:
-* undefined
-* null
-* this
-
-Primitive types:
-* boolean
-* number
-* string
-
-Built-in classes:
-* Array
-* Date
-* Function
-* RegExp
-* Object
-
-Browser classes:
-* HTMLElement
-
-jQuery classes:
-* jQuery
-* jQuery.Event
+* @returns
 
 ## Add a new javascript class
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8b9339b075ca5367fc836252a68c276339d1099
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Labs: manage idmapd.conf on instances - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Labs: manage idmapd.conf on instances
..


Labs: manage idmapd.conf on instances

This is required for NFSv4 auth.

Change-Id: I23b9dd619288fab6918939d99f1f59f518e7126a
---
M manifests/role/labs.pp
1 file changed, 15 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index cb57230..2568a73 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -35,7 +35,7 @@
 
 file { '/data/project':
 ensure => directory, owner => 'root', group => 'root', mode => 
'0755',
-require => File['/data'],
+require => File['/data', '/etc/idmapd.conf'],
 }
 mount { '/data/project':
 ensure => mounted, atboot => true, fstype => 'nfs', options => 
"rw,${nfs_opts}",
@@ -45,7 +45,7 @@
 
 file { '/data/scratch':
 ensure => directory, owner => 'root', group => 'root', mode => 
'0755',
-require => File['/data'],
+require => File['/data', '/etc/idmapd.conf'],
 }
 mount { '/data/scratch':
 ensure => mounted, atboot => true, fstype => 'nfs', options => 
"rw,${nfs_opts}",
@@ -85,6 +85,19 @@
 notify => Service['ssh'],
 }
 
+service { 'idmapd':
+ensure => running,
+subscribe => File['/etc/idmapd.conf'],
+}
+
+file { '/etc/idmapd.conf':
+ensure => present,
+owner => root,
+group => root,
+mode => 0444,
+source => 'puppet:///files/nfs/idmapd.conf',
+}
+
 } else {
 
 include gluster::client

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23b9dd619288fab6918939d99f1f59f518e7126a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Labs: manage idmapd.conf on instances - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Labs: manage idmapd.conf on instances
..

Labs: manage idmapd.conf on instances

This is required for NFSv4 auth.

Change-Id: I23b9dd619288fab6918939d99f1f59f518e7126a
---
M manifests/role/labs.pp
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/114675/1

diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index cb57230..019cf0d 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -35,7 +35,7 @@
 
 file { '/data/project':
 ensure => directory, owner => 'root', group => 'root', mode => 
'0755',
-require => File['/data'],
+require => File['/data', '/etc/idmapd.conf'],
 }
 mount { '/data/project':
 ensure => mounted, atboot => true, fstype => 'nfs', options => 
"rw,${nfs_opts}",
@@ -45,7 +45,7 @@
 
 file { '/data/scratch':
 ensure => directory, owner => 'root', group => 'root', mode => 
'0755',
-require => File['/data'],
+require => File['/data', '/etc/idmapd.conf'],
 }
 mount { '/data/scratch':
 ensure => mounted, atboot => true, fstype => 'nfs', options => 
"rw,${nfs_opts}",
@@ -85,6 +85,18 @@
 notify => Service['ssh'],
 }
 
+service { 'idmapd':
+ensure => running,
+subscribe => File['/etc/idmapd.conf'],
+}
+
+file { '/etc/idmapd.conf':
+ensure => present,
+owner => root,
+group => root,
+mode = 0444,
+}
+
 } else {
 
 include gluster::client

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

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

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


[MediaWiki-commits] [Gerrit] Add the whole eng MM team to the recipient list of e2e test ... - change (mediawiki/selenium)

2014-02-20 Thread Aarcos (Code Review)
Aarcos has uploaded a new change for review.

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

Change subject: Add the whole eng MM team to the recipient list of e2e test 
failures
..

Add the whole eng MM team to the recipient list of e2e test failures

The more eyes we have monitoring the status of the e2e tests,
the sooner we will detect problems and react accordingly.

Change-Id: Id61b4f064b6fd92e659a7fed297cb8874dbb623f
---
M docs/jobs.md
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/74/114674/1

diff --git a/docs/jobs.md b/docs/jobs.md
index 430d7aa..c30de58 100644
--- a/docs/jobs.md
+++ b/docs/jobs.md
@@ -145,7 +145,7 @@
 ## MultimediaViewer-en.wikipedia.beta.wmflabs.org-linux-firefox
 - Browser Label: firefox
 - bundle exec cucumber: --tags @en.wikipedia.beta.wmflabs.org
-- Recipients: aarcos.w...@gmail.com cmcma...@wikimedia.org jh...@wikimedia.org 
zfili...@wikimedia.org
+- Recipients: aarcos.w...@gmail.com gdu...@wikimedia.org gti...@wikimedia.org 
mholmqu...@wikimedia.org cmcma...@wikimedia.org jh...@wikimedia.org 
zfili...@wikimedia.org
 - MediaWiki URL: en.wikipedia.beta.wmflabs.org
 - Repository URL: MultimediaViewer
 - MediaWiki user: Selenium_user

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id61b4f064b6fd92e659a7fed297cb8874dbb623f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Aarcos 

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


[MediaWiki-commits] [Gerrit] Add generic command argument generation function - change (mediawiki...scap)

2014-02-20 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Add generic command argument generation function
..

Add generic command argument generation function

Add scap.utils.cmd_args to centralize the logic needed to create a safe
command description wiht optional runtime environment modifications.
This lays the ground work for moving command execution from dsh to our
scap.ssh module.

Change-Id: If7f583dcdf712fb001f07b639d79de7c2b6fce0e
---
M scap/utils.py
1 file changed, 49 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap 
refs/changes/73/114673/1

diff --git a/scap/utils.py b/scap/utils.py
index 3bf1b56..744f21c 100644
--- a/scap/utils.py
+++ b/scap/utils.py
@@ -13,20 +13,21 @@
 import pipes
 import random
 import re
+import shlex
 import socket
 import struct
 import subprocess
 
 
 def shell_map(mapping):
-"""Convert a map to a string of space-separated KEY=VALUE pairs.
+"""Convert a dict to a list of KEY=VALUE pairs.
 
 >>> shell_map({'a':'b'})
-'a=b'
+['a=b']
 >>> shell_map({'a':'1', 'b':'2 or 3'})
-"a=1 b='2 or 3'"
+['a=1', "b='2 or 3'"]
 """
-return ' '.join('%s=%s' % (k, pipes.quote(v)) for k, v in mapping.items())
+return ['%s=%s' % (k, pipes.quote(v)) for k, v in mapping.items()]
 
 
 def read_dsh_hosts_file(path):
@@ -85,15 +86,54 @@
 def dsh(command, group, exports=None):
 """Run a command on multiple hosts via DSH."""
 if exports:
-command = '%s %s' % (shell_map(exports), command)
+command = '%s %s' % (' '.join(shell_map(exports)), command)
 group_file = os.path.join('/etc/dsh/group', group)
 return subprocess.call(['/usr/bin/dsh', '-F40', '-cM', '-f',
 group_file, '-o', '-oSetupTimeout=10', '--',
 command.strip()])
 
 
+def cmd_args(command, exports=None):
+"""Build an argument list for running a command.
+
+If the command is a string rather than a sequence it will be split using
+``shlex.split`` as recommended by the ``subprocess`` documentation. If
+a dict of environment exports is provided it will be converted into
+VAR=VALUE statements and prepended to the command.
+
+>>> cmd_args('hello')
+['hello']
+>>> cmd_args(['hello'])
+['hello']
+>>> cmd_args(['hello'] + 'foo bar baz'.split())
+['hello', 'foo', 'bar', 'baz']
+>>> cmd_args('hello --who world')
+['hello', '--who', 'world']
+>>> cmd_args('echo "hello world"')
+['echo', 'hello world']
+>>> cmd_args(['scap-2', 'tin'], {'FOO':'bar baz'})
+["FOO='bar baz'", 'scap-2', 'tin']
+
+:param command: Command to execute
+:type command: str or sequence
+:param exports: Environment variables to export to the command
+:type exports: dict
+:returns: List of arguments suitable for use with subprocess methods
+"""
+args = []
+if exports:
+args.extend(shell_map(exports))
+if isinstance(command, basestring):
+command = shlex.split(command)
+args.extend(command)
+return args
+
+
 def sudo_args(command, user=None, exports=None):
 """Build an argument list for running a command under sudo.
+
+The command and optional exports will be processed by :func:`cmd_args` and
+then used as the object of a ``sudo`` invocation.
 
 >>> sudo_args('hello')
 ['sudo', 'hello']
@@ -105,24 +145,19 @@
 ['sudo', '-u', 'wmdeploy', "FOO='bar baz'", 'scap-2', 'tin']
 
 :param command: Command to execute
-:type command: str or list
+:type command: str or sequence
 :param user: User to execute as
 :type user: str
 :param exports: Environment variables to export to the command
 :type exports: dict
 :returns: List of arguments suitable for use with subprocess methods
+
+.. seealso:: :func:`cmd_args`
 """
 args = ['sudo']
 if user is not None:
 args.extend(['-u', user])
-if exports is not None:
-args.extend('%s=%s' % (k, pipes.quote(v)) for k, v in exports.items())
-if isinstance(command, basestring):
-func = args.append
-command = command.strip()
-else:
-func = args.extend
-func(command)
+args.extend(cmd_args(command, exports))
 return args
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7f583dcdf712fb001f07b639d79de7c2b6fce0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] Grand Unified Documentation Patch Jr. - change (mediawiki...MultimediaViewer)

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

Change subject: Grand Unified Documentation Patch Jr.
..


Grand Unified Documentation Patch Jr.

The GRUDP is dead, long live the GRUDPJ

Change-Id: I71a22c3aa42b2eb799ce8104159e8c7e56fe13ae
---
M resources/mmv/model/mmv.model.TaskQueue.js
M resources/mmv/model/mmv.model.Thumbnail.js
M resources/mmv/model/mmv.model.ThumbnailWidth.js
M resources/mmv/model/mmv.model.User.js
M resources/mmv/provider/mmv.provider.Api.js
M resources/mmv/provider/mmv.provider.FileRepoInfo.js
M resources/mmv/provider/mmv.provider.GlobalUsage.js
M resources/mmv/provider/mmv.provider.Image.js
M resources/mmv/provider/mmv.provider.ImageInfo.js
M resources/mmv/provider/mmv.provider.ImageUsage.js
M resources/mmv/provider/mmv.provider.ThumbnailInfo.js
M resources/mmv/provider/mmv.provider.UserInfo.js
M resources/mmv/ui/mmv.ui.buttons.js
M resources/mmv/ui/mmv.ui.categories.js
M resources/mmv/ui/mmv.ui.description.js
M resources/mmv/ui/mmv.ui.fileUsage.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
17 files changed, 44 insertions(+), 75 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mmv/model/mmv.model.TaskQueue.js 
b/resources/mmv/model/mmv.model.TaskQueue.js
index fae6101..4717cb3 100644
--- a/resources/mmv/model/mmv.model.TaskQueue.js
+++ b/resources/mmv/model/mmv.model.TaskQueue.js
@@ -19,11 +19,9 @@
var tqp;
 
/**
-* @class mw.mmv.model.TaskQueue
-*
 * A queue which holds a list of tasks (functions). The tasks will be 
executed in order,
 * each starting when the previous one has finished (or failed).
-*
+* @class mw.mmv.model.TaskQueue
 * @constructor
 */
function TaskQueue() {
@@ -37,14 +35,14 @@
/**
 * State of the task queue (running, finished etc)
 * @protected
-* @type {mw.mmv.model.TaskQueue.State}
+* @property {mw.mmv.model.TaskQueue.State}
 */
this.state = TaskQueue.State.NOT_STARTED;
 
/**
 * A deferred which shows the state of the queue.
 * @protected
-* @type {jQuery.Deferred}
+* @property {jQuery.Deferred}
 */
this.deferred = $.Deferred();
}
diff --git a/resources/mmv/model/mmv.model.Thumbnail.js 
b/resources/mmv/model/mmv.model.Thumbnail.js
index b1c8b49..1345b39 100644
--- a/resources/mmv/model/mmv.model.Thumbnail.js
+++ b/resources/mmv/model/mmv.model.Thumbnail.js
@@ -17,8 +17,8 @@
 
 ( function ( mw ) {
/**
-* @class mw.mmv.model.Thumbnail
 * Represents information about an image thumbnail
+* @class mw.mmv.model.Thumbnail
 * @constructor
 * @param {string} url URL to the thumbnail
 * @param {number} width Width in pixels
diff --git a/resources/mmv/model/mmv.model.ThumbnailWidth.js 
b/resources/mmv/model/mmv.model.ThumbnailWidth.js
index 3a0fd41..5fd8d9d 100644
--- a/resources/mmv/model/mmv.model.ThumbnailWidth.js
+++ b/resources/mmv/model/mmv.model.ThumbnailWidth.js
@@ -16,14 +16,13 @@
  */
 
 /**
- * @class mw.mmv.model.ThumbnailWidth
  * Represents image width information.
  *
  * To utilize caching as much as possible, we use images which are displayed 
at a slightly
  * different size than their screen size. The ThumbnailWidth model stores the 
various types of
  * sizes and helps avoiding accidental incompatible assignments. (Think of it 
as a slightly
  * overcomplicated Hungarian notation :)
- *
+ * @class mw.mmv.model.ThumbnailWidth
  * @constructor
  * @param {number} css width in CSS pixels
  * @param {number} screen width in screen pixels
diff --git a/resources/mmv/model/mmv.model.User.js 
b/resources/mmv/model/mmv.model.User.js
index b0388c5..a57b2a0 100644
--- a/resources/mmv/model/mmv.model.User.js
+++ b/resources/mmv/model/mmv.model.User.js
@@ -17,11 +17,11 @@
 
 ( function ( mw ) {
/**
+* Represents information about a MediaWiki user.
 * @class mw.mmv.model.User
-* Represents information about an image thumbnail
 * @constructor
 * @param {string} username
-* @param {mw.mmv.model.User.Gender} [gender] defaults to unknown
+* @param {mw.mmv.model.User.Gender} [gender='unknown']
 */
function User(
username,
@@ -44,7 +44,7 @@
}
 
/**
-*  username The user's name, without namespace prefix, in 
human-readable format
+*  The user's name, without namespace prefix, in 
human-readable format
 *  ("John Doe", not "John_Doe")
 *  @property {string}
 */
diff --git a/resources/mmv/provider/mmv.provider.Api.js 
b/resources/mmv/provider/mmv.provider.A

[MediaWiki-commits] [Gerrit] Minor documentation tweaks - change (mediawiki...MultimediaViewer)

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

Change subject: Minor documentation tweaks
..


Minor documentation tweaks

Change-Id: I8b513ceab06ddeb47261949061b777105cfa7b65
---
M resources/mmv/mmv.api.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mmv/mmv.api.js b/resources/mmv/mmv.api.js
index 52476d4..6cdff0a 100755
--- a/resources/mmv/mmv.api.js
+++ b/resources/mmv/mmv.api.js
@@ -41,7 +41,7 @@
 * @override
 * @param {Object} parameters
 * @param {Object} [ajaxOptions]
-* @returns {jQuery.Promise} Done: API response data. Fail: Error code.
+* @returns {jQuery.Promise.} Done: API response data. 
Fail: Error code.
 */
Api.prototype.ajax = function ( parameters, ajaxOptions ) {
var start = $.now(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b513ceab06ddeb47261949061b777105cfa7b65
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixing font size in beta - change (mediawiki...MobileFrontend)

2014-02-20 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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

Change subject: Fixing font size in beta
..

Fixing font size in beta

We have to use !important on the font-size of the html element
since the html element cannot be targeted to stable or beta (as it
is outside the body element). Thus we have to override the rule in
typography.less.

Bug: 61291
Change-Id: I6c52e55729bc2c1eedf00ddb6d2c4a39414e5148
---
M less/common/typographyNew.less
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/less/common/typographyNew.less b/less/common/typographyNew.less
index 7d52a50..f47c754 100644
--- a/less/common/typographyNew.less
+++ b/less/common/typographyNew.less
@@ -2,8 +2,11 @@
 @import "minerva.mixins";
 
 html {
-   // When moving to stable, change @fontScalingFactor to 1.0
-   font-size: 100%;
+   // When moving to stable, change @fontScalingFactor to 1.0.
+   // We have to use !important here since the html element cannot be 
targeted to stable
+   // or beta (as it is outside the body element). Thus we have to 
override the rule in
+   // typography.less.
+   font-size: 100% !important;
 }
 
 .beta, .alpha {

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

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

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


[MediaWiki-commits] [Gerrit] Minor documentation tweaks - change (mediawiki...MultimediaViewer)

2014-02-20 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Minor documentation tweaks
..

Minor documentation tweaks

Change-Id: I8b513ceab06ddeb47261949061b777105cfa7b65
---
M resources/mmv/mmv.api.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/resources/mmv/mmv.api.js b/resources/mmv/mmv.api.js
index 52476d4..d1eb899 100755
--- a/resources/mmv/mmv.api.js
+++ b/resources/mmv/mmv.api.js
@@ -22,7 +22,7 @@
 * @extends mw.Api
 * @constructor
 * @param {string} type The type of the requests to be made through 
this API.
-* @param {Object} options See mw.Api#defaultOptions
+* @param {Object} options See {@link mw.Api#defaultOptions}
 */
function Api( type, options ) {
mw.Api.call( this, options );
@@ -41,7 +41,7 @@
 * @override
 * @param {Object} parameters
 * @param {Object} [ajaxOptions]
-* @returns {jQuery.Promise} Done: API response data. Fail: Error code.
+* @returns {jQuery.Promise.} Done: API response data. 
Fail: Error code.
 */
Api.prototype.ajax = function ( parameters, ajaxOptions ) {
var start = $.now(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b513ceab06ddeb47261949061b777105cfa7b65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] Revert "Reenable redis for keystone in eqiad" - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Revert "Reenable redis for keystone in eqiad"
..


Revert "Reenable redis for keystone in eqiad"

This reverts commit f3fce1d7588fca83d0a9c4d166ba6610a695682a.

While it works for Wikitech, it breaks glance.  Disabling for now.

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

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



diff --git a/manifests/role/keystone.pp b/manifests/role/keystone.pp
index 380ecdf..6a0ab07 100644
--- a/manifests/role/keystone.pp
+++ b/manifests/role/keystone.pp
@@ -57,7 +57,7 @@
"labs" => "127.0.0.1",
},
token_driver => $realm ? {
-   'production' => 'redis',
+   'production' => 'sql',
'labs'   => 'redis',
},
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3316f653d7b7b4fdf314145db609e76b564dcbd1
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove height: auto !important styles for .content img - change (mediawiki...MobileFrontend)

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

Change subject: Remove height: auto !important styles for .content img
..


Remove height: auto !important styles for .content img

Fixes shields and phantom overlays in mobile VE.

These rules were moved from #content img in 8d0e4aa7. They do not seem
to affect Special:Uploads or Special:UserProfile in any way.

Unfortunately, I don't know what Nicole Sullivan says because of
[citation needed]. There are no other comments specifying what exactly
height: auto !important was for, so it seems like a good idea to remove
it and bring it back somewhere else if necessary.

Bug: 60841

Change-Id: I2157134db93c9cf87bcca76135a34201ca8fe3c5
---
M less/common/common.less
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/less/common/common.less b/less/common/common.less
index 57ef303..bbf530f 100644
--- a/less/common/common.less
+++ b/less/common/common.less
@@ -274,12 +274,10 @@
}
}
 
-   // Includes images on the profile and uploads special pages
img {
-   // FIXME [Inline Styles]: Important ensures we can overwrite 
any inline styles
-   // It's a leaf node so Nicole Sullivan says its okay
+   // make sure that images in articles don't cause a horizontal 
scrollbar
+   // on small screens
max-width: 100% !important;
-   height: auto !important;
}
 
ul {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2157134db93c9cf87bcca76135a34201ca8fe3c5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] jsduck: Have a default --meta-tags setting - change (VisualEditor/VisualEditor)

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

Change subject: jsduck: Have a default --meta-tags setting
..


jsduck: Have a default --meta-tags setting

Our custom bin/generateDocs will override accordingly, but
for production we want to default to jsduck 4. That way
we can use the generic macro instead of a custom job
to run the repo's bin/generateDocs.

We need that for mwext-VisualEditor because that also
needs other overrides, but for VisualEditor standalone
we can do plain jsduck.

Change-Id: I09507b048f1f487e3067853de959a56ab4d08723
---
M .docs/config.json
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/.docs/config.json b/.docs/config.json
index 49c21a2..ca66450 100644
--- a/.docs/config.json
+++ b/.docs/config.json
@@ -1,6 +1,7 @@
 {
"--title": "VisualEditor Code Documentation",
"--categories": "../.docs/categories.json",
+   "--meta-tags": "./MetaTags.rb",
"--eg-iframe": "../.docs/eg-iframe.html",
"--warnings": ["-no_doc"],
"--builtin-classes": true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09507b048f1f487e3067853de959a56ab4d08723
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Robmoen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "Reenable redis for keystone in eqiad" - change (operations/puppet)

2014-02-20 Thread coren (Code Review)
coren has uploaded a new change for review.

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

Change subject: Revert "Reenable redis for keystone in eqiad"
..

Revert "Reenable redis for keystone in eqiad"

This reverts commit f3fce1d7588fca83d0a9c4d166ba6610a695682a.

While it works for Wikitech, it breaks glance.  Disabling for now.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/114670/1

diff --git a/manifests/role/keystone.pp b/manifests/role/keystone.pp
index 380ecdf..6a0ab07 100644
--- a/manifests/role/keystone.pp
+++ b/manifests/role/keystone.pp
@@ -57,7 +57,7 @@
"labs" => "127.0.0.1",
},
token_driver => $realm ? {
-   'production' => 'redis',
+   'production' => 'sql',
'labs'   => 'redis',
},
}

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

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

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


[MediaWiki-commits] [Gerrit] Update Flow in 1.23wmf15 - change (mediawiki/core)

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

Change subject: Update Flow in 1.23wmf15
..


Update Flow in 1.23wmf15

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

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



diff --git a/extensions/Flow b/extensions/Flow
index 8c66a7e..f57738d 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit 8c66a7e27dfb18128dc979b55cd47b28e133e2ab
+Subproject commit f57738d822a6480cdca8c63e67120f1744d9ee5c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifdee1240be5769fdb9b9c79b2161267d8b45e73a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
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 Flow in 1.23wmf14 - change (mediawiki/core)

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

Change subject: Update Flow in 1.23wmf14
..


Update Flow in 1.23wmf14

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

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



diff --git a/extensions/Flow b/extensions/Flow
index a4fffd2..9909b8c 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit a4fffd21727c8a303e7340793445ca754b0c1054
+Subproject commit 9909b8ce809af0dc2e71f774f41980ea1311d21e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2aff3a73ad8d6fc584fb40c2253fc80c21920f64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
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 Flow in 1.23wmf15 - change (mediawiki/core)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Update Flow in 1.23wmf15
..

Update Flow in 1.23wmf15

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/114669/1

diff --git a/extensions/Flow b/extensions/Flow
index 8c66a7e..f57738d 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit 8c66a7e27dfb18128dc979b55cd47b28e133e2ab
+Subproject commit f57738d822a6480cdca8c63e67120f1744d9ee5c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdee1240be5769fdb9b9c79b2161267d8b45e73a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Update Flow in 1.23wmf14 - change (mediawiki/core)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Update Flow in 1.23wmf14
..

Update Flow in 1.23wmf14

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


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

diff --git a/extensions/Flow b/extensions/Flow
index a4fffd2..9909b8c 16
--- a/extensions/Flow
+++ b/extensions/Flow
-Subproject commit a4fffd21727c8a303e7340793445ca754b0c1054
+Subproject commit 9909b8ce809af0dc2e71f774f41980ea1311d21e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2aff3a73ad8d6fc584fb40c2253fc80c21920f64
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Show most recent items for watchlist but recentchanges - change (mediawiki...Flow)

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

Change subject: Show most recent items for watchlist but recentchanges
..


Show most recent items for watchlist but recentchanges

(cherry picked from commit 82ae7c0018633e364514a4ceed2783c691cb9d94)

Change-Id: Ia87d94d43034e54317eac5e352062afe7c8827fa
---
M Hooks.php
M includes/RecentChanges/Formatter.php
2 files changed, 30 insertions(+), 4 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 896de24..a576534 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -101,8 +101,15 @@
return true;
}
 
-   $line = Container::get( 'recentchanges.formatter' )->format( 
$changesList, $rc );
-
+   try {
+   $formatter = Container::get( 'recentchanges.formatter' 
);
+   $watchlist = $formatter->isWatchlist( $classes );
+   $line = $formatter->format( $changesList, $rc, 
$watchlist );
+   } catch ( FlowException $e ) {
+   wfWarn( __METHOD__ . ': Exception formatting rc ' . 
$rc->getAttribute( 'rc_id' ) . ' ' . $e );
+   \MWExceptionHandler::logException( $e );
+   return false;
+   }
if ( $line === false ) {
return false;
}
diff --git a/includes/RecentChanges/Formatter.php 
b/includes/RecentChanges/Formatter.php
index 7f34473..2d998c7 100644
--- a/includes/RecentChanges/Formatter.php
+++ b/includes/RecentChanges/Formatter.php
@@ -16,7 +16,13 @@
 */
protected $displayStatus = array();
 
-   public function format( ChangesList $cl, RecentChange $rc ) {
+   /**
+* @param ChangesList $cl
+* @param RecentChange $rc
+* @param bool $watchlist
+* @return string|bool Output line, or false on failure
+*/
+   public function format( ChangesList $cl, RecentChange $rc, $watchlist = 
false ) {
$params = unserialize( $rc->getAttribute( 'rc_params' ) );
$changeData = $params['flow-workflow-change'];
 
@@ -58,7 +64,7 @@
return false;
}
 
-   if ( $this->hideRecord( $revision, $changeData ) ) {
+   if ( $watchlist && $this->hideRecord( $revision, $changeData ) 
) {
return false;
}
 
@@ -147,6 +153,19 @@
return false;
}
 
+   // @todo:
+   // This is a temporary fix.
+   // We will add a param to core hook to determine if this is watchlist 
page
+   // Or add a method to the ChangesList to test for its $watchlist 
property
+   public function isWatchList( array $classes ) {
+   foreach ( $classes as $class ) {
+   if ( substr( $class, 0, 10 ) === 'watchlist-' ) {
+   return true;
+   }
+   }
+   return false;
+   }
+
protected function changeSeparator() {
return ' . . ';
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia87d94d43034e54317eac5e352062afe7c8827fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Bsitu 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Show most recent items for watchlist but recentchanges - change (mediawiki...Flow)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Show most recent items for watchlist but recentchanges
..

Show most recent items for watchlist but recentchanges

(cherry picked from commit 82ae7c0018633e364514a4ceed2783c691cb9d94)

Change-Id: Ia87d94d43034e54317eac5e352062afe7c8827fa
---
M Hooks.php
M includes/RecentChanges/Formatter.php
2 files changed, 30 insertions(+), 4 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index 896de24..a576534 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -101,8 +101,15 @@
return true;
}
 
-   $line = Container::get( 'recentchanges.formatter' )->format( 
$changesList, $rc );
-
+   try {
+   $formatter = Container::get( 'recentchanges.formatter' 
);
+   $watchlist = $formatter->isWatchlist( $classes );
+   $line = $formatter->format( $changesList, $rc, 
$watchlist );
+   } catch ( FlowException $e ) {
+   wfWarn( __METHOD__ . ': Exception formatting rc ' . 
$rc->getAttribute( 'rc_id' ) . ' ' . $e );
+   \MWExceptionHandler::logException( $e );
+   return false;
+   }
if ( $line === false ) {
return false;
}
diff --git a/includes/RecentChanges/Formatter.php 
b/includes/RecentChanges/Formatter.php
index 7f34473..2d998c7 100644
--- a/includes/RecentChanges/Formatter.php
+++ b/includes/RecentChanges/Formatter.php
@@ -16,7 +16,13 @@
 */
protected $displayStatus = array();
 
-   public function format( ChangesList $cl, RecentChange $rc ) {
+   /**
+* @param ChangesList $cl
+* @param RecentChange $rc
+* @param bool $watchlist
+* @return string|bool Output line, or false on failure
+*/
+   public function format( ChangesList $cl, RecentChange $rc, $watchlist = 
false ) {
$params = unserialize( $rc->getAttribute( 'rc_params' ) );
$changeData = $params['flow-workflow-change'];
 
@@ -58,7 +64,7 @@
return false;
}
 
-   if ( $this->hideRecord( $revision, $changeData ) ) {
+   if ( $watchlist && $this->hideRecord( $revision, $changeData ) 
) {
return false;
}
 
@@ -147,6 +153,19 @@
return false;
}
 
+   // @todo:
+   // This is a temporary fix.
+   // We will add a param to core hook to determine if this is watchlist 
page
+   // Or add a method to the ChangesList to test for its $watchlist 
property
+   public function isWatchList( array $classes ) {
+   foreach ( $classes as $class ) {
+   if ( substr( $class, 0, 10 ) === 'watchlist-' ) {
+   return true;
+   }
+   }
+   return false;
+   }
+
protected function changeSeparator() {
return ' . . ';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia87d94d43034e54317eac5e352062afe7c8827fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Bsitu 

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


[MediaWiki-commits] [Gerrit] Show most recent items for watchlist but recentchanges - change (mediawiki...Flow)

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

Change subject: Show most recent items for watchlist but recentchanges
..


Show most recent items for watchlist but recentchanges

Change-Id: Id4be8a966d1b569308310c34f38f59166c0b0121
(cherry picked from commit 82ae7c0018633e364514a4ceed2783c691cb9d94)
---
M Hooks.php
M includes/Formatter/RecentChanges.php
2 files changed, 29 insertions(+), 5 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 3ea60e0..27fef73 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -103,7 +103,9 @@
}
 
try {
-   $line = Container::get( 'recentchanges.formatter' 
)->format( $changesList, $rc );
+   $formatter = Container::get( 'recentchanges.formatter' 
);
+   $watchlist = $formatter->isWatchlist( $classes );
+   $line = $formatter->format( $changesList, $rc, 
$watchlist );
} catch ( FlowException $e ) {
wfWarn( __METHOD__ . ': Exception formatting rc ' . 
$rc->getAttribute( 'rc_id' ) . ' ' . $e );
\MWExceptionHandler::logException( $e );
diff --git a/includes/Formatter/RecentChanges.php 
b/includes/Formatter/RecentChanges.php
index 83cfe80..2081c31 100644
--- a/includes/Formatter/RecentChanges.php
+++ b/includes/Formatter/RecentChanges.php
@@ -14,7 +14,13 @@
 */
protected $displayStatus = array();
 
-   public function format( ChangesList $cl, RecentChange $rc ) {
+   /**
+* @param ChangesList $cl
+* @param RecentChange $rc
+* @param bool $watchlist
+* @return string|bool Output line, or false on failure
+*/
+   public function format( ChangesList $cl, RecentChange $rc, $watchlist = 
false ) {
$params = unserialize( $rc->getAttribute( 'rc_params' ) );
$changeData = $params['flow-workflow-change'];
 
@@ -57,9 +63,12 @@
return false;
}
 
-   if ( $this->hideRecord( $revision, $changeData )
-   || !$this->getPermissions( $user )->isRevisionAllowed( 
$revision, 'recentchanges' ) 
-   ) {
+   // Only show most recent items for watchlist
+   if ( $watchlist && $this->hideRecord( $revision, $changeData ) 
) {
+   return false;
+   }
+
+   if ( !$this->getPermissions( $user )->isRevisionAllowed( 
$revision, 'recentchanges' ) ) {
return false;
}
 
@@ -149,6 +158,19 @@
return false;
}
 
+   // @todo:
+   // This is a temporary fix.
+   // We will add a param to core hook to determine if this is watchlist 
page
+   // Or add a method to the ChangesList to test for its $watchlist 
property
+   public function isWatchList( array $classes ) {
+   foreach ( $classes as $class ) {
+   if ( substr( $class, 0, 10 ) === 'watchlist-' ) {
+   return true;
+   }
+   }
+   return false;
+   }
+
protected function changeSeparator() {
return ' . . ';
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4be8a966d1b569308310c34f38f59166c0b0121
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Bsitu 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] jsduck: Have a default --meta-tags setting - change (VisualEditor/VisualEditor)

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

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

Change subject: jsduck: Have a default --meta-tags setting
..

jsduck: Have a default --meta-tags setting

Our custom bin/generateDocs will override accordingly, but
for production we want to default to jsduck 4. That way
we can use the generic macro instead of a custom job
to run the repo's bin/generateDocs.

We need that for mwext-VisualEditor because that also
needs other overrides, but for VisualEditor standalone
we can do plain jsduck.

Change-Id: I09507b048f1f487e3067853de959a56ab4d08723
---
M .docs/config.json
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/.docs/config.json b/.docs/config.json
index 49c21a2..ca66450 100644
--- a/.docs/config.json
+++ b/.docs/config.json
@@ -1,6 +1,7 @@
 {
"--title": "VisualEditor Code Documentation",
"--categories": "../.docs/categories.json",
+   "--meta-tags": "./MetaTags.rb",
"--eg-iframe": "../.docs/eg-iframe.html",
"--warnings": ["-no_doc"],
"--builtin-classes": true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09507b048f1f487e3067853de959a56ab4d08723
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Show most recent items for watchlist but recentchanges - change (mediawiki...Flow)

2014-02-20 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Show most recent items for watchlist but recentchanges
..

Show most recent items for watchlist but recentchanges

Change-Id: Id4be8a966d1b569308310c34f38f59166c0b0121
(cherry picked from commit 82ae7c0018633e364514a4ceed2783c691cb9d94)
---
M Hooks.php
M includes/Formatter/RecentChanges.php
2 files changed, 29 insertions(+), 5 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index 3ea60e0..27fef73 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -103,7 +103,9 @@
}
 
try {
-   $line = Container::get( 'recentchanges.formatter' 
)->format( $changesList, $rc );
+   $formatter = Container::get( 'recentchanges.formatter' 
);
+   $watchlist = $formatter->isWatchlist( $classes );
+   $line = $formatter->format( $changesList, $rc, 
$watchlist );
} catch ( FlowException $e ) {
wfWarn( __METHOD__ . ': Exception formatting rc ' . 
$rc->getAttribute( 'rc_id' ) . ' ' . $e );
\MWExceptionHandler::logException( $e );
diff --git a/includes/Formatter/RecentChanges.php 
b/includes/Formatter/RecentChanges.php
index 83cfe80..2081c31 100644
--- a/includes/Formatter/RecentChanges.php
+++ b/includes/Formatter/RecentChanges.php
@@ -14,7 +14,13 @@
 */
protected $displayStatus = array();
 
-   public function format( ChangesList $cl, RecentChange $rc ) {
+   /**
+* @param ChangesList $cl
+* @param RecentChange $rc
+* @param bool $watchlist
+* @return string|bool Output line, or false on failure
+*/
+   public function format( ChangesList $cl, RecentChange $rc, $watchlist = 
false ) {
$params = unserialize( $rc->getAttribute( 'rc_params' ) );
$changeData = $params['flow-workflow-change'];
 
@@ -57,9 +63,12 @@
return false;
}
 
-   if ( $this->hideRecord( $revision, $changeData )
-   || !$this->getPermissions( $user )->isRevisionAllowed( 
$revision, 'recentchanges' ) 
-   ) {
+   // Only show most recent items for watchlist
+   if ( $watchlist && $this->hideRecord( $revision, $changeData ) 
) {
+   return false;
+   }
+
+   if ( !$this->getPermissions( $user )->isRevisionAllowed( 
$revision, 'recentchanges' ) ) {
return false;
}
 
@@ -149,6 +158,19 @@
return false;
}
 
+   // @todo:
+   // This is a temporary fix.
+   // We will add a param to core hook to determine if this is watchlist 
page
+   // Or add a method to the ChangesList to test for its $watchlist 
property
+   public function isWatchList( array $classes ) {
+   foreach ( $classes as $class ) {
+   if ( substr( $class, 0, 10 ) === 'watchlist-' ) {
+   return true;
+   }
+   }
+   return false;
+   }
+
protected function changeSeparator() {
return ' . . ';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4be8a966d1b569308310c34f38f59166c0b0121
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Bsitu 

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


[MediaWiki-commits] [Gerrit] Tampa is silly and should go away - change (operations/puppet)

2014-02-20 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Tampa is silly and should go away
..

Tampa is silly and should go away

Change-Id: Ia3203b4c66233564aa2c0315972bbd7b090db05c
---
M files/dsh/group/mediawiki-installation
1 file changed, 0 insertions(+), 198 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/114664/1

diff --git a/files/dsh/group/mediawiki-installation 
b/files/dsh/group/mediawiki-installation
index 47273c1..264a936 100644
--- a/files/dsh/group/mediawiki-installation
+++ b/files/dsh/group/mediawiki-installation
@@ -231,201 +231,3 @@
 mw1218
 mw1219
 mw1220
-
-mw1
-mw2
-mw3
-mw4
-mw5
-mw6
-mw7
-mw8
-mw9
-mw10
-mw11
-mw12
-mw13
-mw14
-mw15
-mw16
-mw17
-mw18
-mw19
-mw20
-mw21
-mw22
-mw23
-mw24
-mw25
-mw26
-mw27
-mw28
-mw29
-mw30
-mw31
-mw32
-mw33
-mw34
-mw35
-mw36
-mw37
-mw38
-mw39
-mw40
-mw41
-mw42
-mw43
-mw44
-mw45
-mw46
-mw47
-mw48
-mw49
-
-mw51
-mw52
-mw53
-mw54
-mw55
-mw56
-mw57
-mw58
-mw59
-mw60
-mw61
-mw62
-mw63
-mw64
-mw65
-mw66
-mw67
-mw68
-mw69
-mw70
-mw71
-mw72
-mw73
-mw74
-mw75
-mw76
-mw77
-mw78
-mw79
-mw80
-mw81
-mw82
-mw83
-mw84
-mw85
-mw86
-mw87
-mw88
-mw89
-mw90
-mw91
-mw92
-mw93
-mw94
-mw95
-mw96
-mw97
-mw98
-mw99
-mw100
-mw101
-mw102
-mw103
-mw104
-mw105
-mw106
-mw107
-mw108
-mw109
-
-mw111
-mw112
-mw113
-mw114
-mw115
-mw116
-mw117
-mw118
-mw119
-mw120
-mw121
-mw122
-mw123
-mw124
-mw125
-
-srv193
-srv235
-srv236
-srv237
-srv238
-srv239
-srv240
-srv241
-srv242
-srv243
-srv244
-srv245
-srv246
-srv247
-srv248
-srv249
-srv250
-srv251
-srv252
-srv253
-srv254
-srv255
-srv256
-srv257
-srv258
-srv259
-srv260
-srv261
-srv262
-srv263
-srv264
-srv265
-srv267
-srv268
-srv269
-srv270
-srv271
-srv272
-srv273
-srv274
-srv275
-srv276
-srv277
-srv279
-srv280
-srv282
-srv283
-srv284
-srv285
-srv286
-srv287
-srv288
-srv289
-srv290
-srv291
-srv292
-srv293
-srv294
-srv295
-srv296
-srv297
-srv298
-srv299
-srv300
-srv301
-snapshot1
-snapshot2
-snapshot3
-snapshot4
-tmh1
-tmh2

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Enable VisualEditor-jsduck" - change (integration/zuul-config)

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

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

Change subject: Revert "Enable VisualEditor-jsduck"
..

Revert "Enable VisualEditor-jsduck"

For some reason, Zuul is unable to comprehend jsduck's awesomeness.
They consistently go "VIsualEditor-jsduck: LOST".

This reverts commit 4605c44ffd845422ec8a50695fdba2a8adbf9538.

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


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

diff --git a/layout.yaml b/layout.yaml
index 24c6382..ef5aca8 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -3022,8 +3022,6 @@
 test:
   - VisualEditor-npm
   - VisualEditor-ruby1.9.3lint
-  - VisualEditor-jsduck
 gate-and-submit:
   - VisualEditor-npm
   - VisualEditor-ruby1.9.3lint
-  - VisualEditor-jsduck

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb280080791d5c253008cb8f24759a912eacd132
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Only run *-ruby1.9.3lint jobs when commit touches .rb files - change (integration/zuul-config)

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

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

Change subject: Only run *-ruby1.9.3lint jobs when commit touches .rb files
..

Only run *-ruby1.9.3lint jobs when commit touches .rb files

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


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

diff --git a/layout.yaml b/layout.yaml
index 24c6382..b3abb7e 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -316,11 +316,14 @@
 files:
  - '^.*\.erb$'
 
-  # puppet manifests
   - name: ^.*-pplint-HEAD$
 files:
  - '^.*\.pp$'
 
+  - name: '^.*-ruby1.9.3lint$'
+files:
+ - '^.*\.rb$'
+
   # Experiment for bug 48420
   - name: ^.*phpcs-lenient(-HEAD)?$
 voting: true

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37ce89455724ed15a756c1732de93cf3c1c7fcb2
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Only run *-ruby1.9.3lint jobs when commit touches .rb files - change (integration/zuul-config)

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

Change subject: Only run *-ruby1.9.3lint jobs when commit touches .rb files
..


Only run *-ruby1.9.3lint jobs when commit touches .rb files

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

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



diff --git a/layout.yaml b/layout.yaml
index 24c6382..b3abb7e 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -316,11 +316,14 @@
 files:
  - '^.*\.erb$'
 
-  # puppet manifests
   - name: ^.*-pplint-HEAD$
 files:
  - '^.*\.pp$'
 
+  - name: '^.*-ruby1.9.3lint$'
+files:
+ - '^.*\.rb$'
+
   # Experiment for bug 48420
   - name: ^.*phpcs-lenient(-HEAD)?$
 voting: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37ce89455724ed15a756c1732de93cf3c1c7fcb2
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
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] Make ApiCreateAccount return camelcase statuses - change (mediawiki/core)

2014-02-20 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Make ApiCreateAccount return camelcase statuses
..


Make ApiCreateAccount return camelcase statuses

Bug: 61663
Change-Id: I214d8eb7c9d49f55f49c5228c92806601c5499f6
(cherry picked from commit efcf0a3f61b5bcdf5f9f6f716fa732b6afb9336e)
---
M includes/api/ApiCreateAccount.php
M tests/phpunit/includes/api/ApiCreateAccountTest.php
2 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/includes/api/ApiCreateAccount.php 
b/includes/api/ApiCreateAccount.php
index 7727b28..be8286c 100644
--- a/includes/api/ApiCreateAccount.php
+++ b/includes/api/ApiCreateAccount.php
@@ -138,13 +138,13 @@
// since not having the correct token is part of the 
normal
// flow of events.
$result['token'] = LoginForm::getCreateaccountToken();
-   $result['result'] = 'needtoken';
+   $result['result'] = 'NeedToken';
} elseif ( !$status->isOK() ) {
// There was an error. Die now.
$this->dieStatus( $status );
} elseif ( !$status->isGood() ) {
// Status is not good, but OK. This means warnings.
-   $result['result'] = 'warning';
+   $result['result'] = 'Warning';
 
// Add any warnings to the result
$warnings = $status->getErrorsByType( 'warning' );
@@ -157,7 +157,7 @@
}
} else {
// Everything was fine.
-   $result['result'] = 'success';
+   $result['result'] = 'Success';
}
 
// Give extensions a chance to modify the API result data
@@ -229,9 +229,9 @@
'createaccount' => array(
'result' => array(
ApiBase::PROP_TYPE => array(
-   'success',
-   'warning',
-   'needtoken'
+   'Success',
+   'Warning',
+   'NeedToken'
)
),
'username' => array(
diff --git a/tests/phpunit/includes/api/ApiCreateAccountTest.php 
b/tests/phpunit/includes/api/ApiCreateAccountTest.php
index a723245..8d134f7 100644
--- a/tests/phpunit/includes/api/ApiCreateAccountTest.php
+++ b/tests/phpunit/includes/api/ApiCreateAccountTest.php
@@ -45,7 +45,7 @@
 
// Should first ask for token.
$a = $result['createaccount'];
-   $this->assertEquals( 'needtoken', $a['result'] );
+   $this->assertEquals( 'NeedToken', $a['result'] );
$token = $a['token'];
 
// Finally create the account
@@ -63,7 +63,7 @@
 
$result = $ret[0];
$this->assertNotInternalType( 'bool', $result );
-   $this->assertEquals( 'success', 
$result['createaccount']['result'] );
+   $this->assertEquals( 'Success', 
$result['createaccount']['result'] );
 
// Try logging in with the new user.
$ret = $this->doApiRequest( array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I214d8eb7c9d49f55f49c5228c92806601c5499f6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: MaxSem 
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] Update MobileFrontend to wmf/1.23wmf15 tip - change (mediawiki/core)

2014-02-20 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Update MobileFrontend to wmf/1.23wmf15 tip
..


Update MobileFrontend to wmf/1.23wmf15 tip

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

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



diff --git a/extensions/MobileFrontend b/extensions/MobileFrontend
index e3646ef..ec5d80b 16
--- a/extensions/MobileFrontend
+++ b/extensions/MobileFrontend
-Subproject commit e3646ef14d04452aaa4a6706b19843778dd5b727
+Subproject commit ec5d80b6917284fdafcb67741c56e26a8624950b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a23dffa132cb267cd6b8c1d3f63c273ef9f3a61
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf15
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
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 ConfirmEdit to wmf/1.23wmf14 tip - change (mediawiki/core)

2014-02-20 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Update ConfirmEdit to wmf/1.23wmf14 tip
..


Update ConfirmEdit to wmf/1.23wmf14 tip

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

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



diff --git a/extensions/ConfirmEdit b/extensions/ConfirmEdit
index 15dc32e..a39b8e1 16
--- a/extensions/ConfirmEdit
+++ b/extensions/ConfirmEdit
-Subproject commit 15dc32ebb0f24ad76dd470ac9bd1b790e579cc6e
+Subproject commit a39b8e11cdf0292f2d8b564a6c4a939be8316b87

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6444aff2353af615b32e229d15fa4595b6a7662
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf14
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Sample commit for Jenkins - change (VisualEditor/VisualEditor)

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

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

Change subject: Sample commit for Jenkins
..

Sample commit for Jenkins

Change-Id: I228ea7c07d89be380fc9e8f220dbaad6a7c38348
---
A .jenkins
A jenkins.css
A jenkins.js
A jenkins.php
M modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
5 files changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/61/114661/1

diff --git a/.jenkins b/.jenkins
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/.jenkins
diff --git a/jenkins.css b/jenkins.css
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.css
diff --git a/jenkins.js b/jenkins.js
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.js
diff --git a/jenkins.php b/jenkins.php
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.php
diff --git a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js 
b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
index 11ac91d..10dc2f6 100644
--- a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js
@@ -9,6 +9,7 @@
  * Creates an ve.ui.LanguageInputWidget object.
  *
  * @class
+ * @emits Throw up Jenkins!
  * @extends OO.ui.Widget
  *
  * @constructor

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I228ea7c07d89be380fc9e8f220dbaad6a7c38348
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 37c84dc..e2f06d4 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 37c84dc..e2f06d4
..

Syncronize VisualEditor: 37c84dc..e2f06d4

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


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

diff --git a/VisualEditor b/VisualEditor
index 37c84dc..e2f06d4 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 37c84dc3bb3d164971280e29b0657fbdd887400d
+Subproject commit e2f06d487503ff9bc94d7f9c945c695130681a78

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3790a2d39259d9422b1a82cc6671ab4313a15795
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: 37c84dc..e2f06d4 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 37c84dc..e2f06d4
..


Syncronize VisualEditor: 37c84dc..e2f06d4

Change-Id: I3790a2d39259d9422b1a82cc6671ab4313a15795
---
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 37c84dc..e2f06d4 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 37c84dc3bb3d164971280e29b0657fbdd887400d
+Subproject commit e2f06d487503ff9bc94d7f9c945c695130681a78

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3790a2d39259d9422b1a82cc6671ab4313a15795
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] Revamp media edit dialog's position widget - change (mediawiki...VisualEditor)

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

Change subject: Revamp media edit dialog's position widget
..


Revamp media edit dialog's position widget

Added checkbox to set position (left/center/right) or none if unchecked.
Also handle 'default' position based on the wiki direction.

Bug: 61155
Change-Id: Iddd78c98929759a13d2dc5a774e72b59cbe28c36
---
M VisualEditor.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
4 files changed, 127 insertions(+), 31 deletions(-)

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



diff --git a/VisualEditor.php b/VisualEditor.php
index 401f43e..d14e572 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -675,11 +675,7 @@
'visualeditor-dialog-media-page-advanced',
'visualeditor-dialog-media-page-general',
'visualeditor-dialog-media-position-center',
-   'visualeditor-dialog-media-type-border',
-   'visualeditor-dialog-media-type-frame',
-   'visualeditor-dialog-media-type-frameless',
-   'visualeditor-dialog-media-type-section',
-   'visualeditor-dialog-media-type-thumb',
+   'visualeditor-dialog-media-position-checkbox',
'visualeditor-dialog-media-position-left',
'visualeditor-dialog-media-position-none',
'visualeditor-dialog-media-position-right',
@@ -687,6 +683,11 @@
'visualeditor-dialog-media-size-originalsize-error',
'visualeditor-dialog-media-size-section',
'visualeditor-dialog-media-title',
+   'visualeditor-dialog-media-type-border',
+   'visualeditor-dialog-media-type-frame',
+   'visualeditor-dialog-media-type-frameless',
+   'visualeditor-dialog-media-type-section',
+   'visualeditor-dialog-media-type-thumb',
'visualeditor-dialog-meta-advancedsettings-label',
'visualeditor-dialog-meta-advancedsettings-section',
'visualeditor-dialog-meta-categories-category',
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 34e5e33..ad524f7 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -45,11 +45,7 @@
 "visualeditor-dialog-media-page-advanced": "Advanced settings",
 "visualeditor-dialog-media-page-general": "General settings",
 "visualeditor-dialog-media-position-center": "Center",
-"visualeditor-dialog-media-type-border": "Border",
-"visualeditor-dialog-media-type-frame": "Frame",
-"visualeditor-dialog-media-type-frameless": "Frameless",
-"visualeditor-dialog-media-type-section": "Image type",
-"visualeditor-dialog-media-type-thumb": "Thumbnail",
+"visualeditor-dialog-media-position-checkbox": "Wrap content with this 
item",
 "visualeditor-dialog-media-position-left": "Left",
 "visualeditor-dialog-media-position-none": "None",
 "visualeditor-dialog-media-position-right": "Right",
@@ -57,6 +53,11 @@
 "visualeditor-dialog-media-size-originalsize-error": "Could not retrieve 
original file size.",
 "visualeditor-dialog-media-size-section": "Image size",
 "visualeditor-dialog-media-title": "Media settings",
+"visualeditor-dialog-media-type-border": "Border",
+"visualeditor-dialog-media-type-frame": "Frame",
+"visualeditor-dialog-media-type-frameless": "Frameless",
+"visualeditor-dialog-media-type-section": "Image type",
+"visualeditor-dialog-media-type-thumb": "Thumbnail",
 "visualeditor-dialog-meta-advancedsettings-label": "Advanced settings",
 "visualeditor-dialog-meta-advancedsettings-section": "Advanced settings",
 "visualeditor-dialog-meta-categories-category": "Category",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 5315e6c..3f3a37e 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -50,11 +50,7 @@
 "visualeditor-dialog-media-page-advanced": "Label for the advanced 
settings page in the media edit dialog",
 "visualeditor-dialog-media-page-general": "Label for the general settings 
page in the media edit dialog.\n{{Identical|General settings}}",
 "visualeditor-dialog-media-position-center": "Label for the image position 
option for aligning to the 
center.\n{{Related|Visualeditor-dialog-media-position}}\n{{Identical|Center}}",
-"visualeditor-dialog-media-type-border": "Label for the image type option 
for bordered image.",
-"visualeditor-dialog-media-type-frame": "Label for the image type option 
for framed image.",
-"visualeditor-dialog-media-type-frameless": "Label for 

[MediaWiki-commits] [Gerrit] Enable VisualEditor-jsduck - change (integration/zuul-config)

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

Change subject: Enable VisualEditor-jsduck
..


Enable VisualEditor-jsduck

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

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



diff --git a/layout.yaml b/layout.yaml
index ef5aca8..24c6382 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -3022,6 +3022,8 @@
 test:
   - VisualEditor-npm
   - VisualEditor-ruby1.9.3lint
+  - VisualEditor-jsduck
 gate-and-submit:
   - VisualEditor-npm
   - VisualEditor-ruby1.9.3lint
+  - VisualEditor-jsduck

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15c43ec458b053a9094d80bbc23d27a30aebc570
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
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] mwext-MultimediaViewer-doc-test: Remove redundant 'voting' s... - change (integration/zuul-config)

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

Change subject: mwext-MultimediaViewer-doc-test: Remove redundant 'voting' 
setting
..


mwext-MultimediaViewer-doc-test: Remove redundant 'voting' setting

This is the default for all jobs, and there is no override
making *-doc-test voting false (like there is with some others).

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

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



diff --git a/layout.yaml b/layout.yaml
index baef258..ef5aca8 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -554,9 +554,6 @@
   # Nonvoting until we can be sure it works
   - name: 'integration-jjb-config-test'
 
-  - name: 'mwext-MultimediaViewer-doc-test'
-voting: true
-
   - name: 'mwext-MultimediaViewer-doc-publish'
 branch: ^master$
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ad547b3ea54f23846436428a7896d628020bda3
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Enable VisualEditor-jsduck - change (integration/zuul-config)

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

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

Change subject: Enable VisualEditor-jsduck
..

Enable VisualEditor-jsduck

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


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

diff --git a/layout.yaml b/layout.yaml
index ef5aca8..24c6382 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -3022,6 +3022,8 @@
 test:
   - VisualEditor-npm
   - VisualEditor-ruby1.9.3lint
+  - VisualEditor-jsduck
 gate-and-submit:
   - VisualEditor-npm
   - VisualEditor-ruby1.9.3lint
+  - VisualEditor-jsduck

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15c43ec458b053a9094d80bbc23d27a30aebc570
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mwext-MultimediaViewer-doc-test: Remove redundant 'voting' s... - change (integration/zuul-config)

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

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

Change subject: mwext-MultimediaViewer-doc-test: Remove redundant 'voting' 
setting
..

mwext-MultimediaViewer-doc-test: Remove redundant 'voting' setting

This is the default for all jobs, and there is no override
making *-doc-test voting false (like there is with some others).

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


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

diff --git a/layout.yaml b/layout.yaml
index baef258..ef5aca8 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -554,9 +554,6 @@
   # Nonvoting until we can be sure it works
   - name: 'integration-jjb-config-test'
 
-  - name: 'mwext-MultimediaViewer-doc-test'
-voting: true
-
   - name: 'mwext-MultimediaViewer-doc-publish'
 branch: ^master$
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ad547b3ea54f23846436428a7896d628020bda3
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Create VisualEditor-jsduck job - change (integration/jenkins-job-builder-config)

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

Change subject: Create VisualEditor-jsduck job
..


Create VisualEditor-jsduck job

For testing jsduck pre-merge. Also removed obsolete comment
that hasn't been true since 69ec1bc.

Change-Id: I736f2bf61ce79ddd4292a9568b03e839a7d61f76
---
M mediawiki-extensions.yaml
M misc.yaml
2 files changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index bee327a..a302016 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -209,7 +209,6 @@
 export TERM=xterm
 $WORKSPACE/docs/generate
 
-# VisualEditor's docgen has a maintenance script, so install mediawiki first
 - job-template:
 name: 'mwext-VisualEditor-doc-test'
 defaults: use-remote-zuul
diff --git a/misc.yaml b/misc.yaml
index 476ac3d..435efb9 100644
--- a/misc.yaml
+++ b/misc.yaml
@@ -1,9 +1,20 @@
+- job-template:
+name: 'VisualEditor-jsduck'
+defaults: use-remote-zuul
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - jsduck:
+config: '$WORKSPACE/.docs/config.json'
+
 - project:
 name: 'VisualEditor'
 jobs:
  - '{name}-jslint'
  - '{name}-npm'
  - '{name}-ruby1.9.3lint'
+ - 'VisualEditor-jsduck'
 
 - project:
 name: 'oojs-core'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I736f2bf61ce79ddd4292a9568b03e839a7d61f76
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Trevor Parscal 
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: 4c1e1f3..37c84dc - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 4c1e1f3..37c84dc
..


Syncronize VisualEditor: 4c1e1f3..37c84dc

Change-Id: I2803d082d514c2ebc4f474d92a52a892b1bae165
---
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 4c1e1f3..37c84dc 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 4c1e1f3ccc20e85551085c09dd3036800d5a10d8
+Subproject commit 37c84dc3bb3d164971280e29b0657fbdd887400d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2803d082d514c2ebc4f474d92a52a892b1bae165
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] Ensure we use our references to certain native or upstream m... - change (mediawiki...VisualEditor)

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

Change subject: Ensure we use our references to certain native or upstream 
methods
..


Ensure we use our references to certain native or upstream methods

Checked:
 ve.cloneObject   (oo|OO).cloneObject
 ve.getObjectValues   (oo|OO).getObjectValues
 ve.getObjectKeys Object.keys
 ve.compare   (oo|OO).compare
 ve.copy  (oo|OO).copy
 ve.isPlainObject ($|jQuery).isPlainObject
 ve.isEmptyObject ($|jQuery).isEmptyObject
 ve.isArray   Array.isArray
 ve.bind  ($|jQuery).proxy
 ve.indexOf   ($|jQuery).inArray
 ve.extendObject  ($|jQuery).extend

Fixed:
* ve.dm.MWBlockImageNode.js (added in Iebb2081de)
* ve.dm.MWInlineImageNode.js (aded in I62ec12a6b)
* ve.dm.MWConverter.test.js (added in I90273786a)
* ve.ui.MWMediaInsertDialog.js (added in Ia5ad9a8c0)
* ve.dm.MWTemplateSpecModel.js (added in Ic3eb66538)
* ve.init.mw.MobileViewTarget.js
* ve.init.mw.ViewPageTarget.js
* ve.init.mw.Target.js

Skipped:
* ve.init.mw.ViewPageTarget.init.js
  - Feature test (which is for the very references from ve.js
being ensured in this commit).
  - Misc code using $.inArray (can't use ve.js yet since that
isn't loaded yet there).

Change-Id: I73ae005d3692e871fdcaea938641558c0b98ec69
---
M modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
M modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
M modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js
M modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
M modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
M modules/ve-mw/init/ve.init.mw.Target.js
M modules/ve-mw/test/dm/ve.dm.MWConverter.test.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaInsertDialog.js
8 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
index 365ffaa..621e800 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTemplateSpecModel.js
@@ -51,7 +51,7 @@
if ( data.description !== null ) {
this.description = data.description;
}
-   if ( Array.isArray( data.paramOrder ) ) {
+   if ( ve.isArray( data.paramOrder ) ) {
this.paramOrder = data.paramOrder.slice();
}
if ( ve.isPlainObject( data.params ) ) {
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
index 5fc6807..22057e5 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWBlockImageNode.js
@@ -56,7 +56,7 @@
 ve.dm.MWBlockImageNode.static.blacklistedAnnotationTypes = [ 'link' ];
 
 ve.dm.MWBlockImageNode.static.getMatchRdfaTypes = function () {
-   return Object.keys( this.rdfaToType );
+   return ve.getObjectKeys( this.rdfaToType );
 };
 
 ve.dm.MWBlockImageNode.static.toDataElement = function ( domElements, 
converter ) {
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js
index a9b5d3d..0af7295 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js
@@ -52,7 +52,7 @@
 ve.dm.MWInlineImageNode.static.blacklistedAnnotationTypes = [ 'link' ];
 
 ve.dm.MWInlineImageNode.static.getMatchRdfaTypes = function () {
-   return Object.keys( this.rdfaToType );
+   return ve.getObjectKeys( this.rdfaToType );
 };
 
 ve.dm.MWInlineImageNode.static.toDataElement = function ( domElements, 
converter ) {
diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
index 8010d3a..6d75f7e 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.MobileViewTarget.js
@@ -39,7 +39,7 @@
 OO.inheritClass( ve.init.mw.MobileViewTarget, ve.init.mw.Target );
 
 /* Static Properties */
-$.extend( ve.init.mw.Target.static.iconModuleStyles, {
+ve.extendObject( ve.init.mw.Target.static.iconModuleStyles, {
'raster': [],
'vector': []
 } );
diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
index 01572c4..627eabc 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js
@@ -837,7 +837,7 @@
fields[$this.prop( 'name' )] = $this.val();
}
} );
-   $.extend( fields, {
+   ve.extendObject( fields, {
'wpSummary': this.saveDialog ? 
this.saveDialog.editSummaryInput.getValue() : this.initialEditSummary,
'wpCaptchaId': this.captcha && this.captcha.id

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 4c1e1f3..37c84dc - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 4c1e1f3..37c84dc
..

Syncronize VisualEditor: 4c1e1f3..37c84dc

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


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

diff --git a/VisualEditor b/VisualEditor
index 4c1e1f3..37c84dc 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 4c1e1f3ccc20e85551085c09dd3036800d5a10d8
+Subproject commit 37c84dc3bb3d164971280e29b0657fbdd887400d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2803d082d514c2ebc4f474d92a52a892b1bae165
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] Simplify the AbuseFilter configuration a little - change (operations/mediawiki-config)

2014-02-20 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Simplify the AbuseFilter configuration a little
..

Simplify the AbuseFilter configuration a little

Change-Id: Ia472af8fd5e59b75ad8e2de6a9d83b8194e7b9c8
---
M wmf-config/abusefilter.php
1 file changed, 0 insertions(+), 26 deletions(-)


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

diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php
index da818d5..d82071e 100644
--- a/wmf-config/abusefilter.php
+++ b/wmf-config/abusefilter.php
@@ -5,8 +5,6 @@
 # You must also set wmgUseAbuseFilter in InitialiseSettings.php
 # This file is referenced from an include in CommonSettings.php
 
-$wgAbuseFilterStyleVersion = "9-1";
-
 $wgGroupPermissions['*']['abusefilter-view'] = true;
 $wgGroupPermissions['*']['abusefilter-log'] = true;
 
@@ -41,7 +39,6 @@
$wgGroupPermissions['abusefilter']['abusefilter-modify'] = true;

$wgGroupPermissions['abusefilter']['abusefilter-modify-restricted'] = true;
$wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = 
true;
-   $wgGroupPermissions['autoconfirmed']['abusefilter-view'] = true;
break;
case 'cawiki':
$wgGroupPermissions['sysop']['abusefilter-modify'] = false;
@@ -50,7 +47,6 @@
$wgGroupPermissions['sysop']['abusefilter-view-private'] = true;
$wgGroupPermissions['*']['abusefilter-view'] = false;
$wgGroupPermissions['user']['abusefilter-view'] = true;
-   $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= true;
$wgAbuseFilterAvailableActions[] = 'block';
$wgAbuseFilterBlockDuration = '2 hours';
break;
@@ -65,15 +61,6 @@
case 'cswikisource':
$wgAbuseFilterNotifications = "udp";
$wgAbuseFilterNotificationsPrivate = true;
-   break;
-   case 'dewiki':
-   // Removed custom AbuseFilter settings per bug 18223 --Andrew 
2009-03-29
-   // Where on earth did this come from? --Andrew
-   // Was from bug 17453, but doesn't belong here.
-   // Per bug 19208 now they want it off, using an abusefilter 
filter to do it.
-   // -- Brion 2009-07-13
-   // $wgDefaultUserOptions ['forceeditsummary'] = 1;
-   $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= true;
break;
case 'eewiki':
$wgGroupPermissions['*']['abusefilter-view'] = false;
@@ -118,7 +105,6 @@
break;
case 'eswiki':
$wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= false; // bug 42012
-   $wgGroupPermissions['user']['abusefilter-view'] = true;
$wgGroupPermissions['user']['abusefilter-log'] = true;
$wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = 
true;
$wgGroupPermissions['sysop']['abusefilter-revert'] = true;
@@ -152,7 +138,6 @@
// !!! Please be careful if you edit these rules, they are 
shared
// by two wikis. Create two sections, one per wiki, if needed. 
!!!
$wgGroupPermissions['*']['abusefilter-view'] = false;
-   $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= true;
$wgGroupPermissions['autoconfirmed']['abusefilter-view'] = true;
$wgGroupPermissions['sysop']['abusefilter-revert'] = true;
$wgGroupPermissions['sysop']['abusefilter-modify'] = false;
@@ -238,16 +223,12 @@
$wgGroupPermissions['*']['abusefilter-log-detail'] = true;
$wgAbuseFilterAvailableActions[] = 'block'; // bug 52681
break;
-   case 'mrwiki':
-   $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= true; // bug 40611
-   break;
case 'nlwiki':
$wgGroupPermissions['*']['abusefilter-view'] = false;
$wgGroupPermissions['*']['abusefilter-log'] = false;
$wgGroupPermissions['sysop']['abusefilter-modify'] = false;
$wgGroupPermissions['autoconfirmed']['abusefilter-view'] = true;
$wgGroupPermissions['autoconfirmed']['abusefilter-log'] = true;
-   $wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= true;
$wgGroupPermissions['abusefilter']['abusefilter-modify'] = true;

$wgGroupPermissions['abusefilter']['abusefilter-modify-restricted'] = true;
$wgGroupPermissions['abusefilter']['abusefilter-revert'] = true;
@@ -265,8 +246,6 @@
$wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= false; // bug 420

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2dd8888..4c1e1f3 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 2dd..4c1e1f3
..


Syncronize VisualEditor: 2dd..4c1e1f3

Change-Id: I5ed68c1c099e585314c948cf42b7f81443ee4a90
---
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 2dd..4c1e1f3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2dd14adb536e50dada2af32b110e5141f8a7
+Subproject commit 4c1e1f3ccc20e85551085c09dd3036800d5a10d8

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ed68c1c099e585314c948cf42b7f81443ee4a90
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] Update MWLanguageInputWidget to new API - change (mediawiki...VisualEditor)

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

Change subject: Update MWLanguageInputWidget to new API
..


Update MWLanguageInputWidget to new API

As per changes in core:
* Use new #this.setAnnotationFromValues method.
* Inline 'initialize' in constructor.
* Bring over 'Change language' button.
* Rename 'Change language' button to 'Find language' and
  move to top of form so that it's obvious it's not just a submit
  button for the form.
* Properties -> local vairables.

Depends on If121603b5637 in core.

Change-Id: I059acea7258fc5097b747595e09fae394ab066ec
---
M lib/ve
M modules/ve-mw/i18n/en.json
M modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
M modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js
M modules/ve-mw/ui/styles/ve.ui.MWWidget.css
M modules/ve-mw/ui/widgets/ve.ui.MWLanguageInputWidget.js
6 files changed, 20 insertions(+), 28 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index b6b80c2..7406d4b 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit b6b80c2712044f04b93c1f7c601c42dc5cc77d47
+Subproject commit 7406d4ba5d90f067e13e0c3b63168ee60656f82f
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index f5bbbd1..71939e5 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -133,6 +133,7 @@
 "visualeditor-formatdropdown-format-mw-heading4": "Sub-heading 2",
 "visualeditor-formatdropdown-format-mw-heading5": "Sub-heading 3",
 "visualeditor-formatdropdown-format-mw-heading6": "Sub-heading 4",
+"visualeditor-languageinspector-widget-changelang": "Find language",
 "visualeditor-languages-tool": "Languages",
 "visualeditor-linkinspector-illegal-title": "Invalid page title",
 "visualeditor-linkinspector-suggest-external-link": "External link",
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
index af7d2c1..9df1630 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
@@ -128,7 +128,7 @@
 /**
  * Bound to MetaList insert event for adding meta dialog components.
  *
- * @param {Object} ve.dm.MetaItem
+ * @param {ve.dm.MetaItem} metaItem
  */
 ve.ui.MWCategoriesPage.prototype.onMetaListInsert = function ( metaItem ) {
// Responsible for adding UI components
@@ -143,7 +143,7 @@
 /**
  * Bound to MetaList insert event for removing meta dialog components.
  *
- * @param {Object} ve.dm.MetaItem
+ * @param {ve.dm.MetaItem} metaItem
  */
 ve.ui.MWCategoriesPage.prototype.onMetaListRemove = function ( metaItem ) {
var item;
@@ -183,7 +183,7 @@
 /**
  * Gets category item from meta list item
  *
- * @param {Object} ve.dm.MWCategoryMetaItem
+ * @param {ve.dm.MWCategoryMetaItem} metaItem
  * @returns {Object} item
  */
 ve.ui.MWCategoriesPage.prototype.getCategoryItemFromMetaListItem = function ( 
metaItem ) {
diff --git a/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js
index 1c026f4..b099137 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWLanguagesPage.js
@@ -123,7 +123,7 @@
 /**
  * Gets language item from meta list item
  *
- * @param {Object} ve.dm.MWLanguageMetaItem
+ * @param {ve.dm.MWLanguageMetaItem} metaItem
  * @returns {Object} item
  */
 ve.ui.MWLanguagesPage.prototype.getLanguageItemFromMetaListItem = function ( 
metaItem ) {
diff --git a/modules/ve-mw/ui/styles/ve.ui.MWWidget.css 
b/modules/ve-mw/ui/styles/ve.ui.MWWidget.css
index 088d4b0..7e51b2b 100644
--- a/modules/ve-mw/ui/styles/ve.ui.MWWidget.css
+++ b/modules/ve-mw/ui/styles/ve.ui.MWWidget.css
@@ -5,6 +5,13 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+/* ve.ui.MWLanguageInputWidget */
+
+.ve-ui-mwLangugageInputWidget-uls {
+   text-align: center;
+   margin-bottom: 0.5em;
+}
+
 /* ve.ui.MWLinkTargetInputWidget */
 
 .ve-ui-mwLinkTargetInputWidget-menu {
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWLanguageInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWLanguageInputWidget.js
index 00eb66b..0a0b727 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWLanguageInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWLanguageInputWidget.js
@@ -17,25 +17,8 @@
 ve.ui.MWLanguageInputWidget = function VeUiMWLanguageInputWidget( config ) {
// Parent constructor
ve.ui.LanguageInputWidget.call( this, config );
-};
 
-/* Inheritance */
-
-OO.inheritClass( ve.ui.MWLanguageInputWidget, ve.ui.LanguageInputWidget );
-
-/* Static properties */
-
-/* Methods */
-
-/**
- * @inheritdoc
- */
-ve.ui.MWLanguageInputWidget.prototype.initialize = function () {
-   // Parent method
-   ve.ui.LanguageInputWidget.prototype.initialize.call( this );
-
-   // Properties
-   this.changeButton = new OO.ui.ButtonWidget( {
+   var changeButton = new OO.ui.ButtonWi

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2dd8888..4c1e1f3 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 2dd..4c1e1f3
..

Syncronize VisualEditor: 2dd..4c1e1f3

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


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

diff --git a/VisualEditor b/VisualEditor
index 2dd..4c1e1f3 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2dd14adb536e50dada2af32b110e5141f8a7
+Subproject commit 4c1e1f3ccc20e85551085c09dd3036800d5a10d8

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ed68c1c099e585314c948cf42b7f81443ee4a90
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] Create VisualEditor-jsduck job - change (integration/jenkins-job-builder-config)

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

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

Change subject: Create VisualEditor-jsduck job
..

Create VisualEditor-jsduck job

For testing jsduck pre-merge. Also removed obsolete comment
that hasn't been true since 69ec1bc.

Change-Id: I736f2bf61ce79ddd4292a9568b03e839a7d61f76
---
M mediawiki-extensions.yaml
M misc.yaml
2 files changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index bee327a..a302016 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -209,7 +209,6 @@
 export TERM=xterm
 $WORKSPACE/docs/generate
 
-# VisualEditor's docgen has a maintenance script, so install mediawiki first
 - job-template:
 name: 'mwext-VisualEditor-doc-test'
 defaults: use-remote-zuul
diff --git a/misc.yaml b/misc.yaml
index 476ac3d..435efb9 100644
--- a/misc.yaml
+++ b/misc.yaml
@@ -1,9 +1,20 @@
+- job-template:
+name: 'VisualEditor-jsduck'
+defaults: use-remote-zuul
+concurrent: true
+triggers:
+ - zuul
+builders:
+ - jsduck:
+config: '$WORKSPACE/.docs/config.json'
+
 - project:
 name: 'VisualEditor'
 jobs:
  - '{name}-jslint'
  - '{name}-npm'
  - '{name}-ruby1.9.3lint'
+ - 'VisualEditor-jsduck'
 
 - project:
 name: 'oojs-core'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I736f2bf61ce79ddd4292a9568b03e839a7d61f76
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] 'class' attribute for all components - change (mediawiki...chameleon)

2014-02-20 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: 'class' attribute for all components
..


'class' attribute for all components

The 'class' attribute in the XML layout spec is now observed by all components.

The attribute is not a parameter to the component constructor anymore. Instead 
it is directly
taken from the DOMElement which is a parameter to the component constructor 
itself, making the
additional 'class' parameter redundent except in special cases. For these 
special cases an
addClass and a setClass method were added to the Component class.

Change-Id: I9034b488a67c0b061045c066c4b7ec251dc7cf1d
---
M components/Cell.php
M components/Component.php
M components/FooterIcons.php
M components/FooterInfo.php
M components/FooterPlaces.php
M components/Grid.php
M components/MainContent.php
M components/NavHead.php
M components/NavbarHorizontal.php
M components/NewtalkNotifier.php
M components/PersonalTools.php
M components/Row.php
M components/SiteNotice.php
M components/TabList.php
M components/ToolbarHorizontal.php
15 files changed, 50 insertions(+), 21 deletions(-)

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



diff --git a/components/Cell.php b/components/Cell.php
index 865e825..f9982fc 100644
--- a/components/Cell.php
+++ b/components/Cell.php
@@ -36,7 +36,7 @@
  */
 class Cell extends Container {
 
-   public function __construct( ChameleonTemplate $template, $domElement, 
$indent = 0, $class = '' ) {
+   public function __construct( ChameleonTemplate $template, $domElement, 
$indent = 0 ) {
 
$span = $domElement->getAttribute( 'span' );
 
@@ -44,7 +44,9 @@
$span = '12';
}
 
-   parent::__construct( $template, $domElement, $indent, 
"col-lg-$span $class" );
+   parent::__construct( $template, $domElement, $indent );
+
+   $this->addClass( "col-lg-$span" );
}
 
 }
diff --git a/components/Component.php b/components/Component.php
index eb77569..d5acf1b 100644
--- a/components/Component.php
+++ b/components/Component.php
@@ -45,12 +45,12 @@
 * @param int   $indent
 * @param string$class
 */
-   public function __construct( ChameleonTemplate $template, $domElement, 
$indent = 0, $class = '' ) {
+   public function __construct( ChameleonTemplate $template, $domElement, 
$indent = 0 ) {
 
$this->mSkinTemplate = $template;
$this->mIndent   = $indent;
-   $this->mClass= $class;
$this->mDomElement   = $domElement;
+   $this->mClass= $domElement !== null ? 
$domElement->getAttribute( 'class' ) : '';
}
 
/**
@@ -82,6 +82,28 @@
}
 
/**
+* Sets the class string that should be assigned to the top-level html 
element of this component
+*
+* @param $class
+* @return string
+*/
+   public function setClass( $class ) {
+
+   $this->mClass = $class;
+   }
+
+   /**
+* Adds the given class to the class string that should be assigned to 
the top-level html element of this component
+*
+* @param $class
+* @return string
+*/
+   public function addClass( $class ) {
+
+   $this->mClass .= ' ' . $class;
+   }
+
+   /**
 * Returns the DOMElement from the description XML file associated with 
this element.
 *
 * @return \DOMElement
diff --git a/components/FooterIcons.php b/components/FooterIcons.php
index bc1c663..0e77cc7 100644
--- a/components/FooterIcons.php
+++ b/components/FooterIcons.php
@@ -48,7 +48,7 @@
if ( $icons !== null && count( $icons ) > 0 ) {
 
$ret = $this->indent() . '' .
-  $this->indent() . '';
+  $this->indent() . '';
 
$this->indent( 1 );
foreach ( $icons as $blockName => $footerIcons ) {
diff --git a/components/FooterInfo.php b/components/FooterInfo.php
index 442690c..aa154f2 100644
--- a/components/FooterInfo.php
+++ b/components/FooterInfo.php
@@ -46,7 +46,7 @@
public function getHtml() {
 
$ret = $this->indent() . '' .
-  $this->indent() . '';
+  $this->indent() . '';
 
$footerlinks = $this->getSkinTemplate()->getFooterLinks();
$this->indent( 1 );
diff --git a/components/FooterPlaces.php b/components/FooterPlaces.php
index b4d10e1..b7d02b6 100644
--- a/components/FooterPlaces.php
+++ b/components/FooterPlaces.php
@@ -48,7 +48,7 @@
if ( array_key_exists( 'places', $footerlinks ) ) {
 
$ret = $this->indent() . '' .
-  $this->indent() . '';
+  

[MediaWiki-commits] [Gerrit] Changed $article->doPurge() to only be called for SMW < 1.9 - change (mediawiki...ApprovedRevs)

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

Change subject: Changed $article->doPurge() to only be called for SMW < 1.9
..


Changed $article->doPurge() to only be called for SMW < 1.9

Change-Id: Iebc76cf9b23e9cf1026475a5b3ac3bc2d8af30e8
---
M ApprovedRevs.hooks.php
1 file changed, 10 insertions(+), 4 deletions(-)

Approvals:
  Yaron Koren: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApprovedRevs.hooks.php b/ApprovedRevs.hooks.php
index 43fa601..639b8eb 100644
--- a/ApprovedRevs.hooks.php
+++ b/ApprovedRevs.hooks.php
@@ -473,8 +473,14 @@
array( 'style' => 'clear: both' )
) . "\n" );
 
-   // show the revision, instead of the history page
-   $article->doPurge();
+   // Show the revision, instead of the history page.
+   if ( version_compare( SMW_VERSION, '1.9', '<' ) ) {
+   // Call this only for SMW < 1.9 - it causes semantic
+   // data to not be set when using SMW 1.9 (a bug fixed
+   // in SMW 1.9.1), but thankfully it doesn't seem to be
+   // needed, in any case.
+   $article->doPurge();
+   }
$article->view();
 
return false;
@@ -695,7 +701,7 @@
if ( !$egApprovedRevsShowNotApprovedMessage) {
return true;
}
-
+ 
$title = $article->getTitle();
if ( ! ApprovedRevs::hasApprovedRevision( $title ) ) {
$text = wfMessage( 'approvedrevs-noapprovedrevision' 
)->text();
@@ -706,7 +712,7 @@
$wgOut->setSubtitle( $text );
}
}
-
+ 
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebc76cf9b23e9cf1026475a5b3ac3bc2d8af30e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApprovedRevs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Ensure SkinAfterBottomScripts hook gets called - change (mediawiki...MobileFrontend)

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

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

Change subject: Ensure SkinAfterBottomScripts hook gets called
..

Ensure SkinAfterBottomScripts hook gets called

Was already fixed before, appears to have resurfaced in merges and refactorings

Bug: 61462
Change-Id: Ieeff78af69db019ab19d083b98ef131abb7382bd
---
M includes/skins/SkinMinerva.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 1fdcb35..a40b23d 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -78,7 +78,7 @@
"document.documentElement.className = " .
"document.documentElement.className.replace( 
'page-loading', '' );"
);
-   $bottomScripts .= $out->getBottomScripts();
+   $bottomScripts .= $this->bottomScripts();
$tpl->set( 'bottomscripts', $bottomScripts );
if ( $this->isMobileMode ) {
$tpl->set( 'bodytext', $html );

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

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

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


  1   2   3   4   >