[MediaWiki-commits] [Gerrit] Use dummy user to make taking-over revision - change (mediawiki...Flow)

2014-05-22 Thread Werdna (Code Review)
Werdna has uploaded a new change for review.

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

Change subject: Use dummy user to make taking-over revision
..

Use dummy user to make taking-over revision

Instead of using the user viewing the page, use a dummy username to add
the revision made when a page is taken over by flow.

Bug: 64344
Change-Id: I923623881431011aff6d3a3f01c2da56017e79de
---
M Hooks.php
M i18n/en.json
M i18n/qqq.json
M includes/TalkpageManager.php
4 files changed, 24 insertions(+), 4 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index 5d8f1ad..e3b41b3 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -393,7 +393,8 @@
/**
 * Make sure no user can register a flow-*-usertext username, to avoid
 * confusion with a real user when we print e.g. "Suppressed" instead 
of a
-* username.
+* username. Additionally reserve the username used to add a revision on
+* taking over a page.
 *
 * @param array $names
 * @return bool
@@ -403,8 +404,12 @@
foreach ( $permissions as $permission ) {
$names[] = "msg:flow-$permission-usertext";
}
+   $names[] = 'msg:flow-system-usertext';
 
-   $names[] = "msg:flow-system-usertext";
+   // Reserve both the localized username and the English fallback 
for the
+   // taking-over revision.
+   $names[] = 'msg:flow-talk-username';
+   $names[] = 'Flow talk page manager';
 
return true;
}
diff --git a/i18n/en.json b/i18n/en.json
index 5bb5c16..b4c2204 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -11,6 +11,7 @@
 },
 "flow-desc": "Workflow management system",
 "flow-talk-taken-over": "This talk page has been taken over by a 
[https://www.mediawiki.org/wiki/Special:MyLanguage/Flow_Portal Flow board].",
+"flow-talk-username": "Flow talk page manager",
 "log-name-flow": "Flow activity log",
 "logentry-delete-flow-delete-post": "$1 {{GENDER:$2|deleted}} a [$4 post] 
on [[$3]]",
 "logentry-delete-flow-restore-post": "$1 {{GENDER:$2|restored}} a [$4 
post] on [[$3]]",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 6dc71b6..c980d6c 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -13,6 +13,7 @@
},
"flow-desc": 
"{{desc|name=Flow|url=http://www.mediawiki.org/wiki/Extension:Flow}}";,
"flow-talk-taken-over": "Content to replace existing page content by 
for pages that are turned into Flow boards.",
+   "flow-talk-username": "Username used for the revision added when Flow 
takes over a talk page.",
"log-name-flow": "{{doc-logpage}}\nName of the Flow log filter on the 
[[Special:Log]] page.",
"logentry-delete-flow-delete-post": "Text for a deletion log entry when 
a post was deleted. Parameters:\n* $1 - the user: link to the user page\n* $2 - 
the username. Can be used for GENDER.\n* $3 - the page where the post was 
moderated\n* $4 - permalink URL to the moderated 
post\n{{Related|Flow-logentry}}",
"logentry-delete-flow-restore-post": "Text for a deletion log entry 
when a deleted post was restored. Parameters:\n* $1 - the user: link to the 
user page\n* $2 - the username. Can be used for GENDER.\n* $3 - the page where 
the post was moderated\n* $4 - permalink URL to the moderated 
post\n{{Related|Flow-logentry}}",
diff --git a/includes/TalkpageManager.php b/includes/TalkpageManager.php
index d3b0ed6..62424b4 100644
--- a/includes/TalkpageManager.php
+++ b/includes/TalkpageManager.php
@@ -7,6 +7,7 @@
 use ContentHandler;
 use Revision;
 use Title;
+use User;
 
 // I got the feeling NinetyNinePercentController was a bit much.
 interface OccupationController {
@@ -64,17 +65,29 @@
throw new InvalidInputException( 'Requested article is 
not Flow enabled', 'invalid-input' );
}
 
-   // comment to add to the Revision to indicate Flow taking over
+   // Comment to add to the Revision to indicate Flow taking over
$comment = '/* Taken over by Flow */';
 
$page = $article->getPage();
$revision = $page->getRevision();
 
-   // make sure a Flow revision has not yet been inserted
+   // Add a revision only if a Flow revision has not yet been 
inserted.
if ( $revision === null || $revision->getComment( Revision::RAW 
) != $comment ) {
$message = wfMessage( 'flow-talk-taken-over' 
)->inContentLanguage()->text();
$content = ContentHandler::makeContent( $message, 
$title );
$page->doEditContent( $content, $comment, 
EDIT_FORCE_BOT | EDIT_SUPPRESS_RC );
+
+   $user = User::newFromName(
+  

[MediaWiki-commits] [Gerrit] Handle void elements in JS unclosed tags checker - change (mediawiki...MassMessage)

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

Change subject: Handle void elements in JS unclosed tags checker
..


Handle void elements in JS unclosed tags checker

Makes it so that tags such as  are not detected as unclosed.
Includes other minor code changes.

Change-Id: I6a50585ca7404153a8411f644c1cf87505f56782
---
M modules/ext.MassMessage.badhtml.js
1 file changed, 33 insertions(+), 22 deletions(-)

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



diff --git a/modules/ext.MassMessage.badhtml.js 
b/modules/ext.MassMessage.badhtml.js
index 5efa7d2..fa15fd7 100644
--- a/modules/ext.MassMessage.badhtml.js
+++ b/modules/ext.MassMessage.badhtml.js
@@ -1,67 +1,78 @@
 /**
  * Attempt to detect invalid HTML
- * from 
http://www.raymondcamden.com/index.cfm/2012/1/23/Detecting-invalid-HTML-with-JavaScript
+ * Based on 
http://www.raymondcamden.com/index.cfm/2012/1/23/Detecting-invalid-HTML-with-JavaScript
+ * Similar PHP method that checks on preview in SpecialMassMessage.php
  */
 ( function ( mw, $ ) {
$( function () {
'use strict';
-   var $msg, $warnings;
+   var voidElements, $msg, $warnings;
+
+   // Construct a set containing elements that do not need an end 
tag.
+   // List obtained from 
http://www.w3.org/TR/html-markup/syntax.html#syntax-elements
+   voidElements = {'area': 1, 'base': 1, 'br': 1, 'col': 1, 
'command': 1,
+   'embed': 1,'hr': 1, 'img': 1, 'input': 1, 'keygen': 1, 
'link': 1,
+   'meta': 1, 'param': 1, 'source': 1, 'track': 1, 'wbr': 
1};
+
$msg = $( '#mw-massmessage-form-message' );
$warnings = $( '' )
.attr( 'id', 'mw-massmessage-form-warnings' )
.addClass( 'warningbox' );
$msg.after( $warnings );
$warnings.hide();
+
$msg.on( 'keyup', $.debounce( 500, function( ) {
-   var code, matches, tags, possibles, tag;
+   var code, matches, tags, results, tag;
+
code = $.trim( $msg.val() );
if( code === '' ) {
$warnings.hide();
return;
}
 
-   matches = code.match( /<.*?>/g );
+   // Ignore tags that have '/' outside of the first 
character
+   // (assume those are self closing).
+   matches = code.match( /<[\w\/][^\/]*?>/g );
if( !matches ) {
$warnings.hide();
return;
}
 
tags = {};
-
$.each( matches, function( idx, itm ) {
var realTag, tag;
-   // if the tag is, , it's self closing
-   if ( itm.substr( itm.length - 2, itm.length ) 
!== '/>' ) {
 
-   // strip out any attributes
-   tag = itm.replace( /[<>]/g, '' ).split( 
' ' )[0];
-   // start or end tag?
-   if ( tag.charAt( 0 ) !== '/' ) {
+   // Keep just the element names and the starting 
'/', if exists.
+   tag = itm.replace( /[<>]/g, '' ).split( ' ' 
)[0];
+   if ( tag.charAt( 0 ) !== '/' ) { // Start tag
+   if ( !voidElements.hasOwnProperty( tag 
) ) { // Ignore void elements
if ( tags.hasOwnProperty( tag ) 
) {
tags[tag]++;
} else {
tags[tag] = 1;
}
+   }
+   } else { // End tag
+   realTag = tag.substr( 1, tag.length );
+   if ( tags.hasOwnProperty( realTag ) ) {
+   tags[realTag]--;
} else {
-   realTag = tag.substr( 1, 
tag.length );
-   if ( tags.hasOwnProperty( 
realTag ) ) {
-   tags[realTag]--;
-   } else {
-   tags[realTag] = -1;
-   }
+ 

[MediaWiki-commits] [Gerrit] Add basic unclosed HTML tags checking in PHP - change (mediawiki...MassMessage)

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

Change subject: Add basic unclosed HTML tags checking in PHP
..


Add basic unclosed HTML tags checking in PHP

This should really have been done with an HTML parser instead of regular
expressions.

Bug: 54909
Change-Id: Ica688adc8593cbf13bdc076b22ccaf31fbd65476
---
M SpecialMassMessage.php
1 file changed, 75 insertions(+), 0 deletions(-)

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



diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 28ac2ee..8d6fb67 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -192,6 +192,69 @@
}
 
/**
+* Returns an array containing possibly unclosed HTML tags in $message
+* TODO: Use an HTML parser instead of regular expressions
+*
+* @param $message string
+* @return array
+*/
+   protected function getUnclosedTags( $message ) {
+   $startTags = array();
+   $endTags = array();
+
+   // For start tags, ignore ones that contain '/' (assume those 
are self-closing).
+   preg_match_all( '|\<([\w]+)[^/]*?>|', $message, $startTags );
+   preg_match_all( '|\http://www.w3.org/TR/html-markup/syntax.html#syntax-elements
+   $voidElements = array();
+   $voidElementNames = array( 'area', 'base', 'br', 'col', 
'command', 'embed','hr', 'img',
+   'input', 'keygen', 'link', 'meta', 'param', 'source', 
'track', 'wbr' );
+   foreach ( $voidElementNames as $name ) {
+   $voidElements[$name] = 1;
+   }
+
+   // Count start / end tags for each element, ignoring start tags 
of void elements.
+   $tags = array();
+   foreach ( $startTags as $tag ) {
+   if ( !isset( $voidElements[$tag] ) ) {
+   if ( !isset( $tags[$tag] ) ) {
+   $tags[$tag] = 1;
+   } else {
+   $tags[$tag]++;
+   }
+   }
+   }
+   foreach ( $endTags as $tag ) {
+   if ( !isset( $tags[$tag] ) ) {
+   $tags[$tag] = -1;
+   } else {
+   $tags[$tag]--;
+   }
+   }
+
+   $results = array();
+   foreach ( $tags as $element => $num ) {
+   if ( $num > 0 ) {
+   $results[] = '<' . $element . '>';
+   } else if ( $num < 0 ) {
+   $results[] = '';
+   }
+   }
+   return $results;
+   }
+
+   /**
 * A preview/confirmation screen
 *
 * @param $data Array
@@ -234,6 +297,18 @@
$this->status->fatal( 'massmessage-unescaped-langlinks' 
);
}
 
+   // Check for unclosed HTML tags (Bug 54909)
+   $unclosedTags = $this->getUnclosedTags( $message );
+   if ( !empty( $unclosedTags ) ) {
+   $this->status->fatal(
+   $this->msg( 'massmessage-badhtml' )
+   ->params(
+   htmlspecialchars( 
$this->getLanguage()->commaList( $unclosedTags ) )
+   )
+   ->numParams( count( $unclosedTags ) )
+   );
+   }
+
// Check for no timestamp (Bug 54848)
if ( !preg_match( MassMessage::getTimestampRegex(), 
$content->getNativeData() ) ) {
$this->status->fatal( 'massmessage-no-timestamp' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica688adc8593cbf13bdc076b22ccaf31fbd65476
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Wctaiwan 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add 'X-Robots-Tag: noindex' header in action=render pages - change (mediawiki/core)

2014-05-22 Thread devunt (Code Review)
devunt has uploaded a new change for review.

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

Change subject: Add 'X-Robots-Tag: noindex' header in action=render pages
..

Add 'X-Robots-Tag: noindex' header in action=render pages

Bug: 63891
Change-Id: I297a6269fcab999610bc01755462938c70eb64a1
---
M includes/actions/RenderAction.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/134996/1

diff --git a/includes/actions/RenderAction.php 
b/includes/actions/RenderAction.php
index c9b3f8f..97a1664 100644
--- a/includes/actions/RenderAction.php
+++ b/includes/actions/RenderAction.php
@@ -41,7 +41,7 @@
}
 
public function show() {
-
+   $this->getRequest()->response()->header('X-Robots-Tag: 
noindex');
$this->page->render();
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] TemplateHandler: Detect simple URL template params and proce... - change (mediawiki...parsoid)

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

Change subject: TemplateHandler: Detect simple URL template params and process 
them directly into HTML
..


TemplateHandler: Detect simple URL template params and process
them directly into HTML

Change-Id: I2c96cb0f78ecb40d013705d904b03ceec30e484d
---
M lib/ext.core.TemplateHandler.js
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/lib/ext.core.TemplateHandler.js b/lib/ext.core.TemplateHandler.js
index a685d4a..dd313b0 100644
--- a/lib/ext.core.TemplateHandler.js
+++ b/lib/ext.core.TemplateHandler.js
@@ -20,6 +20,7 @@
PreprocessorRequest = api.PreprocessorRequest,
Util = require('./mediawiki.Util.js').Util,
DU = require('./mediawiki.DOMUtils.js').DOMUtils,
+   entities = require('entities'),
async = require('async'),
// define some constructor shortcuts
KV = defines.KV,
@@ -797,6 +798,11 @@
(paramTokens.constructor === String ||
 isSimpleParam(paramTokens))) {
param.html = param.wt;
+   } else if 
(param.wt.match(/^https?:\/\/[^[\]{}\s]*$/)) {
+   // If the param is just a simple URL, 
we can process it to
+   // HTML directly without going through 
a sub-pipeline.
+   param.html = "" + param.wt + "";
} else {
// Prepare the data needed to parse to 
HTML
params.push({

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

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

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


[MediaWiki-commits] [Gerrit] New empty ExtLinks shouldn't be converted to interwiki - change (mediawiki...parsoid)

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

Change subject: New empty ExtLinks shouldn't be converted to interwiki
..


New empty ExtLinks shouldn't be converted to interwiki

 * Adds a test, which now seems superfluous seeing that a few selser
   tests are fixed.

Bug: 64113
Change-Id: Ida5a3668fc62f3286917c2feb6a26cd654d52706
---
M lib/wts.LinkHandler.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 17 insertions(+), 3 deletions(-)

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



diff --git a/lib/wts.LinkHandler.js b/lib/wts.LinkHandler.js
index f001794..d355de8 100644
--- a/lib/wts.LinkHandler.js
+++ b/lib/wts.LinkHandler.js
@@ -274,6 +274,9 @@
// 2) does not contain a query string.
// Both are not supported by wikitext 
syntax.
!/^#|\?./.test(interWikiMatch[1]) &&
+   // ExtLinks should have content to 
convert.
+   ( linkData.type !== 'mw:ExtLink' ||
+ ( linkData.content.string || 
linkData.contentNode ) ) &&
(dp.isIW || target.modified || 
linkData.contentModified)) {
//console.log(interWikiMatch);
// External link that is really an interwiki 
link. Convert it.
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 4d1d733..02c3ba5 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -1975,9 +1975,7 @@
 
 // Blacklist for selser
 add("selser", "Extra newlines followed by heading [1,2,1,3,0,4,0,4,1,3,4]", 
"a\n\n40z1qdji2lfskyb9\n\n\n\n=b=\n9h4x5nzjh28rggb9\n\n[[a]]\n\nkup4bo01iztzkt9\n\n\n\nzlbbwe36wkrcnmi\n");
-add("selser", "Parsing an URL [[[3]],3,0]", "[[:fr:🍺|]]\n");
 add("selser", "Parsing an URL [[[2]],2,0]", 
"[[:fr:🍺|blv27e9oigmpwrk9http://fr.wikipedia.org/wiki/🍺]]\n\n7vcz2sjoo733ow29\n");
-add("selser", "Parsing an URL [[[3]],2,4]", 
"[[:fr:🍺|]]\n\n5j6cvz3yerd4pldi\n\nihkme7ay6re8kt9\n");
 add("selser", "Italics and possessives (1) [1]", "obtained by ''[[Lunar 
Prospector]]'''s gamma-ray spectrometer");
 add("selser", "Italics and possessives (1) [2]", "mylboba6mj3v7vi\n\nobtained 
by ''[[Lunar Prospector]]'''s gamma-ray spectrometer");
 add("selser", "Italics and possessives (1) [[2,2,3]]", 
"uqrnj4w22jqkhuxrobtained by abdihwdsev7ycik9''[[Lunar Prospector]]'''\n");
@@ -2618,7 +2616,6 @@
 add("selser", "Header with special characters (bug 25462) 
[1,2,2,0,3,4,0,4,[2],3,0,0,1,0,[3],0,0,2,4,0,1]", "The tooltips shall not show 
entities to the user (ie. be double 
escaped)\n\n8z7x1wcux3v26gvi\n\ns1o423l9ajg7gb9\n== text > text 
==\n2whgc18x6v3d6lxr\n== text < text 
==\nt5l87q61pf0z4cxr\n\n92ysy522qy28d7visection 2\n\n== text & text ==\nsection 
3\n\n\nsection 
4\n\nozk2j78opgajdcxr\n\nw7mpykjqlaowp14i\n\nsection 5");
 add("selser", "Single-line or multiline-comments can follow headings 
[2,4,3,1,0,4,[2],3]", 
"u9j9ywtzcjbawcdi\n==foo==\ndrrd423rrk1vpldi\n==bar==\nz66d0aderf9lik9\n==nxo7we9vvk70t3xrbaz==");
 add("selser", "Bug 1186 news: in the middle of text [[[2]]]", 
"[[wikinews:Wikinews:Workplace|9el1tkd6tbne9udihttp://en.wikinews.org/wiki/Wikinews:Workplace]]";);
-add("selser", "Bug 1186 news: in the middle of text [[[3]]]", 
"[[wikinews:Wikinews:Workplace|]]");
 add("selser", "Bug 1186 news: in the middle of text [[[4]]]", 
"[[wikinews:Wikinews:Workplace|qalth4rrg9q6ko6r]]");
 add("selser", "div with single-quoted attribute [2]", "qu686umowmw8kt9\nHTML rocks");
 add("selser", "div with unquoted attribute [2]", "pmr3ap5nlf7833di\nHTML rocks");
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 2f657a2..f885d16 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -3859,6 +3859,20 @@
 !! end
 
 !! test
+External links: with no contents
+!! wikitext
+[http://en.wikipedia.org/wiki/Foo]
+
+[[wikipedia:Foo|Bar]]
+
+[[wikipedia:Foo|Bar]]
+!! html/parsoid
+http://en.wikipedia.org/wiki/Foo";>
+http://en.wikipedia.org/wiki/Foo";>Bar
+http://en.wikipedia.org/wiki/Foo";>Bar
+!! end
+
+!! test
 External image
 !! wikitext
 External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png

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

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

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailm

[MediaWiki-commits] [Gerrit] WIP: Use NFS on non-Windows systems, with related permission... - change (mediawiki/vagrant)

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

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

Change subject: WIP: Use NFS on non-Windows systems, with related permissions 
changes
..

WIP: Use NFS on non-Windows systems, with related permissions changes

Based on https://gerrit.wikimedia.org/r/#/c/115114

Change-Id: Ia9214dcd5fbbb6d8e3da417dd25a16bae3a50256
---
M Vagrantfile
M puppet/manifests/base.pp
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/settings.pp
4 files changed, 28 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/95/134995/1

diff --git a/Vagrantfile b/Vagrantfile
index 62d203c..af8016b 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -113,10 +113,18 @@
 auto_correct: true
 } unless settings['forward_ports'].nil?
 
-config.vm.synced_folder '.', '/vagrant',
-id: 'vagrant-root',
-owner: 'vagrant',
-group: 'www-data'
+root_share_options = {:id => 'vagrant-root'}
+
+if Vagrant::Util::Platform.windows?
+root_share_options[:owner] = 'vagrant'
+root_share_options[:group] = 'www-data'
+else
+root_share_options[:type] = :nfs
+config.nfs.map_uid = Process.uid
+config.nfs.map_gid = Process.gid
+end
+
+config.vm.synced_folder '.', '/vagrant', root_share_options
 
 # www-data needs to write to the logs, but doesn't need write
 # access for all of /vagrant
@@ -163,6 +171,15 @@
 'forwarded_port' => settings['http_port'],
 'shared_apt_cache'   => '/vagrant/apt-cache/',
 }
+
+if Vagrant::Util::Platform.windows?
+$FACTER['share_owner'] = 'vagrant'
+$FACTER['share_group'] = 'www-data'
+else
+$FACTER['share_owner'] = Process.uid
+$FACTER['share_group'] = Process.gid
+end
+
 end
 
 config.vm.provision :mediawiki_reload
diff --git a/puppet/manifests/base.pp b/puppet/manifests/base.pp
index a9b6a2e..f878d4d 100644
--- a/puppet/manifests/base.pp
+++ b/puppet/manifests/base.pp
@@ -42,13 +42,9 @@
 ensure => present,
 }
 
-# Declare default uid / gid and permissions for file resources, and
-# tells Puppet not to back up configuration files by default.
+# Tell Puppet not to back up configuration files by default.
 File {
 backup => false,
-owner  => 'root',
-group  => 'root',
-mode   => '0644',
 }
 
 file { '/srv':
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index d9641b1..73e81d0 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -94,9 +94,8 @@
 
 file { $settings_dir:
 ensure => directory,
-owner  => 'vagrant',
-group  => 'www-data',
-mode   => '0755',
+owner => $::share_owner,
+group => $::share_group,
 }
 
 file { [ $cache_dir, $upload_dir ]:
@@ -108,8 +107,8 @@
 
 file { $managed_settings_dir:
 ensure  => directory,
-owner   => 'vagrant',
-group   => 'www-data',
+owner   => $::share_owner,
+group   => $::share_group,
 mode=> undef,
 recurse => true,
 purge   => true,
diff --git a/puppet/modules/mediawiki/manifests/settings.pp 
b/puppet/modules/mediawiki/manifests/settings.pp
index 9ced46a..ec61f20 100644
--- a/puppet/modules/mediawiki/manifests/settings.pp
+++ b/puppet/modules/mediawiki/manifests/settings.pp
@@ -84,11 +84,8 @@
 file { $settings_file:
 ensure  => $ensure,
 content => template('mediawiki/settings.php.erb'),
-# Because the file resides on a shared folder, any other owner
-# or mode will cause VirtualBox and Puppet to play tug-o'-war
-# over the file.
-owner   => 'vagrant',
-group   => 'www-data',
+owner   => $::share_owner,
+group   => $::share_group,
 require => Exec['mediawiki setup'],
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9214dcd5fbbb6d8e3da417dd25a16bae3a50256
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Allow sysops on mw.o to add/remove the autopatrolled group - change (operations/mediawiki-config)

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

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

Change subject: Allow sysops on mw.o to add/remove the autopatrolled group
..

Allow sysops on mw.o to add/remove the autopatrolled group

This used to be possible, but I think it stopped working
after FlaggedRevs was removed.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 451b104..7b35219 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7979,6 +7979,7 @@
'sysop' => array( 'abusefilter' ),
),
'+mediawikiwiki' => array(
+   'sysop' => array( 'autopatrolled' ),
'bureaucrat' => array( 'transwiki', 'coder', 'import', 
'svnadmins', 'translationadmin' ),
'coder' => array( 'coder' ),
),
@@ -8488,6 +8489,7 @@
'sysop' => array( 'abusefilter' ),
),
'+mediawikiwiki' => array(
+   'sysop' => array( 'autopatrolled' ),
'bureaucrat' => array( 'transwiki', 'import', 'coder', 
'svnadmins', 'translationadmin' ),
),
'+metawiki' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ad0a00cee05d28d0349bafd537c28ed8a82e2d7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] WTS: Make LinkHandler more robust in the presence of diff ma... - change (mediawiki...parsoid)

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

Change subject: WTS: Make LinkHandler more robust in the presence of diff 
markers.
..


WTS: Make LinkHandler more robust in the presence of diff markers.

* No change in parser test results in this patch, but fixes
  test failures in my dom-diff patch, so no need for new tests
  in this patch.

Change-Id: Ibaaec384cf59614c18ff8146bd90e2f6d0477e35
---
M lib/wts.LinkHandler.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/lib/wts.LinkHandler.js b/lib/wts.LinkHandler.js
index f001794..0fb1281 100644
--- a/lib/wts.LinkHandler.js
+++ b/lib/wts.LinkHandler.js
@@ -446,9 +446,8 @@
urlStr = escapeExtLinkURL(urlStr);
}
// Get plain text content, if any
-   var contentStr = node.childNodes.length === 1 &&
-   
DU.isText(node.firstChild) &&
-   
node.firstChild.nodeValue;
+   var contentStr = node.childNodes.length >= 1 &&
+   DU.allChildrenAreText(node) ? node.textContent 
: null;
// First check if we can serialize as an URL link
if ( contentStr &&
// Can we minimize this?

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

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

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


[MediaWiki-commits] [Gerrit] Cast empty server-side events to object - change (mediawiki...EventLogging)

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

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

Change subject: Cast empty server-side events to object
..

Cast empty server-side events to object

A server-side event with no properties is represented in PHP as an empty array.
Because PHP does not distinguish between an empty indexed array and an empty
associative array, it serializes the empty array to '[]' rather than '{}'.
This is not the desired behavior: an empty event object should still be an
object. So cast empty events to object, ensuring they serialize correctly.

Bug: 65385
Change-Id: If4665ce2f97bacdd019829dbfa4e8ea239451854
---
M includes/EventLogging.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/includes/EventLogging.php b/includes/EventLogging.php
index 7f331e0..08be1b0 100644
--- a/includes/EventLogging.php
+++ b/includes/EventLogging.php
@@ -46,6 +46,11 @@
$isValid = false;
}
 
+   if ( count( $event ) === 0 ) {
+   // Ensure empty events are serialized as '{}' and not 
'[]'.
+   $event = (object)$event;
+   }
+
$encapsulated = array(
'event'=> $event,
'schema'   => $schemaName,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4665ce2f97bacdd019829dbfa4e8ea239451854
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
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] WTS: Make LinkHandler more robust in the present of diff mar... - change (mediawiki...parsoid)

2014-05-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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

Change subject: WTS: Make LinkHandler more robust in the present of diff markers
..

WTS: Make LinkHandler more robust in the present of diff markers

* No change in parser test results in this patch, but fixes
  test failures in my dom-diff patch, so need for new tests.

Change-Id: Ibaaec384cf59614c18ff8146bd90e2f6d0477e35
---
M lib/wts.LinkHandler.js
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/lib/wts.LinkHandler.js b/lib/wts.LinkHandler.js
index f001794..0fb1281 100644
--- a/lib/wts.LinkHandler.js
+++ b/lib/wts.LinkHandler.js
@@ -446,9 +446,8 @@
urlStr = escapeExtLinkURL(urlStr);
}
// Get plain text content, if any
-   var contentStr = node.childNodes.length === 1 &&
-   
DU.isText(node.firstChild) &&
-   
node.firstChild.nodeValue;
+   var contentStr = node.childNodes.length >= 1 &&
+   DU.allChildrenAreText(node) ? node.textContent 
: null;
// First check if we can serialize as an URL link
if ( contentStr &&
// Can we minimize this?

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaaec384cf59614c18ff8146bd90e2f6d0477e35
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] Update flow_block_topiclist.html.handlebars.php - change (mediawiki...Flow)

2014-05-22 Thread Werdna (Code Review)
Werdna has uploaded a new change for review.

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

Change subject: Update flow_block_topiclist.html.handlebars.php
..

Update flow_block_topiclist.html.handlebars.php

Change-Id: Ic63250962ae077bae89f71ed135faabb27f64d50
---
M handlebars/flow_block_topiclist.html.handlebars.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/handlebars/flow_block_topiclist.html.handlebars.php 
b/handlebars/flow_block_topiclist.html.handlebars.php
index 4be5ee2..3ea2eeb 100644
--- a/handlebars/flow_block_topiclist.html.handlebars.php
+++ b/handlebars/flow_block_topiclist.html.handlebars.php
@@ -59,7 +59,6 @@
 '.LCRun2::ch('l10n', 
Array('Load_More'), 'enc', $cx).'
'.htmlentities(((is_array($in) && isset($in['elseif'])) ? 
$in['elseif'] : null), ENT_QUOTES, 'UTF-8').'
 '.LCRun2::ch('l10n', 
Array('Load_More'), 'enc', $cx).'
-   
' : '

 '.LCRun2::ch('l10n', Array('Load_More'), 'enc', 
$cx).'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic63250962ae077bae89f71ed135faabb27f64d50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: Werdna 

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


[MediaWiki-commits] [Gerrit] tox: test against Python 3.2 - change (mediawiki...EventLogging)

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

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

Change subject: tox: test against Python 3.2
..

tox: test against Python 3.2

Python 3.3 is not available for Precise, and Trusty is already on Python 3.4.
Let's target 3.2 for now to make it easy to test changes in MWV, and then
switch to 3.4 when we switch MWV to Trusty.

Change-Id: Ibcfd7594feb7e1ff0e9d461a98f51398a660be0d
---
M .travis.yml
M server/tox.ini
2 files changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/.travis.yml b/.travis.yml
index ddf4ca7..4d04c3c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,8 @@
 language: python
 python:
 - "2.7"
-- "3.3"
+- "3.2"
+- "3.4"
 install:
 - pip install -q pyzmq --install-option="--zmq=bundled" --use-mirrors
 - pip install -q server/ --use-mirrors
@@ -11,6 +12,6 @@
 - python setup.py test
 notifications:
 email: o...@wikimedia.org
-irc: "irc.freenode.org#wikimedia-e3"
+irc: "irc.freenode.org#wikimedia-analytics"
 on_success: change
 on_failure: change
diff --git a/server/tox.ini b/server/tox.ini
index 4f4c3bf..0c0f0f9 100644
--- a/server/tox.ini
+++ b/server/tox.ini
@@ -11,8 +11,7 @@
 # .. _virtualenv: http://pypi.python.org/pypi/virtualenv
 
 [tox]
-# Please redefine environement in /tox.ini
-envlist = py27, py33, flake8
+envlist = py27, py32, flake8
 skipsdist = true
 
 [testenv]
@@ -26,5 +25,4 @@
 
 [testenv:flake8]
 commands = flake8
-# No need to install any other dependency
 deps = flake8

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcfd7594feb7e1ff0e9d461a98f51398a660be0d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
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] Fix issues with empty TopicList blocks / formatters. - change (mediawiki...Flow)

2014-05-22 Thread Werdna (Code Review)
Werdna has uploaded a new change for review.

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

Change subject: Fix issues with empty TopicList blocks / formatters.
..

Fix issues with empty TopicList blocks / formatters.

There was some loop scope abuse that wasn't working.

Change-Id: I0f2fdeba46da8d4f84ad8d1f7f360cf1e310fcc5
---
M includes/Block/TopicList.php
M includes/Formatter/TopicListFormatter.php
2 files changed, 9 insertions(+), 5 deletions(-)


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

diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index de4a99d..5252412 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -201,9 +201,12 @@
// @todo remove the 'api' => true, its always api
$findOptions = $this->getFindOptions( $options + array( 'api' 
=> true ) );
$page = $this->getPage( $findOptions );
+
+   $workflowIds = array();
foreach ( $page->getResults() as $topicListEntry ) {
$workflowIds[] = $topicListEntry->getId();
}
+   
$workflows = $this->storage->getMulti( 'Workflow', $workflowIds 
);
$found = Container::get( 'query.topiclist' )->getResults( 
$page->getResults() );
 
diff --git a/includes/Formatter/TopicListFormatter.php 
b/includes/Formatter/TopicListFormatter.php
index e1da272..b2a1c7a 100644
--- a/includes/Formatter/TopicListFormatter.php
+++ b/includes/Formatter/TopicListFormatter.php
@@ -35,7 +35,7 @@
IContextSource $ctx
) {
$section = new \ProfileSection( __METHOD__ );
-   $res = $this->buildResult( $workflows, $found, $ctx ) +
+   $res = $this->buildResult( $listWorkflow, $workflows, $found, 
$ctx ) +
$this->buildEmptyResult( $listWorkflow );
$res['links']['pagination'] = $this->buildPaginationLinks(
$listWorkflow,
@@ -64,7 +64,7 @@
return $res;
}
 
-   protected function buildResult( array $workflows, array $found, 
IContextSource $ctx ) {
+   protected function buildResult( Workflow $listWorkflow, array 
$workflows, array $found, IContextSource $ctx ) {
$revisions = $posts = $replies = array();
foreach( $found as $formatterRow ) {
$serialized = $this->serializer->formatApi( 
$formatterRow, $ctx );
@@ -81,10 +81,11 @@
$revisions[$i]['replies'] = isset( $replies[$alpha] ) ? 
$replies[$alpha] : array();
}
 
+   $workflows = array();
+   $list = array();
+
if ( $workflows ) {
$orig = $workflows;
-   $workflows = array();
-   $list = array();
foreach ( $orig as $workflow ) {
$list[] = $alpha = 
$workflow->getId()->getAlphadecimal();
$workflows[$alpha] = $workflow;
@@ -100,7 +101,7 @@
}
 
return array(
-   'workflowId' => $workflow->getId()->getAlphadecimal(),
+   'workflowId' => 
$listWorkflow->getId()->getAlphadecimal(),
'roots' => $list,
'posts' => $posts,
'revisions' => $revisions,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f2fdeba46da8d4f84ad8d1f7f360cf1e310fcc5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: Werdna 

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


[MediaWiki-commits] [Gerrit] Bump version number for 2.0-alpha-2014-05-22 - change (apps...wikipedia)

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

Change subject: Bump version number for 2.0-alpha-2014-05-22
..


Bump version number for 2.0-alpha-2014-05-22

Change-Id: Id16880270fb452e89ffea4be2b43b3190981d76c
---
M wikipedia/AndroidManifest.xml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml
index ceda207..4d171f0 100644
--- a/wikipedia/AndroidManifest.xml
+++ b/wikipedia/AndroidManifest.xml
@@ -1,8 +1,8 @@
 
 http://schemas.android.com/apk/res/android";
 package="org.wikipedia"
-android:versionCode="50"
-android:versionName="2.0-alpha-2014-05-20">
+android:versionCode="51"
+android:versionName="2.0-alpha-2014-05-22">
 
 https://gerrit.wikimedia.org/r/134988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id16880270fb452e89ffea4be2b43b3190981d76c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Bump version number for 2.0-alpha-2014-05-22 - change (apps...wikipedia)

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

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

Change subject: Bump version number for 2.0-alpha-2014-05-22
..

Bump version number for 2.0-alpha-2014-05-22

Change-Id: Id16880270fb452e89ffea4be2b43b3190981d76c
---
M wikipedia/AndroidManifest.xml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/88/134988/1

diff --git a/wikipedia/AndroidManifest.xml b/wikipedia/AndroidManifest.xml
index ceda207..4d171f0 100644
--- a/wikipedia/AndroidManifest.xml
+++ b/wikipedia/AndroidManifest.xml
@@ -1,8 +1,8 @@
 
 http://schemas.android.com/apk/res/android";
 package="org.wikipedia"
-android:versionCode="50"
-android:versionName="2.0-alpha-2014-05-20">
+android:versionCode="51"
+android:versionName="2.0-alpha-2014-05-22">
 
 https://gerrit.wikimedia.org/r/134988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id16880270fb452e89ffea4be2b43b3190981d76c
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
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] Keep only a limited number of WebViews in memory. - change (apps...wikipedia)

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

Change subject: Keep only a limited number of WebViews in memory.
..


Keep only a limited number of WebViews in memory.

(scroll position to be implemented in next patch)

Bug: 64450

Change-Id: I768e2dcae18924d78253fad66bfaa83b8447d94a
---
M wikipedia/res/layout/activity_main.xml
A 
wikipedia/src/main/java/android/support/v4/app/FixedFragmentStatePagerAdapter.java
A wikipedia/src/main/java/org/wikipedia/page/BackStack.java
A wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java
M wikipedia/src/main/java/org/wikipedia/page/PageActivity.java
A wikipedia/src/main/java/org/wikipedia/page/PageFragmentAdapter.java
A wikipedia/src/main/java/org/wikipedia/page/PageFragmentPager.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
8 files changed, 525 insertions(+), 50 deletions(-)

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



diff --git a/wikipedia/res/layout/activity_main.xml 
b/wikipedia/res/layout/activity_main.xml
index 7a767b2..4a70937 100644
--- a/wikipedia/res/layout/activity_main.xml
+++ b/wikipedia/res/layout/activity_main.xml
@@ -7,11 +7,10 @@
 android:saveEnabled="false"
 android:layout_height="match_parent">
 
-
-
+android:layout_height="match_parent" />
 
 
 https://code.google.com/p/android/issues/detail?id=37484
+ */
+public abstract class FixedFragmentStatePagerAdapter extends 
FragmentStatePagerAdapter {
+
+public FixedFragmentStatePagerAdapter(FragmentManager fm) {
+super(fm);
+}
+
+@Override
+public Object instantiateItem(ViewGroup container, int position) {
+Fragment f = (Fragment) super.instantiateItem(container, position);
+Bundle savedFragmentState = f.mSavedFragmentState;
+if (savedFragmentState != null) {
+savedFragmentState.setClassLoader(f.getClass().getClassLoader());
+}
+return f;
+}
+
+}
diff --git a/wikipedia/src/main/java/org/wikipedia/page/BackStack.java 
b/wikipedia/src/main/java/org/wikipedia/page/BackStack.java
new file mode 100644
index 000..fb36074
--- /dev/null
+++ b/wikipedia/src/main/java/org/wikipedia/page/BackStack.java
@@ -0,0 +1,47 @@
+package org.wikipedia.page;
+
+import android.os.*;
+import java.util.*;
+
+public class BackStack implements Parcelable {
+
+private ArrayList backStack;
+
+public ArrayList getStack() {
+return backStack;
+}
+
+public int size() {
+return backStack.size();
+}
+
+public BackStack() {
+backStack = new ArrayList();
+}
+
+public BackStack(Parcel in) {
+backStack = in.readArrayList(BackStackItem.class.getClassLoader());
+}
+
+@Override
+public int describeContents() {
+return 0;
+}
+
+@Override
+public void writeToParcel(Parcel parcel, int flags) {
+parcel.writeList(backStack);
+}
+
+public static final Parcelable.Creator CREATOR
+= new Parcelable.Creator() {
+public BackStack createFromParcel(Parcel in) {
+return new BackStack(in);
+}
+
+public BackStack[] newArray(int size) {
+return new BackStack[size];
+}
+};
+
+}
\ No newline at end of file
diff --git a/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java 
b/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java
new file mode 100644
index 000..12c99f1
--- /dev/null
+++ b/wikipedia/src/main/java/org/wikipedia/page/BackStackItem.java
@@ -0,0 +1,47 @@
+package org.wikipedia.page;
+
+import android.os.*;
+import org.wikipedia.*;
+import org.wikipedia.history.*;
+
+public class BackStackItem implements Parcelable {
+public final PageTitle title;
+public final HistoryEntry historyEntry;
+public final int scrollPosition;
+
+public BackStackItem(PageTitle title, HistoryEntry historyEntry, int 
scrollPosition) {
+this.title = title;
+this.historyEntry = historyEntry;
+this.scrollPosition = scrollPosition;
+}
+
+public BackStackItem(Parcel in) {
+title = in.readParcelable(PageTitle.class.getClassLoader());
+historyEntry = in.readParcelable(HistoryEntry.class.getClassLoader());
+scrollPosition = in.readInt();
+}
+
+@Override
+public int describeContents() {
+return 0;
+}
+
+@Override
+public void writeToParcel(Parcel parcel, int flags) {
+parcel.writeParcelable(title, flags);
+parcel.writeParcelable(historyEntry, flags);
+parcel.writeInt(scrollPosition);
+}
+
+public static final Parcelable.Creator CREATOR
+= new Parcelable.Creator() {
+public BackStackItem createFromParcel(Parcel in) {
+return new BackStackItem(in);
+}
+
+public BackStackItem[] newArray(int size)

[MediaWiki-commits] [Gerrit] Use cannonical url for IRC feed - change (mediawiki...Flow)

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

Change subject: Use cannonical url for IRC feed
..


Use cannonical url for IRC feed

So we don't end up with urls that start like:
 //en.wikipedia.beta.wmflabs.org/[...]
and aren't clickable in most clients.

Change-Id: Ia7b4a1ec8711afc4b5447e721b215d908b8349f8
---
M includes/Formatter/IRCLineUrlFormatter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Formatter/IRCLineUrlFormatter.php 
b/includes/Formatter/IRCLineUrlFormatter.php
index 1cec75a..7b6c72e 100644
--- a/includes/Formatter/IRCLineUrlFormatter.php
+++ b/includes/Formatter/IRCLineUrlFormatter.php
@@ -51,7 +51,7 @@
 
foreach ( $accept as $key ) {
if ( isset( $links[$key] ) ) {
-   return $links[$key]->getFullUrl();
+   return $links[$key]->getCanonicalURL();
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7b4a1ec8711afc4b5447e721b215d908b8349f8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Bsitu 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improved FileBackend failure logging a bit - change (mediawiki/core)

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

Change subject: Improved FileBackend failure logging a bit
..


Improved FileBackend failure logging a bit

* This partly follows up on 2cfce9f

Change-Id: I9d15f44d8000f52fd7b307d358c895452ee96a8d
---
M includes/filebackend/FileBackendStore.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index ce4dedd..340c315 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -357,8 +357,8 @@
$status->merge( $this->doConcatenate( $params ) );
$sec = microtime( true ) - $start_time;
if ( !$status->isOK() ) {
-   wfDebugLog( 'FileOperation', get_class( $this ) 
. " failed to concatenate " .
-   count( $params['srcs'] ) . " file(s) 
[$sec sec]" );
+   wfDebugLog( 'FileOperation', get_class( $this ) 
. "-{$this->name}" .
+   " failed to concatenate " . count( 
$params['srcs'] ) . " file(s) [$sec sec]" );
}
}
 
@@ -1122,6 +1122,8 @@
$subStatus->success[$i] = false;
++$subStatus->failCount;
}
+   wfDebugLog( 'FileOperation', get_class( $this ) . 
"-{$this->name} " .
+   " stat failure; aborted operations: " . 
FormatJson::encode( $ops ) );
}
 
// Merge errors into status fields

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d15f44d8000f52fd7b307d358c895452ee96a8d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [WIP]Separate revision state related action to smaller objects - change (mediawiki...Flow)

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

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

Change subject: [WIP]Separate revision state related action to smaller objects
..

[WIP]Separate revision state related action to smaller objects

DON'T REVIEW, this is a very initial draft

Change-Id: I136a6f16783321105b9efc6249766705883afb5a
---
M Flow.php
A includes/Data/RevisionState/RevisionStateChecker.php
A includes/Data/RevisionState/RevisionStateModifier.php
A includes/Data/RevisionState/RevisionStateValue.php
4 files changed, 254 insertions(+), 0 deletions(-)


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

diff --git a/Flow.php b/Flow.php
index d3e4ca4..f8f8ab8 100755
--- a/Flow.php
+++ b/Flow.php
@@ -160,6 +160,9 @@
 $wgAutoloadClasses['Flow\Data\ShallowCompactor'] = $dir . 
'includes/Data/ShallowCompactor.php';
 $wgAutoloadClasses['Flow\Data\Merger'] = $dir . 'includes/Data/Merger.php';
 $wgAutoloadClasses['Flow\Data\RawSql'] = $dir . 'includes/Data/RawSql.php';
+$wgAutoloadClasses['Flow\Data\RevisionState\RevisionStateValue'] = $dir . 
'includes/Data/RevisionState/RevisionStateValue.php';
+$wgAutoloadClasses['Flow\Data\RevisionState\RevisionStateModifier'] = $dir . 
'includes/Data/RevisionState/RevisionStateModifier.php';
+$wgAutoloadClasses['Flow\Data\RevisionState\RevisionStateChecker'] = $dir . 
'includes/Data/RevisionState/RevisionStateChecker.php';
 $wgAutoloadClasses['Flow\Log\Logger'] = $dir . 'includes/Log/Logger.php';
 $wgAutoloadClasses['Flow\Log\Formatter'] = $dir . 'includes/Log/Formatter.php';
 $wgAutoloadClasses['Flow\Log\PostModerationLogger'] = $dir . 
'includes/Log/PostModerationLogger.php';
diff --git a/includes/Data/RevisionState/RevisionStateChecker.php 
b/includes/Data/RevisionState/RevisionStateChecker.php
new file mode 100644
index 000..cc7bf92
--- /dev/null
+++ b/includes/Data/RevisionState/RevisionStateChecker.php
@@ -0,0 +1,52 @@
+states = $this->revision->getRevisionState();
+   }
+
+   /**
+* Check if a state is set, this is meant to replace: isHidden(), 
isClosed() etc
+* @param string Any of the state constant from RevisionStateValue
+* @return boolean
+*/
+   public function isStateSet( $state ) {
+   $states = $this->revision->getRevisionState();
+   return isset( $states[$state] );
+   }
+
+   /**
+* Check if the revision content is set with a state
+*/
+   public function isContentSetWithState() {
+   foreach ( $this->states as $state => $row ) {
+   if ( $state !== RevisionStateValue::None ) {
+   $context = RevisionStateValue::$context[$state];
+   if (
+$context === 'revision' ||
+$context === 'content'
+   ) {
+   return true;
+   }
+   }
+   }
+   return false;
+   }
+
+}
diff --git a/includes/Data/RevisionState/RevisionStateModifier.php 
b/includes/Data/RevisionState/RevisionStateModifier.php
new file mode 100644
index 000..453735e
--- /dev/null
+++ b/includes/Data/RevisionState/RevisionStateModifier.php
@@ -0,0 +1,137 @@
+revision = $revision;
+   $this->states = $this->revision->getRevisionState();
+   }
+
+   /**
+* Moderate a flow revision, eg: suppress/delete.  This is done from the
+* history page and would not create a new flow revision.  The action is
+* saved to general logging table
+*
+* @param User The user moderating the revision
+* @param string[] The new moderation states
+* @param string The moderation comment
+* @return AbstractRevision
+*/
+   public function moderate( User $user, array $newStates, $comment ) {
+   foreach ( $newStates as $newState ) {
+   if ( !in_array( $newState, 
RevisionStateValue::$moderateState ) ) {
+   throw new InvalidInputException( $newState . ' 
is not a valid moderation state', 'invalid-input' );
+   }
+   }
+
+   // If all revision states are set already, there is not point to
+   // set it again, just return the revision
+   if ( !array_diff( array_keys( $this->states ), $newStates ) ) {
+   return $this->revision;
+   }
+
+   foreach ( RevisionStateValue::$moderateState as $state ) {
+   $this->removeState( $state );
+   }
+
+   // Moderation always passes in the new set of states
+   foreach ( $newStates as $newState ) {
+   $this->addState( RevisionState::cre

[MediaWiki-commits] [Gerrit] Convert toolbar structure group from bar to list - change (mediawiki...VisualEditor)

2014-05-22 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Convert toolbar structure group from bar to list
..

Convert toolbar structure group from bar to list

Aligns with I84a4d948ae in stand-alone.

Change-Id: I533355a20bb329b91d6550bde4afa18180b38f59
---
M modules/ve-mw/init/ve.init.mw.Target.js
M modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
3 files changed, 15 insertions(+), 6 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 102860a..ad1e3e4 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -216,8 +216,11 @@
},
// Structure
{
-   'type': 'bar',
-   'include': [ 'number', 'bullet', 'outdent', 'indent' ]
+   'type': 'list',
+   'icon': 'bullet-list',
+   'indicator': 'down',
+   'include': [ { 'group': 'structure' } ],
+   'demote': [ 'outdent', 'indent' ]
},
// Insert
{
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
index 9c93638..ed58edb 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js
@@ -78,8 +78,11 @@
},
// No structure
/* {
-   'type': 'bar',
-   'include': [ 'number', 'bullet', 'outdent', 'indent' ]
+   'type': 'list',
+   'icon': 'bullet-list',
+   'indicator': 'down',
+   'include': [ { 'group': 'structure' } ],
+   'demote': [ 'outdent', 'indent' ]
},*/
// Insert
{
diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
index 090db16..7404894 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
@@ -73,8 +73,11 @@
},
// No structure
/* {
-   'type': 'bar',
-   'include': [ 'number', 'bullet', 'outdent', 'indent' ]
+   'type': 'list',
+   'icon': 'bullet-list',
+   'indicator': 'down',
+   'include': [ { 'group': 'structure' } ],
+   'demote': [ 'outdent', 'indent' ]
},*/
// Insert
{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I533355a20bb329b91d6550bde4afa18180b38f59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Remove more noise. - change (operations/puppet)

2014-05-22 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has uploaded a new change for review.

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

Change subject: Remove more noise.
..

Remove more noise.

* While a solution is being pursued at the network side, this will help remove 
some noise.

Change-Id: Ib6ac793b228e75d3c1451006acfbffdcede40094
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/134984/1

diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 949cbdc..b50f576 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -8,9 +8,45 @@
error 403 "Noise";
}
 
+   /* The following are roughly in highest to lower order */
+
if (req.http.referer && req.http.referer ~ 
"^http://www\.keeprefreshing\.com/";) {
error 403 "Noise";
}
+
+   if (req.http.referer && req.http.referer ~ 
"^http://tuneshub\.blogspot\.com/";) {
+   error 403 "Noise";
+   }
+
+   if (req.http.referer && req.http.referer ~ 
"^http://itunes24x7\.blogspot\.com/";) {
+   error 403 "Noise";
+   }
+
+   if (req.http.referer && req.http.referer ~ "^http://autoreload\.net/";) {
+   error 403 "Noise";
+   }
+
+   /* Forged UAs on zerodot */
+   if (req.http.host ~ "zero\.wikipedia\.org" && req.http.User-Agent ~ 
"Facebookbot|Googlebot") {
+   error 403 "Noise";
+   }
+
+   if (req.http.referer && req.http.referer ~ 
"^http://www\.refreshthis\.com";) {
+   error 403 "Noise";
+   }
+
+   if (req.http.referer && req.http.referer ~ 
"^http://www\.refresh-page\.com";) {
+   error 403 "Noise";
+   }
+
+   if (req.http.referer && req.http.referer ~ 
"^http://www\.urlreload\.com/";) {
+   error 403 "Noise";
+   }
+
+   /* this one is mostly covered with forged Facebookbot and forged 
Googlebot above */
+   if (req.http.referer && req.http.referer ~ 
"^http://www\.lazywebtools\.co\.uk/";) {
+   error 403 "Noise";
+   }
 }
 
 sub vcl_recv {

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

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

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


[MediaWiki-commits] [Gerrit] [WIP]Update flow_revision_state - change (mediawiki...Flow)

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

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

Change subject: [WIP]Update flow_revision_state
..

[WIP]Update flow_revision_state

DON'T REVIEW, this is a very initial draft

Change-Id: I89a4d8ba5ac23c1bcfba24b54fea30c914daae12
---
M Hooks.php
A maintenance/FlowUpdateRevisionState.php
2 files changed, 89 insertions(+), 0 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index 404d489..33308ed 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -143,6 +143,9 @@
require_once 
__DIR__.'/maintenance/FlowUpdateRevisionTypeId.php';
$updater->addPostDatabaseUpdateMaintenance( 
'FlowUpdateRevisionTypeId' );
 
+   require_once __DIR__.'/maintenance/FlowUpdateRevisionState.php';
+   $updater->addPostDatabaseUpdateMaintenance( 
'FlowUpdateRevisionState' );
+
require_once __DIR__.'/maintenance/FlowPopulateLinksTables.php';
$updater->addPostDatabaseUpdateMaintenance( 
'FlowPopulateLinksTables' );
 
diff --git a/maintenance/FlowUpdateRevisionState.php 
b/maintenance/FlowUpdateRevisionState.php
new file mode 100644
index 000..91b1d10
--- /dev/null
+++ b/maintenance/FlowUpdateRevisionState.php
@@ -0,0 +1,86 @@
+mDescription = "Update flow_revision_state";
+   $this->setBatchSize( 300 );
+   }
+
+   protected function doDBUpdates() {
+   $revId = '';
+   $count = $this->mBatchSize;
+   $dbFactory = Container::get( 'db.factory' );
+   $dbr = $dbFactory->getDB( DB_SLAVE );
+   $dbw = $dbFactory->getDB( DB_MASTER );
+
+   while ( $count == $this->mBatchSize ) {
+   $count = 0;
+   $res = $dbr->select(
+   array( 'flow_revision' ),
+   array(
+   'frs_rev_id' => 'rev_id',
+   'frs_state' => 'rev_mod_state',
+   'frs_user_id' => 'rev_mod_user_id',
+   'frs_user_ip' => 'rev_mod_user_ip',
+   'frs_user_wiki' => 'rev_mod_user_wiki',
+   'frs_comment' => 'rev_mod_reason'
+   ),
+   array( 'rev_id > ' . $dbr->addQuotes( $revId ) 
),
+   __METHOD__,
+   array( 'ORDER BY' => 'rev_id ASC', 'LIMIT' => 
$this->mBatchSize )
+   );
+
+   if ( $res ) {
+   foreach ( $res as $row ) {
+   $count++;
+   $revId = $row->frs_rev_id;
+   $this->insertRevisionState( $dbw, $row 
);
+   }
+   } else {
+   throw new MWException( 'SQL error in 
maintenance script ' . __CLASS__ . '::' . __METHOD__ );
+   }
+   $dbFactory->waitForSlaves();
+   }
+
+   return true;
+   }
+
+   private function insertRevisionState( $dbw, $row ) {
+   $res = $dbw->insert(
+   'flow_revision_state',
+   $insert,
+   __METHOD__,
+   array( 'IGNORE' )
+   );
+   if ( !$res ) {
+   throw new MWException( 'SQL error in maintenance script 
' . __CLASS__ . '::' . __METHOD__ );
+   }
+   }
+
+   /**
+* Get the update key name to go in the update log table
+*
+* @return string
+*/
+   protected function getUpdateKey() {
+   return 'FlowUpdateRevisionState';
+   }
+}
+
+$maintClass = 'FlowUpdateRevisionState';
+require_once( DO_MAINTENANCE );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89a4d8ba5ac23c1bcfba24b54fea30c914daae12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] Convert toolbar structure group from bar to list - change (VisualEditor/VisualEditor)

2014-05-22 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Convert toolbar structure group from bar to list
..

Convert toolbar structure group from bar to list

Change-Id: I84a4d948aeca995d32cd78840ce153f1d18adb2f
---
M modules/ve/init/ve.init.Target.js
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/83/134983/1

diff --git a/modules/ve/init/ve.init.Target.js 
b/modules/ve/init/ve.init.Target.js
index f4c8785..30894ff 100644
--- a/modules/ve/init/ve.init.Target.js
+++ b/modules/ve/init/ve.init.Target.js
@@ -102,8 +102,11 @@
{ 'include': [ 'link' ] },
// Structure
{
-   'type': 'bar',
-   'include': [ 'number', 'bullet', 'outdent', 'indent' ]
+   'type': 'list',
+   'icon': 'bullet-list',
+   'indicator': 'down',
+   'include': [ { 'group': 'structure' } ],
+   'demote': [ 'outdent', 'indent' ]
},
// Insert
{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84a4d948aeca995d32cd78840ce153f1d18adb2f
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Update lua tests for snak error formatting changes - change (mediawiki...Wikibase)

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

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

Change subject: Update lua tests for snak error formatting changes
..

Update lua tests for snak error formatting changes

Change-Id: I471c1e4a26a2da949a38bc9724d4115c0e292902
---
M client/tests/phpunit/includes/scribunto/LuaWikibaseEntityLibraryTests.lua
M 
client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php
2 files changed, 27 insertions(+), 17 deletions(-)


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

diff --git 
a/client/tests/phpunit/includes/scribunto/LuaWikibaseEntityLibraryTests.lua 
b/client/tests/phpunit/includes/scribunto/LuaWikibaseEntityLibraryTests.lua
index 236452c..0ab8c74 100644
--- a/client/tests/phpunit/includes/scribunto/LuaWikibaseEntityLibraryTests.lua
+++ b/client/tests/phpunit/includes/scribunto/LuaWikibaseEntityLibraryTests.lua
@@ -169,18 +169,18 @@
  expect = { 'FooBarFoo' }
},
{ name = 'mw.wikibase.entity.getProperties integration', func = 
integrationTestGetPropertiesCount,
- expect = { 1 }
+ expect = { 2 }
},
{ name = 'mw.wikibase.entity.formatPropertyValues integration 1', func 
= integrationTestFormatPropertyValues,
- expect = { { label = 'LuaTestProperty', value = 'Lua :)' } }
+ expect = { { label = 'LuaTestStringProperty', value = 'Lua :)' } }
},
{ name = 'mw.wikibase.entity.formatPropertyValues integration 2', func 
= integrationTestFormatPropertyValues,
  args = { { mw.wikibase.entity.claimRanks.RANK_PREFERRED, 
mw.wikibase.entity.claimRanks.RANK_NORMAL } },
- expect = { { label = 'LuaTestProperty', value = 'Lua :), This is 
clearly superior to the parser function' } }
+ expect = { { label = 'LuaTestStringProperty', value = 'Lua :), This 
is clearly superior to the parser function' } }
},
{ name = 'mw.wikibase.entity.formatPropertyValues integration 3', func 
= integrationTestFormatPropertyValues,
  args = { { mw.wikibase.entity.claimRanks.RANK_TRUTH } },
- expect = { { label = 'LuaTestProperty', value = '' } }
+ expect = { { label = 'LuaTestStringProperty', value = '' } }
},
 }
 
diff --git 
a/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php
 
b/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php
index 45b89ac..1eb55aa 100644
--- 
a/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php
+++ 
b/client/tests/phpunit/includes/scribunto/WikibaseLuaIntegrationTestItemSetUpHelper.php
@@ -46,22 +46,32 @@
return;
}
 
-   $property = $this->createTestProperty();
+   $itemProperty = $this->createTestProperty( 'wikibase-item', 
'LuaTestItemProperty' );
+   $stringProperty = $this->createTestProperty( 'string', 
'LuaTestStringProperty' );
 
-   $snak = $this->getTestSnak(
-   $property->getId(),
+   $mismatchSnak = $this->getTestSnak(
+   $itemProperty->getId(),
+   new StringValue( 'Lua mismatch' )
+   );
+
+   $statement1 = $this->getTestStatement( $mismatchSnak );
+   $statement1->setRank( CLAIM::RANK_PREFERRED );
+
+   $stringSnak = $this->getTestSnak(
+   $stringProperty->getId(),
new StringValue( 'Lua :)' )
);
 
-   $statement1 = $this->getTestStatement( $snak );
-   $statement1->setRank( Claim::RANK_PREFERRED );
+   $statement2 = $this->getTestStatement( $stringSnak );
+   $statement2->setRank( Claim::RANK_PREFERRED );
 
-   $snak = $this->getTestSnak(
-   $property->getId(),
+   $stringSnak2 = $this->getTestSnak(
+   $stringProperty->getId(),
new StringValue( 'This is clearly superior to the 
parser function' )
);
-   $statement2 = $this->getTestStatement( $snak );
-   $statement2->setRank( Claim::RANK_NORMAL );
+
+   $statement3 = $this->getTestStatement( $stringSnak2 );
+   $statement3->setRank( Claim::RANK_NORMAL );
 
$siteLinks = array( $siteLink );
$siteLinks[] = new SiteLink(
@@ -74,16 +84,16 @@
'en' => 'Test all the code paths'
);
 
-   $this->createTestItem( $labels, array( $statement1, $statement2 
), $siteLinks );
+   $this->createTestItem( $labels, array( $statement1, 
$statement2, $statement3 ), $siteLinks );
}
 
/**
 * @return Property
 */
-   protected function createTestPrope

[MediaWiki-commits] [Gerrit] [WIP]Flow revision multi-state support - change (mediawiki...Flow)

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

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

Change subject: [WIP]Flow revision multi-state support
..

[WIP]Flow revision multi-state support

DON'T REVIEW, this is a very initial draft

The ultimate goal is to support revision delete. Move delete/suppress
action from board action menu to history page. hide/close actions are kept
in flow history.  delete/suppress will be removed from flow history and
logged in general logging table

This is step one of the followings:

* Add multi-state support to collect data to new table

* Maintenance script to populate data to new table for old records

* Have flow code reference the new table for revision state

* Drop old data columns

Change-Id: I269b5cd143ea956b670d46483486b3cecaeebcd7
---
M Flow.php
M Hooks.php
A db_patches/patch-flow_revision_state.sql
M flow.sql
M includes/Data/RevisionStorage.php
M includes/Model/AbstractRevision.php
A includes/Model/RevisionState.php
7 files changed, 361 insertions(+), 2 deletions(-)


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

diff --git a/Flow.php b/Flow.php
index effc0a0..d3e4ca4 100755
--- a/Flow.php
+++ b/Flow.php
@@ -97,6 +97,7 @@
 $wgAutoloadClasses['Flow\Model\PostSummary'] = $dir . 
'includes/Model/PostSummary.php';
 $wgAutoloadClasses['Flow\Model\TopicListEntry'] = $dir . 
'includes/Model/TopicListEntry.php';
 $wgAutoloadClasses['Flow\Model\Workflow'] = $dir . 
'includes/Model/Workflow.php';
+$wgAutoloadClasses['Flow\Model\RevisionState'] = $dir . 
'includes/Model/RevisionState.php';
 $wgAutoloadClasses['Flow\Model\UUID'] = "$dir/includes/Model/UUID.php";
 $wgAutoloadClasses['Flow\Collection\AbstractCollection'] = $dir . 
'includes/Collection/AbstractCollection.php';
 $wgAutoloadClasses['Flow\Collection\CollectionCache'] = $dir . 
'includes/Collection/CollectionCache.php';
diff --git a/Hooks.php b/Hooks.php
index 75d5eea..953aaf5 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -126,6 +126,7 @@
$updater->modifyExtensionField( 'flow_revision', 'rev_user_ip', 
"$dir/db_patches/patch-revision_user_ip.sql" );
$updater->addExtensionField( 'flow_revision', 'rev_type_id', 
"$dir/db_patches/patch-rev_type_id.sql" );
$updater->addExtensionTable( 'flow_ext_ref', 
"$dir/db_patches/patch-add-linkstables.sql" );
+   $updater->addExtensionTable( 'flow_revision_state', 
"$dir/db_patches/patch-flow_revision_state.sql" );
 
require_once 
__DIR__.'/maintenance/FlowInsertDefaultDefinitions.php';
$updater->addPostDatabaseUpdateMaintenance( 
'FlowInsertDefaultDefinitions' );
diff --git a/db_patches/patch-flow_revision_state.sql 
b/db_patches/patch-flow_revision_state.sql
new file mode 100644
index 000..1520a1b
--- /dev/null
+++ b/db_patches/patch-flow_revision_state.sql
@@ -0,0 +1,10 @@
+CREATE TABLE /*_*/flow_revision_state (
+   frs_rev_id binary(11) not null,
+   frs_state varchar(32) binary not null,
+   frs_user_id bigint unsigned not null default 0,
+   frs_user_ip varbinary(39) default null,
+   frs_user_wiki varchar(32) binary not null default '',
+   frs_comment varchar(255) binary
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/flow_revision_state_rev_id_state ON 
/*_*/flow_revision_state (frs_rev_id,frs_state);
diff --git a/flow.sql b/flow.sql
index 67fdbd0..0165461 100644
--- a/flow.sql
+++ b/flow.sql
@@ -136,6 +136,17 @@
 CREATE INDEX /*i*/flow_revision_user ON
/*_*/flow_revision (rev_user_id, rev_user_ip, rev_user_wiki);
 
+CREATE TABLE /*_*/flow_revision_state (
+   frs_rev_id binary(11) not null,
+   frs_state varchar(32) binary not null,
+   frs_user_id bigint unsigned not null default 0,
+   frs_user_ip varbinary(39) default null,
+   frs_user_wiki varchar(32) binary not null default '',
+   frs_comment varchar(255) binary
+) /*$wgDBTableOptions*/;
+
+CREATE UNIQUE INDEX /*i*/flow_revision_state_rev_id_state ON 
/*_*/flow_revision_state (frs_rev_id,frs_state);
+
 -- Closure table implementation of tree storage in sql
 -- We may be able to go simpler than this
 CREATE TABLE /*_*/flow_tree_node (
diff --git a/includes/Data/RevisionStorage.php 
b/includes/Data/RevisionStorage.php
index 2d6b7c6..2cff084 100644
--- a/includes/Data/RevisionStorage.php
+++ b/includes/Data/RevisionStorage.php
@@ -92,6 +92,96 @@
abstract protected function getRevType();
 
/**
+* Insert revision state
+* @param array
+* @return boolean
+*/
+   protected function insertRevState( array $rows ) {
+   // Revision state
+   $stateRows = array();
+   foreach ( $rows as $i => $row ) {
+   $stateRows += array_values( unserialize( 
$this->splitUpdate( $row, 'frs' ) ) );
+   }
+   if ( $stateRows ) {
+

[MediaWiki-commits] [Gerrit] WorldPay Multiple Accounts - change (mediawiki...DonationInterface)

2014-05-22 Thread Adamw (Code Review)
Adamw has submitted this change and it was merged.

Change subject: WorldPay Multiple Accounts
..


WorldPay Multiple Accounts

Yay; it works!

Lots of changed needed to local settings to get this
to work in production through... :p

Change-Id: I20d614164bbf234886abdc926c5111614e4a6d3a
---
M tests/TestConfiguration.php
M worldpay_gateway/worldpay.adapter.php
2 files changed, 62 insertions(+), 23 deletions(-)

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



diff --git a/tests/TestConfiguration.php b/tests/TestConfiguration.php
index 79ad9f0..916d7fd 100644
--- a/tests/TestConfiguration.php
+++ b/tests/TestConfiguration.php
@@ -125,9 +125,17 @@
'Password' => 'testpass',
'MerchantId' => '123456',
'Test' => true,
+   'TokenizingMerchantID' => '123456',
'StoreIDs' => array (
-   'EUR' => 'eur_store_id',
-   )
+   '*/*/EUR' => array( 123456, 'eur_store_id' ),
+   '*/*/USD' => array( 123456, 'usd_store_id' ),
+   ),
+   'MerchantIDs' => array(
+   123456 => array(
+   'Username' => 'testname2',
+   'Password' => 'testpass2',
+   ),
+   ),
 );
 $wgWorldPayGatewayURL = 'https://test.worldpay.com';
 
diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 78156e6..5094f4f 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -186,7 +186,6 @@
$this->staged_vars = array(
'returnto',
'wp_acctname',
-   'wp_storeid',
'iso_currency_id',
'payment_submethod',
'zip',
@@ -197,10 +196,8 @@
function defineAccountInfo() {
$this->accountInfo = array(
'IsTest' => $this->account_config[ 'Test' ],
-   'MerchantId' => $this->account_config[ 'MerchantId' ],
-   'UserName' => $this->account_config[ 'Username' ],
-   'UserPassword' => $this->account_config[ 'Password' ],
-
+   'TokenizingMerchantID' => $this->account_config[ 
'TokenizingMerchantID' ],
+   'MerchantIDs' => $this->account_config[ 'MerchantIDs' ],
'StoreIDs' => $this->account_config[ 'StoreIDs' ],
);
}
@@ -700,11 +697,16 @@
'AcctName'  => 'wp_acctname',
'CVN'   => 'cvv',
'PTTID' => 'wp_pttid',
+   'UserName'  => 'username',
+   'UserPassword'  => 'user_password',
+   'MerchantId'=> 'wp_merchant_id'
);
}
 
public function do_transaction( $transaction ) {
$this->url = $this->getGlobal( 'URL' );
+
+   $this->loadRoutingInfo( $transaction );
 
switch ( $transaction ) {
case 'GenerateToken':
@@ -849,22 +851,6 @@
));
}
 
-   protected function stage_wp_storeid( $type = 'request' ) {
-   $currency = $this->getData_Unstaged_Escaped( 'currency_code' );
-   if ( array_key_exists( $currency, 
$this->accountInfo['StoreIDs'] ) ) {
-   // If we have the currency setup; settle into that
-   $this->staged_data['wp_storeid'] = 
$this->accountInfo['StoreIDs'][$currency];
-   } else {
-   // Otherwise settle into whatever the default it
-   $defaultStore = $this->getGlobal( 'DefaultCurrency' );
-   if ( array_key_exists( $defaultStore, 
$this->accountInfo['StoreIDs'] ) ) {
-   $this->staged_data['wp_storeid'] = 
$this->accountInfo['StoreIDs'][$defaultStore];
-   } elseif ( $this->getCurrentTransaction() === 
'AuthorizePaymentForFraud' ) {
-   throw new MWException( 'Store not configured 
for currency. Cannot perform auth request.' );
-   }
-   }
-   }
-
protected function stage_iso_currency_id( $type = 'request' ) {
$currency = $this->getData_Unstaged_Escaped( 'currency_code' );
if ( array_key_exists( $currency, self::$CURRENCY_CODES ) ) {
@@ -884,6 +870,51 @@
}
}
 
+   protected function loadRoutingInfo( $transaction ) {
+   switch ( $transaction ) {
+   case 'QueryAuthorizeDeposit':
+   break;
+   case 'GenerateToken':
+   case 'QueryTokenData':
+   $mid = 
$this->ac

[MediaWiki-commits] [Gerrit] Improved FileBackend failure logging a bit - change (mediawiki/core)

2014-05-22 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Improved FileBackend failure logging a bit
..

Improved FileBackend failure logging a bit

* This partly follows up on 2cfce9f

Change-Id: I9d15f44d8000f52fd7b307d358c895452ee96a8d
---
M includes/filebackend/FileBackendStore.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/134980/1

diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index ce4dedd..340c315 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -357,8 +357,8 @@
$status->merge( $this->doConcatenate( $params ) );
$sec = microtime( true ) - $start_time;
if ( !$status->isOK() ) {
-   wfDebugLog( 'FileOperation', get_class( $this ) 
. " failed to concatenate " .
-   count( $params['srcs'] ) . " file(s) 
[$sec sec]" );
+   wfDebugLog( 'FileOperation', get_class( $this ) 
. "-{$this->name}" .
+   " failed to concatenate " . count( 
$params['srcs'] ) . " file(s) [$sec sec]" );
}
}
 
@@ -1122,6 +1122,8 @@
$subStatus->success[$i] = false;
++$subStatus->failCount;
}
+   wfDebugLog( 'FileOperation', get_class( $this ) . 
"-{$this->name} " .
+   " stat failure; aborted operations: " . 
FormatJson::encode( $ops ) );
}
 
// Merge errors into status fields

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

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

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


[MediaWiki-commits] [Gerrit] Basic funnel data logging for UploadWizard - change (mediawiki...UploadWizard)

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

Change subject: Basic funnel data logging for UploadWizard
..


Basic funnel data logging for UploadWizard

See also https://meta.wikimedia.org/wiki/Schema:UploadWizardStep

Change-Id: Ifc79d45617f1712ad937373cd51592bfea645e4c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/609
---
M UploadWizard.php
M UploadWizardHooks.php
M resources/mw.UploadWizard.js
A tests/qunit/mw.UploadWizard.test.js
4 files changed, 45 insertions(+), 1 deletion(-)

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



diff --git a/UploadWizard.php b/UploadWizard.php
index db9d8da..410062a 100644
--- a/UploadWizard.php
+++ b/UploadWizard.php
@@ -134,6 +134,8 @@
'position' => 'top'
 ) + $uploadWizardModuleInfo;
 
+$wgEventLoggingSchemas[ 'UploadWizardStep' ] = 8612364;
+
 // Campaign hook handlers
 $wgHooks[ 'BeforePageDisplay' ][] = 'CampaignHooks::onBeforePageDisplay';
 $wgHooks[ 'EditFilterMerged' ][] = 'CampaignHooks::onEditFilterMerged';
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 394b26d..aa40b67 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -512,6 +512,9 @@
'ext.eventLogging',
'schema.UploadWizardTutorialActions',
);
+
+   self::$modules['ext.uploadWizard']['dependencies'][] = 
'schema.UploadWizardStep';
+
}
 
foreach ( self::$modules as $name => $resources ) {
@@ -671,6 +674,7 @@
) {
$testModules['qunit']['ext.uploadWizard.unit.tests'] = array(
'scripts' => array(
+   'tests/qunit/mw.UploadWizard.test.js',

'tests/qunit/mw.UploadWizardLicenseInput.test.js',
'tests/qunit/mw.FlickrChecker.test.js',
),
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 9ecc0ca..14b452f 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -28,6 +28,11 @@
this.makePreviewsFlag = true;
this.showDeed = false;
 
+/**
+ * A random number identifying this upload session for analytics purposes.
+ * @property {string}
+ */
+this.flowId = parseInt( new Date().getTime() + '' + Math.floor( 
Math.random() * 1000 ), 10 );
 };
 
 mw.UploadWizard.DEBUG = true;
@@ -50,6 +55,7 @@
$.purgeReadyEvents();
$.purgeSubscriptions();
this.removeMatchingUploads( function() { return true; } );
+this.currentStepName = undefined;
},
 
 
@@ -517,7 +523,14 @@
 
$( '#mwe-upwiz-steps' ).arrowStepsHighlight( '#mwe-upwiz-step-' 
+ selectedStepName );
 
-   this.currentStepName = selectedStepName;
+if ( mw.eventLog ) {
+if ( selectedStepName === 'file' && !this.currentStepName ) { // 
tutorial was skipped
+mw.eventLog.logEvent( 'UploadWizardStep', { flowId: 
this.flowId, step: 'tutorial', skipped: true } );
+}
+mw.eventLog.logEvent( 'UploadWizardStep', { flowId: this.flowId, 
step: selectedStepName } );
+}
+
+this.currentStepName = selectedStepName;
 
if ( selectedStepName === 'file' ) {
this.resetFileStepUploads();
diff --git a/tests/qunit/mw.UploadWizard.test.js 
b/tests/qunit/mw.UploadWizard.test.js
new file mode 100644
index 000..4fc65f6
--- /dev/null
+++ b/tests/qunit/mw.UploadWizard.test.js
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the MediaWiki extension UploadWizard.
+ *
+ * UploadWizard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * UploadWizard is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with UploadWizard.  If not, see .
+ */
+
+( function ( mw ) {
+QUnit.module( 'mw.UploadWizard', QUnit.newMwEnvironment() );
+
+QUnit.test( 'constructor sanity test', 1, function ( assert ) {
+var wizard = new mw.UploadWizard( {} );
+assert.ok( wizard );
+} );
+}( mediaWiki, jQuery ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc79d45617f1712ad937373cd51592bfea645e4c
Gerrit-PatchSet: 14
Gerrit-Project: mediawiki/extension

[MediaWiki-commits] [Gerrit] WIP: for discussion: escape all \n in - change (mediawiki...parsoid)

2014-05-22 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: WIP: for discussion: escape all \n in 
..

WIP: for discussion: escape all \n in 

Change-Id: I268b7c6e494f07c606d80d4d6892566e48819f68
---
M lib/XMLSerializer.js
M lib/mediawiki.DOMUtils.js
M lib/wts.TagHandlers.js
3 files changed, 23 insertions(+), 1 deletion(-)


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

diff --git a/lib/XMLSerializer.js b/lib/XMLSerializer.js
index a7d2fab..7b98f6c 100644
--- a/lib/XMLSerializer.js
+++ b/lib/XMLSerializer.js
@@ -77,6 +77,15 @@
default: return '&#' + c.charCodeAt() + ';';
}
 }
+/**
+ * Protect  from broken browser serializers
+ */
+function _preXmlEncoder(c) {
+   if (c === '\n') {
+   return "";
+   }
+   return _xmlEncoder(c);
+}
 
 function serializeToString(node, options, cb){
var child;
@@ -120,6 +129,15 @@
if(child){
cb(child.data);
}
+   } else if (child && nodeName === 'pre' && 
options.protectPre) {
+   while (child) {
+   if (child.nodeType === TEXT_NODE) {
+   
cb(child.data.replace(/[<&\n]/g, _preXmlEncoder));
+   } else {
+   serializeToString(child, 
options, cb);
+   }
+   child = child.nextSibling;
+   }
} else {
if (child && newlineStrippingElements[localName]
&& child.nodeType === TEXT_NODE 
&& /^\n/.test(child.data)) {
diff --git a/lib/mediawiki.DOMUtils.js b/lib/mediawiki.DOMUtils.js
index bda23dd..d7b29cd 100644
--- a/lib/mediawiki.DOMUtils.js
+++ b/lib/mediawiki.DOMUtils.js
@@ -1780,7 +1780,8 @@
if (!options) {
options = {
smartQuote: true,
-   innerXML: false
+   innerXML: false,
+   protectPre: true
};
}
if (doc.nodeName==='#document') {
diff --git a/lib/wts.TagHandlers.js b/lib/wts.TagHandlers.js
index a421c32..1ba71ab 100644
--- a/lib/wts.TagHandlers.js
+++ b/lib/wts.TagHandlers.js
@@ -872,6 +872,9 @@
h6: buildHeadingHandler("=="),
br: {
handle: function(node, state, cb) {
+   if (state.inHTMLPre) { // XXX too broad?
+   return cb('', node);
+   }
if (DU.getDataParsoid( node ).stx === 'html' || 
node.parentNode.nodeName !== 'P') {
cb('', node);
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I268b7c6e494f07c606d80d4d6892566e48819f68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Promoting mobile typography changes from beta to stable: Part 2 - change (mediawiki...MobileFrontend)

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

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

Change subject: Promoting mobile typography changes from beta to stable: Part 2
..

Promoting mobile typography changes from beta to stable: Part 2

This is part 2 of 2 and includes the updates to tablet styles. The
way these styles is loaded has been changed to use a regular top
position ResourceLoader module rather than the fancy matchMedia
hack, as it seems a bit risky for stable. The tablet styles are
pretty small anyway, so it doesn't seem like it would be a
significant change to the footprint of the head. Ideally, if we
want to use a method similar to matchMedia in stable, we should
probably get such a capability added to ResourceLoader itself.

Change-Id: Ia2ddca666c42762378e4c2bfe8e6a82ee3e43420
---
M includes/Resources.php
M includes/skins/SkinMinerva.php
M includes/skins/SkinMinervaBeta.php
D javascripts/common/matchMedia.js
M less/tablet/common.less
M less/tablet/hacks.less
6 files changed, 83 insertions(+), 152 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index 29233f0..d3bb689 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -85,11 +85,11 @@
),
 
'tablet.styles' => $wgMFMobileResourceBoilerplate + array(
-   'dependencies' => array( 'mobile.startup' ),
'styles' => array(
'less/tablet/common.less',
'less/tablet/hacks.less',
),
+   'position' => 'top',
),
 
'mobile.toc' => $wgMFMobileResourceBoilerplate + array(
@@ -184,16 +184,6 @@
'mobile-frontend-last-modified-with-user-months',
'mobile-frontend-last-modified-with-user-years',
'mobile-frontend-last-modified-with-user-just-now',
-   ),
-   'position' => 'top',
-   ),
-
-   'mobile.head.beta' => $wgMFMobileResourceBoilerplate + array(
-   'dependencies' => array(
-   'mobile.head',
-   ),
-   'scripts' => array(
-   'javascripts/common/matchMedia.js',
),
'position' => 'top',
),
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index ec9be88..5b449d9 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -791,6 +791,7 @@
'skins.minerva.content.styles',
'skins.minerva.drawers.styles',
// FIXME: Rename to use skins.minerva prefix - don't 
break cache in process
+   'tablet.styles',
'mobile.styles.page',
'mobile.pagelist.styles',
);
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index 6fc2aa7..5a0c341 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -14,37 +14,7 @@
# Replace page content before DOMParse to make sure images are 
scrubbed
# and Zero transformations are applied.
$this->handleNewPages( $out );
-   $this->prepareResponsiveStyles();
parent::outputPage( $out );
-   }
-
-   /**
-* Prepares head items that add conditionally loaded responsive styles.
-* FIXME: Review this approach thoroughly before pushing to stable.
-* Loosely based on:
-*   
http://christianheilmann.com/2012/12/19/conditional-loading-of-resources-with-mediaqueries/
-*/
-   protected function prepareResponsiveStyles() {
-   global $wgMFDeviceWidthTablet;
-
-   $url = ResourceLoader::makeLoaderURL(
-   array( 'tablet.styles' ),
-   $this->getLanguage()->getCode(),
-   $this->getSkinName(),
-   null,
-   null,
-   ResourceLoader::inDebugMode(),
-   'styles'
-   );
-   $attrs = array(
-   'data-href' => $url,
-   'data-media' => '(min-width: ' . $wgMFDeviceWidthTablet 
.'px)'
-   );
-   $out = $this->getOutput();
-   $out->addHeadItem( 'responsiveStyles', Html::element( 'style', 
$attrs ) );
-   $out->addHeadItem( 'responsiveScript', Html::inlineScript(
-   "jQuery.matchMedia();"
-   ) );
}
 
protected function getSearchPlaceHolderText() {
@@ -88,7 +58,6 @@
 
public function getDefaultModules() {
$modules = parent::getDefaultModules();
-   $modules['mobi

[MediaWiki-commits] [Gerrit] Enable the new PDF renderer in beta labs - change (operations/mediawiki-config)

2014-05-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Enable the new PDF renderer in beta labs
..

Enable the new PDF renderer in beta labs

Change-Id: I66ad4c22d1c98b7b98276e836a709b2bc4a0adeb
---
M wmf-config/CommonSettings-labs.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 4001c36..e2bff21 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -173,4 +173,12 @@
$wgExtensionEntryPointListFiles[] = "$wmfConfigDir/extension-list-labs";
 }
 
+if ( $wmgUseCollection ) {
+   // MwLib (PediaPress PDF Generation) is still done on the production 
servers
+
+   $wgCollectionFormats['rdf2latex'] = 'WMF PDF';
+   $wgCollectionFormatToServeURL['rdf2latex'] = 
'http://deployment-pdf01:8000';
+   $wgCollectionPortletFormats[] = 'rdf2latex';
+}
+
 } # end safeguard

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

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

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


[MediaWiki-commits] [Gerrit] Make sure DjVu files do not attempt metadata extraction repe... - change (mediawiki/core)

2014-05-22 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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

Change subject: Make sure DjVu files do not attempt metadata extraction 
repeatedly
..

Make sure DjVu files do not attempt metadata extraction repeatedly

If a file is broken, we don't want to spend time trying to find
its metadata over and over again.

Bug: 41090
Change-Id: Iad63b8942af99e1ec44530599a43ec1d6b2b8a62
---
M includes/media/DjVu.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/134976/1

diff --git a/includes/media/DjVu.php b/includes/media/DjVu.php
index 566efb2..200d526 100644
--- a/includes/media/DjVu.php
+++ b/includes/media/DjVu.php
@@ -278,7 +278,14 @@
$unser = unserialize( $metadata );
wfRestoreWarnings();
if ( is_array( $unser ) ) {
-   return $unser['xml'];
+   if ( isset( $unser['error'] ) ) {
+   return false;
+   } elseif ( isset( $unser['xml'] ) ) {
+   return $unser['xml'];
+   } else {
+   // Should never ever reach here.
+   throw new MWException( "Error unserializing 
DjVu metadata." );
+   }
}
 
// unserialize failed. Guess it wasn't really serialized after 
all,
@@ -364,7 +371,8 @@
 
$xml = $this->getDjVuImage( $image, $path )->retrieveMetaData();
if ( $xml === false ) {
-   return false;
+   // Special value so that we don't repetitively try and 
decode a broken file.
+   return serialize( array( 'error' => 'Error extracting 
metadata' ) );
} else {
return serialize( array( 'xml' => $xml ) );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad63b8942af99e1ec44530599a43ec1d6b2b8a62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] Move OCG default port to 8000 - change (operations/puppet)

2014-05-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Move OCG default port to 8000
..

Move OCG default port to 8000

Because we cannot open a port less than 1024 without being root
and we really dont want to give NodeJS root, even if I can
drop permissions later...

Change-Id: I82592e01bcff4556ee3c42fbcfe6ad3a6ec2ca88
---
M modules/ocg/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index eaa59bc..b9af570 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -12,7 +12,7 @@
 
 class ocg (
 $host_name = $::hostname,
-$service_port = 80,
+$service_port = 8000,
 $redis_host = 'localhost',
 $redis_port = 6379,
 $redis_password = '',

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

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

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


[MediaWiki-commits] [Gerrit] Make validation for page more strict on pdf to take only num... - change (mediawiki...PdfHandler)

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

Change subject: Make validation for page more strict on pdf to take only numbers
..


Make validation for page more strict on pdf to take only numbers

This change causes wiki syntax like
 [[File:Foo.pdf|thumb|Page 7 of document]]
to be interpreted as a caption instead, of saying select page 7
of the pdf. Previously it eventually ran intval( '7 of document' ),
so flipped to page 7.

Only possible downside I could see is this would cause things like
left-to-right marks and weird unicode spaces to no longer be ignored.
I don't think that's a big deal.

Change-Id: Ib98510a0473458fdc9cdecdb7f75676488b4c5c8
---
M PdfHandler_body.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/PdfHandler_body.php b/PdfHandler_body.php
index 0211c85..2458161 100644
--- a/PdfHandler_body.php
+++ b/PdfHandler_body.php
@@ -60,6 +60,11 @@
 * @return bool
 */
function validateParam( $name, $value ) {
+   if ( $name === 'page' && trim( $value ) !== (string) intval( 
$value ) ) {
+   // Extra junk on the end of page, probably actually a 
caption
+   // e.g. [[File:Foo.pdf|thumb|Page 3 of the document 
shows foo]]
+   return false;
+   }
if ( in_array( $name, array( 'width', 'height', 'page' ) ) ) {
return ( $value > 0 );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib98510a0473458fdc9cdecdb7f75676488b4c5c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PdfHandler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Gilles 
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] Make validation for page more strict on tiff to take only nu... - change (mediawiki...PagedTiffHandler)

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

Change subject: Make validation for page more strict on tiff to take only 
numbers
..


Make validation for page more strict on tiff to take only numbers

This change causes wiki syntax like
 [[File:Foo.tiff|thumb|Page 7 of document]]
to be interpreted as a caption instead, of saying select page 7
of the tiff. Previously it eventually ran intval( '7 of document' ),
so flipped to page 7.

Only possible downside I could see is this would cause things like
left-to-right marks and weird unicode spaces to no longer be ignored.
I don't think that's a big deal.

Change-Id: I4760df0a230affb3189ca9b5f3f9f4cc76292b97
---
M PagedTiffHandler_body.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/PagedTiffHandler_body.php b/PagedTiffHandler_body.php
index a12206e..f20290e 100644
--- a/PagedTiffHandler_body.php
+++ b/PagedTiffHandler_body.php
@@ -145,6 +145,12 @@
 */
function validateParam( $name, $value ) {
if ( in_array( $name, array( 'width', 'height', 'page', 'lossy' 
) ) ) {
+   if ( $name === 'page' && trim( $value ) !== (string) 
intval( $value ) ) {
+   // Extra junk on the end of page, probably 
actually a caption
+   // e.g. [[File:Foo.tiff|thumb|Page 3 of the 
document shows foo]]
+   return false;
+   }
+
if ( $name == 'lossy' ) {
# NOTE: make sure to use === for comparison. in 
PHP, '' == 0 and 'foo' == 1.
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4760df0a230affb3189ca9b5f3f9f4cc76292b97
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PagedTiffHandler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Gilles 
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] Added save button to share menu - hooked it up too. - change (apps...wikipedia)

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

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

Change subject: Added save button to share menu - hooked it up too.
..

Added save button to share menu - hooked it up too.

Change-Id: I6bf18ac4d4a60fe76bef74e3a5de450ade3b6146
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
A wikipedia/View Controllers/Navigation/Bottom/ShareMenuSavePageActivity.h
A wikipedia/View Controllers/Navigation/Bottom/ShareMenuSavePageActivity.m
M wikipedia/en.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
6 files changed, 142 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/74/134974/1

diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 1b165ef..93b09ae 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -41,6 +41,7 @@
042A5B36192591520095E172 /* TopMenuTextField.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 042A5B31192591520095E172 /* TopMenuTextField.m 
*/; };
042A5B37192591520095E172 /* TopMenuLabel.m in Sources */ = {isa 
= PBXBuildFile; fileRef = 042A5B33192591520095E172 /* TopMenuLabel.m */; };
042A5B38192591520095E172 /* TopMenuButtonView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 042A5B35192591520095E172 /* TopMenuButtonView.m 
*/; };
+   042B3996192EAEEA0066B270 /* ShareMenuSavePageActivity.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 042B3995192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m */; };
0433542218A023FE009305F0 /* UIViewController+HideKeyboard.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0433542118A023FE009305F0 /* 
UIViewController+HideKeyboard.m */; };
0433542618A093C5009305F0 /* UIView+RemoveConstraints.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0433542518A093C5009305F0 /* 
UIView+RemoveConstraints.m */; };
043C668A18BE9A8E00580E9B /* PreviewWikiTextOp.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 043C668918BE9A8E00580E9B /* PreviewWikiTextOp.m 
*/; };
@@ -231,6 +232,8 @@
042A5B33192591520095E172 /* TopMenuLabel.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= TopMenuLabel.m; sourceTree = ""; };
042A5B34192591520095E172 /* TopMenuButtonView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
TopMenuButtonView.h; sourceTree = ""; };
042A5B35192591520095E172 /* TopMenuButtonView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= TopMenuButtonView.m; sourceTree = ""; };
+   042B3994192EAEEA0066B270 /* ShareMenuSavePageActivity.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = ShareMenuSavePageActivity.h; sourceTree = ""; };
+   042B3995192EAEEA0066B270 /* ShareMenuSavePageActivity.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = ShareMenuSavePageActivity.m; sourceTree = ""; 
};
0433542018A023FE009305F0 /* UIViewController+HideKeyboard.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; path = "UIViewController+HideKeyboard.h"; sourceTree = 
""; };
0433542118A023FE009305F0 /* UIViewController+HideKeyboard.m */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = "UIViewController+HideKeyboard.m"; sourceTree = 
""; };
0433542418A093C5009305F0 /* UIView+RemoveConstraints.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = "UIView+RemoveConstraints.h"; sourceTree = ""; };
@@ -717,6 +720,8 @@
042A5B2B19253E690095E172 /* 
BottomMenuViewController.m */,
04B162EF19284A6F00B1ABC2 /* 
BottomMenuContainerView.h */,
04B162F019284A6F00B1ABC2 /* 
BottomMenuContainerView.m */,
+   042B3994192EAEEA0066B270 /* 
ShareMenuSavePageActivity.h */,
+   042B3995192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m */,
);
path = Bottom;
sourceTree = "";
@@ -1538,6 +1543,7 @@
048A26701905E55B00395F53 /* 
PreviewChoicesMenuView.m in Sources */,
04992BC418B6971F00A6C22B /* SearchThumbUrlsOp.m 
in Sources */,
044BD6B618849AD000FFE4BE /* 
SectionEditorViewController.m in Sources */,
+   042B3996192EAEEA0066B270 /* 
ShareMenuSavePageActivity.m in Sources */,
 

[MediaWiki-commits] [Gerrit] Fix URL in documentation - change (pywikibot/core)

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

Change subject: Fix URL in documentation
..


Fix URL in documentation

the old URL return 404 error

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

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



diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index f8db7ac..7b08695 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -4,7 +4,7 @@
 Each XmlEntry object represents a page, as read from an XML source
 
 The XmlDump class reads a pages_current XML dump (like the ones offered on
-http://download.wikimedia.org/wikipedia/de/) and offers a generator over
+http://dumps.wikimedia.org/backup-index.html) and offers a generator over
 XmlEntry objects which can be used by other bots.
 """
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ba9428a365e66ed31c20afa9ca233dd095f573e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] * Removed wikiHow-specific ad-related code * Removed some co... - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: * Removed wikiHow-specific ad-related code * Removed some 
commented-out code * Fixed one URL * Small HTML validation fix -- all s 
need an alt attribute, even if it's empty
..


* Removed wikiHow-specific ad-related code
* Removed some commented-out code
* Fixed one URL
* Small HTML validation fix -- all s need an alt attribute, even if it's 
empty

Change-Id: I6ed52f00bdc504faf00aae25e224a2d4736316a6
---
M BlueSky.skin.php
1 file changed, 22 insertions(+), 100 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index c24b0b6..a0c6745 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -2018,10 +2018,6 @@
class="mediawiki  sitedir-">
isUserAgentMobile() ) ); ?>
 
-   


 $tab ): ?>
@@ -2042,12 +2038,12 @@
$logoPath = $wgStylePath . 
'/BlueSky/resources/images/wikihow_logo_intl.png';
}
?>
-   
+   




-   
+   

 

@@ -2093,7 +2089,7 @@
$showingArticleInfo = 0;
if ( in_array( $title->getNamespace(), array( NS_MAIN, 
NS_PROJECT ) ) && $action == 'view' && !$isMainPage ) {
$catLinks = $sk->getCategoryLinks( false );
-   $authors = ArticleAuthors::getAuthorFooter();
+   $authors = class_exists( 'ArticleAuthors' ) ? 
ArticleAuthors::getAuthorFooter() : false;
if ( $authors || is_array( 
$this->data['language_urls'] ) || $catLinks ) {
$showingArticleInfo = 1;
}
@@ -2191,11 +2187,8 @@
 

text() ) ? ' style="padding-left:' . wfMessage( 'top_links_padding' 
)->text() . 'px;padding-right:' . wfMessage( 'top_links_padding' )->text() . 
'px;"' : '' ?>>
-   text(); ?>
+   text(); ?>
text(); ?>
-   getNamespace() == NS_MAIN && 
$title->getArticleId() ): ?>
-   
-   



@@ -2208,37 +2201,9 @@


 
-
-   getText() != 
'Userlogin' && $title->getNamespace() == NS_MAIN ) {
-   // temporary ad code for amazon ad 
loading, added by Reuben 3/13, disabled 4/23, and re-enabled 5/28
-   if ( $wgLanguageCode == 'en' ):
-   ?>
-   
-   
-   
-   
-   
-
getUserLinks(); ?>

-   
+   



@@ -2251,7 +2216,6 @@
 
echo $related_articles;
}
-
?>
 

@@ -2268,26 +2232,11 @@


 
-   
-   
-   
-   
-   
-  

[MediaWiki-commits] [Gerrit] * Removed wikiHow-specific ad-related code * Removed some co... - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: * Removed wikiHow-specific ad-related code * Removed some 
commented-out code * Fixed one URL * Small HTML validation fix -- all s 
need an alt attribute, even if it's empty
..

* Removed wikiHow-specific ad-related code
* Removed some commented-out code
* Fixed one URL
* Small HTML validation fix -- all s need an alt attribute, even if it's 
empty

Change-Id: I6ed52f00bdc504faf00aae25e224a2d4736316a6
---
M BlueSky.skin.php
1 file changed, 22 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/73/134973/1

diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index c24b0b6..a0c6745 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -2018,10 +2018,6 @@
class="mediawiki  sitedir-">
isUserAgentMobile() ) ); ?>
 
-   


 $tab ): ?>
@@ -2042,12 +2038,12 @@
$logoPath = $wgStylePath . 
'/BlueSky/resources/images/wikihow_logo_intl.png';
}
?>
-   
+   




-   
+   

 

@@ -2093,7 +2089,7 @@
$showingArticleInfo = 0;
if ( in_array( $title->getNamespace(), array( NS_MAIN, 
NS_PROJECT ) ) && $action == 'view' && !$isMainPage ) {
$catLinks = $sk->getCategoryLinks( false );
-   $authors = ArticleAuthors::getAuthorFooter();
+   $authors = class_exists( 'ArticleAuthors' ) ? 
ArticleAuthors::getAuthorFooter() : false;
if ( $authors || is_array( 
$this->data['language_urls'] ) || $catLinks ) {
$showingArticleInfo = 1;
}
@@ -2191,11 +2187,8 @@
 

text() ) ? ' style="padding-left:' . wfMessage( 'top_links_padding' 
)->text() . 'px;padding-right:' . wfMessage( 'top_links_padding' )->text() . 
'px;"' : '' ?>>
-   text(); ?>
+   text(); ?>
text(); ?>
-   getNamespace() == NS_MAIN && 
$title->getArticleId() ): ?>
-   
-   



@@ -2208,37 +2201,9 @@


 
-
-   getText() != 
'Userlogin' && $title->getNamespace() == NS_MAIN ) {
-   // temporary ad code for amazon ad 
loading, added by Reuben 3/13, disabled 4/23, and re-enabled 5/28
-   if ( $wgLanguageCode == 'en' ):
-   ?>
-   
-   
-   
-   
-   
-
getUserLinks(); ?>

-   
+   



@@ -2251,7 +2216,6 @@
 
echo $related_articles;
}
-
?>
 

@@ -2268,26 +2232,11 @@


 
-   
-   
-   
-   
- 

[MediaWiki-commits] [Gerrit] Fix URL in documentation - change (pywikibot/core)

2014-05-22 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Fix URL in documentation
..

Fix URL in documentation

the old URL return 404 error

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/72/134972/1

diff --git a/pywikibot/xmlreader.py b/pywikibot/xmlreader.py
index f8db7ac..7b08695 100644
--- a/pywikibot/xmlreader.py
+++ b/pywikibot/xmlreader.py
@@ -4,7 +4,7 @@
 Each XmlEntry object represents a page, as read from an XML source
 
 The XmlDump class reads a pages_current XML dump (like the ones offered on
-http://download.wikimedia.org/wikipedia/de/) and offers a generator over
+http://dumps.wikimedia.org/backup-index.html) and offers a generator over
 XmlEntry objects which can be used by other bots.
 """
 #

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

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

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


[MediaWiki-commits] [Gerrit] Update VisualEditor with I8df73bfc - change (mediawiki/core)

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

Change subject: Update VisualEditor with I8df73bfc
..


Update VisualEditor with I8df73bfc

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

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



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index e019969..1de681b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit e019969be5d3c39bae9df00a139ee622736cf14e
+Subproject commit 1de681bc6df2cbf44fad12599ddd007c19543878

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I901bfb09531bdcc8d9d31a795e7a882a4935020e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf6
Gerrit-Owner: Jforrester 
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] * Stylized * Added typeof check for _gaq variable -- Google ... - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: * Stylized * Added typeof check for _gaq variable -- Google 
Analytics is not always there! * Added missing iPhone/iPad-related variables, 
which are only used here
..

* Stylized
* Added typeof check for _gaq variable -- Google Analytics is not always there!
* Added missing iPhone/iPad-related variables, which are only used here

Change-Id: Ic726d3f700cfb3e1f7baae336525b7bbd6cbdf84
---
M resources/js/social.js
1 file changed, 39 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/70/134970/1

diff --git a/resources/js/social.js b/resources/js/social.js
index 94e714d..012da71 100644
--- a/resources/js/social.js
+++ b/resources/js/social.js
@@ -1,49 +1,61 @@
-(function ($) {
-   $(document).ready(function() {
+( function ( $ ) {
+   $( document ).ready( function() {
WH.addScrollEffectToTOC();
-   });
+   } );
 
-   $(window).load(function() {
-   if ($('.twitter-share-button').length && (!$.browser.msie || 
$.browser.version > 7)) {
-
-   $.getScript("https://platform.twitter.com/widgets.js";, 
function() {
-   twttr.events.bind('tweet', function(event) {
-   if (event) {
+   $( window ).load( function() {
+   if ( $( '.twitter-share-button' ).length && ( !$.browser.msie 
|| $.browser.version > 7 ) ) {
+   $.getScript( 'https://platform.twitter.com/widgets.js', 
function() {
+   twttr.events.bind( 'tweet', function ( event ) {
+   if ( event ) {
var targetUrl;
-   if (event.target && 
event.target.nodeName == 'IFRAME') {
-   targetUrl = 
extractParamFromUri(event.target.src, 'url');
+   if ( event.target && 
event.target.nodeName == 'IFRAME' ) {
+   targetUrl = 
extractParamFromUri( event.target.src, 'url' );
}
-   _gaq.push(['_trackSocial', 
'twitter', 'tweet', targetUrl]);
+   if ( typeof _gaq !== 
'undefined' ) {
+   _gaq.push( 
['_trackSocial', 'twitter', 'tweet', targetUrl] );
+   }
}
-   });
-
-   });
+   } );
+   } );
}
 
-   if (isiPhone < 0 && isiPad < 0 && $('.gplus1_button').length) {
+   var ua = navigator.userAgent.toLowerCase(),
+   isiPad = ua.indexOf( 'ipad' ),
+   isiPhone = ua.indexOf( 'iphone' );
+
+   if ( isiPhone < 0 && isiPad < 0 && $( '.gplus1_button' ).length 
) {
WH.setGooglePlusOneLangCode();
-   var node2 = document.createElement('script');
+   var node2 = document.createElement( 'script' );
node2.type = 'text/javascript';
node2.async = true;
node2.src = 'http://apis.google.com/js/plusone.js';
-   $('body').append(node2);
+   $( 'body' ).append( node2 );
}
-   if (typeof WH.FB != 'undefined') WH.FB.init('new');
-   if (typeof WH.GP != 'undefined') WH.GP.init();
 
-   if ($('#pinterest').length) {
-   var node3 = document.createElement('script');
+   // Init Facebook components
+   if ( typeof WH.FB != 'undefined' ) {
+   WH.FB.init( 'new' );
+   }
+
+   // Init Google+ Sign In components
+   if ( typeof WH.GP != 'undefined' ) {
+   WH.GP.init();
+   }
+
+   if ( $( '#pinterest' ).length ) {
+   var node3 = document.createElement( 'script' );
node3.type = 'text/javascript';
node3.async = true;
node3.src = 'http://assets.pinterest.com/js/pinit.js';
-   $('body').append(node3);
+   $( 'body' ).append( node3 );
}
 
-   if (typeof WH.imageFeedback != 'undefined') {
+   if ( typeof WH.imageFeedback != 'undefined' ) {
WH.imageFeedback();
}
-   if (typeo

[MediaWiki-commits] [Gerrit] * Stylized * Added typeof check for _gaq variable -- Google ... - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: * Stylized * Added typeof check for _gaq variable -- Google 
Analytics is not always there! * Added missing iPhone/iPad-related variables, 
which are only used here
..


* Stylized
* Added typeof check for _gaq variable -- Google Analytics is not always there!
* Added missing iPhone/iPad-related variables, which are only used here

Change-Id: Ic726d3f700cfb3e1f7baae336525b7bbd6cbdf84
---
M resources/js/social.js
1 file changed, 39 insertions(+), 27 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/resources/js/social.js b/resources/js/social.js
index 94e714d..012da71 100644
--- a/resources/js/social.js
+++ b/resources/js/social.js
@@ -1,49 +1,61 @@
-(function ($) {
-   $(document).ready(function() {
+( function ( $ ) {
+   $( document ).ready( function() {
WH.addScrollEffectToTOC();
-   });
+   } );
 
-   $(window).load(function() {
-   if ($('.twitter-share-button').length && (!$.browser.msie || 
$.browser.version > 7)) {
-
-   $.getScript("https://platform.twitter.com/widgets.js";, 
function() {
-   twttr.events.bind('tweet', function(event) {
-   if (event) {
+   $( window ).load( function() {
+   if ( $( '.twitter-share-button' ).length && ( !$.browser.msie 
|| $.browser.version > 7 ) ) {
+   $.getScript( 'https://platform.twitter.com/widgets.js', 
function() {
+   twttr.events.bind( 'tweet', function ( event ) {
+   if ( event ) {
var targetUrl;
-   if (event.target && 
event.target.nodeName == 'IFRAME') {
-   targetUrl = 
extractParamFromUri(event.target.src, 'url');
+   if ( event.target && 
event.target.nodeName == 'IFRAME' ) {
+   targetUrl = 
extractParamFromUri( event.target.src, 'url' );
}
-   _gaq.push(['_trackSocial', 
'twitter', 'tweet', targetUrl]);
+   if ( typeof _gaq !== 
'undefined' ) {
+   _gaq.push( 
['_trackSocial', 'twitter', 'tweet', targetUrl] );
+   }
}
-   });
-
-   });
+   } );
+   } );
}
 
-   if (isiPhone < 0 && isiPad < 0 && $('.gplus1_button').length) {
+   var ua = navigator.userAgent.toLowerCase(),
+   isiPad = ua.indexOf( 'ipad' ),
+   isiPhone = ua.indexOf( 'iphone' );
+
+   if ( isiPhone < 0 && isiPad < 0 && $( '.gplus1_button' ).length 
) {
WH.setGooglePlusOneLangCode();
-   var node2 = document.createElement('script');
+   var node2 = document.createElement( 'script' );
node2.type = 'text/javascript';
node2.async = true;
node2.src = 'http://apis.google.com/js/plusone.js';
-   $('body').append(node2);
+   $( 'body' ).append( node2 );
}
-   if (typeof WH.FB != 'undefined') WH.FB.init('new');
-   if (typeof WH.GP != 'undefined') WH.GP.init();
 
-   if ($('#pinterest').length) {
-   var node3 = document.createElement('script');
+   // Init Facebook components
+   if ( typeof WH.FB != 'undefined' ) {
+   WH.FB.init( 'new' );
+   }
+
+   // Init Google+ Sign In components
+   if ( typeof WH.GP != 'undefined' ) {
+   WH.GP.init();
+   }
+
+   if ( $( '#pinterest' ).length ) {
+   var node3 = document.createElement( 'script' );
node3.type = 'text/javascript';
node3.async = true;
node3.src = 'http://assets.pinterest.com/js/pinit.js';
-   $('body').append(node3);
+   $( 'body' ).append( node3 );
}
 
-   if (typeof WH.imageFeedback != 'undefined') {
+   if ( typeof WH.imageFeedback != 'undefined' ) {
WH.imageFeedback();
}
-   if (typeof WH.uciFeedback != 'undefined') {
+   if ( typeof

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 805dbdd..4c36d6e - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 805dbdd..4c36d6e
..

Syncronize VisualEditor: 805dbdd..4c36d6e

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


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

diff --git a/VisualEditor b/VisualEditor
index 805dbdd..4c36d6e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 805dbdd5bb5d11798acb5956ce2fc7d18df8d148
+Subproject commit 4c36d6e9c67c695d28baedd3fcdd307f506cb9cd

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad733381313c1970ad9d2150dc9b2522840415f4
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: 805dbdd..4c36d6e - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 805dbdd..4c36d6e
..


Syncronize VisualEditor: 805dbdd..4c36d6e

Change-Id: Iad733381313c1970ad9d2150dc9b2522840415f4
---
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 805dbdd..4c36d6e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 805dbdd5bb5d11798acb5956ce2fc7d18df8d148
+Subproject commit 4c36d6e9c67c695d28baedd3fcdd307f506cb9cd

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad733381313c1970ad9d2150dc9b2522840415f4
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] Make MWGalleryInspector wider - change (mediawiki...VisualEditor)

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

Change subject: Make MWGalleryInspector wider
..


Make MWGalleryInspector wider

Galleries usually have very long lines of text so make the
inspector big.

Change-Id: I69f294af9603a271b73ac1d39166fe4b492290f0
---
M VisualEditor.php
M modules/ve-mw/ui/inspectors/ve.ui.MWGalleryInspector.js
A modules/ve-mw/ui/styles/inspectors/ve.ui.MWGalleryInspector.css
3 files changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/VisualEditor.php b/VisualEditor.php
index ab37eb8..0bda854 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -1158,6 +1158,9 @@

'modules/ve-mw/ui/inspectors/ve.ui.MWGalleryInspector.js',

'modules/ve-mw/ui/tools/ve.ui.MWGalleryInspectorTool.js',
),
+   'styles' => array(
+   
'modules/ve-mw/ui/styles/inspectors/ve.ui.MWGalleryInspector.css',
+   ),
'dependencies' => array(
'ext.visualEditor.mwcore',
),
diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWGalleryInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWGalleryInspector.js
index 4ee9d12..c9df6bf 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWGalleryInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWGalleryInspector.js
@@ -19,6 +19,8 @@
 ve.ui.MWGalleryInspector = function VeUiMWGalleryInspector( config ) {
// Parent constructor
ve.ui.MWExtensionInspector.call( this, config );
+
+   this.$element.addClass( 've-ui-mwGalleryInpsector' );
 };
 
 /* Inheritance */
@@ -39,6 +41,14 @@
 /* Methods */
 
 /** */
+ve.ui.MWGalleryInspector.prototype.initialize = function () {
+   // Parent method
+   ve.ui.MWExtensionInspector.prototype.initialize.call( this );
+
+   this.input.$element.addClass( 've-ui-mwGalleryInpsector-input' );
+};
+
+/** */
 ve.ui.MWGalleryInspector.prototype.getInputPlaceholder = function () {
// 'File:' is always in content language
return mw.config.get( 'wgFormattedNamespaces' )['6'] + ':' +
diff --git a/modules/ve-mw/ui/styles/inspectors/ve.ui.MWGalleryInspector.css 
b/modules/ve-mw/ui/styles/inspectors/ve.ui.MWGalleryInspector.css
new file mode 100644
index 000..79f962c
--- /dev/null
+++ b/modules/ve-mw/ui/styles/inspectors/ve.ui.MWGalleryInspector.css
@@ -0,0 +1,14 @@
+/*!
+ * VisualEditor MediaWiki UserInterface alien extension inspector styles.
+ *
+ * @copyright 2011-2014 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.ve-ui-mwGalleryInpsector .oo-ui-frame {
+   width: 40em;
+}
+
+.ve-ui-mwGalleryInpsector-input {
+   width: 100%;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69f294af9603a271b73ac1d39166fe4b492290f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
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] Remove flaggedrevs-specific user groups from mediawiki.org - change (operations/mediawiki-config)

2014-05-22 Thread Withoutaname (Code Review)
Withoutaname has uploaded a new change for review.

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

Change subject: Remove flaggedrevs-specific user groups from mediawiki.org
..

Remove flaggedrevs-specific user groups from mediawiki.org

Also keeping "autoreview" as a usergroup even though it is
flaggedrevs-specific, to substitute for the previous lack
of an "autopatrolled" usergroup.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d6662fa..3b5eed6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7158,10 +7158,11 @@
),
'mediawikiwiki' => array(
'user' => array( 'move' => false ),
+   // Kept 'autoreview' as substitute for 'autopatrolled' user 
group
+   // because previously MediaWiki.org did not have one and it 
would be
+   // tedious to rename everyone's userrights.
'autoreview' => array( 'autopatrol' => true ),
'coder' => array( 'autopatrol' => true ),
-   'editor' => array( 'autopatrol' => true ),
-   'reviewer' => array( 'autopatrol' => true ),
),
 
'metawiki' => array(

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

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

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


[MediaWiki-commits] [Gerrit] some small lint/style fixes on 'ocg' - change (operations/puppet)

2014-05-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: some small lint/style fixes on 'ocg'
..


some small lint/style fixes on 'ocg'

fixes some puppet-lint warnings,
removes a tab,
fixes some pathes in "managed by puppet" comments

Change-Id: I9afbdf5edd09f0991310453813cd636aa516e2e5
---
M manifests/role/ocg.pp
M modules/ocg/files/logrotate
M modules/ocg/manifests/decommission.pp
M modules/ocg/manifests/init.pp
M modules/ocg/templates/mw-ocg-service.js.erb
5 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 7dae610..30921cf 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -15,7 +15,7 @@
 } else {
 # Default host in the WMF production env... this needs a variable or 
something
 $redis_host = 'rdb1002.eqiad.wmnet'
-   }
+}
 
 class { '::ocg':
 redis_host  => $redis_host,
@@ -25,7 +25,7 @@
 
 monitor_service { 'ocg':
 description   => 'Offline Content Generation - Collection',
-check_command => "check_http_on_port!80",
+check_command => 'check_http_on_port!80',
 }
 }
 
diff --git a/modules/ocg/files/logrotate b/modules/ocg/files/logrotate
index e817d26..7e5ebcd 100644
--- a/modules/ocg/files/logrotate
+++ b/modules/ocg/files/logrotate
@@ -1,6 +1,6 @@
 #
 ### THIS FILE IS MANAGED BY PUPPET
-### puppet:///files/ocg/logrotate
+### puppet:///modules/ocg/files/logrotate
 #
 
 /var/log/ocg/*.log {
diff --git a/modules/ocg/manifests/decommission.pp 
b/modules/ocg/manifests/decommission.pp
index 8a68f23..a2aed3d 100644
--- a/modules/ocg/manifests/decommission.pp
+++ b/modules/ocg/manifests/decommission.pp
@@ -10,8 +10,8 @@
 service { 'ocg':
 ensure   => stopped,
 provider => upstart,
-before => File['/etc/init/ocg.conf'],
-before => File[$temp_dir],
+before   => File['/etc/init/ocg.conf'],
+before   => File[$temp_dir],
 }
 
 file { [
@@ -30,7 +30,7 @@
 }
 
 deployment::target { 'ocg':
-require => Service['ocg'],
 ensure  => absent,
+require => Service['ocg'],
 }
 }
diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index eaa59bc..d4357eb 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -33,7 +33,7 @@
 system => true,
 }
 
-if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, "14.04") 
>= 0 ) {
+if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '14.04') 
>= 0 ) {
 # Although we need NodeJS on the server, only ubuntu 14.04 currently
 # comes with it. On labs or 12.04 boxes it has to be installed by hand 
:(
 package { 'nodejs':
@@ -42,7 +42,7 @@
 }
 }
 
-if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, "12.04") 
>= 0 ) {
+if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '12.04') 
>= 0 ) {
 # On ubuntu versions greater than 12.04 node is known as nodejs
 # This is exposed as a variable in the upstart configuration template
 $nodebin = 'nodejs'
@@ -80,8 +80,8 @@
 }
 
 service { 'ocg':
-provider   => upstart,
 ensure => running,
+provider   => upstart,
 hasstatus  => false,
 hasrestart => false,
 require=> File['/etc/init/ocg.conf'],
diff --git a/modules/ocg/templates/mw-ocg-service.js.erb 
b/modules/ocg/templates/mw-ocg-service.js.erb
index 067c6f5..6aa2e29 100644
--- a/modules/ocg/templates/mw-ocg-service.js.erb
+++ b/modules/ocg/templates/mw-ocg-service.js.erb
@@ -1,6 +1,6 @@
 /* -
  * THIS FILE IS MANAGED BY PUPPET
- * /modules/ocg_collection/templates/mw-collection-ocg.js.erb
+ * /modules/ocg/templates/mw-collection-ocg.js.erb
  *
  * It is intended to be included by the main configuration file
  * in the deploy repository. This just allows puppetization of

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9afbdf5edd09f0991310453813cd636aa516e2e5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
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] Decreasing indent level by one. - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Decreasing indent level by one.
..

Decreasing indent level by one.

Change-Id: I50391f9502cc25b33012a51e9da91895bd61e407
---
M resources/js/social.js
1 file changed, 42 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/68/134968/1

diff --git a/resources/js/social.js b/resources/js/social.js
index 4c34b8f..94e714d 100644
--- a/resources/js/social.js
+++ b/resources/js/social.js
@@ -1,49 +1,49 @@
-   (function ($) {
-   $(document).ready(function() {
-   WH.addScrollEffectToTOC();
-   });
+(function ($) {
+   $(document).ready(function() {
+   WH.addScrollEffectToTOC();
+   });
 
-   $(window).load(function() {
-   if ($('.twitter-share-button').length && 
(!$.browser.msie || $.browser.version > 7)) {
+   $(window).load(function() {
+   if ($('.twitter-share-button').length && (!$.browser.msie || 
$.browser.version > 7)) {
 
-   
$.getScript("https://platform.twitter.com/widgets.js";, function() {
-   twttr.events.bind('tweet', 
function(event) {
-   if (event) {
-   var targetUrl;
-   if (event.target && 
event.target.nodeName == 'IFRAME') {
-   targetUrl = 
extractParamFromUri(event.target.src, 'url');
-   }
-   
_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
+   $.getScript("https://platform.twitter.com/widgets.js";, 
function() {
+   twttr.events.bind('tweet', function(event) {
+   if (event) {
+   var targetUrl;
+   if (event.target && 
event.target.nodeName == 'IFRAME') {
+   targetUrl = 
extractParamFromUri(event.target.src, 'url');
}
-   });
-
+   _gaq.push(['_trackSocial', 
'twitter', 'tweet', targetUrl]);
+   }
});
-   }
 
-   if (isiPhone < 0 && isiPad < 0 && 
$('.gplus1_button').length) {
-   WH.setGooglePlusOneLangCode();
-   var node2 = document.createElement('script');
-   node2.type = 'text/javascript';
-   node2.async = true;
-   node2.src = 
'http://apis.google.com/js/plusone.js';
-   $('body').append(node2);
-   }
-   if (typeof WH.FB != 'undefined') WH.FB.init('new');
-   if (typeof WH.GP != 'undefined') WH.GP.init();
+   });
+   }
 
-   if ($('#pinterest').length) {
-   var node3 = document.createElement('script');
-   node3.type = 'text/javascript';
-   node3.async = true;
-   node3.src = 
'http://assets.pinterest.com/js/pinit.js';
-   $('body').append(node3);
-   }
+   if (isiPhone < 0 && isiPad < 0 && $('.gplus1_button').length) {
+   WH.setGooglePlusOneLangCode();
+   var node2 = document.createElement('script');
+   node2.type = 'text/javascript';
+   node2.async = true;
+   node2.src = 'http://apis.google.com/js/plusone.js';
+   $('body').append(node2);
+   }
+   if (typeof WH.FB != 'undefined') WH.FB.init('new');
+   if (typeof WH.GP != 'undefined') WH.GP.init();
 
-   if (typeof WH.imageFeedback != 'undefined') {
-   WH.imageFeedback();
-   }
-   if (typeof WH.uciFeedback != 'undefined') {
-   WH.uciFeedback();
-   }
-   });
-   })(jQuery);
\ No newline at end of file
+   if ($('#pinterest').length) {
+   var node3 = document.createElement('script');
+   node3.type = 'text/javascript';
+   

[MediaWiki-commits] [Gerrit] Decreasing indent level by one. - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Decreasing indent level by one.
..


Decreasing indent level by one.

Change-Id: I50391f9502cc25b33012a51e9da91895bd61e407
---
M resources/js/social.js
1 file changed, 42 insertions(+), 42 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/resources/js/social.js b/resources/js/social.js
index 4c34b8f..94e714d 100644
--- a/resources/js/social.js
+++ b/resources/js/social.js
@@ -1,49 +1,49 @@
-   (function ($) {
-   $(document).ready(function() {
-   WH.addScrollEffectToTOC();
-   });
+(function ($) {
+   $(document).ready(function() {
+   WH.addScrollEffectToTOC();
+   });
 
-   $(window).load(function() {
-   if ($('.twitter-share-button').length && 
(!$.browser.msie || $.browser.version > 7)) {
+   $(window).load(function() {
+   if ($('.twitter-share-button').length && (!$.browser.msie || 
$.browser.version > 7)) {
 
-   
$.getScript("https://platform.twitter.com/widgets.js";, function() {
-   twttr.events.bind('tweet', 
function(event) {
-   if (event) {
-   var targetUrl;
-   if (event.target && 
event.target.nodeName == 'IFRAME') {
-   targetUrl = 
extractParamFromUri(event.target.src, 'url');
-   }
-   
_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
+   $.getScript("https://platform.twitter.com/widgets.js";, 
function() {
+   twttr.events.bind('tweet', function(event) {
+   if (event) {
+   var targetUrl;
+   if (event.target && 
event.target.nodeName == 'IFRAME') {
+   targetUrl = 
extractParamFromUri(event.target.src, 'url');
}
-   });
-
+   _gaq.push(['_trackSocial', 
'twitter', 'tweet', targetUrl]);
+   }
});
-   }
 
-   if (isiPhone < 0 && isiPad < 0 && 
$('.gplus1_button').length) {
-   WH.setGooglePlusOneLangCode();
-   var node2 = document.createElement('script');
-   node2.type = 'text/javascript';
-   node2.async = true;
-   node2.src = 
'http://apis.google.com/js/plusone.js';
-   $('body').append(node2);
-   }
-   if (typeof WH.FB != 'undefined') WH.FB.init('new');
-   if (typeof WH.GP != 'undefined') WH.GP.init();
+   });
+   }
 
-   if ($('#pinterest').length) {
-   var node3 = document.createElement('script');
-   node3.type = 'text/javascript';
-   node3.async = true;
-   node3.src = 
'http://assets.pinterest.com/js/pinit.js';
-   $('body').append(node3);
-   }
+   if (isiPhone < 0 && isiPad < 0 && $('.gplus1_button').length) {
+   WH.setGooglePlusOneLangCode();
+   var node2 = document.createElement('script');
+   node2.type = 'text/javascript';
+   node2.async = true;
+   node2.src = 'http://apis.google.com/js/plusone.js';
+   $('body').append(node2);
+   }
+   if (typeof WH.FB != 'undefined') WH.FB.init('new');
+   if (typeof WH.GP != 'undefined') WH.GP.init();
 
-   if (typeof WH.imageFeedback != 'undefined') {
-   WH.imageFeedback();
-   }
-   if (typeof WH.uciFeedback != 'undefined') {
-   WH.uciFeedback();
-   }
-   });
-   })(jQuery);
\ No newline at end of file
+   if ($('#pinterest').length) {
+   var node3 = document.createElement('script');
+   node3.type = 'text/javascript';
+   node3.async = true;
+   node3.

[MediaWiki-commits] [Gerrit] Moved icky inline JS to a separate file. - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Moved icky inline JS to a separate file.
..


Moved icky inline JS to a separate file.

Change-Id: I86422daf6f31fbf301ce3ebdc7f98990b1430bdd
---
M BlueSky.skin.php
A resources/js/social.js
2 files changed, 49 insertions(+), 51 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index b5fbebb..c24b0b6 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -2429,57 +2429,6 @@
}
?>
 
-
-   (function ($) {
-   $(document).ready(function() {
-   WH.addScrollEffectToTOC();
-   });
-
-   $(window).load(function() {
-   if ($('.twitter-share-button').length && 
(!$.browser.msie || $.browser.version > 7)) {
-
-   
$.getScript("https://platform.twitter.com/widgets.js";, function() {
-   twttr.events.bind('tweet', 
function(event) {
-   if (event) {
-   var targetUrl;
-   if (event.target && 
event.target.nodeName == 'IFRAME') {
-   targetUrl = 
extractParamFromUri(event.target.src, 'url');
-   }
-   
_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
-   }
-   });
-
-   });
-   }
-
-   if (isiPhone < 0 && isiPad < 0 && 
$('.gplus1_button').length) {
-   WH.setGooglePlusOneLangCode();
-   var node2 = document.createElement('script');
-   node2.type = 'text/javascript';
-   node2.async = true;
-   node2.src = 
'http://apis.google.com/js/plusone.js';
-   $('body').append(node2);
-   }
-   if (typeof WH.FB != 'undefined') WH.FB.init('new');
-   if (typeof WH.GP != 'undefined') WH.GP.init();
-
-   if ($('#pinterest').length) {
-   var node3 = document.createElement('script');
-   node3.type = 'text/javascript';
-   node3.async = true;
-   node3.src = 
'http://assets.pinterest.com/js/pinit.js';
-   $('body').append(node3);
-   }
-
-   if (typeof WH.imageFeedback != 'undefined') {
-   WH.imageFeedback();
-   }
-   if (typeof WH.uciFeedback != 'undefined') {
-   WH.uciFeedback();
-   }
-   });
-   })(jQuery);
-
  7)) {
+
+   
$.getScript("https://platform.twitter.com/widgets.js";, function() {
+   twttr.events.bind('tweet', 
function(event) {
+   if (event) {
+   var targetUrl;
+   if (event.target && 
event.target.nodeName == 'IFRAME') {
+   targetUrl = 
extractParamFromUri(event.target.src, 'url');
+   }
+   
_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
+   }
+   });
+
+   });
+   }
+
+   if (isiPhone < 0 && isiPad < 0 && 
$('.gplus1_button').length) {
+   WH.setGooglePlusOneLangCode();
+   var node2 = document.createElement('script');
+   node2.type = 'text/javascript';
+   node2.async = true;
+   node2.src = 
'http://apis.google.com/js/plusone.js';
+   $('body').append(node2);
+   }
+   if (typeof WH.FB != 'undefined') WH.FB.init('new');
+   if (typeof WH.G

[MediaWiki-commits] [Gerrit] Moved icky inline JS to a separate file. - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Moved icky inline JS to a separate file.
..

Moved icky inline JS to a separate file.

Change-Id: I86422daf6f31fbf301ce3ebdc7f98990b1430bdd
---
M BlueSky.skin.php
A resources/js/social.js
2 files changed, 49 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/67/134967/1

diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index b5fbebb..c24b0b6 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -2429,57 +2429,6 @@
}
?>
 
-
-   (function ($) {
-   $(document).ready(function() {
-   WH.addScrollEffectToTOC();
-   });
-
-   $(window).load(function() {
-   if ($('.twitter-share-button').length && 
(!$.browser.msie || $.browser.version > 7)) {
-
-   
$.getScript("https://platform.twitter.com/widgets.js";, function() {
-   twttr.events.bind('tweet', 
function(event) {
-   if (event) {
-   var targetUrl;
-   if (event.target && 
event.target.nodeName == 'IFRAME') {
-   targetUrl = 
extractParamFromUri(event.target.src, 'url');
-   }
-   
_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
-   }
-   });
-
-   });
-   }
-
-   if (isiPhone < 0 && isiPad < 0 && 
$('.gplus1_button').length) {
-   WH.setGooglePlusOneLangCode();
-   var node2 = document.createElement('script');
-   node2.type = 'text/javascript';
-   node2.async = true;
-   node2.src = 
'http://apis.google.com/js/plusone.js';
-   $('body').append(node2);
-   }
-   if (typeof WH.FB != 'undefined') WH.FB.init('new');
-   if (typeof WH.GP != 'undefined') WH.GP.init();
-
-   if ($('#pinterest').length) {
-   var node3 = document.createElement('script');
-   node3.type = 'text/javascript';
-   node3.async = true;
-   node3.src = 
'http://assets.pinterest.com/js/pinit.js';
-   $('body').append(node3);
-   }
-
-   if (typeof WH.imageFeedback != 'undefined') {
-   WH.imageFeedback();
-   }
-   if (typeof WH.uciFeedback != 'undefined') {
-   WH.uciFeedback();
-   }
-   });
-   })(jQuery);
-
  7)) {
+
+   
$.getScript("https://platform.twitter.com/widgets.js";, function() {
+   twttr.events.bind('tweet', 
function(event) {
+   if (event) {
+   var targetUrl;
+   if (event.target && 
event.target.nodeName == 'IFRAME') {
+   targetUrl = 
extractParamFromUri(event.target.src, 'url');
+   }
+   
_gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
+   }
+   });
+
+   });
+   }
+
+   if (isiPhone < 0 && isiPad < 0 && 
$('.gplus1_button').length) {
+   WH.setGooglePlusOneLangCode();
+   var node2 = document.createElement('script');
+   node2.type = 'text/javascript';
+   node2.async = true;
+   node2.src = 
'http://apis.google.com/js/plusone.js';
+   $('body').append(node2);
+   }
+   if (typeof WH.FB != 'undefine

[MediaWiki-commits] [Gerrit] Coding style tweaks, de-wikiHow-ification, removed unused va... - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Coding style tweaks, de-wikiHow-ification, removed unused 
variables and some more $wgTitles.
..


Coding style tweaks, de-wikiHow-ification, removed unused variables and
some more $wgTitles.

Change-Id: I6aa1a45f557c84bb181cd1ee5ec336b71c7621ba
---
M BlueSky.skin.php
1 file changed, 79 insertions(+), 48 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 1ae1d17..b5fbebb 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -457,7 +457,7 @@
if ( $wgLanguageCode == 'zh' ) {
$articleName = $wgContLang->convert( $articleName );
}
-   $html = "" . wfMessage( 'Howto', '' )->text() . "{$articleName}";
+   $html = "" . wfMessage( 'Howto', '' )->text() . "{$articleName}";
 
return $html;
}
@@ -686,12 +686,12 @@
 
$sep = self::BREADCRUMB_SEPARATOR;
 
-   $viewMode = WikihowCategoryViewer::getViewModeArray( 
$this->getContext() );
+   //$viewMode = WikihowCategoryViewer::getViewModeArray( 
$this->getContext() );
$categories = Linker::link(
-   Title::newFromText( 'Special:Categorylisting' ),
-   wfMessage( 'categories' )->text(),
+   SpecialPage::getTitleFor( 'Categories' ),
+   wfMessage( 'categories' )->text()/*,
array(),
-   $viewMode
+   $viewMode*/
);
$s = '' . Linker::link( $mainPageObj, 
wfMessage( 'home' )->text() ) . " $sep $categories";
 
@@ -720,7 +720,9 @@
 
asort( $tempout );
$olds = $s;
-   if ( $tempout ) $s .= $tempout[0]; // this usually works
+   if ( $tempout ) {
+   $s .= $tempout[0]; // this usually works
+   }
 
if ( strpos( $s, "/Category:WikiHow" ) !== false
|| strpos( $s, "/Category:Featured" ) !== false
@@ -737,8 +739,8 @@
}
}
}
-
}
+
return $s;
}
 
@@ -919,7 +921,14 @@
}
 
// edit
-   if ( $wgTitle->getNamespace() != NS_CATEGORY && ( !in_array( 
$wgTitle->getNamespace(), array( NS_USER, NS_USER_TALK, NS_IMAGE ) ) || $action 
== 'edit' || $wgUser->getID() > 0 ) ) {
+   if (
+   $wgTitle->getNamespace() != NS_CATEGORY &&
+   (
+   !in_array( $wgTitle->getNamespace(), array( 
NS_USER, NS_USER_TALK, NS_FILE ) ) ||
+   $action == 'edit' || $wgUser->getID() > 0
+   )
+   )
+   {
$editTab->href = $wgTitle->getLocalURL( 
$skin->editUrlOptions() );
$editTab->text = wfMessage( 'edit' )->text();
$editTab->class = ( $action == 'edit' ) ? 'on' : '';
@@ -969,7 +978,7 @@
$textViewTab->href = $wgTitle->getLocalURL( 
'viewMode=text' );
$textViewTab->text = wfMessage( 'text_view' )->text();
$textViewTab->class = $wgRequest->getVal( 'viewMode', 0 
) ? 'on' : '';
-   $textViewTab->id = "tab_text_view";
+   $textViewTab->id = 'tab_text_view';
$tabs[] = $textViewTab;
}
 
@@ -1005,33 +1014,36 @@
}
 
function getTabsHtml( $tabs ) {
-   $html = "";
+   $html = '';
 
if ( count( $tabs ) > 0 ) {
-   $html .= "";
-   $html .= "";
+   $html .= '';
+   $html .= '';
+
foreach ( $tabs as $tab ) {
-   $attributes = "";
+   $attributes = '';
+
foreach ( $tab as $attribute => $value ) {
-   if ( $attribute != "text" ) {
+   if ( $attribute != 'text' ) {
$attributes .= " 
{$attribute}='{$value}'";
}
}
 
$html .= "{$tab->text}";
-   // $activeClass = $tab->active?'on':'';
-   // $html .= "{$tab->text}";
if ( isset( $tab->hasSubMenu ) && 
$tab->hasSubMenu ) {
- 

[MediaWiki-commits] [Gerrit] some small lint/style fixes on 'ocg' - change (operations/puppet)

2014-05-22 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: some small lint/style fixes on 'ocg'
..

some small lint/style fixes on 'ocg'

fixes some puppet-lint warnings,
removes a tab,
fixes some pathes in "managed by puppet" comments

Change-Id: I9afbdf5edd09f0991310453813cd636aa516e2e5
---
M manifests/role/ocg.pp
M modules/ocg/files/logrotate
M modules/ocg/manifests/decommission.pp
M modules/ocg/manifests/init.pp
M modules/ocg/templates/mw-ocg-service.js.erb
5 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/134966/1

diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 7dae610..30921cf 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -15,7 +15,7 @@
 } else {
 # Default host in the WMF production env... this needs a variable or 
something
 $redis_host = 'rdb1002.eqiad.wmnet'
-   }
+}
 
 class { '::ocg':
 redis_host  => $redis_host,
@@ -25,7 +25,7 @@
 
 monitor_service { 'ocg':
 description   => 'Offline Content Generation - Collection',
-check_command => "check_http_on_port!80",
+check_command => 'check_http_on_port!80',
 }
 }
 
diff --git a/modules/ocg/files/logrotate b/modules/ocg/files/logrotate
index e817d26..7e5ebcd 100644
--- a/modules/ocg/files/logrotate
+++ b/modules/ocg/files/logrotate
@@ -1,6 +1,6 @@
 #
 ### THIS FILE IS MANAGED BY PUPPET
-### puppet:///files/ocg/logrotate
+### puppet:///modules/ocg/files/logrotate
 #
 
 /var/log/ocg/*.log {
diff --git a/modules/ocg/manifests/decommission.pp 
b/modules/ocg/manifests/decommission.pp
index 8a68f23..a2aed3d 100644
--- a/modules/ocg/manifests/decommission.pp
+++ b/modules/ocg/manifests/decommission.pp
@@ -10,8 +10,8 @@
 service { 'ocg':
 ensure   => stopped,
 provider => upstart,
-before => File['/etc/init/ocg.conf'],
-before => File[$temp_dir],
+before   => File['/etc/init/ocg.conf'],
+before   => File[$temp_dir],
 }
 
 file { [
@@ -30,7 +30,7 @@
 }
 
 deployment::target { 'ocg':
-require => Service['ocg'],
 ensure  => absent,
+require => Service['ocg'],
 }
 }
diff --git a/modules/ocg/manifests/init.pp b/modules/ocg/manifests/init.pp
index eaa59bc..d4357eb 100644
--- a/modules/ocg/manifests/init.pp
+++ b/modules/ocg/manifests/init.pp
@@ -33,7 +33,7 @@
 system => true,
 }
 
-if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, "14.04") 
>= 0 ) {
+if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '14.04') 
>= 0 ) {
 # Although we need NodeJS on the server, only ubuntu 14.04 currently
 # comes with it. On labs or 12.04 boxes it has to be installed by hand 
:(
 package { 'nodejs':
@@ -42,7 +42,7 @@
 }
 }
 
-if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, "12.04") 
>= 0 ) {
+if ( $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '12.04') 
>= 0 ) {
 # On ubuntu versions greater than 12.04 node is known as nodejs
 # This is exposed as a variable in the upstart configuration template
 $nodebin = 'nodejs'
@@ -80,8 +80,8 @@
 }
 
 service { 'ocg':
-provider   => upstart,
 ensure => running,
+provider   => upstart,
 hasstatus  => false,
 hasrestart => false,
 require=> File['/etc/init/ocg.conf'],
diff --git a/modules/ocg/templates/mw-ocg-service.js.erb 
b/modules/ocg/templates/mw-ocg-service.js.erb
index 067c6f5..6aa2e29 100644
--- a/modules/ocg/templates/mw-ocg-service.js.erb
+++ b/modules/ocg/templates/mw-ocg-service.js.erb
@@ -1,6 +1,6 @@
 /* -
  * THIS FILE IS MANAGED BY PUPPET
- * /modules/ocg_collection/templates/mw-collection-ocg.js.erb
+ * /modules/ocg/templates/mw-collection-ocg.js.erb
  *
  * It is intended to be included by the main configuration file
  * in the deploy repository. This just allows puppetization of

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

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

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


[MediaWiki-commits] [Gerrit] Coding style tweaks, de-wikiHow-ification, removed unused va... - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Coding style tweaks, de-wikiHow-ification, removed unused 
variables and some more $wgTitles.
..

Coding style tweaks, de-wikiHow-ification, removed unused variables and
some more $wgTitles.

Change-Id: I6aa1a45f557c84bb181cd1ee5ec336b71c7621ba
---
M BlueSky.skin.php
1 file changed, 79 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/65/134965/1

diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 1ae1d17..b5fbebb 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -457,7 +457,7 @@
if ( $wgLanguageCode == 'zh' ) {
$articleName = $wgContLang->convert( $articleName );
}
-   $html = "" . wfMessage( 'Howto', '' )->text() . "{$articleName}";
+   $html = "" . wfMessage( 'Howto', '' )->text() . "{$articleName}";
 
return $html;
}
@@ -686,12 +686,12 @@
 
$sep = self::BREADCRUMB_SEPARATOR;
 
-   $viewMode = WikihowCategoryViewer::getViewModeArray( 
$this->getContext() );
+   //$viewMode = WikihowCategoryViewer::getViewModeArray( 
$this->getContext() );
$categories = Linker::link(
-   Title::newFromText( 'Special:Categorylisting' ),
-   wfMessage( 'categories' )->text(),
+   SpecialPage::getTitleFor( 'Categories' ),
+   wfMessage( 'categories' )->text()/*,
array(),
-   $viewMode
+   $viewMode*/
);
$s = '' . Linker::link( $mainPageObj, 
wfMessage( 'home' )->text() ) . " $sep $categories";
 
@@ -720,7 +720,9 @@
 
asort( $tempout );
$olds = $s;
-   if ( $tempout ) $s .= $tempout[0]; // this usually works
+   if ( $tempout ) {
+   $s .= $tempout[0]; // this usually works
+   }
 
if ( strpos( $s, "/Category:WikiHow" ) !== false
|| strpos( $s, "/Category:Featured" ) !== false
@@ -737,8 +739,8 @@
}
}
}
-
}
+
return $s;
}
 
@@ -919,7 +921,14 @@
}
 
// edit
-   if ( $wgTitle->getNamespace() != NS_CATEGORY && ( !in_array( 
$wgTitle->getNamespace(), array( NS_USER, NS_USER_TALK, NS_IMAGE ) ) || $action 
== 'edit' || $wgUser->getID() > 0 ) ) {
+   if (
+   $wgTitle->getNamespace() != NS_CATEGORY &&
+   (
+   !in_array( $wgTitle->getNamespace(), array( 
NS_USER, NS_USER_TALK, NS_FILE ) ) ||
+   $action == 'edit' || $wgUser->getID() > 0
+   )
+   )
+   {
$editTab->href = $wgTitle->getLocalURL( 
$skin->editUrlOptions() );
$editTab->text = wfMessage( 'edit' )->text();
$editTab->class = ( $action == 'edit' ) ? 'on' : '';
@@ -969,7 +978,7 @@
$textViewTab->href = $wgTitle->getLocalURL( 
'viewMode=text' );
$textViewTab->text = wfMessage( 'text_view' )->text();
$textViewTab->class = $wgRequest->getVal( 'viewMode', 0 
) ? 'on' : '';
-   $textViewTab->id = "tab_text_view";
+   $textViewTab->id = 'tab_text_view';
$tabs[] = $textViewTab;
}
 
@@ -1005,33 +1014,36 @@
}
 
function getTabsHtml( $tabs ) {
-   $html = "";
+   $html = '';
 
if ( count( $tabs ) > 0 ) {
-   $html .= "";
-   $html .= "";
+   $html .= '';
+   $html .= '';
+
foreach ( $tabs as $tab ) {
-   $attributes = "";
+   $attributes = '';
+
foreach ( $tab as $attribute => $value ) {
-   if ( $attribute != "text" ) {
+   if ( $attribute != 'text' ) {
$attributes .= " 
{$attribute}='{$value}'";
}
}
 
$html .= "{$tab->text}";
-   // $activeClass = $tab->active?'on':'';
-   // $html .= "{$tab->text}";
if ( isset( $tab->hasSub

[MediaWiki-commits] [Gerrit] MediaWiki::performAction, return 404 on nosuchaction error - change (mediawiki/core)

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

Change subject: MediaWiki::performAction, return 404 on nosuchaction error
..


MediaWiki::performAction, return 404 on nosuchaction error

Nosuchaction error page was sending 200 as the HTTP status code,
which was misleading. Instead return 404.

Change-Id: I9b432c9e53caf0a13e9a0c798f78a7bd8a78443b
---
M includes/Wiki.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/Wiki.php b/includes/Wiki.php
index eff251f..555813d 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -434,6 +434,7 @@
}
 
if ( wfRunHooks( 'UnknownAction', array( $request->getVal( 
'action', 'view' ), $page ) ) ) {
+   $output->setStatusCode( 404 );
$output->showErrorPage( 'nosuchaction', 
'nosuchactiontext' );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b432c9e53caf0a13e9a0c798f78a7bd8a78443b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Taueres 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Happy-melon 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Wikinaut 
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 border-radius and box-shadow functions to mediawiki mixins - change (mediawiki/core)

2014-05-22 Thread Robmoen (Code Review)
Robmoen has uploaded a new change for review.

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

Change subject: Add border-radius and box-shadow functions to mediawiki mixins
..

Add border-radius and box-shadow functions to mediawiki mixins

Change-Id: Idb46dee0ac8a29d489ec7fb405f8a3149a729b3b
---
M resources/src/mediawiki.less/mediawiki.mixins.less
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/resources/src/mediawiki.less/mediawiki.mixins.less 
b/resources/src/mediawiki.less/mediawiki.mixins.less
index 6556af9..2390c37 100644
--- a/resources/src/mediawiki.less/mediawiki.mixins.less
+++ b/resources/src/mediawiki.less/mediawiki.mixins.less
@@ -70,3 +70,15 @@
-webkit-box-sizing: @value;
box-sizing: @value;
 }
+
+.box-shadow(...) {
+  -moz-box-shadow: @arguments
+  -webkit-box-shadow: @arguments;
+  box-shadow: @arguments;
+}
+
+.border-radius(@radius) {
+  -moz-border-radius: @radius;
+  -webkit-border-radius: @radius;
+  border-radius: @radius;
+}

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

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

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


[MediaWiki-commits] [Gerrit] Add unit tests for #ifexist in NS_MEDIA with file redirects - change (mediawiki...ParserFunctions)

2014-05-22 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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

Change subject: Add unit tests for #ifexist in NS_MEDIA with file redirects
..

Add unit tests for #ifexist in NS_MEDIA with file redirects

Bug: 32031
Change-Id: I6be56d9b1942caf85c26af1b08bda37b1f70b82c
---
M funcsParserTests.txt
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFunctions 
refs/changes/63/134963/1

diff --git a/funcsParserTests.txt b/funcsParserTests.txt
index 2ff7ba3..088f2e6 100644
--- a/funcsParserTests.txt
+++ b/funcsParserTests.txt
@@ -21,6 +21,18 @@
 blah blah
 !! endarticle
 
+!! article
+File:Redirect_to_Foobar.jpg
+!! text
+#REDIRECT[[File:Foobar.jpg]]
+!! endarticle
+
+!! article
+File:Redirect_to_nowhere.jpg
+!! text
+#REDIRECT[[File:Missing target file.jpg]]
+!! endarticle
+
 !! test
 Input times are UTC, not local time
 !! input
@@ -127,6 +139,21 @@
 !! end
 
 !! test
+{{#ifexist:}} media redirect (bug 32031)
+!! input
+{{#ifexist:Media:Redirect_to_Foobar.jpg|Found|Not found}}
+{{#ifexist:Media:Redirect_to_nowhere.jpg|Found|Not found}}
+{{#ifexist:Media:Missing file.jpg|Found|Not found}}
+{{#ifexist:Media:Dionysos-Brunnen am Kölner Dom.jpg|Found|Not found}}
+!!result
+Found
+Not found
+Not found
+Not found
+
+!!end
+
+!! test
 #if
 !! input
 {{#if: | yes | no}}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6be56d9b1942caf85c26af1b08bda37b1f70b82c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] Allow faux-renaming/database remapping - change (operations/mediawiki-config)

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

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

Change subject: Allow faux-renaming/database remapping
..

Allow faux-renaming/database remapping

Example with chapcomwiki -> affcomwiki

Change-Id: I47e7dd3ef0052c863bdf32082899cf824b290407
---
M multiversion/MWMultiVersion.php
1 file changed, 15 insertions(+), 3 deletions(-)


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

diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 526b397..d3410e5 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -43,7 +43,7 @@
 */
public static function newFromDBName( $dbName ) {
$m = new self();
-   $m->db = $dbName;
+   $m->db = $m->remapDatabase( $dbName );
return $m;
}
 
@@ -214,7 +214,19 @@
self::error( "--wiki must be the first parameter.\n" );
}
 
-   $this->db = $dbname;
+   $this->db = $this->remapDatabase( $dbname );
+   }
+
+   /**
+* @param string $dbname
+* @return string
+*/
+   private function remapDatabase( $dbName ) {
+   switch ( $dbName ) {
+   case 'chapcomwiki':
+   return 'affcomwiki';
+   }
+   return $dbName;
}
 
/**
@@ -228,7 +240,7 @@
} else {
$dbSuffix = $site;
}
-   $this->db = str_replace( "-", "_", $lang . $dbSuffix );
+   $this->db = $this->remapDatabase( str_replace( "-", "_", $lang 
. $dbSuffix ) );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47e7dd3ef0052c863bdf32082899cf824b290407
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] Allow override of redis host - change (operations/puppet)

2014-05-22 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Allow override of redis host
..


Allow override of redis host

We need this in labs where the redis host is using the
main_password; but I'm still statically pointing to the
redis host in production.

Change-Id: I9d279beb8c370f408d94184d98fc6c4a7066a368
TODO: Find some sort of puppet variable with the puppet lvs hostname
---
M manifests/role/ocg.pp
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 33da2f8..7dae610 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -10,8 +10,15 @@
 
 include passwords::redis
 
+if ( $::ocg_redis_server_override != undef ) {
+$redis_host = $::ocg_redis_server_override
+} else {
+# Default host in the WMF production env... this needs a variable or 
something
+$redis_host = 'rdb1002.eqiad.wmnet'
+   }
+
 class { '::ocg':
-redis_host  => 'rdb1002.eqiad.wmnet',
+redis_host  => $redis_host,
 redis_password  => $passwords::redis::main_password,
 temp_dir=> '/srv/deployment/ocg/tmp',
 }
@@ -23,7 +30,7 @@
 }
 
 class role::ocg::test {
-system::role { 'ocg-test': description => 'offline content generator for 
MediaWiki Collection extension (testing)' }
+system::role { 'ocg-test': description => 'offline content generator for 
MediaWiki Collection extension (single host testing)' }
 
 include passwords::redis
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d279beb8c370f408d94184d98fc6c4a7066a368
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Jgreen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] .unbind() -> .off() - change (VisualEditor/VisualEditor)

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

Change subject: .unbind() -> .off()
..


.unbind() -> .off()

Because .unbind() stopped being cool when jQuery 1.7 came out in 2011.

Change-Id: I55b260087104b680341810cb878c6d5003fdd163
---
M modules/ve/ce/ve.ce.ProtectedNode.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js 
b/modules/ve/ce/ve.ce.ProtectedNode.js
index 68babdb..2d1194b 100644
--- a/modules/ve/ce/ve.ce.ProtectedNode.js
+++ b/modules/ve/ce/ve.ce.ProtectedNode.js
@@ -326,7 +326,7 @@
 ve.ce.ProtectedNode.prototype.clearPhantoms = function () {
var surface = this.root.getSurface();
surface.replacePhantoms( null );
-   surface.$element.unbind( '.ve-ce-protectedNode' );
+   surface.$element.off( '.ve-ce-protectedNode' );
surface.getModel().getDocument().disconnect( this, { 'transact': 
'positionPhantoms' } );
this.$phantoms = this.$( [] );
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55b260087104b680341810cb878c6d5003fdd163
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add docblock parameter type hints - change (operations/mediawiki-config)

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

Change subject: Add docblock parameter type hints
..


Add docblock parameter type hints

Change-Id: I207e77c638f89711c98ee73f43160aa9fdcb2167
---
M multiversion/MWMultiVersion.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 5ddd7e5..526b397 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -38,7 +38,7 @@
 
/**
 * Create a multiversion object based on a dbname
-* @param $dbName string
+* @param string $dbName
 * @return MWMultiVersion object for this wiki
 */
public static function newFromDBName( $dbName ) {
@@ -62,7 +62,7 @@
/**
 * Initialize and get the singleton instance of MWMultiVersion.
 * Use this for all web hits except to /w/thumb.php on 
upload.wikmedia.org.
-* @param $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
+* @param string $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
 * @return MWMultiVersion object for this wiki
 */
public static function initializeForWiki( $serverName ) {
@@ -74,7 +74,7 @@
/**
 * Initialize and get the singleton instance of MWMultiVersion.
 * Use this for web hits to /w/thumb.php on upload.wikmedia.org.
-* @param $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
+* @param string $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
 * @return MWMultiVersion object for the wiki derived from the pathinfo
 */
public static function initializeForUploadWiki( $pathInfo ) {
@@ -117,7 +117,7 @@
 
/**
 * Derives site and lang from the parameters and sets $site and $lang 
on the instance
-* @param $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
+* @param string $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
 */
private function setSiteInfoForWiki( $serverName ) {
$matches = array();
@@ -180,7 +180,7 @@
 
/**
 * Derives site and lang from the parameter and sets $site and $lang on 
the instance
-* @param $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
+* @param string $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
 */
private function setSiteInfoForUploadWiki( $pathInfo ) {
$pathBits = explode( '/', $pathInfo );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I207e77c638f89711c98ee73f43160aa9fdcb2167
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] Add docblock parameter type hints - change (operations/mediawiki-config)

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

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

Change subject: Add docblock parameter type hints
..

Add docblock parameter type hints

Change-Id: I207e77c638f89711c98ee73f43160aa9fdcb2167
---
M multiversion/MWMultiVersion.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 5ddd7e5..526b397 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -38,7 +38,7 @@
 
/**
 * Create a multiversion object based on a dbname
-* @param $dbName string
+* @param string $dbName
 * @return MWMultiVersion object for this wiki
 */
public static function newFromDBName( $dbName ) {
@@ -62,7 +62,7 @@
/**
 * Initialize and get the singleton instance of MWMultiVersion.
 * Use this for all web hits except to /w/thumb.php on 
upload.wikmedia.org.
-* @param $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
+* @param string $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
 * @return MWMultiVersion object for this wiki
 */
public static function initializeForWiki( $serverName ) {
@@ -74,7 +74,7 @@
/**
 * Initialize and get the singleton instance of MWMultiVersion.
 * Use this for web hits to /w/thumb.php on upload.wikmedia.org.
-* @param $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
+* @param string $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
 * @return MWMultiVersion object for the wiki derived from the pathinfo
 */
public static function initializeForUploadWiki( $pathInfo ) {
@@ -117,7 +117,7 @@
 
/**
 * Derives site and lang from the parameters and sets $site and $lang 
on the instance
-* @param $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
+* @param string $serverName the ServerName for this wiki -- 
$_SERVER['SERVER_NAME']
 */
private function setSiteInfoForWiki( $serverName ) {
$matches = array();
@@ -180,7 +180,7 @@
 
/**
 * Derives site and lang from the parameter and sets $site and $lang on 
the instance
-* @param $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
+* @param string $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
 */
private function setSiteInfoForUploadWiki( $pathInfo ) {
$pathBits = explode( '/', $pathInfo );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I207e77c638f89711c98ee73f43160aa9fdcb2167
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] jQuery 1.9 fixes - change (mediawiki...TimedMediaHandler)

2014-05-22 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: jQuery 1.9 fixes
..

jQuery 1.9 fixes

This should be enough to satisfy the upgrade; I couldn't find anything
else that was an issue according to the upgrade guide.

Change-Id: I12a408f2faf46527c6561471a38a632d4de91e3c
---
M MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
M MwEmbedModules/EmbedPlayer/resources/mw.processEmbedPlayers.js
M MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js
M MwEmbedModules/EmbedPlayer/tests/Player_Native_Bindings.html
6 files changed, 33 insertions(+), 25 deletions(-)


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

diff --git a/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js 
b/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js
index 7cb215b..32e8351 100644
--- a/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js
+++ b/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js
@@ -39,11 +39,13 @@
 
var rewriteElementCount = 0;
$( this ).each( function(inx, playerElement){
-   var skinName ='';
+   var skinName = '',
+   profile = $.client.profile();
+
// we have javascript ( disable controls )
$( playerElement ).removeAttr( 'controls' );
// Add an overlay loader ( firefox has its own native 
loading spinner )
-   if( !$.browser.mozilla ){
+   if ( profile.name !== 'firefox' ){
$( playerElement )
.parent()
.getAbsoluteOverlaySpinner()
diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
index b93eca5..f77f085 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -580,7 +580,9 @@
 * @return {Number} pixel height of the video
 */
getPlayerWidth: function() {
-   if ( $.browser.mozilla && parseFloat( $.browser.version ) < 2 ) 
{
+   var profile = $.client.profile();
+
+   if ( profile.name === 'firefox' && profile.versionNumber < 2 ) {
return ( $( this ).parent().parent().width() );
}
return $( this ).width();
@@ -1613,10 +1615,11 @@
updatePosterHTML: function () {
mw.log( 'EmbedPlayer:updatePosterHTML::' + this.id );

-   var _this = this;
-   var thumb_html = '';
-   var class_atr = '';
-   var style_atr = '';
+   var _this = this,
+   thumb_html = '',
+   class_atr = '',
+   style_atr = '',
+   profile = $.client.profile();
 
if( this.isImagePlayScreen() ){
this.addPlayScreenWithNativeOffScreen();
@@ -1632,11 +1635,11 @@
var $vid = $( '#' + this.pid ).show();
$vid.attr( 'poster', posterSrc );
// Add a quick timeout hide / show ( firefox 4x 
bug with native poster updates )
-   if( $.browser.mozilla ){
+   if ( profile.name === 'firefox' ){
$vid.hide();
-   setTimeout(function(){
+   setTimeout( function () {
$vid.show();
-   },0);
+   }, 0);
}
} else {
// hide the pid if present:
diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js 
b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
index 80960a4..aa5ff47 100644
--- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
+++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js
@@ -152,7 +152,7 @@
 
}
// Some browsers filter out duplicate mime types, hiding some 
plugins
-   var uniqueMimesOnly = $.browser.opera || $.browser.safari;
+   var uniqueMimesOnly = $.client.test( { opera: null, safari: 
null } );
 
// Opera will switch off javaEnabled in preferences if java 
can't be

[MediaWiki-commits] [Gerrit] MediaWiki::performAction, change nosuchaction HTTP status co... - change (mediawiki/core)

2014-05-22 Thread Taueres (Code Review)
Taueres has uploaded a new change for review.

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

Change subject: MediaWiki::performAction, change nosuchaction HTTP status code 
to 404
..

MediaWiki::performAction, change nosuchaction HTTP status code to 404

nosuchaction error page was sending 200 as HTTP status code,
this is misleading. The correct code is 404: action not found.

Change-Id: I9b432c9e53caf0a13e9a0c798f78a7bd8a78443b
---
M includes/Wiki.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/134959/1

diff --git a/includes/Wiki.php b/includes/Wiki.php
index eff251f..555813d 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -434,6 +434,7 @@
}
 
if ( wfRunHooks( 'UnknownAction', array( $request->getVal( 
'action', 'view' ), $page ) ) ) {
+   $output->setStatusCode( 404 );
$output->showErrorPage( 'nosuchaction', 
'nosuchactiontext' );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Allow override of redis host - change (operations/puppet)

2014-05-22 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Allow override of redis host
..

Allow override of redis host

We need this in labs where the redis host is using the
main_password; but I'm still statically pointing to the
redis host in production.

Change-Id: I9d279beb8c370f408d94184d98fc6c4a7066a368
TODO: Find some sort of puppet variable with the puppet lvs hostname
---
M manifests/role/ocg.pp
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/134958/1

diff --git a/manifests/role/ocg.pp b/manifests/role/ocg.pp
index 33da2f8..4ad66dc 100644
--- a/manifests/role/ocg.pp
+++ b/manifests/role/ocg.pp
@@ -10,8 +10,15 @@
 
 include passwords::redis
 
+if ( $::ocg_redis_server_override != undef ) {
+$redis_host = $::ocg_redis_server_override;
+} else {
+# Default host in the WMF production env... this needs a variable or 
something
+$redis_host = 'rdb1002.eqiad.wmnet';
+   }
+
 class { '::ocg':
-redis_host  => 'rdb1002.eqiad.wmnet',
+redis_host  => $redis_host,
 redis_password  => $passwords::redis::main_password,
 temp_dir=> '/srv/deployment/ocg/tmp',
 }
@@ -23,7 +30,7 @@
 }
 
 class role::ocg::test {
-system::role { 'ocg-test': description => 'offline content generator for 
MediaWiki Collection extension (testing)' }
+system::role { 'ocg-test': description => 'offline content generator for 
MediaWiki Collection extension (single host testing)' }
 
 include passwords::redis
 

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

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

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


[MediaWiki-commits] [Gerrit] Removed UserCompletedImages stuff. - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Removed UserCompletedImages stuff.
..


Removed UserCompletedImages stuff.

Again, extensions should remain as self-contained and
cross-skin-compatible as possible.

Change-Id: I72890342215efabf17231cc65f4e8fb4ead87301
---
M BlueSky.skin.php
1 file changed, 0 insertions(+), 17 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 4671856..1ae1d17 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -1841,13 +1841,6 @@
!$isMainPage &&
strpos( $this->data['bodytext'], 'textscroller_outer' ) 
!== false;
 
-   $showUserCompletedImages =
-   class_exists( 'UCIPatrol' ) &&
-   $title->exists() &&
-   $title->getNamespace() == NS_MAIN &&
-   !$isMainPage &&
-   UCIPatrol::showUCI( 
$this->getSkin()->getContext()->getTitle() );
-
$showImageFeedback =
class_exists( 'ImageFeedback' ) &&
ImageFeedback::isValidPage();
@@ -1884,7 +1877,6 @@
( $isMainPage ? ',hp' : '' ) .
( $showWikivideo ? ',whv' : '' ) .
( $showImageFeedback ? ',ii' : '' ) .
-   ( $showUserCompletedImages ? ',uci' : '' ) .
( $showTextScroller ? ',ts' : '' );
 
if ( $wgOut->mJSminCodes ) {
@@ -1903,7 +1895,6 @@
( $showTextScroller ? ',tsc' : '' ) .
( $isMainPage ? ',hpc' : '' ) .
( $showImageFeedback ? ',iic' : '' ) .
-   ( $showUserCompletedImages ? ',ucic' : '' ) .
( $isSpecialPage ? ',spc' : '' );
 
if ( $wgOut->mCSSminCodes ) {
@@ -2137,14 +2128,6 @@
 

-   
-   text() 
?>
-   
-   getSkin()->getContext() ) ?>
-
-   
-   getNamespace(), array( NS_USER, 
NS_MAIN, NS_PROJECT ) ) && $action == 'view' && !$isMainPage ) {
?>
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72890342215efabf17231cc65f4e8fb4ead87301
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Removed UserCompletedImages stuff. - change (mediawiki...BlueSky)

2014-05-22 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Removed UserCompletedImages stuff.
..

Removed UserCompletedImages stuff.

Again, extensions should remain as self-contained and
cross-skin-compatible as possible.

Change-Id: I72890342215efabf17231cc65f4e8fb4ead87301
---
M BlueSky.skin.php
1 file changed, 0 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/57/134957/1

diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 4671856..1ae1d17 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -1841,13 +1841,6 @@
!$isMainPage &&
strpos( $this->data['bodytext'], 'textscroller_outer' ) 
!== false;
 
-   $showUserCompletedImages =
-   class_exists( 'UCIPatrol' ) &&
-   $title->exists() &&
-   $title->getNamespace() == NS_MAIN &&
-   !$isMainPage &&
-   UCIPatrol::showUCI( 
$this->getSkin()->getContext()->getTitle() );
-
$showImageFeedback =
class_exists( 'ImageFeedback' ) &&
ImageFeedback::isValidPage();
@@ -1884,7 +1877,6 @@
( $isMainPage ? ',hp' : '' ) .
( $showWikivideo ? ',whv' : '' ) .
( $showImageFeedback ? ',ii' : '' ) .
-   ( $showUserCompletedImages ? ',uci' : '' ) .
( $showTextScroller ? ',ts' : '' );
 
if ( $wgOut->mJSminCodes ) {
@@ -1903,7 +1895,6 @@
( $showTextScroller ? ',tsc' : '' ) .
( $isMainPage ? ',hpc' : '' ) .
( $showImageFeedback ? ',iic' : '' ) .
-   ( $showUserCompletedImages ? ',ucic' : '' ) .
( $isSpecialPage ? ',spc' : '' );
 
if ( $wgOut->mCSSminCodes ) {
@@ -2137,14 +2128,6 @@
 

-   
-   text() 
?>
-   
-   getSkin()->getContext() ) ?>
-
-   
-   getNamespace(), array( NS_USER, 
NS_MAIN, NS_PROJECT ) ) && $action == 'view' && !$isMainPage ) {
?>
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72890342215efabf17231cc65f4e8fb4ead87301
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Simplify wmf-config listings in createTxtFileSymlinks.sh - change (operations/mediawiki-config)

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

Change subject: Simplify wmf-config listings in createTxtFileSymlinks.sh
..


Simplify wmf-config listings in createTxtFileSymlinks.sh

Change-Id: I21f9be264f0edffa776168894c846e7a69d6a59f
---
M docroot/noc/createTxtFileSymlinks.sh
1 file changed, 40 insertions(+), 40 deletions(-)

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



diff --git a/docroot/noc/createTxtFileSymlinks.sh 
b/docroot/noc/createTxtFileSymlinks.sh
index 1c37453..fb35a34 100755
--- a/docroot/noc/createTxtFileSymlinks.sh
+++ b/docroot/noc/createTxtFileSymlinks.sh
@@ -3,45 +3,45 @@
 
 # Create .txt symlink from mediawiki-config
 mwconfig_files_txt=(
-   wmf-config/CommonSettings-labs.php
-   wmf-config/CommonSettings.php
-   wmf-config/InitialiseSettings-labs.php
-   wmf-config/InitialiseSettings.php
-   wmf-config/PoolCounterSettings-eqiad.php
-   wmf-config/StartProfiler.php
-   wmf-config/abusefilter.php
-   wmf-config/CirrusSearch-common.php
-   wmf-config/CirrusSearch-labs.php
-   wmf-config/db-eqiad.php
-   wmf-config/db-labs.php
-   wmf-config/db-secondary.php
-   wmf-config/ext-labs.php
-   wmf-config/ext-production.php
-   wmf-config/filebackend-labs.php
-   wmf-config/filebackend.php
-   wmf-config/flaggedrevs.php
-   wmf-config/jobqueue-eqiad.php
-   wmf-config/liquidthreads.php
-   wmf-config/logging-labs.php
-   wmf-config/lucene-common.php
-   wmf-config/lucene-production.php
-   wmf-config/mc.php
-   wmf-config/mc-labs.php
-   wmf-config/missing.php
-   wmf-config/mobile-labs.php
-   wmf-config/mobile.php
-   wmf-config/proofreadpage.php
-   wmf-config/throttle.php
-   wmf-config/wgConf.php
-   wmf-config/wgConfVHosts.php
-   wmf-config/wgConfVHosts-labs.php
-   wmf-config/squid.php
-   wmf-config/squid-labs.php
-   wmf-config/session.php
-   wmf-config/session-labs.php
-   wmf-config/twemproxy-eqiad.yaml
-   wmf-config/twemproxy-labs.yaml
-   wmf-config/Wikibase.php
+   CommonSettings-labs.php
+   CommonSettings.php
+   InitialiseSettings-labs.php
+   InitialiseSettings.php
+   PoolCounterSettings-eqiad.php
+   StartProfiler.php
+   abusefilter.php
+   CirrusSearch-common.php
+   CirrusSearch-labs.php
+   db-eqiad.php
+   db-labs.php
+   db-secondary.php
+   ext-labs.php
+   ext-production.php
+   filebackend-labs.php
+   filebackend.php
+   flaggedrevs.php
+   jobqueue-eqiad.php
+   liquidthreads.php
+   logging-labs.php
+   lucene-common.php
+   lucene-production.php
+   mc.php
+   mc-labs.php
+   missing.php
+   mobile-labs.php
+   mobile.php
+   proofreadpage.php
+   throttle.php
+   wgConf.php
+   wgConfVHosts.php
+   wgConfVHosts-labs.php
+   squid.php
+   squid-labs.php
+   session.php
+   session-labs.php
+   twemproxy-eqiad.yaml
+   twemproxy-labs.yaml
+   Wikibase.php
 )
 
 # Create non-txt symlink from mediawiki-config
@@ -122,7 +122,7 @@
 
 for i in "${mwconfig_files_txt[@]}"
 do
-   ln -s ../../../$i "./$(basename $i).txt"
+   ln -s ../../../wmf-config/$i "./$(basename $i).txt"
 done
 
 for i in "${mwconfig_files[@]}"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I21f9be264f0edffa776168894c846e7a69d6a59f
Gerrit-PatchSet: 2
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] Update VisualEditor with I8df73bfc - change (mediawiki/core)

2014-05-22 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update VisualEditor with I8df73bfc
..

Update VisualEditor with I8df73bfc

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/134956/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index e019969..1de681b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit e019969be5d3c39bae9df00a139ee622736cf14e
+Subproject commit 1de681bc6df2cbf44fad12599ddd007c19543878

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I901bfb09531bdcc8d9d31a795e7a882a4935020e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf6
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Add sortby last activity as a user preference - change (mediawiki...Flow)

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

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

Change subject: Add sortby last activity as a user preference
..

Add sortby last activity as a user preference

To sort by last activity, pass in topiclist_sortby=updated,
this would also be saved in user's preference for non-anon users.

To clear sort by last activity, pass in topiclist_sortby=

Change-Id: I78dd2d5509876d91137a429b8f421e50f4476c47
---
M Flow.php
M Hooks.php
M includes/Block/TopicList.php
3 files changed, 41 insertions(+), 6 deletions(-)


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

diff --git a/Flow.php b/Flow.php
index 0310867..41dd25b 100755
--- a/Flow.php
+++ b/Flow.php
@@ -251,7 +251,7 @@
 
 // Housekeeping hooks
 $wgHooks['LoadExtensionSchemaUpdates'][] = 'FlowHooks::getSchemaUpdates';
-//$wgHooks['GetPreferences'][] = 'FlowHooks::getPreferences';
+$wgHooks['GetPreferences'][] = 'FlowHooks::onGetPreferences';
 $wgHooks['UnitTestsList'][] = 'FlowHooks::getUnitTests';
 $wgHooks['MediaWikiPerformAction'][] = 'FlowHooks::onPerformAction';
 $wgHooks['OldChangesListRecentChangesLine'][] = 
'FlowHooks::onOldChangesListRecentChangesLine';
diff --git a/Hooks.php b/Hooks.php
index 5d8f1ad..a35b7e6 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -632,4 +632,18 @@
 
return true;
}
+
+   /**
+* Add topiclist sortby to preferences.
+* @param $user User object
+* @param &$preferences array Preferences object
+* @return bool
+*/
+   public static function onGetPreferences( $user, &$preferences ) {
+   $preferences['flow-topiclist-sortby'] = array(
+   'type' => 'api',
+   );
+
+   return true;
+   }
 }
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index de4a99d..e3e356a 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -250,11 +250,32 @@
 
$findOptions['pager-limit'] = $limit;
 
-   if ( isset( $requestOptions['sortby'] ) && 
$requestOptions['sortby'] === 'updated' ) {
-   $findOptions['sort'] = 'workflow_last_update_timestamp';
-   $findOptions['pager-dir'] = 'rev';
-   $findOptions['order'] = 'desc';
-   $findOptions['limit'] = 500;
+   // Only support sortby = updated now, fall back to creation 
time by default otherwise.
+   // To clear the sortby user preference, pass sortby with an 
empty value
+   $sortByOption = '';
+   $user = $this->user;
+   if ( isset( $requestOptions['sortby'] ) ) {
+   if ( $requestOptions['sortby'] === 'updated' ) {
+   $sortByOption = 'updated';
+   }
+   if ( !$user->isAnon() && $user->getOption( 
'flow-topiclist-sortby' ) != $sortByOption ) {
+   $user->setOption( 'flow-topiclist-sortby', 
$sortByOption );
+   $user->saveSettings();
+   $user->invalidateCache();
+   }
+   } else {
+   if ( !$user->isAnon() && $user->getOption( 
'flow-topiclist-sortby' ) === 'updated' ) {
+$sortByOption = 'updated';
+   }
+   }
+
+   if ( $sortByOption === 'updated' ) {
+   $findOptions = array(
+   'sort' => 'workflow_last_update_timestamp',
+   'pager-dir' => 'rev',
+   'order' => 'desc',
+   'limit' => 500
+   ) + $findOptions;
}
 
return $findOptions;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78dd2d5509876d91137a429b8f421e50f4476c47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: frontend-rewrite
Gerrit-Owner: Bsitu 

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


[MediaWiki-commits] [Gerrit] Updated hashchange for jQuery 1.9 - change (mediawiki...MultimediaViewer)

2014-05-22 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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

Change subject: Updated hashchange for jQuery 1.9
..

Updated hashchange for jQuery 1.9

This came from https://github.com/nporteschaikin/jquery-hashchange
which has fixed the 1.9 issue in hashchange; the upstream is totally
inactive.

Also we had weird diffs with upstream because someone stripped the
trailing whitespace off a bunch of commented lines.

Change-Id: Ic57c08c9733cf64c115d28678a376af0f525818a
---
M resources/jquery.hashchange/jquery.hashchange.js
1 file changed, 91 insertions(+), 91 deletions(-)


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

diff --git a/resources/jquery.hashchange/jquery.hashchange.js 
b/resources/jquery.hashchange/jquery.hashchange.js
index 1f0592b..ed34c77 100644
--- a/resources/jquery.hashchange/jquery.hashchange.js
+++ b/resources/jquery.hashchange/jquery.hashchange.js
@@ -1,7 +1,7 @@
 /*!
  * jQuery hashchange event - v1.3 - 7/21/2010
  * http://benalman.com/projects/jquery-hashchange-plugin/
- *
+ * 
  * Copyright (c) 2010 "Cowboy" Ben Alman
  * Dual licensed under the MIT and GPL licenses.
  * http://benalman.com/about/license/
@@ -10,59 +10,59 @@
 // Script: jQuery hashchange event
 //
 // *Version: 1.3, Last updated: 7/21/2010*
-//
+// 
 // Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
 // GitHub   - http://github.com/cowboy/jquery-hashchange/
 // Source   - 
http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
 // (Minified)   - 
http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js
 (0.8kb gzipped)
-//
+// 
 // About: License
-//
+// 
 // Copyright (c) 2010 "Cowboy" Ben Alman,
 // Dual licensed under the MIT and GPL licenses.
 // http://benalman.com/about/license/
-//
+// 
 // About: Examples
-//
+// 
 // These working examples, complete with fully commented code, illustrate a few
 // ways in which this plugin can be used.
-//
+// 
 // hashchange event - 
http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
 // document.domain - 
http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
-//
+// 
 // About: Support and Testing
-//
+// 
 // Information about what version or versions of jQuery this plugin has been
 // tested with, what browsers it has been tested in, and where the unit tests
 // reside (so you can test it yourself).
-//
+// 
 // jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
 // Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 
3.2-5,
 //   Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 
4.6-5.
 // Unit Tests  - http://benalman.com/code/projects/jquery-hashchange/unit/
-//
+// 
 // About: Known issues
-//
+// 
 // While this jQuery hashchange event implementation is quite stable and
 // robust, there are a few unfortunate browser bugs surrounding expected
 // hashchange event-based behaviors, independent of any JavaScript
 // window.onhashchange abstraction. See the following examples for more
 // information:
-//
+// 
 // Chrome: Back Button - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
 // Firefox: Remote XMLHttpRequest - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
 // WebKit: Back Button in an Iframe - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
 // Safari: Back Button from a different domain - 
http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
-//
-// Also note that should a browser natively support the window.onhashchange
+// 
+// Also note that should a browser natively support the window.onhashchange 
 // event, but not report that it does, the fallback polling loop will be used.
-//
+// 
 // About: Release History
-//
+// 
 // 1.3   - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
 // "removable" for mobile-only development. Added IE6/7 document.title
 // support. Attempted to make Iframe as hidden as possible by using
-// techniques from http://www.paciellogroup.com/blog/?p=604. Added
+// techniques from http://www.paciellogroup.com/blog/?p=604. Added 
 // support for the "shortcut" format $(window).hashchange( fn ) and
 // $(window).hashchange() like jQuery provides for built-in events.
 // Renamed jQuery.hashchangeDelay to  and
@@ -87,40 +87,40 @@
 
 (function($,window,undefined){
   '$:nomunge'; // Used by YUI compressor.
-
+  
   // Reused string.
   var str_hashchange = 'hashchange',
-
+
 // Method / object references.
 doc = document,
 fake_onhashchange,
 special = $.event.special,
-
+
 // Does the browser support window.onhashchange? Note that IE8 running in
 // IE7 compatibil

[MediaWiki-commits] [Gerrit] WIP: Insert newlines in pre serialization - change (mediawiki...parsoid)

2014-05-22 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: WIP: Insert newlines in pre serialization
..

WIP: Insert newlines in pre serialization

This implements
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#html-fragment-serialization-algorithm

It breaks a bunch of parser tests by duplicating newlines. Need to investigate
why.

Change-Id: Idd28ea56bf63ec1aa70b1dc1396197d41de50c70
---
M lib/XMLSerializer.js
1 file changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/lib/XMLSerializer.js b/lib/XMLSerializer.js
index 803f460..a7d2fab 100644
--- a/lib/XMLSerializer.js
+++ b/lib/XMLSerializer.js
@@ -56,6 +56,14 @@
   plaintext: true,
   noscript: true
 };
+// Elements that strip leading newlines
+// 
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#html-fragment-serialization-algorithm
+var newlineStrippingElements = {
+   pre: true,
+   textarea: true,
+   listing: true
+};
+
 
 /**
  * Use only very few entities, encode everything else as numeric entity
@@ -113,6 +121,15 @@
cb(child.data);
}
} else {
+   if (child && newlineStrippingElements[localName]
+   && child.nodeType === TEXT_NODE 
&& /^\n/.test(child.data)) {
+   /* If current node is a pre, textarea, 
or listing element,
+* and the first child node of the 
element, if any, is a
+* Text node whose character data has 
as its first
+* character a U+000A LINE FEED (LF) 
character, then
+* append a U+000A LINE FEED (LF) 
character. */
+   cb('\n');
+   }
while(child) {
serializeToString(child, options, cb);
child = child.nextSibling;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd28ea56bf63ec1aa70b1dc1396197d41de50c70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] Fix for search term highlighting font size and TOC updates. - change (apps...wikipedia)

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

Change subject: Fix for search term highlighting font size and TOC updates.
..


Fix for search term highlighting font size and TOC updates.

When non-lead section of article were retrieved while TOC was
open, there was a regression which caused new sections/images
to not appear in the TOC until it was closed and opened again.

Ran ttfautohint on WikiFont.ttf

Fix for sharing some articles with special characters in
their titles causing app crash.

When you select a search result the top menu switches back
to default chrome.

Returned search result text size - had accidentally shrunken
the result article titles.

Change-Id: I1d96b8f9d01e5077f5091a4ad161a36272ac6112
---
M wikipedia/Categories/Article+Convenience.h
M wikipedia/Categories/Article+Convenience.m
M wikipedia/Defines/Defines.h
M wikipedia/Fonts/WikiFont.ttf
M wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
M wikipedia/View Controllers/Navigation/Top/TopMenuViewController.m
M wikipedia/View Controllers/SearchResults/SearchResultsController.m
M wikipedia/View Controllers/WebView/WebViewController.m
8 files changed, 54 insertions(+), 24 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/Categories/Article+Convenience.h 
b/wikipedia/Categories/Article+Convenience.h
index 8c6dac3..ed58405 100644
--- a/wikipedia/Categories/Article+Convenience.h
+++ b/wikipedia/Categories/Article+Convenience.h
@@ -12,4 +12,6 @@
 // larger than 99 x 99 px.
 - (UIImage *)getThumbnailUsingContext:(NSManagedObjectContext *)context;
 
+- (NSURL *)desktopURL;
+
 @end
diff --git a/wikipedia/Categories/Article+Convenience.m 
b/wikipedia/Categories/Article+Convenience.m
index 167ad22..70a22d0 100644
--- a/wikipedia/Categories/Article+Convenience.m
+++ b/wikipedia/Categories/Article+Convenience.m
@@ -5,6 +5,7 @@
 #import "ArticleCoreDataObjects.h"
 #import "Image+Convenience.h"
 #import "Defines.h"
+#import "NSString+Extras.h"
 
 @implementation Article (Convenience)
 
@@ -88,4 +89,17 @@
 return sectionImages;
 }
 
+-(NSURL *)desktopURL
+{
+NSString *titleWithoutSpaces = [self.title wikiTitleWithoutSpaces];
+
+NSString *urlString =
+[NSString stringWithFormat:@"https://%@.%@/wiki/%@";, self.domain, 
self.site, titleWithoutSpaces];
+
+NSString *encodedUrlString =
+[urlString 
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+
+return encodedUrlString ? [NSURL URLWithString:encodedUrlString] : nil;
+}
+
 @end
diff --git a/wikipedia/Defines/Defines.h b/wikipedia/Defines/Defines.h
index 2983b1b..01ab479 100644
--- a/wikipedia/Defines/Defines.h
+++ b/wikipedia/Defines/Defines.h
@@ -4,11 +4,14 @@
 #define SEARCH_RESULT_HEIGHT 60
 #define SEARCH_MAX_RESULTS @"25"
 
-#define SEARCH_FONT [UIFont systemFontOfSize:14.0]
-#define SEARCH_FONT_COLOR [UIColor colorWithWhite:0.0 alpha:0.85]
+#define SEARCH_TEXT_FIELD_FONT [UIFont systemFontOfSize:14.0]
+#define SEARCH_TEXT_FIELD_HIGHLIGHTED_COLOR [UIColor blackColor]
 
-#define SEARCH_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:16.0]
-#define SEARCH_FONT_HIGHLIGHTED_COLOR [UIColor blackColor]
+#define SEARCH_RESULT_FONT [UIFont systemFontOfSize:16.0]
+#define SEARCH_RESULT_FONT_COLOR [UIColor colorWithWhite:0.0 alpha:0.85]
+
+#define SEARCH_RESULT_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:16.0]
+#define SEARCH_RESULT_FONT_HIGHLIGHTED_COLOR [UIColor blackColor]
 
 #define SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR [UIColor colorWithRed:0.7 
green:0.7 blue:0.7 alpha:1.0]
 
diff --git a/wikipedia/Fonts/WikiFont.ttf b/wikipedia/Fonts/WikiFont.ttf
index ab851d0..66ec0c0 100644
--- a/wikipedia/Fonts/WikiFont.ttf
+++ b/wikipedia/Fonts/WikiFont.ttf
Binary files differ
diff --git a/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m b/wikipedia/View 
Controllers/Navigation/Bottom/BottomMenuViewController.m
index a7ec2b2..b5df308 100644
--- a/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
+++ b/wikipedia/View Controllers/Navigation/Bottom/BottomMenuViewController.m
@@ -14,6 +14,7 @@
 #import "UIViewController+Alert.h"
 #import "UIView+TemporaryAnimatedXF.h"
 #import "NSString+Extras.h"
+#import "Article+Convenience.h"
 
 typedef NS_ENUM(NSInteger, BottomMenuItemTag) {
 BOTTOM_MENU_BUTTON_UNKNOWN = 0,
@@ -108,7 +109,7 @@
 - (void)shareButtonPushed
 {
 NSString *title = @"";
-NSURL *URL = nil;
+NSURL *desktopURL = nil;
 
 NSManagedObjectID *articleID =
 [articleDataContext_.mainContext getArticleIDForTitle: [SessionSingleton 
sharedInstance].currentArticleTitle
@@ -116,13 +117,18 @@
 if (articleID) {
 Article *article = (Article *)[articleDataContext_.mainContext 
objectWithID:articleID];
 if (article) {
-NSString *titleWithoutSpaces = [article.title 
wikiTitleWithoutSpaces];
-URL = 

[MediaWiki-commits] [Gerrit] Change font to SourceSansPro - change (wikimedia...dash)

2014-05-22 Thread Ssmith (Code Review)
Ssmith has uploaded a new change for review.

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

Change subject: Change font to SourceSansPro
..

Change font to SourceSansPro

Change-Id: Icb8ba00c7d992fd8ab996412dc05867a6425b4c0
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/52/134952/1

diff --git a/.gitreview b/.gitreview
index ba0c44e..a464dcd 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=wikimedia/fundraising/dash.git
-defaultbranch=master
+defaultbranch=StyleTemplating
 defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb8ba00c7d992fd8ab996412dc05867a6425b4c0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: StyleTemplating
Gerrit-Owner: Ssmith 

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


[MediaWiki-commits] [Gerrit] Fix bad file_manager creation - change (analytics/wikimetrics)

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

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

Change subject: Fix bad file_manager creation
..

Fix bad file_manager creation

Change-Id: I8c0ddb4925f78df28cbeefc30f406a3676332cee
---
M wikimetrics/controllers/reports.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/51/134951/1

diff --git a/wikimetrics/controllers/reports.py 
b/wikimetrics/controllers/reports.py
index dd5e3a8..be0e030 100644
--- a/wikimetrics/controllers/reports.py
+++ b/wikimetrics/controllers/reports.py
@@ -21,7 +21,7 @@
 @app.before_request
 def setup_filemanager():
 if request.endpoint is not None:
-if 'reports' in request.endpoint:
+if request.path.startswith('/reports'):
 file_manager = getattr(g, 'file_manager', None)
 if file_manager is None:
 g.file_manager = PublicReportFileManager(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c0ddb4925f78df28cbeefc30f406a3676332cee
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric 

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


[MediaWiki-commits] [Gerrit] Change font to SourceSansPro - change (wikimedia...dash)

2014-05-22 Thread Ssmith (Code Review)
Ssmith has uploaded a new change for review.

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

Change subject: Change font to SourceSansPro
..

Change font to SourceSansPro

Change-Id: I80ee61beac1f1788eb08e633f86e16cada34939e
---
M .gitreview
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/50/134950/1

diff --git a/.gitreview b/.gitreview
index ba0c44e..a464dcd 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=wikimedia/fundraising/dash.git
-defaultbranch=master
+defaultbranch=StyleTemplating
 defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80ee61beac1f1788eb08e633f86e16cada34939e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: StyleTemplating
Gerrit-Owner: Ssmith 

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


[MediaWiki-commits] [Gerrit] Revert "Change URLs for noboard.chapters to fix SSL cert iss... - change (operations/mediawiki-config)

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

Change subject: Revert "Change URLs for noboard.chapters to fix SSL cert issues"
..


Revert "Change URLs for noboard.chapters to fix SSL cert issues"

This partially reverts commit 169091fe91d383a7cfc229c655598f757466c022.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cc5b229..451b104 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1184,7 +1184,7 @@
'metawiki' => '//meta.wikimedia.org',
'movementroleswiki' => '//movementroles.wikimedia.org',
'mxwikimedia' => '//mx.wikimedia.org',
-   'noboard_chapterswikimedia' => '//noboard-chapters.wikimedia.org',
+   'noboard_chapterswikimedia' => '//noboard.chapters.wikimedia.org',
'nycwikimedia' => '//nyc.wikimedia.org', // bug 29273
'officewiki' => '//office.wikimedia.org',
'ombudsmenwiki' => '//ombudsmen.wikimedia.org',
@@ -1266,7 +1266,7 @@
'metawiki' => 'http://meta.wikimedia.org',
'movementroleswiki' => 'https://movementroles.wikimedia.org',
'mxwikimedia' => 'http://mx.wikimedia.org',
-   'noboard_chapterswikimedia' => 'http://noboard-chapters.wikimedia.org',
+   'noboard_chapterswikimedia' => 'http://noboard.chapters.wikimedia.org',
'nycwikimedia' => 'http://nyc.wikimedia.org', // bug 29273
'officewiki' => 'https://office.wikimedia.org',
'ombudsmenwiki' => 'https://ombudsmen.wikimedia.org',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd048bafe0eb4af8765cee20a3d93d7663b1bcdf
Gerrit-PatchSet: 4
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] Revert "Change URLs for noboard.chapters and wg.en to fix SS... - change (operations/mediawiki-config)

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

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

Change subject: Revert "Change URLs for noboard.chapters and wg.en to fix SSL 
cert issues"
..

Revert "Change URLs for noboard.chapters and wg.en to fix SSL cert issues"

This reverts commit 169091fe91d383a7cfc229c655598f757466c022.

Change-Id: Ifd048bafe0eb4af8765cee20a3d93d7663b1bcdf
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cc5b229..d6662fa 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1184,7 +1184,7 @@
'metawiki' => '//meta.wikimedia.org',
'movementroleswiki' => '//movementroles.wikimedia.org',
'mxwikimedia' => '//mx.wikimedia.org',
-   'noboard_chapterswikimedia' => '//noboard-chapters.wikimedia.org',
+   'noboard_chapterswikimedia' => '//noboard.chapters.wikimedia.org',
'nycwikimedia' => '//nyc.wikimedia.org', // bug 29273
'officewiki' => '//office.wikimedia.org',
'ombudsmenwiki' => '//ombudsmen.wikimedia.org',
@@ -1205,7 +1205,7 @@
'usabilitywiki' => '//usability.wikimedia.org',
'votewiki' => '//vote.wikimedia.org',
'vewikimedia' => '//ve.wikimedia.org',
-   'wg_enwiki' => '//wg-en.wikipedia.org',
+   'wg_enwiki' => '//wg.en.wikipedia.org',
'wikidatawiki' => '//www.wikidata.org',
'wikimania2005wiki' => '//wikimania2005.wikimedia.org',
'wikimania2006wiki' => '//wikimania2006.wikimedia.org',
@@ -1266,7 +1266,7 @@
'metawiki' => 'http://meta.wikimedia.org',
'movementroleswiki' => 'https://movementroles.wikimedia.org',
'mxwikimedia' => 'http://mx.wikimedia.org',
-   'noboard_chapterswikimedia' => 'http://noboard-chapters.wikimedia.org',
+   'noboard_chapterswikimedia' => 'http://noboard.chapters.wikimedia.org',
'nycwikimedia' => 'http://nyc.wikimedia.org', // bug 29273
'officewiki' => 'https://office.wikimedia.org',
'ombudsmenwiki' => 'https://ombudsmen.wikimedia.org',
@@ -1288,7 +1288,7 @@
'uzwiki' => 'https://uz.wikipedia.org', // bug 43466
'votewiki' => 'https://vote.wikimedia.org',
'vewikimedia' => 'http://ve.wikimedia.org',
-   'wg_enwiki' => 'http://wg-en.wikipedia.org',
+   'wg_enwiki' => 'http://wg.en.wikipedia.org',
'wikidatawiki' => 'http://www.wikidata.org',
'wikimania2005wiki' => 'http://wikimania2005.wikimedia.org',
'wikimania2006wiki' => 'http://wikimania2006.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd048bafe0eb4af8765cee20a3d93d7663b1bcdf
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 . replaced with _ in "lang" - change (operations/mediawiki-config)

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

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

Change subject: Remove remnants of . replaced with _ in "lang"
..

Remove remnants of . replaced with _ in "lang"

Change-Id: I4df7d12e5ddb881b84e0988ac357fb1233cfee77
---
M multiversion/MWMultiVersion.php
1 file changed, 2 insertions(+), 6 deletions(-)


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

diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index 5ddd7e5..aa928f3 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -159,18 +159,14 @@
$lang = $matches[1];
if ( $matches[2] !== 'wikimedia'
|| ( $matches[2] === 'wikimedia' && in_array(
-   str_replace( '.', '_', $lang ),
+   $lang
array(
-   'ar', 'bd', 'be', 'br', 'co', 
'dk', 'et', 'fi', 'il', 'mk', 'mx', 'nl', 'noboard_chapters',
+   'ar', 'bd', 'be', 'br', 'co', 
'dk', 'et', 'fi', 'il', 'mk', 'mx', 'nl',
'no', 'nyc', 'nz', 'pa-us', 
'pl', 'rs', 'ru', 'se', 'tr', 'ua', 'uk', 've'
)
) ) ) {
// wikimedia (non chapters) sites stay as wiki
$site = $matches[2];
-
-   // Hack for some multi subdomain wikis waiting 
to be renamed
-   // arbcom_dewiki, arbcom_enwiki, arbcom_fiwiki, 
arbcom_nlwiki, noboard_chapterswikimedia, wg_enwiki
-   $lang = str_replace( '.', '-', $lang );
}
} else {
self::error( "Invalid host name ($serverName).\n" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4df7d12e5ddb881b84e0988ac357fb1233cfee77
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] Make CloneDatabase error out on shared tables. - change (mediawiki/core)

2014-05-22 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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

Change subject: Make CloneDatabase error out on shared tables.
..

Make CloneDatabase error out on shared tables.

Due to the way prefixes are handled, this doesn't work properly.

Make it quit early to prevent confusion. I don't think there's
many people who need shared table support, so I don't know if
its worth the effort to actually fix.

Bug: 65654
Change-Id: I6cd701998fc9066d8c7a4fc86d93a4282cc7f9bd
---
M includes/db/CloneDatabase.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/134947/1

diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php
index 536d721..dcde3e9 100644
--- a/includes/db/CloneDatabase.php
+++ b/includes/db/CloneDatabase.php
@@ -71,7 +71,13 @@
 * Clone the table structure
 */
public function cloneTableStructure() {
+   global $wgSharedTables;
foreach ( $this->tablesToClone as $tbl ) {
+   if ( in_array( $tbl, $wgSharedTables, true ) ) {
+   // Shared tables don't work properly when 
cloning due to
+   // how prefixes are handled (bug 65654)
+   throw new MWException( "Cannot clone shared 
table $tbl." );
+   }
# Clean up from previous aborted run.  So that table 
escaping
# works correctly across DB engines, we need to change 
the pre-
# fix back and forth so tableName() works right.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cd701998fc9066d8c7a4fc86d93a4282cc7f9bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (1c1eb3a) - change (mediawiki...VisualEditor)

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

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


Update VE core submodule to master (1c1eb3a)

New changes:
7368ea3 Localisation updates from https://translatewiki.net.
712be31 Followup 682b4d0b88: bring this.isSetup back
78fd10e Document that SurfaceFragment#getSelectedNode doesn't require selection

Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index b0a1e1a..1c1eb3a 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit b0a1e1a227ecc7a3059f4cbc22b963d3fc300f2f
+Subproject commit 1c1eb3aa7054abf071cb7a7fccbaa804340a3aa3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.24wmf6
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
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 font to SourceSansPro - change (wikimedia...dash)

2014-05-22 Thread Ssmith (Code Review)
Ssmith has uploaded a new change for review.

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

Change subject: Change font to SourceSansPro
..

Change font to SourceSansPro

Change-Id: I613f62a2d2f5411826f8feceb18b399655fcd414
---
M public/css/style.css
A public/javascripts/vendor/SourceSansPro/.bower.json
A public/javascripts/vendor/SourceSansPro/LICENSE.txt
A public/javascripts/vendor/SourceSansPro/README.md
A public/javascripts/vendor/SourceSansPro/SourceSansPro.css
A public/javascripts/vendor/SourceSansPro/bower.json
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-Black.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-BlackIt.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-Bold.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-BoldIt.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-ExtraLight.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-ExtraLightIt.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-It.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-Light.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-LightIt.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-Regular.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-Semibold.otf
A public/javascripts/vendor/SourceSansPro/fonts/SourceSansPro-SemiboldIt.otf
D public/javascripts/vendor/lato/.bower.json
D public/javascripts/vendor/lato/Gruntfile.js
D public/javascripts/vendor/lato/README.md
D public/javascripts/vendor/lato/bower.json
D public/javascripts/vendor/lato/css/lato.css
D public/javascripts/vendor/lato/css/lato.min.css
D public/javascripts/vendor/lato/font/lato-black.eot
D public/javascripts/vendor/lato/font/lato-black.svg
D public/javascripts/vendor/lato/font/lato-black.ttf
D public/javascripts/vendor/lato/font/lato-black.woff
D public/javascripts/vendor/lato/font/lato-blackitalic.eot
D public/javascripts/vendor/lato/font/lato-blackitalic.svg
D public/javascripts/vendor/lato/font/lato-blackitalic.ttf
D public/javascripts/vendor/lato/font/lato-blackitalic.woff
D public/javascripts/vendor/lato/font/lato-bold.eot
D public/javascripts/vendor/lato/font/lato-bold.svg
D public/javascripts/vendor/lato/font/lato-bold.ttf
D public/javascripts/vendor/lato/font/lato-bold.woff
D public/javascripts/vendor/lato/font/lato-bolditalic.eot
D public/javascripts/vendor/lato/font/lato-bolditalic.svg
D public/javascripts/vendor/lato/font/lato-bolditalic.ttf
D public/javascripts/vendor/lato/font/lato-bolditalic.woff
D public/javascripts/vendor/lato/font/lato-hairline.eot
D public/javascripts/vendor/lato/font/lato-hairline.svg
D public/javascripts/vendor/lato/font/lato-hairline.ttf
D public/javascripts/vendor/lato/font/lato-hairline.woff
D public/javascripts/vendor/lato/font/lato-hairlineitalic.eot
D public/javascripts/vendor/lato/font/lato-hairlineitalic.svg
D public/javascripts/vendor/lato/font/lato-hairlineitalic.ttf
D public/javascripts/vendor/lato/font/lato-hairlineitalic.woff
D public/javascripts/vendor/lato/font/lato-italic.eot
D public/javascripts/vendor/lato/font/lato-italic.svg
D public/javascripts/vendor/lato/font/lato-italic.ttf
D public/javascripts/vendor/lato/font/lato-italic.woff
D public/javascripts/vendor/lato/font/lato-light.eot
D public/javascripts/vendor/lato/font/lato-light.svg
D public/javascripts/vendor/lato/font/lato-light.ttf
D public/javascripts/vendor/lato/font/lato-light.woff
D public/javascripts/vendor/lato/font/lato-lightitalic.eot
D public/javascripts/vendor/lato/font/lato-lightitalic.svg
D public/javascripts/vendor/lato/font/lato-lightitalic.ttf
D public/javascripts/vendor/lato/font/lato-lightitalic.woff
D public/javascripts/vendor/lato/font/lato-regular.eot
D public/javascripts/vendor/lato/font/lato-regular.svg
D public/javascripts/vendor/lato/font/lato-regular.ttf
D public/javascripts/vendor/lato/font/lato-regular.woff
D public/javascripts/vendor/lato/less/lato-black.less
D public/javascripts/vendor/lato/less/lato-blackitalic.less
D public/javascripts/vendor/lato/less/lato-bold.less
D public/javascripts/vendor/lato/less/lato-bolditalic.less
D public/javascripts/vendor/lato/less/lato-hairline.less
D public/javascripts/vendor/lato/less/lato-hairlineitalic.less
D public/javascripts/vendor/lato/less/lato-italic.less
D public/javascripts/vendor/lato/less/lato-light.less
D public/javascripts/vendor/lato/less/lato-lightitalic.less
D public/javascripts/vendor/lato/less/lato-regular.less
D public/javascripts/vendor/lato/less/lato.less
D public/javascripts/vendor/lato/less/variables.less
D public/javascripts/vendor/lato/package.json
D public/javascripts/vendor/lato/scss/lato-black.scss
D public/javascripts/vendor/lato/scss/lato-blackitalic.scss
D public/javascripts/vendor/lato/scss/lato-bold.scss
D public/javascripts/vendor/lato/scss/lato-bolditalic.scss
D public/javascripts/vendor/lato/scss/lato-hairline.s

[MediaWiki-commits] [Gerrit] Fix /a/common/php symlink creation - change (operations/mediawiki-config)

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

Change subject: Fix /a/common/php symlink creation
..


Fix /a/common/php symlink creation

Fix the error "updateSymlink: link target
/a/common//usr/local/apache/common-local/php-1.24wmf5 does not exist."
seen during the group1 to 1.24wmf5 deployment by ensuring that the
symlink target is a relative path.

Bug: 64748
Change-Id: I3aafd82da4c7468b555cb311a3cdad77c089dc52
---
M multiversion/updateBranchPointers
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/multiversion/updateBranchPointers 
b/multiversion/updateBranchPointers
index 4fa7eca..64c2f11 100755
--- a/multiversion/updateBranchPointers
+++ b/multiversion/updateBranchPointers
@@ -37,7 +37,14 @@
 
$branches = array( 'current' => array_pop( $branchDirs ) );
 
-   updateSymlink( MULTIVER_COMMON_HOME . '/php', MULTIVER_COMMON_HOME . 
'/' . $branches['current'], $dryRun );
+   // Symlink common/php to the current branch using a relative path so 
that
+   // the symlink works from both MULTIVER_COMMON_HOME and
+   // MULTIVER_COMMON_APACHE
+   $phpLinkTarget = substr(
+   $branches['current'],
+   strlen( MULTIVER_COMMON_APACHE ) + 1
+   );
+   updateSymlink( MULTIVER_COMMON_HOME . '/php', $phpLinkTarget, $dryRun );
 
foreach( $branches as $branch => $target ) {
echo "Updating $branch branch pointer...\n";
@@ -64,13 +71,16 @@
  * @param bool $dryRun
  */
 function updateSymlink( $link, $dest, $dryRun ) {
+   // Change pwd to MULTIVER_COMMON_HOME so that relative paths can be 
verified
+   chdir( MULTIVER_COMMON_HOME );
+
if ( !file_exists( $dest ) ) {
fwrite( STDERR, __FUNCTION__ . ": link target $dest does not 
exist.\n" );
exit( 1 );
}
 
if ( file_exists( $link ) ) {
-   if ( realpath( $link ) === $dest ) {
+   if ( realpath( $link ) === realpath( $dest ) ) {
echo "$link is already up-to-date.\n";
return;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aafd82da4c7468b555cb311a3cdad77c089dc52
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
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] Cache items found in ClientSiteLinkLookup - change (mediawiki...Wikibase)

2014-05-22 Thread Bene (Code Review)
Bene has uploaded a new change for review.

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

Change subject: Cache items found in ClientSiteLinkLookup
..

Cache items found in ClientSiteLinkLookup

Caches the items which have been found by title in the ClientSiteLinkLookup
in an array and makes it available through the WikibaseClient default
instance. This improves performance a lot.

Change-Id: I0b7477aead578384f3d1331fc984e2ce48bb9e28
---
M client/includes/ClientSiteLinkLookup.php
M client/includes/WikibaseClient.php
2 files changed, 45 insertions(+), 10 deletions(-)


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

diff --git a/client/includes/ClientSiteLinkLookup.php 
b/client/includes/ClientSiteLinkLookup.php
index e08f306..cc20162 100644
--- a/client/includes/ClientSiteLinkLookup.php
+++ b/client/includes/ClientSiteLinkLookup.php
@@ -32,6 +32,11 @@
private $entityLookup;
 
/**
+* @var array
+*/
+   private $cachedItems = array();
+
+   /**
 * @param string $localSiteId global id of the client wiki
 * @param SiteLinkLookup $siteLinkLookup
 * @param EntityLookup $entityLookup
@@ -80,23 +85,31 @@
}
 
/**
-* Finds the corresponding item on the repository.
+* Finds the corresponding item on the repository
+* and caches the result in an array.
 *
 * @param Title $title
 *
 * @return Item|null
 */
private function getItem( Title $title ) {
-   $itemId = $this->siteLinkLookup->getItemIdForLink(
-   $this->localSiteId,
-   $title->getPrefixedText()
-   );
+   $prefixedText = $title->getPrefixedText();
 
-   if ( $itemId === null ) {
-   return null;
+   if ( !isset( $this->cachedItems[$prefixedText] ) ) {
+   $itemId = $this->siteLinkLookup->getItemIdForLink(
+   $this->localSiteId,
+   $prefixedText
+   );
+
+   if ( $itemId === null ) {
+   $this->cachedItems[$prefixedText] = null;
+   }
+   else {
+   $this->cachedItems[$prefixedText] = 
$this->entityLookup->getEntity( $itemId );
+   }
}
 
-   return $this->entityLookup->getEntity( $itemId );
+   return $this->cachedItems[$prefixedText];
}
 
 }
diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index b293e8a..f7773ed 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -115,6 +115,10 @@
 */
private $namespaceChecker = null;
 
+   /**
+* @var ClientSiteLinkLookup
+*/
+   private $clientSiteLinkLookup = null;
 
/**
 * @since 0.4
@@ -519,7 +523,6 @@
 * @return NamespaceChecker
 */
public function getNamespaceChecker() {
-
if ( !$this->namespaceChecker ) {
$settings = $this->getSettings();
 
@@ -536,7 +539,6 @@
 * @return LangLinkHandler
 */
public function getLangLinkHandler() {
-
if ( !$this->langLinkHandler ) {
$settings = $this->getSettings();
 
@@ -564,4 +566,24 @@
 
return $this->siteStore;
}
+
+   /**
+* @since 0.5
+*
+* @return ClientSiteLinkLookup
+*/
+   public function getClientSiteLinkLookup() {
+   if ( !$this->clientSiteLinkLookup ) {
+   $settings = $this->getSettings();
+
+   $this->clientSiteLinkLookup = new ClientSiteLinkLookup(
+   $settings->getSetting( 'siteGlobalID' ),
+   $this->getEntityLookup(),
+   $this->getStore()->getSiteLinkLookup()
+   );
+   }
+
+   return $this->clientSiteLinkLookup;
+   }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b7477aead578384f3d1331fc984e2ce48bb9e28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene 

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


[MediaWiki-commits] [Gerrit] Compute directionality for frame correctly - change (oojs/ui)

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

Change subject: Compute directionality for frame correctly
..


Compute directionality for frame correctly

Use OO.ui.Element.getDir instead of looking for a
dir attribute.

Change-Id: I0e6003b19dea0cd25c069ecb726ad9d4c078ddcc
---
M src/Frame.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/Frame.js b/src/Frame.js
index 798ef35..b9c9f4e 100644
--- a/src/Frame.js
+++ b/src/Frame.js
@@ -178,7 +178,7 @@
this.loading = true;
 
// Figure out directionality:
-   this.dir = this.$element.closest( '[dir]' ).prop( 'dir' ) || 'ltr';
+   this.dir = OO.ui.Element.getDir( this.$element ) || 'ltr';
 
// Initialize contents
doc.open();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e6003b19dea0cd25c069ecb726ad9d4c078ddcc
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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 `--verbose` a universal argument - change (mediawiki...scap)

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

Change subject: Make `--verbose` a universal argument
..


Make `--verbose` a universal argument

Change the logging usage in scap so that all "useful for deployer to
see" log messages are emitted at info or a higher level. Raise the
default logging level for the console appender to INFO. Make the
`--verbose` command line argument universal in cli.Application.

This change also removes the short form `-v` argument for the
scap-purge-l10n-cache script as it conflicts with the short form `-v`
verbose argument.

Change-Id: Ifcfcbfe1848d4b297faa6c712c8b21f15e0f92a7
---
M scap/cli.py
M scap/log.py
M scap/main.py
M scap/tasks.py
4 files changed, 18 insertions(+), 14 deletions(-)

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



diff --git a/scap/cli.py b/scap/cli.py
index 93252b3..f49a369 100644
--- a/scap/cli.py
+++ b/scap/cli.py
@@ -49,6 +49,10 @@
 self.config['statsd_host'], int(self.config['statsd_port']))
 return self._stats
 
+@property
+def verbose(self):
+return self.arguments.loglevel < logging.INFO
+
 def announce(self, *args):
 """Announce a message to broadcast listeners.
 
@@ -115,6 +119,9 @@
 parser.add_argument('-D', '--define', dest='defines',
 action='append', type=lambda v: tuple(v.split(':')),
 help='Set a configuration value', metavar=':')
+parser.add_argument('-v', '--verbose', action='store_const',
+const=logging.DEBUG, default=logging.INFO, dest='loglevel',
+help='Verbose output')
 
 return parser
 
@@ -141,6 +148,7 @@
 def _setup_loggers(self):
 """Setup logging."""
 log.setup_loggers(self.config)
+logging.root.setLevel(self.arguments.loglevel)
 
 def main(self, *extra_args):
 """Main business logic of the application.
@@ -173,7 +181,7 @@
 
 :returns: exit status
 """
-self.logger.debug('Unhandled error:', exc_info=True)
+self.logger.warn('Unhandled error:', exc_info=True)
 self.logger.error('%s failed: <%s> %s',
 self.program_name, type(ex).__name__, ex)
 return 70
@@ -224,7 +232,7 @@
 """
 # Bootstrap the logging system
 logging.basicConfig(
-level=logging.DEBUG,
+level=logging.INFO,
 format=log.CONSOLE_LOG_FORMAT,
 datefmt='%H:%M:%S')
 
diff --git a/scap/log.py b/scap/log.py
index 353140b..8845db7 100644
--- a/scap/log.py
+++ b/scap/log.py
@@ -306,7 +306,7 @@
 """
 self.start = time.time()
 self.mark_start = self.start
-self.logger.debug('Started %s' % self.label)
+self.logger.info('Started %s' % self.label)
 return self
 
 def __exit__(self, exc_type, exc_value, traceback):
diff --git a/scap/main.py b/scap/main.py
index c3b05d5..6f0b1a9 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -57,7 +57,7 @@
 class PurgeL10nCache(cli.Application):
 """Purge the localization cache for an inactive MediaWiki version."""
 
-@cli.argument('-v', '--version', required=True,
+@cli.argument('--version', required=True,
 help='MediaWiki version (eg 1.23wmf16)')
 def main(self, *extra_args):
 if self.arguments.version.startswith('php-'):
@@ -100,8 +100,6 @@
 args.message = ' '.join(args.message) or '(no message)'
 return args, extra_args
 
-@cli.argument('-v', '--verbose', action='store_true',
-help='Verbose output')
 @cli.argument('message', nargs=argparse.REMAINDER,
 help='Log message for SAL')
 def main(self, *extra_args):
@@ -142,7 +140,7 @@
 with log.Timer('mw-update-l10n', self.stats):
 for version, wikidb in self.active_wikiversions().items():
 tasks.update_localization_cache(
-version, wikidb, self.arguments.verbose, self.config)
+version, wikidb, self.verbose, self.config)
 
 # Compute git version information
 with log.Timer('cache_git_info', self.stats):
@@ -221,7 +219,7 @@
 return 1
 
 def _handle_exception(self, ex):
-self.logger.debug('Unhandled error:', exc_info=True)
+self.logger.warn('Unhandled error:', exc_info=True)
 self.announce('scap failed: %s %s (duration: %s)',
 type(ex).__name__, ex, self.human_duration)
 return 1
@@ -265,9 +263,7 @@
 class UpdateL10n(cli.Application):
 """Update localization files"""
 
-@cli.argument('-v', '--verbose', action='store_true',
-help='Verbose output')
 def main(self, *extra_args):
 for version, wikidb in self.active_wikiversions().items():
 tasks.update_lo

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 55fb764..805dbdd - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 55fb764..805dbdd
..


Syncronize VisualEditor: 55fb764..805dbdd

Change-Id: I0b3450737026196052f02d1d14a0a4a21aed8a39
---
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 55fb764..805dbdd 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 55fb76438eef7b24487720c5012b6ab3f7d85920
+Subproject commit 805dbdd5bb5d11798acb5956ce2fc7d18df8d148

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0b3450737026196052f02d1d14a0a4a21aed8a39
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: 55fb764..805dbdd - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 55fb764..805dbdd
..

Syncronize VisualEditor: 55fb764..805dbdd

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


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

diff --git a/VisualEditor b/VisualEditor
index 55fb764..805dbdd 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 55fb76438eef7b24487720c5012b6ab3f7d85920
+Subproject commit 805dbdd5bb5d11798acb5956ce2fc7d18df8d148

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b3450737026196052f02d1d14a0a4a21aed8a39
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] Update VE core submodule to master (1c1eb3a) - change (mediawiki...VisualEditor)

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

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


Update VE core submodule to master (1c1eb3a)

New changes:
7368ea3 Localisation updates from https://translatewiki.net.
712be31 Followup 682b4d0b88: bring this.isSetup back
78fd10e Document that SurfaceFragment#getSelectedNode doesn't require selection

Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index b0a1e1a..1c1eb3a 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit b0a1e1a227ecc7a3059f4cbc22b963d3fc300f2f
+Subproject commit 1c1eb3aa7054abf071cb7a7fccbaa804340a3aa3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
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] Compute directionality for frame correctly - change (oojs/ui)

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

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

Change subject: Compute directionality for frame correctly
..

Compute directionality for frame correctly

Use OO.ui.Element.getDir instead of looking for a
dir attribute.

Change-Id: I0e6003b19dea0cd25c069ecb726ad9d4c078ddcc
---
M src/Frame.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/43/134943/1

diff --git a/src/Frame.js b/src/Frame.js
index 798ef35..b9c9f4e 100644
--- a/src/Frame.js
+++ b/src/Frame.js
@@ -178,7 +178,7 @@
this.loading = true;
 
// Figure out directionality:
-   this.dir = this.$element.closest( '[dir]' ).prop( 'dir' ) || 'ltr';
+   this.dir = OO.ui.Element.getDir( this.$element ) || 'ltr';
 
// Initialize contents
doc.open();

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

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

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (1c1eb3a) - change (mediawiki...VisualEditor)

2014-05-22 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

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

Update VE core submodule to master (1c1eb3a)

New changes:
7368ea3 Localisation updates from https://translatewiki.net.
712be31 Followup 682b4d0b88: bring this.isSetup back
78fd10e Document that SurfaceFragment#getSelectedNode doesn't require selection

Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/lib/ve b/lib/ve
index b0a1e1a..1c1eb3a 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit b0a1e1a227ecc7a3059f4cbc22b963d3fc300f2f
+Subproject commit 1c1eb3aa7054abf071cb7a7fccbaa804340a3aa3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.24wmf6
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Minor fixes to the html structure - change (apps...wikipedia)

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

Change subject: Minor fixes to the html structure
..


Minor fixes to the html structure

This helps us re-use MobileFrontend styles, which is
coming as a separate patch to MobileApp soon

Change-Id: I4ff2d52f24b766670fa037736e9f2555dd6f7a3f
---
M wikipedia/assets/abusefilter.html
M wikipedia/assets/index.html
M wikipedia/assets/preview.html
M www/abusefilter.html
M www/index.html
M www/preview.html
6 files changed, 6 insertions(+), 8 deletions(-)

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



diff --git a/wikipedia/assets/abusefilter.html 
b/wikipedia/assets/abusefilter.html
index c1cb246..a716d99 100644
--- a/wikipedia/assets/abusefilter.html
+++ b/wikipedia/assets/abusefilter.html
@@ -8,6 +8,6 @@
 
 
 
-
+
 
 
\ No newline at end of file
diff --git a/wikipedia/assets/index.html b/wikipedia/assets/index.html
index 404ca95..79b0309 100644
--- a/wikipedia/assets/index.html
+++ b/wikipedia/assets/index.html
@@ -8,8 +8,7 @@
 
 
 
-
-
+
 
 
 
diff --git a/wikipedia/assets/preview.html b/wikipedia/assets/preview.html
index 7992783..d389ff7 100644
--- a/wikipedia/assets/preview.html
+++ b/wikipedia/assets/preview.html
@@ -8,6 +8,6 @@
 
 
 
-
+
 
 
\ No newline at end of file
diff --git a/www/abusefilter.html b/www/abusefilter.html
index c1cb246..a716d99 100644
--- a/www/abusefilter.html
+++ b/www/abusefilter.html
@@ -8,6 +8,6 @@
 
 
 
-
+
 
 
\ No newline at end of file
diff --git a/www/index.html b/www/index.html
index 404ca95..79b0309 100644
--- a/www/index.html
+++ b/www/index.html
@@ -8,8 +8,7 @@
 
 
 
-
-
+
 
 
 
diff --git a/www/preview.html b/www/preview.html
index 7992783..d389ff7 100644
--- a/www/preview.html
+++ b/www/preview.html
@@ -8,6 +8,6 @@
 
 
 
-
+
 
 
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ff2d52f24b766670fa037736e9f2555dd6f7a3f
Gerrit-PatchSet: 3
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (1c1eb3a) - change (mediawiki...VisualEditor)

2014-05-22 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

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

Update VE core submodule to master (1c1eb3a)

New changes:
7368ea3 Localisation updates from https://translatewiki.net.
712be31 Followup 682b4d0b88: bring this.isSetup back
78fd10e Document that SurfaceFragment#getSelectedNode doesn't require selection

Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/lib/ve b/lib/ve
index b0a1e1a..1c1eb3a 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit b0a1e1a227ecc7a3059f4cbc22b963d3fc300f2f
+Subproject commit 1c1eb3aa7054abf071cb7a7fccbaa804340a3aa3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8df73bfc30b5bfeed88d5e96236991ce8bbae72d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Remove flaggedrevs-specific user groups from mediawiki.org - change (operations/mediawiki-config)

2014-05-22 Thread Withoutaname (Code Review)
Withoutaname has uploaded a new change for review.

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

Change subject: Remove flaggedrevs-specific user groups from mediawiki.org
..

Remove flaggedrevs-specific user groups from mediawiki.org

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d6662fa..0dd59f1 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7158,10 +7158,7 @@
),
'mediawikiwiki' => array(
'user' => array( 'move' => false ),
-   'autoreview' => array( 'autopatrol' => true ),
'coder' => array( 'autopatrol' => true ),
-   'editor' => array( 'autopatrol' => true ),
-   'reviewer' => array( 'autopatrol' => true ),
),
 
'metawiki' => array(

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

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

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


[MediaWiki-commits] [Gerrit] Document that SurfaceFragment#getSelectedNode doesn't requir... - change (VisualEditor/VisualEditor)

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

Change subject: Document that SurfaceFragment#getSelectedNode doesn't require 
selection
..


Document that SurfaceFragment#getSelectedNode doesn't require selection

Change-Id: Idaf20bb2a556c813154f86d9ca68d1e0e5f6a702
---
M modules/ve/dm/ve.dm.SurfaceFragment.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve/dm/ve.dm.SurfaceFragment.js 
b/modules/ve/dm/ve.dm.SurfaceFragment.js
index 334acb6..d600aea 100644
--- a/modules/ve/dm/ve.dm.SurfaceFragment.js
+++ b/modules/ve/dm/ve.dm.SurfaceFragment.js
@@ -474,7 +474,10 @@
 };
 
 /**
- * Get the node selected by a range, i.e. the range matches the node's range 
exactly
+ * Get the node selected by a range, i.e. the range matches the node's range 
exactly.
+ *
+ * Note that this method operates on the fragment's range, not the document's 
current selection.
+ * This fragment does not need to be selected for this method to work.
  *
  * @returns {ve.dm.Node|null} The node selected by the range, or null if a 
node is not selected
  */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaf20bb2a556c813154f86d9ca68d1e0e5f6a702
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
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] Followup 682b4d0b88: bring this.isSetup back - change (VisualEditor/VisualEditor)

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

Change subject: Followup 682b4d0b88: bring this.isSetup back
..


Followup 682b4d0b88: bring this.isSetup back

682b4d0b88 removed the only line of code in ve.ce.ProtectedNode
that set this.isSetup to true. Consequently, it was always false,
and onProtectedTeardown would always short-circuit, so no ProtectedNode
would ever get torn down, which resulted in the expected chaos
of JS errors from event handlers that were never unbound.

Change-Id: Icc1748fd5acab4d97e80c88c3336e9d42b70e7ad
---
M modules/ve/ce/ve.ce.ProtectedNode.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js 
b/modules/ve/ce/ve.ce.ProtectedNode.js
index 9c3ba6e..68babdb 100644
--- a/modules/ve/ce/ve.ce.ProtectedNode.js
+++ b/modules/ve/ce/ve.ce.ProtectedNode.js
@@ -83,6 +83,8 @@
'mouseenter.ve-ce-protectedNode': ve.bind( 
this.onProtectedMouseEnter, this ),
'mousedown.ve-ce-protectedNode': ve.bind( 
this.onProtectedMouseDown, this )
} );
+
+   this.isSetup = true;
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc1748fd5acab4d97e80c88c3336e9d42b70e7ad
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Change URLs for noboard.chapters and wg.en to fix SSL cert i... - change (operations/mediawiki-config)

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

Change subject: Change URLs for noboard.chapters and wg.en to fix SSL cert 
issues
..


Change URLs for noboard.chapters and wg.en to fix SSL cert issues

Change-Id: Iecdd8c5e60a142363b40e34d4fe2f27f0e5feef5
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d6662fa..cc5b229 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1184,7 +1184,7 @@
'metawiki' => '//meta.wikimedia.org',
'movementroleswiki' => '//movementroles.wikimedia.org',
'mxwikimedia' => '//mx.wikimedia.org',
-   'noboard_chapterswikimedia' => '//noboard.chapters.wikimedia.org',
+   'noboard_chapterswikimedia' => '//noboard-chapters.wikimedia.org',
'nycwikimedia' => '//nyc.wikimedia.org', // bug 29273
'officewiki' => '//office.wikimedia.org',
'ombudsmenwiki' => '//ombudsmen.wikimedia.org',
@@ -1205,7 +1205,7 @@
'usabilitywiki' => '//usability.wikimedia.org',
'votewiki' => '//vote.wikimedia.org',
'vewikimedia' => '//ve.wikimedia.org',
-   'wg_enwiki' => '//wg.en.wikipedia.org',
+   'wg_enwiki' => '//wg-en.wikipedia.org',
'wikidatawiki' => '//www.wikidata.org',
'wikimania2005wiki' => '//wikimania2005.wikimedia.org',
'wikimania2006wiki' => '//wikimania2006.wikimedia.org',
@@ -1266,7 +1266,7 @@
'metawiki' => 'http://meta.wikimedia.org',
'movementroleswiki' => 'https://movementroles.wikimedia.org',
'mxwikimedia' => 'http://mx.wikimedia.org',
-   'noboard_chapterswikimedia' => 'http://noboard.chapters.wikimedia.org',
+   'noboard_chapterswikimedia' => 'http://noboard-chapters.wikimedia.org',
'nycwikimedia' => 'http://nyc.wikimedia.org', // bug 29273
'officewiki' => 'https://office.wikimedia.org',
'ombudsmenwiki' => 'https://ombudsmen.wikimedia.org',
@@ -1288,7 +1288,7 @@
'uzwiki' => 'https://uz.wikipedia.org', // bug 43466
'votewiki' => 'https://vote.wikimedia.org',
'vewikimedia' => 'http://ve.wikimedia.org',
-   'wg_enwiki' => 'http://wg.en.wikipedia.org',
+   'wg_enwiki' => 'http://wg-en.wikipedia.org',
'wikidatawiki' => 'http://www.wikidata.org',
'wikimania2005wiki' => 'http://wikimania2005.wikimedia.org',
'wikimania2006wiki' => 'http://wikimania2006.wikimedia.org',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecdd8c5e60a142363b40e34d4fe2f27f0e5feef5
Gerrit-PatchSet: 2
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] wg.en -> wg-en and noboard.chapters -> noboard-chapters - change (operations/apache-config)

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

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

Change subject: wg.en -> wg-en and noboard.chapters -> noboard-chapters
..

wg.en -> wg-en and noboard.chapters -> noboard-chapters

Change-Id: Ifc9596cc7b48d8b145aed04ad0631d9b9e4aae8f
---
M redirects.conf
M redirects.dat
2 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/apache-config 
refs/changes/39/134939/1

diff --git a/redirects.conf b/redirects.conf
index a93d841..1158592 100644
--- a/redirects.conf
+++ b/redirects.conf
@@ -286,6 +286,8 @@
jp.wikipedia.com \
nb.wikipedia.org \
pa.us.wikimedia.org \
+   noboard.chapters.wikimedia.org \
+   wg.en.wikipedia.org \
tp.wikipedia.org \
zh-cfr.wikipedia.org \
minnan.wikipedia.org \
@@ -681,6 +683,12 @@
# rewrite   pa.us.wikimedia.org //pa-us.wikimedia.org
RewriteCond %{HTTP_HOST} =pa.us.wikimedia.org
RewriteRule .* %{ENV:RW_PROTO}://pa-us.wikimedia.org$0 [R=301,L,NE]
+   # rewrite   noboard.chapters.wikimedia.org  
//noboard-chapters.wikimedia.org
+   RewriteCond %{HTTP_HOST} =noboard.chapters.wikimedia.org
+   RewriteRule .* %{ENV:RW_PROTO}://noboard-chapters.wikimedia.org$0 
[R=301,L,NE]
+   # rewrite   wg.en.wikipedia.org //wg-en.wikipedia.org
+   RewriteCond %{HTTP_HOST} =wg.en.wikipedia.org
+   RewriteRule .* %{ENV:RW_PROTO}://wg-en.wikipedia.org$0 [R=301,L,NE]
# rewrite   tp.wikipedia.org//tokipona.wikipedia.org
RewriteCond %{HTTP_HOST} =tp.wikipedia.org
RewriteRule .* %{ENV:RW_PROTO}://tokipona.wikipedia.org$0 [R=301,L,NE]
diff --git a/redirects.dat b/redirects.dat
index 0de1dee..6cd5fef 100644
--- a/redirects.dat
+++ b/redirects.dat
@@ -118,6 +118,10 @@
 # renamed chapter wiki - bug 38763
 rewritepa.us.wikimedia.org //pa-us.wikimedia.org
 
+rewritenoboard.chapters.wikimedia.org  //noboard-chapters.wikimedia.org
+
+rewritewg.en.wikipedia.org //wg-en.wikipedia.org
+
 rewritetp.wikipedia.org//tokipona.wikipedia.org
 
 rewritezh-cfr.wikipedia.org//zh-min-nan.wikipedia.org

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

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

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


  1   2   3   >