[MediaWiki-commits] [Gerrit] Compacting the interlanguage links with the ULS - change (mediawiki...UniversalLanguageSelector)

2013-12-31 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review.

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


Change subject: Compacting the interlanguage links with the ULS
..

Compacting the interlanguage links with the ULS

Change-Id: I193f1af405ef1a811b42ba6da57e6ff441ade01d
---
M Resources.php
A resources/js/ext.uls.compactlinks.js
2 files changed, 102 insertions(+), 1 deletion(-)


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

diff --git a/Resources.php b/Resources.php
index 06e2ccf..7320527 100644
--- a/Resources.php
+++ b/Resources.php
@@ -165,7 +165,7 @@
),
 ) + $resourcePaths;
 
-//Module for compacting the interlanguage links in the sidebar with the help 
of the ULS - Added by NIharika
+//Module for compacting the interlanguage links in the sidebar with the ULS
 $wgResourceModules['ext.uls.compactlinks'] = array(
'scripts' => 'resources/js/ext.uls.compactlinks.js',
'dependencies' => array('ext.uls.init'),
diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
new file mode 100644
index 000..c0fd864
--- /dev/null
+++ b/resources/js/ext.uls.compactlinks.js
@@ -0,0 +1,101 @@
+/**
+ * ULS startup script - MediaWiki specific customization for jquery.uls
+ *
+ * Copyright (C) 2012-2013 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon 
Harris,
+ * Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other
+ * contributors. See CREDITS for a list.
+ *
+ * UniversalLanguageSelector is dual licensed GPLv2 or later and MIT. You don't
+ * have to do anything special to choose one license or the other and you don't
+ * have to notify anyone which license you are using. You are free to use
+ * UniversalLanguageSelector in commercial projects as long as the copyright
+ * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.
+ *
+ * @file
+ * @ingroup Extensions
+ * @licence GNU General Public Licence 2.0 or later
+ * @licence MIT License
+ */
+
+( function ( $, mw ) {
+   'use strict';
+
+   function addULSlink( action, section, name ) {
+   'use strict';
+   var node,
+   aNode,
+   liNode,
+   target;
+   try {
+   if( section === 'languages') {
+   target = 'p-lang';
+   }
+   if ( action === 'add' ) {
+   node = document.getElementById( target 
).getElementsByTagName( 'div' )[0].getElementsByTagName( 'ul' )[0];
+   aNode = document.createElement( 'a' );
+   liNode = document.createElement( 'li' );
+aNode.appendChild( document.createTextNode( name ) );
+aNode.setAttribute( 'href', '#' );
+aNode.setAttribute( 'class', 'uls-trigger autonym');
+liNode.appendChild( aNode );
+liNode.setAttribute( 'class', 'active');
+liNode.setAttribute( 'id', 'pt-uls');
+node.appendChild( liNode );
+   }
+
+}
+catch( e ){
+   return;
+   }
+}
+
+
+
+function addLanguage( name ) {
+   'use strict';
+   var target = 'p-lang',
+   node = document.getElementById( target ).getElementsByTagName( 
'div' )[0].getElementsByTagName( 'ul' )[0],
+   aNode = document.createElement( 'a' ),
+   liNode = document.createElement( 'li' );
+
+   aNode.appendChild( document.createTextNode( name ) );
+aNode.setAttribute( 'href', '#' );
+   liNode.appendChild( aNode );
+liNode.setAttribute( 'class', 'active');
+liNode.setAttribute( 'id', 'pt-uls');
+node.appendChild( liNode );
+}
+
+
+function customizeSidebar() {
+   'use strict';
+//var langName = mw.uls.getBrowserLanguage();
+//new addLanguage( mw.uls.getCountryCode() );
+
+addLanguage( 'French' );
+   //var commLangs = mw.uls.getFrequentLanguageList( 
mw.uls.getCountryCode() );
+//Not working!---addLanguage( $uls.data.getAutonym('en') );
+
+   addULSlink( 'add', 'languages', 'More languages' );
+
+
+// $(".interlanguage-link").hide();
+   //var langarray= 
document.getElementByClassName('interlanguage-link');
+//$('.interlanguage-link').hide();
+
+   var elements = $('.interlanguage-link'),
+   i;
+
+   
//document.getElementsByClassName('interlanguage-link').style.display ='none';
+for (i = elements.length/2+1; i < elements.length; i++) {
+   elements[i].style.display= 'none';
+   }
+//$('.active').hide();
+//var x = $.uls.data.getLanguagesByScriptGroupInRegion;
+}
+
+$( document ).ready( function () {
+   'use strict';
+ 

[MediaWiki-commits] [Gerrit] prevent fatal when passing null to getInnerHtml - change (mediawiki...Flow)

2013-12-31 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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


Change subject: prevent fatal when passing null to getInnerHtml
..

prevent fatal when passing null to getInnerHtml

passing null was causing a fatal error, instead allow it and add
some debug logging to indicate there is a problem.

Change-Id: Idbe23d14ae963bfac13d7fb7e2b6b2ea1080cd64
---
M includes/Redlinker.php
1 file changed, 14 insertions(+), 6 deletions(-)


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

diff --git a/includes/Redlinker.php b/includes/Redlinker.php
index 344d671..e6c3c38 100644
--- a/includes/Redlinker.php
+++ b/includes/Redlinker.php
@@ -219,7 +219,13 @@
} );
 
$body = $dom->getElementsByTagName( 'body' )->item( 0 );
-   return Redlinker::getInnerHtml( $body );
+
+   if ( $body ) {
+   return Redlinker::getInnerHtml( $body );
+   } else {
+   wfDebugLog( __CLASS__, __FUNCTION__ . ' : Source 
content ' . md5( $content ) . ' resulted in no body' );
+   return '';
+   }
}
 
/**
@@ -275,18 +281,20 @@
}
}
}
-   
+
/**
 * Helper method retrieves the html of the nodes children
 *
 * @param DOMNode $node
 * @return string html of the nodes children
 */
-   static public function getInnerHtml( DOMNode $node ) {
+   static public function getInnerHtml( DOMNode $node = null ) {
$html = array();
-   $dom = $node->ownerDocument;
-   foreach ( $node->childNodes as $child ) {
-   $html[] = $dom->saveHTML( $child );
+   if ( $node ) {
+   $dom = $node->ownerDocument;
+   foreach ( $node->childNodes as $child ) {
+   $html[] = $dom->saveHTML( $child );
+   }
}
return implode( '', $html );
}

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

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

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


[MediaWiki-commits] [Gerrit] Update constructor arguments - change (mediawiki...Flow)

2013-12-31 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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


Change subject: Update constructor arguments
..

Update constructor arguments

Change-Id: I3831c766dbc46b4398ebf9fb347aad4939946326
---
M includes/Templating.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/includes/Templating.php b/includes/Templating.php
index c986f51..ac979a1 100644
--- a/includes/Templating.php
+++ b/includes/Templating.php
@@ -20,6 +20,11 @@
 
 class Templating {
/**
+* @var UserNameBatch
+*/
+   protected $usernames;
+
+   /**
 * @var UrlGenerator
 */
public $urlGenerator;
@@ -157,7 +162,8 @@
$this->globals['user'], // There is no guarantee of 
this existing
$root,
$actionMenu,
-   $this->urlGenerator
+   $this->urlGenerator,
+   $this->usernames
);
if ( !$actionMenu->isAllowed( 'view' ) ) {
return '';

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

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

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


[MediaWiki-commits] [Gerrit] Update AbyssinicaSIL font to new upstream version - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update AbyssinicaSIL font to new upstream version
..


Update AbyssinicaSIL font to new upstream version

* Upstream version: 1.500
* Upstream URL: http://scripts.sil.org/AbyssinicaSIL

Change-Id: Ia676001360affbb05985bd865506f03f983fdf07
---
M data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.eot
M data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.ttf
M data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.woff
M data/fontrepo/fonts/AbyssinicaSIL/font.ini
M resources/js/ext.uls.webfonts.repository.js
5 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.eot 
b/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.eot
index 0b35dff..2bad89c 100644
--- a/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.eot
+++ b/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.eot
Binary files differ
diff --git a/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.ttf 
b/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.ttf
index 640220c..bccfbb7 100644
--- a/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.ttf
+++ b/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.ttf
Binary files differ
diff --git a/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.woff 
b/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.woff
index 4c949c4..670801c 100644
--- a/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.woff
+++ b/data/fontrepo/fonts/AbyssinicaSIL/AbyssinicaSIL-R.woff
Binary files differ
diff --git a/data/fontrepo/fonts/AbyssinicaSIL/font.ini 
b/data/fontrepo/fonts/AbyssinicaSIL/font.ini
index 83e7dec..7715270 100644
--- a/data/fontrepo/fonts/AbyssinicaSIL/font.ini
+++ b/data/fontrepo/fonts/AbyssinicaSIL/font.ini
@@ -1,6 +1,6 @@
 [AbyssinicaSIL]
 languages=am*, ti*, gez*, tig*
-version=1.200
+version=1.500
 license=OFL-1.1
 licensefile=OFL.txt
 request-url=https://gerrit.wikimedia.org/r/#/c/25479/, 
https://gerrit.wikimedia.org/r/#/c/90306/
diff --git a/resources/js/ext.uls.webfonts.repository.js 
b/resources/js/ext.uls.webfonts.repository.js
index c0b8426..b772d03 100644
--- a/resources/js/ext.uls.webfonts.repository.js
+++ b/resources/js/ext.uls.webfonts.repository.js
@@ -1,5 +1,5 @@
 // Do not edit! This file is generated from data/fontrepo by 
data/fontrepo/scripts/compile.php
 ( function ( $ ) {
$.webfonts = $.webfonts || {};
-   $.webfonts.repository = 
{"base":"..\/data\/fontrepo\/fonts\/","languages":{"adx":["Jomolhari"],"af":["system","OpenDyslexic"],"ahr":["Lohit
 
Marathi"],"akk":["Akkadian"],"am":["AbyssinicaSIL"],"ang":["system","Junicode"],"ar":["system","Amiri"],"arb":["system","Amiri"],"arc":["Estrangelo
 Edessa","East Syriac Adiabene","SertoUrhoy"],"as":["system","Lohit 
Assamese"],"bbc":["system","Pangururan"],"bh":["Lohit 
Devanagari"],"bho":["Lohit 
Devanagari"],"bk":["system","OpenDyslexic"],"bn":["Siyam Rupali","Lohit 
Bengali"],"bo":["Jomolhari"],"bod":["Jomolhari"],"bpy":["Siyam Rupali","Lohit 
Bengali"],"btk":["system","Pangururan"],"bug":["Saweri"],"ca":["system","OpenDyslexic"],"cdo":["system","CharisSIL"],"ckb":["system","Lateef","ScheherazadeRegOT","Amiri"],"cr":["OskiEast"],"cy":["system","OpenDyslexic"],"da":["system","OpenDyslexic"],"de":["system","OpenDyslexic"],"dre":["Jomolhari"],"dv":["FreeFont-Thaana"],"dz":["Jomolhari"],"en":["system","OpenDyslexic"],"es":["system","OpenDyslexic"],"et":["system","OpenDyslexic"],"fa":["system","Iranian
 
Sans","Lateef","Nazli","ScheherazadeRegOT","Amiri"],"fi":["system","OpenDyslexic"],"fo":["system","OpenDyslexic"],"fr":["system","OpenDyslexic"],"fy":["system","OpenDyslexic"],"ga":["system","OpenDyslexic"],"gd":["system","OpenDyslexic"],"gez":["AbyssinicaSIL"],"gl":["system","OpenDyslexic"],"goe":["Jomolhari"],"gom":["Lohit
 Devanagari"],"grc":["system","GentiumPlus"],"gu":["Lohit 
Gujarati"],"hbo":["Taamey Frank CLM","Alef"],"he":["system","Alef","Miriam 
CLM","Taamey Frank CLM"],"hi":["Lohit 
Devanagari"],"hu":["system","OpenDyslexic"],"hut":["Jomolhari"],"id":["system","OpenDyslexic"],"ii":["Nuosu
 
SIL"],"is":["system","OpenDyslexic"],"it":["system","OpenDyslexic"],"iu":["system","OskiEast"],"jv":["system","Tuladha
 Jejeg"],"jv-java":["Tuladha 
Jejeg"],"kbg":["Jomolhari"],"khg":["Jomolhari"],"km":["KhmerOSbattambang","Hanuman","KhmerOS","Nokora
 Regular","Suwannaphum"],"kn":["Lohit Kannada","Gubbi"],"kok":["Lohit 
Devanagari"],"kte":["Jomolhari"],"lb":["system","OpenDyslexic"],"lbj":["Jomolhari"],"lhm":["Jomolhari"],"li":["system","OpenDyslexic"],"lo":["Phetsarath"],"loy":["Jomolhari"],"luk":["Jomolhari"],"lya":["Jomolhari"],"mai":["Lohit
 
Devanagari"],"mak":["Saweri"],"mi":["system","OpenDyslexic"],"ml":["system","AnjaliOldLipi","Meera"],"mr":["Lohit
 
Marathi"],"ms":["system","OpenDyslexic"],"muk":["Jomolhari"],"mul":["system","Autonym"],"my":["TharLon","Myanmar3","Padauk"],

[MediaWiki-commits] [Gerrit] Hygiene: Give feedback when topic added to talk page - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Give feedback when topic added to talk page
..


Hygiene: Give feedback when topic added to talk page

Address FIXME

Change-Id: I8542ad2b3909dfe6bda3b9c0aeec9ca5036bd9c3
---
M MobileFrontend.i18n.php
M includes/Resources.php
M javascripts/modules/talk/TalkSectionAddOverlay.js
3 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 1f1a145..e72f067 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -372,6 +372,7 @@
'mobile-frontend-talk-reply-success' => 'Your reply was successfully 
saved to the talk page.',
'mobile-frontend-talk-reply-info' => 'Note your reply will be 
automatically signed with your username.',
'mobile-frontend-talk-reply' => 'Reply',
+   'mobile-frontend-talk-topic-feedback' => 'New topic added to talk 
page!',
 
// media viewer
'mobile-frontend-media-details' => 'Details',
@@ -1054,6 +1055,7 @@
'mobile-frontend-talk-reply-info' => 'Inform the user their talk reply 
will be automatically signed.',
'mobile-frontend-talk-reply' => 'Reply heading.
 {{Identical|Reply}}',
+   'mobile-frontend-talk-topic-feedback' => 'Feedback when a topic has 
been added to talk page.',
'mobile-frontend-media-details' => 'Caption for a button leading to the 
details of a media file (e.g. an image) in a preview.
 {{Identical|Detail}}',
'mobile-frontend-media-license-link' => 'Link to license information in 
media viewer.
diff --git a/includes/Resources.php b/includes/Resources.php
index 9aa01ac..64fb857 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -642,6 +642,7 @@
'mobile-frontend-talk-reply-success',
'mobile-frontend-talk-reply',
'mobile-frontend-talk-reply-info',
+   'mobile-frontend-talk-topic-feedback',
// FIXME: Gets loaded twice if editor and talk both 
loaded.
'mobile-frontend-editor-cancel',
'mobile-frontend-editor-license' => array( 'parse' ),
diff --git a/javascripts/modules/talk/TalkSectionAddOverlay.js 
b/javascripts/modules/talk/TalkSectionAddOverlay.js
index 83cd97b..2f6ec64 100644
--- a/javascripts/modules/talk/TalkSectionAddOverlay.js
+++ b/javascripts/modules/talk/TalkSectionAddOverlay.js
@@ -3,6 +3,7 @@
var
Overlay = M.require( 'OverlayNew' ),
api = M.require( 'api' ),
+   toast = M.require( 'toast' ),
TalkSectionAddOverlay;
 
TalkSectionAddOverlay = Overlay.extend( {
@@ -60,8 +61,8 @@
self.hide();
// close the list of topics 
overlay as well
self.parent.hide();
-   // FIXME: give nicer user 
experience - toast message would be nice at least!
M.pageApi.invalidatePage( 
self.title );
+   toast.show( mw.msg( 
'mobile-frontend-talk-topic-feedback' ), 'toast' );
} );
} );
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8542ad2b3909dfe6bda3b9c0aeec9ca5036bd9c3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Siebrand 
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 wgPageName on refresh - change (mediawiki...MobileFrontend)

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

Change subject: Update wgPageName on refresh
..


Update wgPageName on refresh

New language overlay uses this
In alpha without this languages will load for the originally loaded
page.
For consistency purposes since other projects might use this config
variable, ensure its contents are accurate

Change-Id: I8cc162c8ec29b328af25610cb0f3f43be46bb11d
---
M javascripts/common/application.js
M javascripts/modules/editor/editor.js
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/javascripts/common/application.js 
b/javascripts/common/application.js
index b9300f9..ceb1124 100644
--- a/javascripts/common/application.js
+++ b/javascripts/common/application.js
@@ -268,9 +268,14 @@
 */
function reloadPage( page ) {
currentPage = page;
+   var parts = page.title.split( ':' );
 
// VisualEditor amongst other things relies on these variables 
to reflect current state of document
-   mw.config.set( 'wgTitle', page.title );
+   // FIXME: Why are there so many of these!?
+   // wgTitle does not have a namespace prefix. e.g. Talk:Foo -> 
Foo, Foo -> Foo
+   mw.config.set( 'wgTitle', parts[1] || parts[0] );
+   // wgPageName has namespace prefix
+   mw.config.set( 'wgPageName', page.title.replace( ' ', '_' ) );
mw.config.set( 'wgRelevantPageName', page.title );
mw.config.set( 'wgArticleId', page.getId() );
M.emit( 'page-loaded', page );
diff --git a/javascripts/modules/editor/editor.js 
b/javascripts/modules/editor/editor.js
index a3d2e18..518f9ee 100644
--- a/javascripts/modules/editor/editor.js
+++ b/javascripts/modules/editor/editor.js
@@ -74,6 +74,7 @@
var VisualEditorOverlay = M.require( 
'modules/editor/VisualEditorOverlay' );
loadingOverlay.hide();
result.resolve( new 
VisualEditorOverlay( {
+   // FIXME: use wgPageName (?)
title: ns ? ns + ':' + title : 
title,
sectionId: sectionId
} ) );
@@ -84,6 +85,7 @@
 
loadingOverlay.hide();
result.resolve( new EditorOverlay( {
+   // FIXME: use wgPageName (?)
title: ns ? ns + ':' + title : 
title,
isNew: isNew,
isNewEditor: 
user.getEditCount() === 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cc162c8ec29b328af25610cb0f3f43be46bb11d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] WIP: New A/B test for Sign-up Edit Guider - change (mediawiki...MobileFrontend)

2013-12-31 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review.

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


Change subject: WIP: New A/B test for Sign-up Edit Guider
..

WIP: New A/B test for Sign-up Edit Guider

Change-Id: Ibce39dd63bd5200a4d68b34efcf3a3a2abd09d28
---
M includes/MobileFrontend.hooks.php
M includes/Resources.php
M includes/skins/SkinMinerva.php
M includes/skins/SkinMinervaBeta.php
M javascripts/modules/editor/editor.js
M javascripts/modules/editorNew/EditorOverlay.js
M javascripts/modules/tutorials/newbieEditor.js
7 files changed, 40 insertions(+), 19 deletions(-)


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

diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 35da4ee..e22e2e2 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -725,6 +725,10 @@
'schema' => 'MobileWebClickTracking',
'revision' => 5929948,
),
+   'schema.MobileLeftNavbarEditCTA' => array(
+   'schema' => 'MobileLeftNavbarEditCTA',
+   'revision' => 6792179,
+   ),
);
 
if ( class_exists( 'ResourceLoaderSchemaModule' ) ) {
diff --git a/includes/Resources.php b/includes/Resources.php
index 9aa01ac..4313785 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -91,6 +91,7 @@
'scripts' => array(
'javascripts/loggingSchemas/MobileWebClickTracking.js',
'javascripts/loggingSchemas/mobileWebEditing.js',
+   'javascripts/loggingSchemas/mobileLeftNavbarEditCTA.js',
),
),
 
@@ -832,6 +833,7 @@
'dependencies' => array(
'mobile.templates',
'mobile.overlays',
+   'mobile.editor',
),
'scripts' => array(
'javascripts/common/ContentOverlay.js',
@@ -861,6 +863,7 @@
'mediawiki.language',
'mobile.loggingSchemas',
'mobile.newusers',
+   'mobile.editor',
),
'scripts' => array(
'javascripts/externals/micro.autosize.js',
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index cc8264e..48e101a 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -633,7 +633,6 @@
$modules['search'] = array( 'mobile.search.stable' );
$modules['stableonly'] = array( 'mobile.lastEdited.stable' );
$modules['issues'] = array( 'mobile.issues' );
-   $modules['editor'] = array( 'mobile.editor' );
$modules['languages'] = array( 'mobile.languages' );
 
$title = $this->getTitle();
@@ -653,6 +652,7 @@
'mobile.editing.schema',
'schema.MobileWebCta',
'schema.MobileWebClickTracking',
+   'schema.MobileLeftNavbarEditCTA',
);
}
}
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index 1219ae3..327abe7 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -63,7 +63,6 @@
$modules['beta'][] = 'mobile.geonotahack';
$modules['search'] = array( 'mobile.search.beta' );
$modules['issues'] = array( 'mobile.issues.beta' );
-   $modules['editor'] = array( 'mobile.editor.beta' );
$modules['languages'] = array( 'mobile.languages.beta' );
// turn off stable only modules
$modules['stableonly'] = array();
diff --git a/javascripts/modules/editor/editor.js 
b/javascripts/modules/editor/editor.js
index a3d2e18..e51ca87 100644
--- a/javascripts/modules/editor/editor.js
+++ b/javascripts/modules/editor/editor.js
@@ -98,13 +98,16 @@
} );
$( '#ca-edit' ).addClass( 'enabled' );
 
-   // FIXME: unfortunately the main page is special cased.
-   if ( mw.config.get( 'wgIsMainPage' ) || isNew || 
M.getLeadSection().text() ) {
-   // if lead section is not empty, open editor with lead 
section
-   addEditButton( 0, '#ca-edit' );
-   } else {
-   // if lead section is empty, open editor with first 
section
-   addEditButton( 1, '#ca-edit' );
+   // Make sure we never create two edit links by accident
+  

[MediaWiki-commits] [Gerrit] Allow sending a message to every single user on all wikis - change (mediawiki...MassMessage)

2013-12-31 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Allow sending a message to every single user on all wikis
..

Allow sending a message to every single user on all wikis

Bug: 59169
Change-Id: I7021fad4e7e43a40a02fcf69ea3fb4fa065409a4
---
M MassMessage.body.php
M SpecialMassMessage.php
2 files changed, 36 insertions(+), 0 deletions(-)


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

diff --git a/MassMessage.body.php b/MassMessage.body.php
index 21e5d33..b2457d1 100644
--- a/MassMessage.body.php
+++ b/MassMessage.body.php
@@ -165,6 +165,10 @@
 * @return array
 */
public static function getParserFunctionTargets( Title $spamlist, 
$context ) {
+   if ( $spamlist->isSpecial( 'GlobalUsers' ) ) {
+   // Bug 59169
+   return self::getAllUsers();
+   }
$page = WikiPage::factory( $spamlist );
$text = $page->getContent( Revision::RAW )->getNativeData();
 
@@ -186,6 +190,35 @@
}
 
/**
+* Return all user pages as targets
+* @return array
+*/
+   public static function getAllUsers() {
+   if ( !class_exists( 'CentralAuthUser' ) ) {
+   // :(
+   return array();
+   }
+   $dbr = CentralAuthUser::getCentralSlaveDB();
+   $rows = $dbr->select(
+   'globaluser',
+   array( 'gu_name' ),
+   array(),
+   __METHOD__
+   );
+
+   $targets = array();
+   foreach( $rows as $row ) {
+   $caUser = new CentralAuthUser( $row->gu_name );
+   $targets[] = array(
+   'wiki' => $caUser->getHomeWiki(),
+   'title' => Title::makeTitleSafe( NS_USER, 
$row->gu_name )->getPrefixedText()
+   );
+   }
+
+   return self::normalizeTargets( $targets );
+   }
+
+   /**
 * Helper function for MassMessageHooks::ParserFunction
 * Inspired from the Cite extension
 * @param $key string message key
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 22a4d65..f7c4a3a 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -222,6 +222,9 @@
 */
protected function getSpamlist( $title ) {
$spamlist = Title::newFromText( $title );
+   if ( $spamlist->isSpecial( 'GlobalUsers' ) ) {
+   return $spamlist;
+   }
if ( $spamlist === null || !$spamlist->exists() ) {
return 'massmessage-spamlist-doesnotexist';
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7021fad4e7e43a40a02fcf69ea3fb4fa065409a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
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] WIP: Generate JSDoc from Common folder - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: WIP: Generate JSDoc from Common folder
..

WIP: Generate JSDoc from Common folder

Bug: 44127
Change-Id: I7f217297f672b868df4b0a88a691c302c02a6f06
---
M Makefile
M javascripts/common/Class.js
M javascripts/common/ContentOverlay.js
M javascripts/common/CtaDrawer.js
M javascripts/common/Drawer.js
M javascripts/common/LoadingOverlay.js
M javascripts/common/LoadingOverlayNew.js
M javascripts/common/Overlay.js
M javascripts/common/OverlayManager.js
M javascripts/common/OverlayNew.js
M javascripts/common/Page.js
M javascripts/common/PageApi.js
A javascripts/common/README.md
M javascripts/common/Router.js
M javascripts/common/View.js
M javascripts/common/api.js
M javascripts/common/eventemitter.js
M javascripts/common/history-alpha.js
M javascripts/common/modules.js
M javascripts/common/polyfills.js
M javascripts/common/settings.js
M javascripts/common/templates.js
M javascripts/common/toast.js
M javascripts/common/user.js
M package.json
25 files changed, 170 insertions(+), 24 deletions(-)


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

diff --git a/Makefile b/Makefile
index 26b14e8..6cd2031 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,12 @@
# FIXME: Use more up to date Ruby version
@node_modules/.bin/kss-node less/ less/ -l less/mobile.less -t 
styleguide-template
 
+jsdoc: nodecheck
+   rm -rf docs
+   @node_modules/.bin/jsdoc -r --verbose javascripts/common/ 
javascripts/common/README.md -d docs 
+
+docs: kss jsdoc
+
 nodecheck:
@scripts/nodecheck.sh
 
diff --git a/javascripts/common/Class.js b/javascripts/common/Class.js
index 27adfa5..db5212e 100644
--- a/javascripts/common/Class.js
+++ b/javascripts/common/Class.js
@@ -41,6 +41,9 @@
return Child;
}
 
+   /**
+* @class
+*/
function Class() {
this.initialize.apply( this, arguments );
}
diff --git a/javascripts/common/ContentOverlay.js 
b/javascripts/common/ContentOverlay.js
index 788aa31..48affe2 100644
--- a/javascripts/common/ContentOverlay.js
+++ b/javascripts/common/ContentOverlay.js
@@ -2,6 +2,10 @@
 
var Overlay = M.require( 'Overlay' ), ContentOverlay;
 
+   /**
+* An {@link Overlay} that points at an element on the page.
+* @class
+*/
ContentOverlay = Overlay.extend( {
fullScreen: false,
closeOnContentTap: true,
diff --git a/javascripts/common/CtaDrawer.js b/javascripts/common/CtaDrawer.js
index 3638b83..ab6adb7 100644
--- a/javascripts/common/CtaDrawer.js
+++ b/javascripts/common/CtaDrawer.js
@@ -1,10 +1,13 @@
-/**
- * This creates the drawer at the bottom of the screen that appears when an 
anonymous
- * user tries to perform an action that requires being logged in. It presents 
the user
- * with options to log in or sign up for a new account.
- */
 ( function( M, $ ) {
 var Drawer = M.require( 'Drawer' ),
+   CtaDrawer;
+
+   /**
+* This creates the drawer at the bottom of the screen that appears 
when an anonymous
+* user tries to perform an action that requires being logged in. It 
presents the user
+* with options to log in or sign up for a new account.
+* @class
+*/
CtaDrawer = Drawer.extend( {
defaults: {
loginCaption: mw.msg( 
'mobile-frontend-watchlist-cta-button-login' ),
diff --git a/javascripts/common/Drawer.js b/javascripts/common/Drawer.js
index 6b3610d..f09ebac 100644
--- a/javascripts/common/Drawer.js
+++ b/javascripts/common/Drawer.js
@@ -1,6 +1,13 @@
 ( function( M, $ ) {
 
 var View = M.require( 'view' ),
+   Drawer;
+
+   /**
+* A {@link View} that pops up from the bottom of the screen.
+* @class
+* @extends View
+*/
Drawer = View.extend( {
defaults: {
cancelMessage: mw.msg( 'mobile-frontend-drawer-cancel' )
diff --git a/javascripts/common/LoadingOverlay.js 
b/javascripts/common/LoadingOverlay.js
index 628fc74..0d58dd1 100644
--- a/javascripts/common/LoadingOverlay.js
+++ b/javascripts/common/LoadingOverlay.js
@@ -1,6 +1,13 @@
+/**
+   @overview An overlay to be shown whilst another Overlay loads 
asynchronously.
+   @module LoadingOverlay
+ */
 ( function( M ) {
var Overlay = M.require( 'Overlay' ), LoadingOverlay;
 
+   /**
+* @class
+*/
LoadingOverlay = Overlay.extend( {
templatePartials: {
content: M.template.get( 'LoadingOverlay' )
diff --git a/javascripts/common/LoadingOverlayNew.js 
b/javascripts/common/LoadingOverlayNew.js
index 4330618..34261e0 100644
--- a/javascripts/common/LoadingOverlayNew.js
+++ b/javascripts/common/LoadingOverlayNew.js

[MediaWiki-commits] [Gerrit] Revert "add BROWSER_LABEL to edit string per Bug 59011" - change (mediawiki...Flow)

2013-12-31 Thread Cmcmahon (Code Review)
Cmcmahon has submitted this change and it was merged.

Change subject: Revert "add BROWSER_LABEL to edit string per Bug 59011"
..


Revert "add BROWSER_LABEL to edit string per Bug 59011"

This reverts commit 2131bfab283bd862e470418614039472389d5cea.

Change-Id: If1ed1481d4691002f7f0533c8c7dd71b9c5ca53b
---
M tests/browser/features/step_definitions/edit_existing_steps.rb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/browser/features/step_definitions/edit_existing_steps.rb 
b/tests/browser/features/step_definitions/edit_existing_steps.rb
index 99737da..98a5603 100644
--- a/tests/browser/features/step_definitions/edit_existing_steps.rb
+++ b/tests/browser/features/step_definitions/edit_existing_steps.rb
@@ -13,11 +13,11 @@
 end
 
 Then(/^I should be able to edit the post field with (.+)$/) do |edited_post|
-  on(FlowPage).post_edit_element.when_present.send_keys(edited_post + 
@random_string + ENV['BROWSER_LABEL'])
+  on(FlowPage).post_edit_element.when_present.send_keys(edited_post + 
@random_string)
 end
 
 Then(/^I should be able to edit the title field with (.+)$/) do |edited_title|
-  on(FlowPage).title_edit_element.when_present.send_keys(edited_title + 
@random_string + ENV['BROWSER_LABEL'])
+  on(FlowPage).title_edit_element.when_present.send_keys(edited_title + 
@random_string)
 end
 
 Then(/^I should be able to save the new post body$/) do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1ed1481d4691002f7f0533c8c7dd71b9c5ca53b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Edit title and body with weird stuff - change (mediawiki...Flow)

2013-12-31 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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


Change subject: Edit title and body with weird stuff
..

Edit title and body with weird stuff

Change-Id: I2c90ddd7248960b0ec7cb62bea03af38f8f7377e
---
M tests/browser/features/flow_anon.feature
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/tests/browser/features/flow_anon.feature 
b/tests/browser/features/flow_anon.feature
index 19d6963..c9aef20 100644
--- a/tests/browser/features/flow_anon.feature
+++ b/tests/browser/features/flow_anon.feature
@@ -4,11 +4,11 @@
 
   Scenario: Add new Flow topic
 Given I am on Flow page
-When I create a Title of Flow Topic in Flow new topic
-  And I create a Body of Flow Topic into Flow body
+When I create a Topic:  in Flow new topic
+  And I create a Body:  into Flow body
   And I click New topic save
-Then the Flow page should contain Title of Flow Topic
-  And the Flow page should contain Body of Flow Topic
+Then the Flow page should contain Topic: 
+  And the Flow page should contain Body: 
 
   Scenario: Anon does not see block or actions
 Given I am on Flow page

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

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

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


[MediaWiki-commits] [Gerrit] Fix bug with getDupeWarning - change (mediawiki...MultiUpload)

2013-12-31 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: Fix bug with getDupeWarning
..


Fix bug with getDupeWarning

The function was trying to overwrite its parent, but was trying to be
static, when the parent is dynamic. This produces PHP errors, preventing
the use of MultiUpload and Special:SpecialPages. Fixed by not declaring
the function as static

Change-Id: Ib2a6004ee009bee3d72008e1c41f7985199fe27c
---
M MultiUpload.body.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  Legoktm: Verified
  Jack Phoenix: Looks good to me, but someone else must approve



diff --git a/MultiUpload.body.php b/MultiUpload.body.php
index cb2e7a6..ba651d1 100644
--- a/MultiUpload.body.php
+++ b/MultiUpload.body.php
@@ -236,7 +236,7 @@
if( $warning == 'exists' ) {
$msg = "\t" . 
self::getExistsWarning( $args ) . "\n";
} elseif( $warning == 'duplicate' ) {
-   $msg = self::getDupeWarning( $args, 
$this->mLocalFile->getTitle() );
+   $msg = $this->getDupeWarning( $args, 
$this->mLocalFile->getTitle() );
} elseif( $warning == 'duplicate-archive' ) {
$msg = "\t" . wfMsgExt( 
'file-deleted-duplicate', 'parseinline',
array( 
Title::makeTitle( NS_FILE, $args )->getPrefixedText() ) )
@@ -351,7 +351,7 @@
 * Construct a warning and a gallery from an array of duplicate files.
 * Override because the original doesn't say which file is a dupe
 */
-   public static function getDupeWarning( $dupes, $dupeTitle = null ) {
+   public function getDupeWarning( $dupes, $dupeTitle = null ) {
$result = parent::getDupeWarning( $dupes );
return preg_replace( '@@', "{$dupeTitle->getText()}", 
$result );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2a6004ee009bee3d72008e1c41f7985199fe27c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MultiUpload
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] Add some comments - change (mediawiki...Flow)

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

Change subject: Add some comments
..


Add some comments

Bug: 59011
Change-Id: I29e28cedd64586a0037e4b1bebafb187bdc1331e
---
M tests/browser/features/edit_existing.feature
M tests/browser/features/support/pages/flow_page.rb
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/tests/browser/features/edit_existing.feature 
b/tests/browser/features/edit_existing.feature
index 72681ca..f0a321b 100644
--- a/tests/browser/features/edit_existing.feature
+++ b/tests/browser/features/edit_existing.feature
@@ -2,6 +2,8 @@
 
 Feature: Edit existing title
 
+Assumes that the test Flow page has at least two topics (with posts).
+
   Background:
 Given I am logged in
 
diff --git a/tests/browser/features/support/pages/flow_page.rb 
b/tests/browser/features/support/pages/flow_page.rb
index 786e0aa..7f0cec6 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -7,6 +7,8 @@
   # MEDIAWIKI_URL must have this in $wgFlowOccupyPages array or 
$wgFlowOccupyNamespaces.
   page_url URL.url("Talk:Flow_QA")
 
+  # This hack makes Chrome edit the second topic on the page to avoid edit
+  # conflicts from simultaneous test runs (bug 59011).
   if ENV['BROWSER_LABEL'] == "chrome"
 topic_index = 1
   else

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29e28cedd64586a0037e4b1bebafb187bdc1331e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage 
Gerrit-Reviewer: Cmcmahon 
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 some comments - change (mediawiki...Flow)

2013-12-31 Thread Spage (Code Review)
Spage has uploaded a new change for review.

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


Change subject: Add some comments
..

Add some comments

Bug: 59011
Change-Id: I29e28cedd64586a0037e4b1bebafb187bdc1331e
---
M tests/browser/features/edit_existing.feature
M tests/browser/features/support/pages/flow_page.rb
2 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/tests/browser/features/edit_existing.feature 
b/tests/browser/features/edit_existing.feature
index 72681ca..f0a321b 100644
--- a/tests/browser/features/edit_existing.feature
+++ b/tests/browser/features/edit_existing.feature
@@ -2,6 +2,8 @@
 
 Feature: Edit existing title
 
+Assumes that the test Flow page has at least two topics (with posts).
+
   Background:
 Given I am logged in
 
diff --git a/tests/browser/features/support/pages/flow_page.rb 
b/tests/browser/features/support/pages/flow_page.rb
index 786e0aa..7f0cec6 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -7,6 +7,8 @@
   # MEDIAWIKI_URL must have this in $wgFlowOccupyPages array or 
$wgFlowOccupyNamespaces.
   page_url URL.url("Talk:Flow_QA")
 
+  # This hack makes Chrome edit the second topic on the page to avoid edit
+  # conflicts from simultaneous test runs (bug 59011).
   if ENV['BROWSER_LABEL'] == "chrome"
 topic_index = 1
   else

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

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

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


[MediaWiki-commits] [Gerrit] Add .gitignore to the /skins directory - change (mediawiki/core)

2013-12-31 Thread Huji (Code Review)
Huji has uploaded a new change for review.

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


Change subject: Add .gitignore to the /skins directory
..

Add .gitignore to the /skins directory

To make it easier to work on extensions.

Bug:55486
Change-Id: I986b6fe71bba429d1274bd86822448838601af64
---
A skins/.gitignore
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/104784/1

diff --git a/skins/.gitignore b/skins/.gitignore
new file mode 100644
index 000..967fd9f
--- /dev/null
+++ b/skins/.gitignore
@@ -0,0 +1,17 @@
+*/
+!cologneblue/
+!cologneblue/*
+!common/
+!common/*
+!modern/
+!modern/*
+!monobook/
+!monobook/*
+!vector/
+!vector/*
+
+*.php
+!CologneBlue.php
+!Modern.php
+!MonoBook.php
+!Vector.php

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

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

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


[MediaWiki-commits] [Gerrit] Refactor ProfilerSimple - change (mediawiki/core)

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

Change subject: Refactor ProfilerSimple
..


Refactor ProfilerSimple

This patch refactors ProfilerSimple, moving the code that creates a new
profiling entry and the code that updates an existing entry to discrete
methods. This allows subclasses to supply a different implementation. It will
allow me to introduce a profiler class that uses RunningStat (introduced in
Ifedda276d) without breaking existing APIs and without having to duplicate lots
of code.

Change-Id: Ida7d7d0c1e2a98618b51246861e6af8ec3eb6320
---
M includes/profiler/ProfilerSimple.php
1 file changed, 31 insertions(+), 14 deletions(-)

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



diff --git a/includes/profiler/ProfilerSimple.php 
b/includes/profiler/ProfilerSimple.php
index 6f3b50c..ee92c17 100644
--- a/includes/profiler/ProfilerSimple.php
+++ b/includes/profiler/ProfilerSimple.php
@@ -29,8 +29,36 @@
 class ProfilerSimple extends Profiler {
var $mMinimumTime = 0;
 
-   var $zeroEntry = array( 'cpu' => 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 
'real_sq' => 0.0, 'count' => 0 );
var $errorEntry;
+
+   public function getZeroEntry() {
+   return array(
+   'cpu' => 0.0,
+   'cpu_sq'  => 0.0,
+   'real'=> 0.0,
+   'real_sq' => 0.0,
+   'count'   => 0
+   );
+   }
+
+   public function getErrorEntry() {
+   $entry = $this->getZeroEntry();
+   $entry['count'] = 1;
+   return $entry;
+   }
+
+   public function updateEntry( $name, $elapsedCpu, $elapsedReal ) {
+   $entry =& $this->mCollated[$name];
+   if ( !is_array( $entry ) ) {
+   $entry = $this->getZeroEntry();
+   $this->mCollated[$name] =& $entry;
+   }
+   $entry['cpu'] += $elapsedCpu;
+   $entry['cpu_sq'] += $elapsedCpu * $elapsedCpu;
+   $entry['real'] += $elapsedReal;
+   $entry['real_sq'] += $elapsedReal * $elapsedReal;
+   $entry['count']++;
+   }
 
public function isPersistent() {
/* Implement in output subclasses */
@@ -38,8 +66,7 @@
}
 
protected function addInitialStack() {
-   $this->errorEntry = $this->zeroEntry;
-   $this->errorEntry['count'] = 1;
+   $this->errorEntry = $this->getErrorEntry();
 
$initialTime = $this->getInitialTime();
$initialCpu = $this->getInitialTime( 'cpu' );
@@ -88,19 +115,9 @@
$this->debug( "$message\n" );
$this->mCollated[$message] = $this->errorEntry;
}
-   $entry =& $this->mCollated[$functionname];
$elapsedcpu = $this->getTime( 'cpu' ) - $octime;
$elapsedreal = $this->getTime() - $ortime;
-   if ( !is_array( $entry ) ) {
-   $entry = $this->zeroEntry;
-   $this->mCollated[$functionname] =& $entry;
-   }
-   $entry['cpu'] += $elapsedcpu;
-   $entry['cpu_sq'] += $elapsedcpu * $elapsedcpu;
-   $entry['real'] += $elapsedreal;
-   $entry['real_sq'] += $elapsedreal * $elapsedreal;
-   $entry['count']++;
-
+   $this->updateEntry( $functionname, $elapsedcpu, 
$elapsedreal );
$this->updateTrxProfiling( $functionname, $elapsedreal 
);
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Adding code comments of resulting keys - change (mediawiki...UploadWizard)

2013-12-31 Thread Mayankmadan (Code Review)
Mayankmadan has uploaded a new change for review.

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


Change subject: Adding code comments of resulting keys
..

Adding code comments of resulting keys

Bug: 54524
Change-Id: I421019d3506aeb4681d489d2a436fe2fa8497314
---
M resources/mw.FormDataTransport.js
M resources/mw.UploadWizardDetails.js
2 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/resources/mw.FormDataTransport.js 
b/resources/mw.FormDataTransport.js
index 8f7cd07..985cf7a 100644
--- a/resources/mw.FormDataTransport.js
+++ b/resources/mw.FormDataTransport.js
@@ -227,6 +227,8 @@
 });
 //Server not ready, wait for 3 more seconds
 } else {
+//Statuses that can be returned:
+// * mwe-upwiz-undefined
 transport.uploadObject.ui.setStatus( 'mwe-upwiz-' + 
response.upload.stage );
 setTimeout(function() {
 transport.checkStatus();
diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index c826505..250fb4d 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -1338,6 +1338,8 @@
if ( ( ( new Date() ).getTime() - firstPoll ) > 
10 * 60 * 1000 ) {
err('server-error', 'unknown server 
error');
} else {
+   //Messages that can be returned:
+   // *mwe-upwiz-undefined
_this.setStatus( mw.message( 
'mwe-upwiz-' + result.upload.stage ).text() );
setTimeout( function() {
if ( _this.upload.state != 
'aborted' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I421019d3506aeb4681d489d2a436fe2fa8497314
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Mayankmadan 

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


[MediaWiki-commits] [Gerrit] Allow page_namespace IS NULL in watchlist query - change (mediawiki...LiquidThreads)

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

Change subject: Allow page_namespace IS NULL in watchlist query
..


Allow page_namespace IS NULL in watchlist query

Some recent changes entries do not join against page,
as such page_namespace will be null due to the left
join.  Null is, for the purposes of this query,
equivilent to != 90.

Bug: 55597
Change-Id: Iadad714267219986a0e8915e8e1b9e240b5d4617
---
M classes/Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/classes/Hooks.php b/classes/Hooks.php
index b788d1c..0a83775 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -115,7 +115,7 @@
// Yes, this is the correct field to join to. Weird 
naming.
$join_conds['page'] = array( 'LEFT JOIN', 
'rc_cur_id=page_id' );
}
-   $conds[] = "page_namespace != " . $db->addQuotes( NS_LQT_THREAD 
);
+   $conds[] = "page_namespace IS NULL OR page_namespace != " . 
$db->addQuotes( NS_LQT_THREAD );
 
$talkpage_messages = NewMessages::newUserMessages( $wgUser );
$tn = count( $talkpage_messages );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iadad714267219986a0e8915e8e1b9e240b5d4617
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Spage 
Gerrit-Reviewer: Werdna 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow page_namespace IS NULL in watchlist query - change (mediawiki...LiquidThreads)

2013-12-31 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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


Change subject: Allow page_namespace IS NULL in watchlist query
..

Allow page_namespace IS NULL in watchlist query

Some recent changes entries do not join against page,
as such page_namespace will be null due to the left
join.  Null is, for the purposes of this query,
equivilent to != 90.

Change-Id: Iadad714267219986a0e8915e8e1b9e240b5d4617
---
M classes/Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/classes/Hooks.php b/classes/Hooks.php
index b788d1c..0a83775 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -115,7 +115,7 @@
// Yes, this is the correct field to join to. Weird 
naming.
$join_conds['page'] = array( 'LEFT JOIN', 
'rc_cur_id=page_id' );
}
-   $conds[] = "page_namespace != " . $db->addQuotes( NS_LQT_THREAD 
);
+   $conds[] = "page_namespace IS NULL OR page_namespace != " . 
$db->addQuotes( NS_LQT_THREAD );
 
$talkpage_messages = NewMessages::newUserMessages( $wgUser );
$tn = count( $talkpage_messages );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadad714267219986a0e8915e8e1b9e240b5d4617
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Refactor ProfilerSimple - change (mediawiki/core)

2013-12-31 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Refactor ProfilerSimple
..

Refactor ProfilerSimple

This patch refactors ProfilerSimple, moving the code that creates a new
profiling entry and the code that updates an existing entry to discrete
methods. This allows subclasses to supply a different implementation. It will
allow me to introduce a profiler class that uses RunningStat (introduced in
Ifedda276d) without breaking existing APIs and without having to duplicate lots
of code.

Change-Id: Ida7d7d0c1e2a98618b51246861e6af8ec3eb6320
---
M includes/profiler/ProfilerSimple.php
1 file changed, 34 insertions(+), 19 deletions(-)


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

diff --git a/includes/profiler/ProfilerSimple.php 
b/includes/profiler/ProfilerSimple.php
index 6f3b50c..10580c0 100644
--- a/includes/profiler/ProfilerSimple.php
+++ b/includes/profiler/ProfilerSimple.php
@@ -29,17 +29,42 @@
 class ProfilerSimple extends Profiler {
var $mMinimumTime = 0;
 
-   var $zeroEntry = array( 'cpu' => 0.0, 'cpu_sq' => 0.0, 'real' => 0.0, 
'real_sq' => 0.0, 'count' => 0 );
var $errorEntry;
 
+   public function getZeroEntry() {
+   return array(
+   'cpu' => 0.0,
+   'cpu_sq'  => 0.0,
+   'real'=> 0.0,
+   'real_sq' => 0.0,
+   'count'   => 0
+   );
+   }
+
+   public function getErrorEntry() {
+   $entry = $this->getZeroEntry();
+   $entry['count'] = 1;
+   return $entry;
+   }
+
+   public function updateEntry( $name, $elapsedCpu, $elapsedReal ) {
+   $entry =& $this->mCollated[$name];
+   if ( !is_array( $entry ) ) {
+   $entry = $this->getZeroEntry();
+   $this->mCollated[$name] =& $entry;
+   }
+   $entry['cpu'] += $elapsedCpu;
+   $entry['cpu_sq'] += $elapsedCpu * $elapsedCpu;
+   $entry['real'] += $elapsedReal;
+   $entry['real_sq'] += $elapsedReal * $elapsedReal;
+   }
+
public function isPersistent() {
-   /* Implement in output subclasses */
-   return false;
+   return true;
}
 
protected function addInitialStack() {
-   $this->errorEntry = $this->zeroEntry;
-   $this->errorEntry['count'] = 1;
+   $this->errorEntry = $this->getErrorEntry();
 
$initialTime = $this->getInitialTime();
$initialCpu = $this->getInitialTime( 'cpu' );
@@ -88,20 +113,10 @@
$this->debug( "$message\n" );
$this->mCollated[$message] = $this->errorEntry;
}
-   $entry =& $this->mCollated[$functionname];
-   $elapsedcpu = $this->getTime( 'cpu' ) - $octime;
-   $elapsedreal = $this->getTime() - $ortime;
-   if ( !is_array( $entry ) ) {
-   $entry = $this->zeroEntry;
-   $this->mCollated[$functionname] =& $entry;
-   }
-   $entry['cpu'] += $elapsedcpu;
-   $entry['cpu_sq'] += $elapsedcpu * $elapsedcpu;
-   $entry['real'] += $elapsedreal;
-   $entry['real_sq'] += $elapsedreal * $elapsedreal;
-   $entry['count']++;
-
-   $this->updateTrxProfiling( $functionname, $elapsedreal 
);
+   $elapsedCpu = $this->getTime( 'cpu' ) - $octime;
+   $elapsedReal = $this->getTime() - $ortime;
+   $this->updateEntry( $functionname, $elapsedCpu, 
$elapsedReal );
+   $this->updateTrxProfiling( $functionname, $elapsedReal 
);
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida7d7d0c1e2a98618b51246861e6af8ec3eb6320
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Moved MappedIterator to /libs - change (mediawiki/core)

2013-12-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Moved MappedIterator to /libs
..

Moved MappedIterator to /libs

Change-Id: Id466b66f43db97c5837030d166b9abd66fd56e0d
---
M includes/AutoLoader.php
R includes/libs/MappedIterator.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/104779/1

diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 1f81249..996e61e 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -681,6 +681,7 @@
'HttpStatus' => 'includes/libs/HttpStatus.php',
'IEContentAnalyzer' => 'includes/libs/IEContentAnalyzer.php',
'IEUrlExtension' => 'includes/libs/IEUrlExtension.php',
+   'MappedIterator' => 'includes/libs/MappedIterator.php',
'JavaScriptMinifier' => 'includes/libs/JavaScriptMinifier.php',
'JSCompilerContext' => 'includes/libs/jsminplus.php',
'JSMinPlus' => 'includes/libs/jsminplus.php',
@@ -1072,7 +1073,6 @@
'IP' => 'includes/utils/IP.php',
'MWCryptRand' => 'includes/utils/MWCryptRand.php',
'MWFunction' => 'includes/utils/MWFunction.php',
-   'MappedIterator' => 'includes/utils/MappedIterator.php',
'RegexlikeReplacer' => 'includes/utils/StringUtils.php',
'ReplacementArray' => 'includes/utils/StringUtils.php',
'Replacer' => 'includes/utils/StringUtils.php',
diff --git a/includes/utils/MappedIterator.php 
b/includes/libs/MappedIterator.php
similarity index 97%
rename from includes/utils/MappedIterator.php
rename to includes/libs/MappedIterator.php
index f2e6df6..1c7e03e 100644
--- a/includes/utils/MappedIterator.php
+++ b/includes/libs/MappedIterator.php
@@ -57,7 +57,7 @@
} elseif ( $iter instanceof Iterator ) {
$baseIterator = $iter;
} else {
-   throw new MWException( "Invalid base iterator 
provided." );
+   throw new UnexpectedValueException( "Invalid base 
iterator provided." );
}
parent::__construct( $baseIterator );
$this->vCallback = $vCallback;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id466b66f43db97c5837030d166b9abd66fd56e0d
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] Moved HashRing to /libs - change (mediawiki/core)

2013-12-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Moved HashRing to /libs
..

Moved HashRing to /libs

Change-Id: I0b74b386f7459f550816f99aa7e00970c3cff4c7
---
M includes/AutoLoader.php
R includes/libs/HashRing.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 1f81249..341d579 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -678,6 +678,7 @@
'CSSJanus_Tokenizer' => 'includes/libs/CSSJanus.php',
'CSSMin' => 'includes/libs/CSSMin.php',
'GenericArrayObject' => 'includes/libs/GenericArrayObject.php',
+   'HashRing' => 'includes/libs/HashRing.php',
'HttpStatus' => 'includes/libs/HttpStatus.php',
'IEContentAnalyzer' => 'includes/libs/IEContentAnalyzer.php',
'IEUrlExtension' => 'includes/libs/IEUrlExtension.php',
@@ -1067,7 +1068,6 @@
'ConfEditorToken' => 'includes/utils/ConfEditor.php',
'DoubleReplacer' => 'includes/utils/StringUtils.php',
'ExplodeIterator' => 'includes/utils/StringUtils.php',
-   'HashRing' => 'includes/utils/HashRing.php',
'HashtableReplacer' => 'includes/utils/StringUtils.php',
'IP' => 'includes/utils/IP.php',
'MWCryptRand' => 'includes/utils/MWCryptRand.php',
diff --git a/includes/utils/HashRing.php b/includes/libs/HashRing.php
similarity index 97%
rename from includes/utils/HashRing.php
rename to includes/libs/HashRing.php
index c152d41..6925c7f 100644
--- a/includes/utils/HashRing.php
+++ b/includes/libs/HashRing.php
@@ -42,7 +42,7 @@
return $w > 0;
} );
if ( !count( $map ) ) {
-   throw new MWException( "Ring is empty or all weights 
are zero." );
+   throw new UnexpectedValueException( "Ring is empty or 
all weights are zero." );
}
$this->sourceMap = $map;
// Sort the locations based on the hash of their names

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b74b386f7459f550816f99aa7e00970c3cff4c7
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] Fix image preview for tablets - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Fix image preview for tablets
..

Fix image preview for tablets

Bug: 57435
Change-Id: Ibb18e0ab87f0c64c3edc784a9b618e0cd263
---
M less/modules/mediaViewer.less
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/less/modules/mediaViewer.less b/less/modules/mediaViewer.less
index 7d3f79a..0886836 100644
--- a/less/modules/mediaViewer.less
+++ b/less/modules/mediaViewer.less
@@ -4,6 +4,8 @@
// http://stackoverflow.com/a/10910802/36523i8
// http://www.w3.org/Style/Examples/007/center.en.html#vertical
display: table;
+   // Bug 57435
+   width: 100%;
background: #000;
 
.container {

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

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

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


[MediaWiki-commits] [Gerrit] Make branch versions of *all* extensions on internal release - change (mediawiki...release)

2013-12-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Make branch versions of *all* extensions on internal release
..

Make branch versions of *all* extensions on internal release

* This makes backports much easier (e.g. "cherry-pick-to" in gerrit)

Change-Id: I1d43952cbb3aa78b6265860e935f08320db9ccc3
---
M make-wmf-branch/default.conf
M make-wmf-branch/make-wmf-branch
2 files changed, 7 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/76/104776/1

diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index a69d382..d953b5c 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -4,8 +4,9 @@
 # You can override variables in this file by creating a file in the same
 # directory called local.conf
 
-# These extensions are all pulling from HEAD on master
-$normalExtensions = array(
+# Branched extensions - these extensions are branched along with core.
+# Branching instead of using a HEAD checkout makes it easy to backport changes.
+$branchedExtensions = array(
'AbuseFilter',
'AccountAudit',
'ActiveAbstract', // Used as part of dumpBackup
@@ -143,6 +144,7 @@
'Vector',
'VectorBeta',
'VipsScaler',
+   'VisualEditor',
'WikiEditor',
'wikihiero',
'WikiLove',
@@ -173,12 +175,6 @@
'SemanticMediaWiki' => '1.8.x',
'SemanticResultFormats' => '1.8.x',
'Validator' => '0.5.x',
-);
-
-# Branched extensions - these extensions are branched along with core since 
we've got
-# to maintain live hacks for them.
-$branchedExtensions = array(
-   'VisualEditor',
 );
 
 # Repository paths. $baseRepoPath is for operations that require write 
operations
diff --git a/make-wmf-branch/make-wmf-branch b/make-wmf-branch/make-wmf-branch
index 9420048..05148e0 100755
--- a/make-wmf-branch/make-wmf-branch
+++ b/make-wmf-branch/make-wmf-branch
@@ -23,7 +23,7 @@
 class MakeWmfBranch {
var $dryRun;
var $newVersion, $oldVersion, $buildDir;
-   var $normalExtensions, $specialExtensions, $branchedExtensions, 
$patches;
+   var $specialExtensions, $branchedExtensions, $patches;
var $baseRepoPath, $anonRepoPath;
var $noisy;
 
@@ -40,9 +40,8 @@
 
$this->dryRun = $dryRun;
$this->buildDir = $buildDir;
-   $this->normalExtensions = $normalExtensions;
-   $this->specialExtensions = $specialExtensions;
$this->branchedExtensions = $branchedExtensions;
+   $this->specialExtensions = $specialExtensions;
$this->noisy = $noisy;
$this->patches = $patches;
$this->baseRepoPath = $baseRepoPath;
@@ -168,7 +167,7 @@
 
# Add extension submodules
foreach (
-   array_merge( $this->normalExtensions, array_keys( 
$this->specialExtensions ), $this->branchedExtensions )
+   array_merge( array_keys( $this->specialExtensions ), 
$this->branchedExtensions )
as $name ) {
if( in_array( $name, $this->branchedExtensions ) ) {
$this->runCmd( 'git', 'submodule', 'add', '-b', 
$newVersion, '-q',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d43952cbb3aa78b6265860e935f08320db9ccc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
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] Fix main menu animation glitches - change (mediawiki...MobileFrontend)

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

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


Change subject: Fix main menu animation glitches
..

Fix main menu animation glitches

Bug: 56391
Change-Id: Ic81d6f38b7933a62c04165d503a8d40bd31ce698
---
M less/common/mainmenu.less
1 file changed, 9 insertions(+), 7 deletions(-)


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

diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index 0d7a7cd..de8a516 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -14,6 +14,10 @@
.box-sizing(border-box);
position: relative;
z-index: 3;
+   min-height: 100%;
+   // We need to ensure the content has a white background - otherwise it 
will
+   // overlap the menu during the main menu reveal/hide animation
+   background: #fff;
 }
 
 #mw-mf-page-left {
@@ -22,6 +26,7 @@
display: none; /* JS only */
background: @mainMenuBackgroundColor;
border-left: solid @menuBorder @menuBorderColor;
+   width: @menuWidth;
.box-sizing( border-box );
 }
 
@@ -156,8 +161,6 @@
}
 
#mw-mf-page-center {
-   // Since we change the color of the body tag above we need to 
ensure the content has a white background
-   background: #fff;
position: absolute;
height: 100%;
// set border here (#mw-mf-page-left doesn't expand height)
@@ -166,7 +169,6 @@
}
 
#mw-mf-page-left {
-   width: @menuWidth;
display: block;
}
 
@@ -178,21 +180,21 @@
 
 // navigation enabled on bigger screens (tablets and desktop)
 @media (min-width: @wgMFDeviceWidthTablet) {
+   #mw-mf-page-left {
+   width: 20%;
+   }
+
body.navigation-enabled.alpha,
body.navigation-enabled.beta {
 
background: #fff;
 
#mw-mf-page-center {
-   // override position: absolute from the general 
.navigation-enabled rule
-   // so that the main content is not clipped
-   position: relative;
width: 80%;
}
 
#mw-mf-page-left {
position: absolute;
-   width: 20%;
}
 
.position-fixed,

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

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

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


[MediaWiki-commits] [Gerrit] changed memcached server parsing to allow for local unix dom... - change (mediawiki/core)

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

Change subject: changed memcached server parsing to allow for local unix domain 
socket connections
..


changed memcached server parsing to allow for local unix domain socket 
connections

* This works with local memcached (e.g. 
unix:///var/run/memcached/memcached.sock:0 )
  and noticeably increases memcached mediawiki performance

Change-Id: Ie08c151caa09eb0a4269df88965d71c2367c398b
---
M includes/objectcache/MemcachedClient.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index f0a9128..79c5187 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -729,7 +729,7 @@
 * @access  private
 */
function _connect_sock( &$sock, $host ) {
-   list( $ip, $port ) = explode( ':', $host );
+   list( $ip, $port ) = preg_split('/:(?=\d)/' , $host );
$sock = false;
$timeout = $this->_connect_timeout;
$errno = $errstr = null;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie08c151caa09eb0a4269df88965d71c2367c398b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jqnatividad 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Jqnatividad 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow "scap " calls as they previously worked - change (operations/puppet)

2013-12-31 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Allow "scap " calls as they previously worked
..


Allow "scap " calls as they previously worked

Rather than assume the first argument is a version specifier, it is assumed to
be a log message unless it matches the format "--versions=.*".

Change-Id: I7eb6297d2d2b7abfd589fb06328598f8f03c0104
---
M files/scap/scap
1 file changed, 11 insertions(+), 6 deletions(-)

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



diff --git a/files/scap/scap b/files/scap/scap
index 30961cd..4c0d33a 100755
--- a/files/scap/scap
+++ b/files/scap/scap
@@ -35,19 +35,24 @@
 
 DSH_EXPORTS=
 # Only sync the active version(s) if requested
-if [ -n "$1" ]; then
-   # This will export MW_VERSIONS_SYNC to sync-common/mw-update-l10n
-   if [ "$1" == "active" ]; then
+if [[ "$1" == --versions=?* ]]; then
+   versions="${1#--versions=}"
+   shift
+   if [ "$versions" == "active" ]; then
# All active MW versions
export MW_VERSIONS_SYNC=$($BINDIR/mwversionsinuse --home)
-   elif [ -d "$MW_COMMON_SOURCE/$1" ]; then
+   elif [ -d "$MW_COMMON_SOURCE/$versions" ]; then
# A specific MW version
-   export MW_VERSIONS_SYNC=$1
+   export MW_VERSIONS_SYNC="$versions"
else
-   die "Invalid MediaWiki version \"$1\""
+   die "Invalid MediaWiki version \"$versions\""
fi
+   unset versions
# This will export MW_VERSIONS_SYNC to scap-1 on the proxies/servers
+   echo "MediaWiki versions selected for sync (via --versions): 
$MW_VERSIONS_SYNC"
DSH_EXPORTS="export MW_VERSIONS_SYNC=\"$MW_VERSIONS_SYNC\";"
+else
+   echo "Syncing all versions."
 fi
 
 # Perform syntax check

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7eb6297d2d2b7abfd589fb06328598f8f03c0104
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add hooks to extend Elasticsearch schema - change (mediawiki...CirrusSearch)

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

Change subject: Add hooks to extend Elasticsearch schema
..


Add hooks to extend Elasticsearch schema

Change-Id: I43eb9514617d5bab6241ae9a445fbc068245d403
---
M README
M includes/AnalysisConfigBuilder.php
M includes/MappingConfigBuilder.php
3 files changed, 19 insertions(+), 2 deletions(-)

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



diff --git a/README b/README
index 7589d1e..15bafd3 100644
--- a/README
+++ b/README
@@ -181,6 +181,19 @@
 See tests/browser/README
 
 
+Hooks
+-
+CirrusSearch provides two hooks that other extensions can make use of to 
extend the core schema.
+Note that at present editing the core schema is a somewhat expert feature and 
requires Elasticsearch
+knowledge.  Also the config parameter is not really a stable API so be careful 
upgrading Cirrus.
+
+'CirrusSearchAnalysisConfig': Allows to hook into the configuration for 
analysis
+ &config - multi-dimensional configuration array for analysis of various 
languages and fields
+
+'CirrusSearchMappingConfig': Allows configuration of the mapping of fields
+ &config - multi-dimensional configuration array that contains page metadata
+
+
 Licensing information
 -
 CirrusSearch makes use of the Elastica library to connect to elasticsearch 
.
diff --git a/includes/AnalysisConfigBuilder.php 
b/includes/AnalysisConfigBuilder.php
index 5b4ffd6..27af241 100644
--- a/includes/AnalysisConfigBuilder.php
+++ b/includes/AnalysisConfigBuilder.php
@@ -41,7 +41,9 @@
 * @return array the analysis config
 */
public function buildConfig() {
-   return $this->customize( $this->defaults() );
+   $config = $this->customize( $this->defaults() );
+   wfRunHooks( 'CirrusSearchAnalysisConfig', array( &$config ) );
+   return $config;
}
 
/**
diff --git a/includes/MappingConfigBuilder.php 
b/includes/MappingConfigBuilder.php
index 1f52442..463a211 100644
--- a/includes/MappingConfigBuilder.php
+++ b/includes/MappingConfigBuilder.php
@@ -54,7 +54,7 @@
$textExtraAnalyzers[] = 'suggest';
}
 
-   return array(
+   $config = array(
'dynamic' => false,
'properties' => array(
'timestamp' => array(
@@ -86,6 +86,8 @@
'local_sites_with_dupe' => 
$this->buildLowercaseKeywordField(),
),
);
+   wfRunHooks( 'CirrusSearchMappingConfig', array( &$config ) );
+   return $config;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43eb9514617d5bab6241ae9a445fbc068245d403
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Automatically create new search index - change (mediawiki...WikimediaMaintenance)

2013-12-31 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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


Change subject: Automatically create new search index
..

Automatically create new search index

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/74/104774/1

diff --git a/addWiki.php b/addWiki.php
index dca94bd..d5d07b8 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -196,6 +196,11 @@
# Rebuild wikiversions.cdb
shell_exec( "cd $common/multiversion && 
./refreshWikiversionsCDB" );
 
+   # Create new search index
+   $searchIndex = $this->runChild( 
'CirrusSearch\UpdateSearchIndexConfig' );
+   $searchIndex->mOptions[ 'baseName' ] = $dbName;
+   $searchIndex->execute();
+
# print "Constructing interwiki SQL\n";
# Rebuild interwiki tables
# passthru( '/home/wikipedia/conf/interwiki/update' ); // FIXME

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3d74eaaee1b5f97faae7b0ebf7d1f92929059cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] Shrink the LinksUpdateJob a bit - change (mediawiki...CirrusSearch)

2013-12-31 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Shrink the LinksUpdateJob a bit
..

Shrink the LinksUpdateJob a bit

This'll protect from updates that add or remove a _ton_ of links.

This moves the link selection from after the job starts to before which
means fewer links are saved to the job.  It also stores the links as
prefixed db keys rather than Titles which should make the job itself much
smaller.

Bug: 59123

Change-Id: Id0586b798dda57fb69350307e9d1f85b34400a7f
---
M includes/Hooks.php
M includes/LinksUpdateJob.php
M includes/Updater.php
3 files changed, 75 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/73/104773/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index a3ddc62..9ef482e 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -159,9 +159,14 @@
 * @return bool
 */
public static function linksUpdateCompletedHook( $linksUpdate ) {
+   global $wgCirrusSearchLinkedArticlesToUpdate;
+   global $wgCirrusSearchUnlinkedArticlesToUpdate;
+
$params = array(
-   'addedLinks' => $linksUpdate->getAddedLinks(),
-   'removedLinks' => $linksUpdate->getRemovedLinks(),
+   'addedLinks' => self::prepareTitlesForLinksUpdate(
+   $linksUpdate->getAddedLinks(), 
$wgCirrusSearchLinkedArticlesToUpdate ),
+   'removedLinks' => self::prepareTitlesForLinksUpdate(
+   $linksUpdate->getRemovedLinks(), 
$wgCirrusSearchUnlinkedArticlesToUpdate ),
'primary' => true,
);
// Prioritize jobs that are triggered from a web process.  This 
should prioritize
@@ -236,4 +241,44 @@
$titleResult = $array[ 0 ];
return false;
}
+
+   /**
+* Take a list of titles either linked or unlinked and prepare them for 
LinksUpdateJob.
+* This includes limiting them to $max titles.
+* @param array(Title) $titles titles to prepare
+* @param int $max maximum number of titles to return
+*/
+   private static function prepareTitlesForLinksUpdate( $titles, $max ) {
+   $titles = self::pickFromArray( $titles, $max );
+   $dBKeys = array();
+   foreach ( $titles as $title ) {
+   $dBKeys[] = $title->getPrefixedDBkey();
+   }
+   return $dBKeys;
+   }
+
+   /**
+* Pick $n random entries from $array.
+* @var $array array array to pick from
+* @var $n int number of entries to pick
+* @return array of entries from $array
+*/
+   private static function pickFromArray( $array, $n ) {
+   if ( $n > count( $array ) ) {
+   return $array;
+   }
+   if ( $n < 1 ) {
+   return array();
+   }
+   $chosen = array_rand( $array, $n );
+   // If $n === 1 then array_rand will return a key rather than an 
array of keys.
+   if ( !is_array( $chosen ) ) {
+   return array( $array[ $chosen ] );
+   }
+   $result = array();
+   foreach ( $chosen as $key ) {
+   $result[] = $array[ $key ];
+   }
+   return $result;
+   }
 }
diff --git a/includes/LinksUpdateJob.php b/includes/LinksUpdateJob.php
index 558b9a2..3e3b405 100644
--- a/includes/LinksUpdateJob.php
+++ b/includes/LinksUpdateJob.php
@@ -2,6 +2,7 @@
 
 namespace CirrusSearch;
 use \JobQueueGroup;
+use \Title;
 
 /**
  * Performs the appropriate updates to Elasticsearch after a LinksUpdate is
@@ -57,12 +58,35 @@
JobQueueGroup::singleton()->push( $next );
}
} else {
-   Updater::updateLinkedArticles( $this->params[ 
'addedLinks' ],
-   $this->params[ 'removedLinks' ] );
+   // Load the titles and filter out any that no longer 
exist.
+   Updater::updateLinkedArticles(
+   self::loadTitles( $this->params[ 'addedLinks' ] 
),
+   self::loadTitles( $this->params[ 'removedLinks' 
] ) );
}
}
 
/**
+* Convert a serialized title to a title ready to be passed to 
updateLinkedArticles.
+* @param Title|string $title Either a Title or a string to be loaded.
+* @return array(Title) loaded titles
+*/
+   private static function loadTitles( $titles ) {
+   $result = array();
+   foreach ( $titles as $title ) {
+   

[MediaWiki-commits] [Gerrit] Allow "scap " calls as they previously worked - change (operations/puppet)

2013-12-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Allow "scap " calls as they previously worked
..

Allow "scap " calls as they previously worked

Change-Id: I7eb6297d2d2b7abfd589fb06328598f8f03c0104
---
M files/scap/scap
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/104772/1

diff --git a/files/scap/scap b/files/scap/scap
index 30961cd..5c5279c 100755
--- a/files/scap/scap
+++ b/files/scap/scap
@@ -35,7 +35,7 @@
 
 DSH_EXPORTS=
 # Only sync the active version(s) if requested
-if [ -n "$1" ]; then
+if [[ "$1" =~ ^(active|php-[0-9]+\.[0-9]+wmf[0-9]+)$ ]]; then
# This will export MW_VERSIONS_SYNC to sync-common/mw-update-l10n
if [ "$1" == "active" ]; then
# All active MW versions

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7eb6297d2d2b7abfd589fb06328598f8f03c0104
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Update Special:ChangePassword to use HTMLForm - change (mediawiki/core)

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

Change subject: Update Special:ChangePassword to use HTMLForm
..


Update Special:ChangePassword to use HTMLForm

Makes the code shorter and easier to read.

Change-Id: I2a3db995c2c560354376fccb48137996dd9432fd
---
M includes/specials/SpecialChangePassword.php
M includes/specials/SpecialUserlogin.php
2 files changed, 132 insertions(+), 173 deletions(-)

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



diff --git a/includes/specials/SpecialChangePassword.php 
b/includes/specials/SpecialChangePassword.php
index 4b62990..d54828a 100644
--- a/includes/specials/SpecialChangePassword.php
+++ b/includes/specials/SpecialChangePassword.php
@@ -26,210 +26,164 @@
  *
  * @ingroup SpecialPage
  */
-class SpecialChangePassword extends UnlistedSpecialPage {
+class SpecialChangePassword extends FormSpecialPage {
 
-   protected $mUserName, $mOldpass, $mNewpass, $mRetype, $mDomain;
+   protected $mUserName, $mDomain;
 
public function __construct() {
parent::__construct( 'ChangePassword', 'editmyprivateinfo' );
+   $this->listed( false );
}
 
/**
 * Main execution point
 */
function execute( $par ) {
-   global $wgAuth;
-
-   $this->setHeaders();
-   $this->outputHeader();
$this->getOutput()->disallowUserJs();
+
+   parent::execute( $par );
+   }
+
+   protected function checkExecutePermissions( User $user ) {
+   parent::checkExecutePermissions( $user );
+
+   if ( !$this->getRequest()->wasPosted() ) {
+   $this->requireLogin( 'resetpass-no-info' );
+   }
+   }
+
+   protected function getFormFields() {
+   global $wgCookieExpiration;
+
+   $user = $this->getUser();
+   $request = $this->getRequest();
+
+   $oldpassMsg = $user->isLoggedIn() ? 'oldpassword' : 
'resetpass-temp-password';
+
+   $fields = array(
+   'Name' => array(
+   'type' => 'info',
+   'label-message' => 'username',
+   'default' => $request->getVal( 'wpName', 
$user->getName() ),
+   ),
+   'Password' => array(
+   'type' => 'password',
+   'label-message' => $oldpassMsg,
+   ),
+   'NewPassword' => array(
+   'type' => 'password',
+   'label-message' => 'newpassword',
+   ),
+   'Retype' => array(
+   'type' => 'password',
+   'label-message' => 'retypenew',
+   ),
+   );
+
+   $extraFields = array();
+   wfRunHooks( 'ChangePasswordForm', array( &$extraFields ) );
+   foreach ( $extraFields as $extra ) {
+   list( $name, $label, $type, $default ) = $extra;
+   $fields[$name] = array(
+   'type' => $type,
+   'name' => $name,
+   'label-message' => $label,
+   'default' => $default,
+   );
+   }
+
+   if ( !$user->isLoggedIn() ) {
+   $fields['Remember'] = array(
+   'type' => 'check',
+   'label' => $this->msg( 'remembermypassword' )
+   ->numParams( ceil( 
$wgCookieExpiration / ( 3600 * 24 ) ) )
+   ->text(),
+   'default' => $request->getVal( 'wpRemember' ),
+   );
+   }
+
+   return $fields;
+   }
+
+   protected function alterForm( HTMLForm $form ) {
+   $form->setId( 'mw-resetpass-form' );
+   $form->setTableId( 'mw-resetpass-table' );
+   $form->setWrapperLegendMsg( 'resetpass_header' );
+   $form->setSubmitTextMsg(
+   $this->getUser()->isLoggedIn()
+   ? 'resetpass-submit-loggedin'
+   : 'resetpass_submit'
+   );
+   $form->addButton( 'wpCancel',  $this->msg( 
'resetpass-submit-cancel' )->text() );
+   $form->setHeaderText( $this->msg( 'resetpass_text' 
)->parseAsBlock() );
+   $form->addHiddenFields(
+   $this->getRequest()->getValues( 'wpName', 'wpDomain', 
'returnto', 'returntoquery' ) );
+   }
+
+   public function onSubmit( array $

[MediaWiki-commits] [Gerrit] Regression: Fix add discussion button in talk overlay - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Regression: Fix add discussion button in talk overlay
..

Regression: Fix add discussion button in talk overlay

Broken by new header's design

Change-Id: I044e890e54662f6ed74b38e80037f1bbcf03bf7c
---
M less/common/buttons.less
M templates/overlays/talk.html
2 files changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/less/common/buttons.less b/less/common/buttons.less
index 8823f30..1ad0969 100644
--- a/less/common/buttons.less
+++ b/less/common/buttons.less
@@ -108,6 +108,8 @@
 //
 // Styleguide 2.2.
 
+// FIXME: Generic rule needed
+.content-header,
 .header {
// Header buttons
//
diff --git a/templates/overlays/talk.html b/templates/overlays/talk.html
index f7f696a..470e569 100644
--- a/templates/overlays/talk.html
+++ b/templates/overlays/talk.html
@@ -1,4 +1,4 @@
-{{explanation}}
+{{explanation}}
{{addTopicLabel}}
 
 

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

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

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


[MediaWiki-commits] [Gerrit] Add make mygerrit command - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Add make mygerrit command
..

Add make mygerrit command

This will show all patchsets you authored that need fixing
Also fix .gitignore

Change-Id: If4722a9709776da7c860e72505e4585c8881a05e
---
M .gitignore
M Makefile
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index 6880718..d2d3b78 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,4 @@
 tmp/
 less/*.html
 less/public
-scripts/remotes/*
+scripts/remotes
diff --git a/Makefile b/Makefile
index 26b14e8..8545a8d 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,10 @@
 remotes:
@scripts/remotecheck.sh
 
+# Requires GERRIT_USERNAME to be defined - lists patchsets you need to amend
+mygerrit: remotes
+   @scripts/remotes/gerrit.py --project 
'mediawiki/extensions/MobileFrontend' --byuser ${GERRIT_USERNAME} --ltscore 0
+
 gerrit: remotes
@scripts/remotes/gerrit.py --project 
'mediawiki/extensions/MobileFrontend' --gtscore -1
 

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

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

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


[MediaWiki-commits] [Gerrit] Prevent preview and editor being shown at the same time - change (mediawiki...MobileFrontend)

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

Change subject: Prevent preview and editor being shown at the same time
..


Prevent preview and editor being shown at the same time

Bug: 58945
Change-Id: I7b2510f252c990779205db63b49caaa2cb92be1d
---
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/editorNew/EditorOverlay.js
M tests/javascripts/modules/editor/test_EditorApi.js
4 files changed, 60 insertions(+), 64 deletions(-)

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



diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index a400626..5a18714 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -151,6 +151,37 @@
this.getToken().done( saveContent ).fail( $.proxy( 
result, 'reject' ) );
 
return result;
+   },
+
+   getPreview: function( options ) {
+   var result = $.Deferred();
+
+   $.extend( options, {
+   action: 'parse',
+   // Enable section preview mode to avoid errors 
(bug 49218)
+   sectionpreview: true,
+   // needed for pre-save transform to work (bug 
53692)
+   pst: true,
+   // Output mobile HTML (bug 54243)
+   mobileformat: true,
+   title: this.title,
+   prop: 'text'
+   } );
+
+   this.post( options ).done( function( resp ) {
+   if ( resp && resp.parse && resp.parse.text ) {
+   // FIXME: hacky
+   var $tmp = $( '' ).html( 
resp.parse.text['*'] );
+   // remove heading from the parsed output
+   $tmp.find( 'h1, h2' ).eq( 0 ).remove();
+
+   result.resolve( $tmp.html() );
+   } else {
+   result.reject();
+   }
+   } ).fail( $.proxy( result, 'reject' ) );
+
+   return result;
}
} );
 
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index efaf5bf..e4615c6 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -5,7 +5,6 @@
Page = M.require( 'Page' ),
schema = M.require( 'loggingSchemas/mobileWebEditing' ),
popup = M.require( 'toast' ),
-   api = M.require( 'api' ),
inBetaOrAlpha = M.isBetaGroupMember(),
inCampaign = M.query.campaign ? true : false,
inKeepGoingCampaign = M.query.campaign === 'mobile-keepgoing',
@@ -107,18 +106,7 @@
},
 
_showPreview: function() {
-   var self = this, params = {
-   action: 'parse',
-   // Enable section preview mode to avoid errors 
(bug 49218)
-   sectionpreview: true,
-   // needed for pre-save transform to work (bug 
53692)
-   pst: true,
-   // Output mobile HTML (bug 54243)
-   mobileformat: true,
-   title: self.options.title,
-   text: self.$content.val(),
-   prop: 'text'
-   };
+   var self = this, params = { text: this.$content.val() };
 
// log save button click
this.log( 'save' );
@@ -138,34 +126,16 @@
if ( mw.config.get( 'wgIsMainPage' ) ) {
params.mainpage = 1; // Setting it to 0 will 
have the same effect
}
-   api.post( params ).then( function( resp ) {
-   var html;
-   if ( resp && resp.parse && resp.parse.text ) {
-   html = resp.parse.text['*'];
-   return $.Deferred().resolve( html );
-   } else {
-   return $.Deferred().reject();
-   }
-   } ).done( function( parsedText ) {
-   // FIXME: hacky
-   var $tmp

[MediaWiki-commits] [Gerrit] Move GerritCommandLine to a new home - change (mediawiki...MobileFrontend)

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

Change subject: Move GerritCommandLine to a new home
..


Move GerritCommandLine to a new home

Replace with make remotes and make clean Make commands
These pull down the Gerrit tool when absent
Currently need make clean to force a download of the latest version

Change-Id: Ia51a5571860ad3a40ed3344e7e9ec0ea2ca80798
---
M .gitignore
M Makefile
D scripts/gerrit.py
A scripts/remotecheck.sh
4 files changed, 17 insertions(+), 139 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index e1c0c58..6880718 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 tmp/
 less/*.html
 less/public
+scripts/remotes/*
diff --git a/Makefile b/Makefile
index 82e54a9..26b14e8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,13 @@
 MW_INSTALL_PATH ?= ../..
 
-gerrit:
-   @scripts/gerrit.py 'mediawiki/extensions/MobileFrontend'
+clean:
+   rm -Rf scripts/remotes
+
+remotes:
+   @scripts/remotecheck.sh
+
+gerrit: remotes
+   @scripts/remotes/gerrit.py --project 
'mediawiki/extensions/MobileFrontend' --gtscore -1
 
 kss: nodecheck
# FIXME: Use more up to date Ruby version
diff --git a/scripts/gerrit.py b/scripts/gerrit.py
deleted file mode 100755
index 928728e..000
--- a/scripts/gerrit.py
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/usr/bin/python
-
-'''
-Copyright [2013] [Jon Robson]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
-'''
-import json
-import operator
-import urllib2
-from datetime import datetime as dt
-import time
-import subprocess
-import sys
-
-
-def calculate_age(timestamp):
-time_string = timestamp[0:18]
-format = "%Y-%m-%d %H:%M:%S"
-d = dt.strptime(time_string, format)
-delta = d.now() - d
-age = delta.days
-if age < 0:
-age = 0
-return age
-
-
-def calculate_score(change):
-#go through reviews..
-reviews = change["labels"]["Code-Review"]
-likes = 0
-dislikes = 0
-status = 0
-reviewers = []
-
-if "recommended" in reviews:
-likes += 1
-
-if "disliked" in reviews:
-dislikes += 1
-
-if "rejected" in reviews:
-dislikes += 2
-
-#calculate status
-if dislikes > 0:
-status = -dislikes
-else:
-status = likes
-return status
-
-
-def query_gerrit(project):
-url = "https://gerrit.wikimedia.org/r/changes/?q=status:open+project:"; \
-+ project + "&n=25&O=1"
-req = urllib2.Request(url)
-req.add_header('Accept',
-   'application/json,application/json,application/jsonrequest')
-req.add_header('Content-Type', "application/json; charset=UTF-8")
-resp, data = urllib2.urlopen(req)
-data = json.loads(data)
-return data
-
-
-def get_patches(project):
-patches = []
-for change in query_gerrit(project):
-user = change["owner"]["name"]
-subj = change["subject"]
-number = change["_number"]
-url = 'https://gerrit.wikimedia.org/r/%s' % number
-
-patch = {"user": user,
- "subject": subj,
- "score": calculate_score(change),
- "id": str(number),
- "url": url,
- "age": calculate_age(change["created"])}
-patches.append(patch)
-patches = sorted(patches,
- key=operator.itemgetter("score", "age"), reverse=True)
-return patches
-
-
-if __name__ == '__main__':
-try:
-project = sys.argv[1]
-except IndexError:
-print "Provide a project name as a parameter e.g. mediawiki/core"
-sys.exit()
-RED = '\033[91m'
-GREEN = '\033[92m'
-ENDC = '\033[0m'
-BOLD = "\033[1m"
-
-patches = get_patches(project)
-#start on 1 since 1 is the easiest key to press on the keyboard
-key = 1
-last_score = 3
-print 'Open patchsets listed below in priority order:\n'
-for patch in patches:
-score = patch["score"]
-if score < 0 and last_score > -1:
-# add an additional new line when moving down
-# from positive to negative scores
-# to give better visual separation of patches
-print '\n'
-last_score = score
-if score < 0:
-color = RED
-else:
-color = GREEN
-score = '%s%s%s%s' % (color, BOLD, score, ENDC)
-args = (key, patch["subject"], patch["use

[MediaWiki-commits] [Gerrit] Move GerritCommandLine to a new home - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Move GerritCommandLine to a new home
..

Move GerritCommandLine to a new home

Replace with make remotes and make clean Make commands
These pull down the Gerrit tool when absent
Currently need make clean to force a download of the latest version

Change-Id: Ia51a5571860ad3a40ed3344e7e9ec0ea2ca80798
---
M .gitignore
M Makefile
D scripts/gerrit.py
A scripts/remotecheck.sh
4 files changed, 17 insertions(+), 139 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index e1c0c58..6880718 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 tmp/
 less/*.html
 less/public
+scripts/remotes/*
diff --git a/Makefile b/Makefile
index 82e54a9..26b14e8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,13 @@
 MW_INSTALL_PATH ?= ../..
 
-gerrit:
-   @scripts/gerrit.py 'mediawiki/extensions/MobileFrontend'
+clean:
+   rm -Rf scripts/remotes
+
+remotes:
+   @scripts/remotecheck.sh
+
+gerrit: remotes
+   @scripts/remotes/gerrit.py --project 
'mediawiki/extensions/MobileFrontend' --gtscore -1
 
 kss: nodecheck
# FIXME: Use more up to date Ruby version
diff --git a/scripts/gerrit.py b/scripts/gerrit.py
deleted file mode 100755
index 928728e..000
--- a/scripts/gerrit.py
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/usr/bin/python
-
-'''
-Copyright [2013] [Jon Robson]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
-See the License for the specific language governing permissions and
-limitations under the License.
-'''
-import json
-import operator
-import urllib2
-from datetime import datetime as dt
-import time
-import subprocess
-import sys
-
-
-def calculate_age(timestamp):
-time_string = timestamp[0:18]
-format = "%Y-%m-%d %H:%M:%S"
-d = dt.strptime(time_string, format)
-delta = d.now() - d
-age = delta.days
-if age < 0:
-age = 0
-return age
-
-
-def calculate_score(change):
-#go through reviews..
-reviews = change["labels"]["Code-Review"]
-likes = 0
-dislikes = 0
-status = 0
-reviewers = []
-
-if "recommended" in reviews:
-likes += 1
-
-if "disliked" in reviews:
-dislikes += 1
-
-if "rejected" in reviews:
-dislikes += 2
-
-#calculate status
-if dislikes > 0:
-status = -dislikes
-else:
-status = likes
-return status
-
-
-def query_gerrit(project):
-url = "https://gerrit.wikimedia.org/r/changes/?q=status:open+project:"; \
-+ project + "&n=25&O=1"
-req = urllib2.Request(url)
-req.add_header('Accept',
-   'application/json,application/json,application/jsonrequest')
-req.add_header('Content-Type', "application/json; charset=UTF-8")
-resp, data = urllib2.urlopen(req)
-data = json.loads(data)
-return data
-
-
-def get_patches(project):
-patches = []
-for change in query_gerrit(project):
-user = change["owner"]["name"]
-subj = change["subject"]
-number = change["_number"]
-url = 'https://gerrit.wikimedia.org/r/%s' % number
-
-patch = {"user": user,
- "subject": subj,
- "score": calculate_score(change),
- "id": str(number),
- "url": url,
- "age": calculate_age(change["created"])}
-patches.append(patch)
-patches = sorted(patches,
- key=operator.itemgetter("score", "age"), reverse=True)
-return patches
-
-
-if __name__ == '__main__':
-try:
-project = sys.argv[1]
-except IndexError:
-print "Provide a project name as a parameter e.g. mediawiki/core"
-sys.exit()
-RED = '\033[91m'
-GREEN = '\033[92m'
-ENDC = '\033[0m'
-BOLD = "\033[1m"
-
-patches = get_patches(project)
-#start on 1 since 1 is the easiest key to press on the keyboard
-key = 1
-last_score = 3
-print 'Open patchsets listed below in priority order:\n'
-for patch in patches:
-score = patch["score"]
-if score < 0 and last_score > -1:
-# add an additional new line when moving down
-# from positive to negative scores
-# to give better visual separation of patches
-print '\n'
-last_score = score
-if score < 0:
-color = RED
-else:
-color = GREEN
-score = '%s%s%s%s' % (color, BOLD,

[MediaWiki-commits] [Gerrit] production: add gwtoolset to extension-list - change (operations/mediawiki-config)

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

Change subject: production: add gwtoolset to extension-list
..


production: add gwtoolset to extension-list

when Commons was updated to 1.23wmf8 the extension-list reference for GWToolset
was not moved from extension-list-1.23wmf7 into extension-list

i am guessing that by placing the reference in extension-list it is no longer
needed in either extension-list-labs or extension-list-1.23wmf7, so i have
removed the reference from those two files.

Change-Id: If1376178384bc356f9f0697d098118c42384300b
---
M wmf-config/extension-list
D wmf-config/extension-list-1.23wmf7
D wmf-config/extension-list-labs
3 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index f53dbd7..e1fbf39 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -58,6 +58,7 @@
 $IP/extensions/GlobalUsage/GlobalUsage.php
 $IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php
 $IP/extensions/GuidedTour/GuidedTour.php
+$IP/extensions/GWToolset/GWToolset.php
 $IP/extensions/ImageMap/ImageMap.php
 $IP/extensions/InputBox/InputBox.php
 $IP/extensions/Insider/Insider.php
diff --git a/wmf-config/extension-list-1.23wmf7 
b/wmf-config/extension-list-1.23wmf7
deleted file mode 100644
index fef7adb..000
--- a/wmf-config/extension-list-1.23wmf7
+++ /dev/null
@@ -1 +0,0 @@
-$IP/extensions/GWToolset/GWToolset.php
diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs
deleted file mode 100644
index fef7adb..000
--- a/wmf-config/extension-list-labs
+++ /dev/null
@@ -1 +0,0 @@
-$IP/extensions/GWToolset/GWToolset.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1376178384bc356f9f0697d098118c42384300b
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl 
Gerrit-Reviewer: Hashar 
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] Bigger click targets for next and previous - change (mediawiki...MultimediaViewer)

2013-12-31 Thread MarkTraceur (Code Review)
MarkTraceur has uploaded a new change for review.

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


Change subject: Bigger click targets for next and previous
..

Bigger click targets for next and previous

Change-Id: Ic2bd5b80092ee34133ae6b594ac25c57ab562b03
---
M resources/ext.multimediaViewer/ext.multimediaViewer.css
M resources/ext.multimediaViewer/ext.multimediaViewer.js
2 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.css 
b/resources/ext.multimediaViewer/ext.multimediaViewer.css
index f85d708..f941e55 100644
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.css
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.css
@@ -86,12 +86,12 @@
/* @embed */
background-image: url(img/mw-close.svg);
transition: opacity 0.25s;
+   background-position: center;
 }
 
 .mlb-close,
 .mw-mlb-next-image,
 .mw-mlb-prev-image {
-   background-position: center;
background-repeat: no-repeat;
opacity: 0.8;
 }
@@ -283,8 +283,8 @@
 .mw-mlb-prev-image {
position: absolute;
top: -999px;
-   width: 26px;
-   height: 40px;
+   width: 80px;
+   height: 120px;
cursor: pointer;
transition: opacity 0.25s, margin 0.25s;
 }
@@ -301,12 +301,14 @@
/* @embed */
background-image: url(img/next-ltr.svg);
right: 5px;
+   background-position: right;
 }
 
 .mw-mlb-prev-image {
/* @embed */
background-image: url(img/prev-ltr.svg);
left: 5px;
+   background-position: left;
 }
 
 .mw-mlb-next-image.disabled,
diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.js 
b/resources/ext.multimediaViewer/ext.multimediaViewer.js
index 6e5c145..a809d8f 100755
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.js
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.js
@@ -365,7 +365,7 @@
var isOnButton = false,
isOnImage = false,
ui = this.ui,
-   prevNextTop = ( ( ui.$imageWrapper.height() / 2 ) - 32 
) + 'px';
+   prevNextTop = ( ( ui.$imageWrapper.height() / 2 ) - 60 
) + 'px';
 
function fadeIn() {
isOnImage = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2bd5b80092ee34133ae6b594ac25c57ab562b03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur 

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


[MediaWiki-commits] [Gerrit] Made RefreshCdbJsonFiles include newlines in the JSON - change (operations/puppet)

2013-12-31 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Made RefreshCdbJsonFiles include newlines in the JSON
..


Made RefreshCdbJsonFiles include newlines in the JSON

* This makes the output more readable and is nice if the
  files ever end up in some deployment git repo

Change-Id: I639c506ad58a3cd98eefe286c4237377006e9437
---
M files/scap/refreshCdbJsonFiles
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/scap/refreshCdbJsonFiles b/files/scap/refreshCdbJsonFiles
index a88217f..9fd4c13 100755
--- a/files/scap/refreshCdbJsonFiles
+++ b/files/scap/refreshCdbJsonFiles
@@ -181,7 +181,7 @@
if ( $first ) {
$first = false;
} else {
-   $data = ',' . $data;
+   $data = ",\n" . $data;
}
fwrite( $jsonHandle, $data );
$bytes += strlen( $data );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I639c506ad58a3cd98eefe286c4237377006e9437
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] i18n: Native digits on '#renderingProgress' - change (mediawiki...Collection)

2013-12-31 Thread Reza (Code Review)
Reza has uploaded a new change for review.

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


Change subject: i18n: Native digits on '#renderingProgress'
..

i18n: Native digits on '#renderingProgress'

Bug: 59168
Change-Id: I170bfccdfe361c1e9ff71c337d46f03d5ba89a38
---
M js/collection.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/js/collection.js b/js/collection.js
index 86243ce..342aca2 100644
--- a/js/collection.js
+++ b/js/collection.js
@@ -66,7 +66,8 @@
}, function(result) {
if (result.state == 'progress' ) {
if ( result.status.progress )  {
-   $('#renderingProgress').html('' + 
result.status.progress);
+   $('#renderingProgress').html( 
mw.language.convertNumber(
+   result.status.progress ) );
}
if (result.status.status) {
var status = result.status.status;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I170bfccdfe361c1e9ff71c337d46f03d5ba89a38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Reza 

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


[MediaWiki-commits] [Gerrit] Add hooks to allow other extensions to extend our schema - change (mediawiki...CirrusSearch)

2013-12-31 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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


Change subject: Add hooks to allow other extensions to extend our schema
..

Add hooks to allow other extensions to extend our schema

Change-Id: I43eb9514617d5bab6241ae9a445fbc068245d403
---
M README
M includes/AnalysisConfigBuilder.php
M includes/MappingConfigBuilder.php
3 files changed, 17 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/66/104766/1

diff --git a/README b/README
index 7589d1e..1d66d59 100644
--- a/README
+++ b/README
@@ -181,6 +181,17 @@
 See tests/browser/README
 
 
+Hooks
+-
+CirrusSearch provides two hooks that other extensions can make use of to 
extend the core schema.
+
+'CirrusSearchAnalysisConfig': Allows to hook into the configuration for 
analysis
+ &config - multi-dimensional configuration array for analysis of various 
languages and fields
+
+'CirrusSearchMappingConfig': Allows configuration of the mapping of fields
+ &config - multi-dimensional configuration array that contains page metadata
+
+
 Licensing information
 -
 CirrusSearch makes use of the Elastica library to connect to elasticsearch 
.
diff --git a/includes/AnalysisConfigBuilder.php 
b/includes/AnalysisConfigBuilder.php
index 5b4ffd6..27af241 100644
--- a/includes/AnalysisConfigBuilder.php
+++ b/includes/AnalysisConfigBuilder.php
@@ -41,7 +41,9 @@
 * @return array the analysis config
 */
public function buildConfig() {
-   return $this->customize( $this->defaults() );
+   $config = $this->customize( $this->defaults() );
+   wfRunHooks( 'CirrusSearchAnalysisConfig', array( &$config ) );
+   return $config;
}
 
/**
diff --git a/includes/MappingConfigBuilder.php 
b/includes/MappingConfigBuilder.php
index 1f52442..463a211 100644
--- a/includes/MappingConfigBuilder.php
+++ b/includes/MappingConfigBuilder.php
@@ -54,7 +54,7 @@
$textExtraAnalyzers[] = 'suggest';
}
 
-   return array(
+   $config = array(
'dynamic' => false,
'properties' => array(
'timestamp' => array(
@@ -86,6 +86,8 @@
'local_sites_with_dupe' => 
$this->buildLowercaseKeywordField(),
),
);
+   wfRunHooks( 'CirrusSearchMappingConfig', array( &$config ) );
+   return $config;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43eb9514617d5bab6241ae9a445fbc068245d403
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad 

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


[MediaWiki-commits] [Gerrit] action=feedcontributions no longer has one item more than limit - change (mediawiki/core)

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

Change subject: action=feedcontributions no longer has one item more than limit
..


action=feedcontributions no longer has one item more than limit

The extra one is used for navigation on Special:Contributions, but that
is not needed on the rss feed.

Bug: 57874
Change-Id: Id56b0da7e921df9cbdb09e90611d226bf224804d
---
M RELEASE-NOTES-1.23
M includes/api/ApiFeedContributions.php
2 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index a43ab03..d13f9cd 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -92,6 +92,7 @@
   properly for all parameters.
 * ApiQueryBase::titlePartToKey allows an extra parameter that indicates the
   namespace in order to properly capitalize the title part.
+* (bug 57874) action=feedcontributions no longer has one item more than limit.
 
 === Languages updated in 1.23 ===
 
diff --git a/includes/api/ApiFeedContributions.php 
b/includes/api/ApiFeedContributions.php
index bf69410..f90ba98 100644
--- a/includes/api/ApiFeedContributions.php
+++ b/includes/api/ApiFeedContributions.php
@@ -87,7 +87,13 @@
 
$feedItems = array();
if ( $pager->getNumRows() > 0 ) {
+   $count = 0;
+   $limit = $pager->getLimit();
foreach ( $pager->mResult as $row ) {
+   // ContribsPager selects one more row for 
navigation, skip that row
+   if ( ++$count > $limit ) {
+   break;
+   }
$feedItems[] = $this->feedItem( $row );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id56b0da7e921df9cbdb09e90611d226bf224804d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Move all other small misc. wikis over to Cirrus - change (operations/mediawiki-config)

2013-12-31 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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


Change subject: Move all other small misc. wikis over to Cirrus
..

Move all other small misc. wikis over to Cirrus

Change-Id: Iea92d8529073c07de63c66bc42b0c2208c0b7edc
---
M cirrus.dblist
1 file changed, 35 insertions(+), 0 deletions(-)


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

diff --git a/cirrus.dblist b/cirrus.dblist
index b7b9459..2a309b9 100644
--- a/cirrus.dblist
+++ b/cirrus.dblist
@@ -3,6 +3,7 @@
 aawiktionary
 abwiktionary
 advisorywiki
+advisorywiki
 akwikibooks
 akwiktionary
 alswikibooks
@@ -11,10 +12,15 @@
 amwikiquote
 angwikiquote
 angwikisource
+arbcom_dewiki
+arbcom_enwiki
+arbcom_fiwiki
+arbcom_nlwiki
 astwikibooks
 astwikiquote
 aswikibooks
 aswiktionary
+auditcomwiki
 avwiktionary
 aywikibooks
 bawikibooks
@@ -24,30 +30,43 @@
 bmwikibooks
 bmwikiquote
 bmwiktionary
+boardgovcomwiki
+boardwiki
 bowikibooks
 bowiktionary
 cawiki
+chairwiki
+chapcomwiki
+checkuserwiki
 chowiki
 chwikibooks
 chwiktionary
+collabwiki
 cowikibooks
 cowikiquote
 crwikiquote
 crwiktionary
+donatewiki
 dzwiktionary
 enwikisource
+execwiki
+fdcwiki
 foundationwiki
 gawikibooks
 gawikiquote
 gnwikibooks
 gotwikibooks
+grantswiki
 guwikibooks
 howiki
 htwikisource
 huwikinews
 hzwiki
+iegcomwiki
 iiwiki
 ikwiktionary
+incubatorwiki
+internalwiki
 itwiktionary
 kjwiki
 kkwikiquote
@@ -67,6 +86,7 @@
 mhwiktionary
 miwikibooks
 mnwikibooks
+movementroleswiki
 mowiki
 mowiktionary
 muswiki
@@ -80,9 +100,14 @@
 nlwikinews
 nostalgiawiki
 nzwikimedia
+officewiki
+ombudsmenwiki
+otrs_wikiwiki
+outreachwiki
 pa_uswikimedia
 piwiktionary
 pswikibooks
+qualitywiki
 qualitywiki
 quwikibooks
 quwikiquote
@@ -91,10 +116,14 @@
 rnwiktionary
 scwiktionary
 sdwikinews
+searchcomwiki
 sewikibooks
 simplewikibooks
 simplewikiquote
 snwiktionary
+sourceswiki
+spcomwiki
+stewardwiki
 strategywiki
 suwikibooks
 swwikibooks
@@ -106,6 +135,7 @@
 tkwikibooks
 tkwikiquote
 towiktionary
+transitionteamwiki
 ttwikiquote
 twwiktionary
 ugwikibooks
@@ -113,9 +143,11 @@
 usabilitywiki
 uzwikibooks
 vewikimedia
+votewiki
 vowikibooks
 vowikiquote
 wawikibooks
+wg_enwiki
 wikimania2005wiki
 wikimania2006wiki
 wikimania2007wiki
@@ -124,6 +156,9 @@
 wikimania2010wiki
 wikimania2011wiki
 wikimania2012wiki
+wikimania2013wiki
+wikimania2014wiki
+wikimaniateamwiki
 xhwikibooks
 xhwiktionary
 yowikibooks

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

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

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


[MediaWiki-commits] [Gerrit] API: Add prop=redirects and list=allredirects - change (mediawiki/core)

2013-12-31 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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


Change subject: API: Add prop=redirects and list=allredirects
..

API: Add prop=redirects and list=allredirects

While redirects can be sort-of queried using list=backlinks with
blfilterredir=redirects, we can get more accurate results with a module
dedicated to this purpose. We can also get the fragment of the redirect
without having to load the content of the redirect page and parse it.

I'm a bit surprised I was able to put together a query for this that
will work as a prop module. Or did I overlook something?

And then we may as well add the corresponding list=allredirects, to work
like alllinks, allfileusages, and alltransclusions.

Change-Id: I81082aa9e4e3a3b2c66cc4f9970a97eed83a6a4f
---
M RELEASE-NOTES-1.23
M includes/AutoLoader.php
M includes/api/ApiQuery.php
M includes/api/ApiQueryAllLinks.php
A includes/api/ApiQueryRedirects.php
5 files changed, 323 insertions(+), 17 deletions(-)


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

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index a43ab03..4f01cdc 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -92,6 +92,8 @@
   properly for all parameters.
 * ApiQueryBase::titlePartToKey allows an extra parameter that indicates the
   namespace in order to properly capitalize the title part.
+* prop=redirects is added, to return redirects to the pages in the query.
+* list=allredirects is added, to list all redirects pointing to a namespace.
 
 === Languages updated in 1.23 ===
 
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 1f81249..b9cc324 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -359,6 +359,7 @@
'ApiQueryRandom' => 'includes/api/ApiQueryRandom.php',
'ApiQueryRecentChanges' => 'includes/api/ApiQueryRecentChanges.php',
'ApiQueryFileRepoInfo' => 'includes/api/ApiQueryFileRepoInfo.php',
+   'ApiQueryRedirects' => 'includes/api/ApiQueryRedirects.php',
'ApiQueryRevisions' => 'includes/api/ApiQueryRevisions.php',
'ApiQuerySearch' => 'includes/api/ApiQuerySearch.php',
'ApiQuerySiteinfo' => 'includes/api/ApiQuerySiteinfo.php',
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index cec1ca8..fbf04ab 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -53,6 +53,7 @@
'iwlinks' => 'ApiQueryIWLinks',
'langlinks' => 'ApiQueryLangLinks',
'pageprops' => 'ApiQueryPageProps',
+   'redirects' => 'ApiQueryRedirects',
'revisions' => 'ApiQueryRevisions',
'stashimageinfo' => 'ApiQueryStashImageInfo',
'templates' => 'ApiQueryLinks',
@@ -68,6 +69,7 @@
'allimages' => 'ApiQueryAllImages',
'alllinks' => 'ApiQueryAllLinks',
'allpages' => 'ApiQueryAllPages',
+   'allredirects' => 'ApiQueryAllLinks',
'alltransclusions' => 'ApiQueryAllLinks',
'allusers' => 'ApiQueryAllUsers',
'backlinks' => 'ApiQueryBacklinks',
diff --git a/includes/api/ApiQueryAllLinks.php 
b/includes/api/ApiQueryAllLinks.php
index 5be304d..577d36a 100644
--- a/includes/api/ApiQueryAllLinks.php
+++ b/includes/api/ApiQueryAllLinks.php
@@ -31,15 +31,21 @@
  */
 class ApiQueryAllLinks extends ApiQueryGeneratorBase {
 
+   private $table, $tablePrefix, $indexTag,
+   $description, $descriptionWhat, $descriptionTargets, 
$descriptionLinking;
+   private $fieldTitle = 'title';
+   private $dfltNamespace = NS_MAIN;
+   private $hasNamespace = true;
+   private $useIndex = null;
+   private $props = array(), $propHelp = array();
+
public function __construct( $query, $moduleName ) {
switch ( $moduleName ) {
case 'alllinks':
$prefix = 'al';
$this->table = 'pagelinks';
$this->tablePrefix = 'pl_';
-   $this->fieldTitle = 'title';
-   $this->dfltNamespace = NS_MAIN;
-   $this->hasNamespace = true;
+   $this->useIndex = 'pl_namespace';
$this->indexTag = 'l';
$this->description = 'Enumerate all links that 
point to a given namespace';
$this->descriptionWhat = 'link';
@@ -50,9 +56,8 @@
$prefix = 'at';
$this->table = 'templatelinks';
$this->tablePrefix = 'tl_';
-   $this->fieldTitle = 'title';
$this->dfltNamespace = NS_TEMPLATE;
-

[MediaWiki-commits] [Gerrit] Avoid md5sum calls in MergeCdbFileUpdates - change (operations/puppet)

2013-12-31 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Avoid md5sum calls in MergeCdbFileUpdates
..


Avoid md5sum calls in MergeCdbFileUpdates

* Also tweaked some error handling bits

Change-Id: I8b9fa8bc4fd45f25c4262616d2b0b971a6fc58de
---
M files/scap/mergeCdbFileUpdates
M files/scap/scap-2
2 files changed, 30 insertions(+), 19 deletions(-)

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



diff --git a/files/scap/mergeCdbFileUpdates b/files/scap/mergeCdbFileUpdates
index 3f2977f..6d7903f 100755
--- a/files/scap/mergeCdbFileUpdates
+++ b/files/scap/mergeCdbFileUpdates
@@ -47,12 +47,16 @@
foreach ( array( 'directory' ) as $par ) {
if ( !isset( $params[$par] ) ) {
die( "Usage: mergeCdbFileUpdates " .
-   "--directory  --threads 
\n"
+   "--directory  --threads 
 [--trustmtime]\n\n" .
+   "The --trustmtime option assumes that 
the CDB files match the " .
+   "upstream JSON files if their mtimes 
match.\nWithout it, the hash " .
+   "of the CDB files is checked against 
the upstream hash files.\n"
);
}
}
$this->params = $params;
$this->params['threads'] = isset( $params['threads'] ) ? 
$params['threads'] : 1;
+   $this->params['trustmtime'] = !empty( $params['trustmtime'] );
}
 
public function execute() {
@@ -138,29 +142,34 @@
$this->error( "Skipped file '$file'; no MD5 
file." );
continue;
}
-   $md5Upstream = file_get_contents( 
"$directory/upstream/$file.MD5" );
-   // Get the MD5 of the local CDB file (which may not 
exist)
-   $md5Local = is_file( "$directory/$file" ) ? md5_file( 
"$directory/$file" ) : '';
+   $cdbPath = "$directory/$file";
+   $jsonPath = "$directory/upstream/$file.json";
+   // Get the upstream JSON file timestamp and local CDB 
file timestamp
+   $jsonTimestamp = is_file( $jsonPath ) ? filemtime( 
$jsonPath ) : 0;
+   // Check if a rebuild is needed
+   if ( $this->params['trustmtime'] ) {
+   $cdbTimestamp = is_file( $cdbPath ) ? 
filemtime( $cdbPath ) : 0;
+   $needRebuild = ( $cdbTimestamp !== 
$jsonTimestamp );
+   } else {
+   $md5Upstream = file_get_contents( 
"$directory/upstream/$file.MD5" );
+   $md5Local = is_file( $cdbPath ) ? md5_file( 
$cdbPath ) : '';
+   $needRebuild = ( $md5Local !== $md5Upstream );
+   }
// If the hashes do not match, fetch the diff needed to 
update the CDB
-   if ( $md5Local !== $md5Upstream ) {
-   // Get the CDB contents from the JSON file
-   $jsonPath = "$directory/upstream/$file.json";
-   if ( !is_file( $jsonPath ) ) {
-   $this->error( "Could not find 
'$jsonPath'." );
-   continue;
-   }
+   if ( $needRebuild ) {
// @FIXME: stream this instead loading to RAM
$data = json_decode( file_get_contents( 
$jsonPath ), true );
+   if ( $data === null ) {
+   $this->error( "Could not read 
'$jsonPath'.", 1 ); // bail
+   }
// Open a temporary new CDB file
$tmpFileName = tempnam( "/tmp", $file );
if ( $tmpFileName === false ) {
-   $this->error( "Could not create temp 
file with tempnam()." );
-   continue;
+   $this->error( "Could not create temp 
file with tempnam().", 1 ); // bail
}
$handle = dba_open( $tmpFileName, 'n', 
'cdb_make' );
if ( $handle === false ) {
-   $this->error( "Could not open temp CDB 
file '$tmpFileName'." );
-   continue;
+   $this->error( "Could not open temp CDB 
file '$tmpFileName'.", 1 ); // bail
  

[MediaWiki-commits] [Gerrit] Initial refactoring of WSP image support. - change (mediawiki...parsoid)

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

Change subject: Initial refactoring of WSP image support.
..


Initial refactoring of WSP image support.

We banish the huge wall of var declarations and move the declarations closer
to the uses.  This helps us see the scope of some of the variables and
identify some unused variables.

We also rework the initial "identify the DOM structure" code to match the
One True Structure of images, and give the four parts better names.
This simplifies some crazy DOM manipulation and confines it to the
start of the function.

This version of the code should be functionally identical to the previous
version (bugs and all) although it should be a little bit more reliable
when picking out  structure from arbitrary input.

Still left to do: break apart the actual option parsing and make it
clear where we are using data-parsoid as a crutch.

Change-Id: I30184edf9c55cce6b4449a3ac397823be745827e
---
M lib/mediawiki.WikitextSerializer.js
1 file changed, 88 insertions(+), 68 deletions(-)

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



diff --git a/lib/mediawiki.WikitextSerializer.js 
b/lib/mediawiki.WikitextSerializer.js
index 5429216..719089b 100644
--- a/lib/mediawiki.WikitextSerializer.js
+++ b/lib/mediawiki.WikitextSerializer.js
@@ -1468,6 +1468,7 @@
 
case 'caption':
// Assume that the caption is straight text...that may 
not work long-term
+   // XXX FIX ME XXX
if ( capNode ) {
state.inCaption = true;
val = state.serializeChildrenToString( capNode, 
this.wteHandlers.wikilinkHandler, false );
@@ -1583,84 +1584,95 @@
 
 // XXX: This should probably be refactored. -rsmith
 WSP.handleImage = function ( node, state, cb ) {
-   var isDefaultSize, imgnode, linkinfo,
-   ix, curOpt, href, src,
-   width, height, wrapName,
-   filename, path, classes, currentClass, currentOpt,
-   htAttr, wdAttr, wrapdp,
-   options = [],
-   wikitext = '',
-   env = state.env,
-   mwAliases = env.conf.wiki.mwAliases,
-   rel = node.getAttribute( 'rel' ) || node.getAttribute( 'typeof' 
),
-   isFigure = node.tagName.toLowerCase() === 'figure',
-   dp = DU.getDataParsoid( node ),
-   dmw = DU.getDataMw( node ),
-   opts = dp.optList || [],
-   wrapNode = node.firstChild,
-   capNode = node.getElementsByTagName( 'figcaption' )[0];
+   var env = state.env,
+   mwAliases = env.conf.wiki.mwAliases;
 
-   if (null === wrapNode) {
-   console.error( "WARNING: In WSP.handleImage, the following node 
has no children:" );
-   console.error( node.outerHTML );
-   cb( '', node );
-   return;
+   // All figures have a fixed structure:
+   //
+   // 
+   //  
+   //  
+   // 
+   //
+   // Pull out this fixed structure, being as generous as possible with
+   // possibly-broken HTML.
+   var outerElt = node;
+   var imgElt = node.querySelector('IMG'); // first IMG tag
+   var linkElt = null;
+   // parent of img is probably the linkElt
+   if (imgElt &&
+   imgElt.parentElement !== outerElt &&
+   /^(A|SPAN)$/.test(imgElt.parentElement.tagName)) {
+   linkElt = imgElt.parentElement;
}
-
-   while ( !DU.isElt(wrapNode) ) {
-   wrapNode = wrapNode.nextSibling;
-   }
-
-   wrapName = wrapNode.tagName.toLowerCase();
-
-   if ( wrapNode.hasAttribute( 'data-parsoid' ) ) {
-   wrapdp = DU.getDataParsoid( node );
-   }
-
-   if ( wrapName === 'a' ) {
-   href = wrapNode.getAttribute( 'href' );
-   }
-
-   imgnode = wrapNode.getElementsByTagName( 'img' )[0];
-
-   if ( imgnode.hasAttribute( 'resource' ) ) {
-   filename = this.serializedAttrVal( imgnode, 'resource' );
-   if ( filename.modified || !filename.value ) {
-   filename = imgnode.getAttribute( 'resource' ).replace( 
/^(\.\.?\/)+/, '' );
-   } else {
-   filename = filename.value;
+   // FIGCAPTION or last child (which is not the linkElt) is the caption.
+   var captionElt = node.querySelector('FIGCAPTION');
+   if (!captionElt) {
+   for (captionElt = node.lastElementChild;
+captionElt;
+captionElt = captionElt.previousElementSibling) {
+   if (captionElt !== linkElt && captionElt !== imgElt &&
+   /^(SPAN|DIV)$/.test(captionElt.tagName)) {
+   break;
+   

[MediaWiki-commits] [Gerrit] Prioritize priority CirrusSearch jobs - change (operations/puppet)

2013-12-31 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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


Change subject: Prioritize priority CirrusSearch jobs
..

Prioritize priority CirrusSearch jobs

Change-Id: If8c330d715bee3c4fd3e5809206e7ea19eff5c09
---
M modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/104763/1

diff --git a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb 
b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
index ed9e9a6..5a72fc5 100755
--- a/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
+++ b/modules/mediawiki/templates/jobrunner/jobs-loop.sh.erb
@@ -210,6 +210,7 @@
hpriotypes="$hpriotypes TranslateRenderJob TranslateMoveJob 
TranslateDeleteJob" # translate
hpriotypes="$hpriotypes uploadFromUrl" # upload
hpriotypes="$hpriotypes MassMessageJob MassMessageSubmitJob" # 
MassMessage
+   hpriotypes="$hpriotypes cirrusSearchLinksUpdatePrioritized" # 
CirrusSearch priority jobs
(runJobsLoopService "$hpriotypes" "y" <%= dprioprocs %>) &
 
# Start loops for highly I/O bound jobs that work on special services 
(e.g. not the DBs)

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

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

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


[MediaWiki-commits] [Gerrit] Add RunningStat class, tests - change (mediawiki/core)

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

Change subject: Add RunningStat class, tests
..


Add RunningStat class, tests

RunningStat computes the central tendency, shape, and extrema of a set of
points online, in constant space. It uses a neat one-pass algorithm for
calculating variance, described here:
  

This particular implementation adapts a sample C++ implementation by John D.
Cook to PHP. See  and
  .

RunningStat instances can be combined. The resultant RunningStat has the same
state it would have had if it had been used to accumulate each point. This
property is attractive because it allows separate threads of execution to
process a stream in parallel. More importantly, individual points can be
accumulated in stages, without loss of fidelity, at intermediate points in the
aggregation process. JavaScript profiling samples can be accumulated in the
user's browser and be combined with measurements from other browsers on the
profiling data aggregator. Functions that are called multiple times in the
course of a profiled web request can be accumulated in MediaWiki prior to being
transmitted to the profiling data aggregator.

Usage will be introduced in a dependent commit.

Change-Id: Ifedda276dfe8e0783cb8c4a95626e2aedd4ad368
---
M includes/AutoLoader.php
A includes/profiler/RunningStat.php
A tests/phpunit/includes/RunningStatTest.php
3 files changed, 258 insertions(+), 0 deletions(-)

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



diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index b172f71..1f81249 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -185,6 +185,7 @@
'Revision' => 'includes/Revision.php',
'RevisionList' => 'includes/RevisionList.php',
'RSSFeed' => 'includes/Feed.php',
+   'RunningStat' => 'includes/profiler/RunningStat.php',
'Sanitizer' => 'includes/Sanitizer.php',
'SiteConfiguration' => 'includes/SiteConfiguration.php',
'SiteStats' => 'includes/SiteStats.php',
diff --git a/includes/profiler/RunningStat.php 
b/includes/profiler/RunningStat.php
new file mode 100644
index 000..dda5254
--- /dev/null
+++ b/includes/profiler/RunningStat.php
@@ -0,0 +1,176 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Profiler
+ */
+
+// Needed due to PHP non-bug .
+define( 'NEGATIVE_INF', -INF );
+
+/**
+ * Represents a running summary of a stream of numbers.
+ *
+ * RunningStat instances are accumulator-like objects that provide a set of
+ * continuously-updated summary statistics for a stream of numbers, without
+ * requiring that each value be stored. The measures it provides are the
+ * arithmetic mean, variance, standard deviation, and extrema (min and max);
+ * together they describe the central tendency and statistical dispersion of a
+ * set of values.
+ *
+ * One RunningStat instance can be merged into another; the resultant
+ * RunningStat has the state it would have had if it had accumulated each
+ * individual point. This allows data to be summarized in parallel and in
+ * stages without loss of fidelity.
+ *
+ * Based on a C++ implementation by John D. Cook:
+ *  
+ *  
+ *
+ * The in-line documentation for this class incorporates content from the
+ * English Wikipedia articles "Variance", "Algorithms for calculating
+ * variance", and "Standard deviation".
+ *
+ * @since 1.23
+ */
+class RunningStat implements Countable {
+
+   /** @var int Number of samples. **/
+   public $n = 0;
+
+   /** @var float The first moment (or mean, or expected value). **/
+   public $m1 = 0.0;
+
+   /** @var float The second central moment (or variance). **/
+   public $m2 = 0.0;
+
+   /** @var float The least value in the the set. **/
+   public $min = INF;
+
+   /** @var float The most value in the set. **/
+   public $max = NEGATIVE_INF;
+
+   /**
+* Count the number of accumulated values.
+* @return int Number of values
+*/
+   public function count() {
+   return $this->n;
+   }
+
+   /**
+* Add a number to the data set.
+* @param int|float $x Value to add
+*/
+   public function push( $x ) {
+   $x = (float) $x;
+
+   $this->min = min( $this->min, $x );
+   $this->max = max( $this->max, $x );
+
+   $n1 = $this->n;
+   $this->n += 1;
+   $delta = $x - $this->m1;
+   $delta_n = $delta / $this->n;
+   $this->m1 += $delta_n;
+   $this->m2 += $delta * $delta_n * $n1;
+   }
+
+   /**
+* Get the mean, or expected value

[MediaWiki-commits] [Gerrit] Made RefreshCdbJsonFiles include newlines in the JSON - change (operations/puppet)

2013-12-31 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Made RefreshCdbJsonFiles include newlines in the JSON
..

Made RefreshCdbJsonFiles include newlines in the JSON

* This makes the output more readable and is nice if the
  files ever end up in some deployment git repo

Change-Id: I639c506ad58a3cd98eefe286c4237377006e9437
---
M files/scap/refreshCdbJsonFiles
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/104762/1

diff --git a/files/scap/refreshCdbJsonFiles b/files/scap/refreshCdbJsonFiles
index a88217f..9fd4c13 100755
--- a/files/scap/refreshCdbJsonFiles
+++ b/files/scap/refreshCdbJsonFiles
@@ -181,7 +181,7 @@
if ( $first ) {
$first = false;
} else {
-   $data = ',' . $data;
+   $data = ",\n" . $data;
}
fwrite( $jsonHandle, $data );
$bytes += strlen( $data );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I639c506ad58a3cd98eefe286c4237377006e9437
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Reworded visibility status of "Notes" section to 'publicly v... - change (mediawiki...AbuseFilter)

2013-12-31 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review.

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


Change subject: Reworded visibility status of "Notes" section to 'publicly 
viewable'
..

Reworded visibility status of "Notes" section to 'publicly viewable'

The "description" says "publicly viewable", but the "Notes" are
 "private". If you log out, you can confirm that the notes are
actually public,so the message should be changed.

Bug: 57305
Change-Id: I04301fc9f188862b2a23d6b316d7e5eef111ade0
---
M AbuseFilter.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/AbuseFilter.i18n.php b/AbuseFilter.i18n.php
index 70680dc..2f0d596 100644
--- a/AbuseFilter.i18n.php
+++ b/AbuseFilter.i18n.php
@@ -200,7 +200,7 @@
'abusefilter-edit-global' => 'Global filter',
'abusefilter-edit-rules' => 'Conditions:',
'abusefilter-edit-notes' => "Notes:
-:''(private)''",
+:''(publicly viewable)''",
'abusefilter-edit-lastmod' => 'Filter last modified:',
'abusefilter-edit-lastmod-text' => '$1 by $2',
'abusefilter-edit-hitcount' => 'Filter hits:',

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

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

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


[MediaWiki-commits] [Gerrit] Fetch moderation status from last revision - change (mediawiki...Flow)

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

Change subject: Fetch moderation status from last revision
..


Fetch moderation status from last revision

We shouldn't be looking at a certain revision to find if it's suppressed, we
should check the current revision

Bug: 58016
Change-Id: I497900d469acb6984ca250a141a337910b93c650
---
M FlowActions.php
M includes/Block/Header.php
M includes/Block/Topic.php
M includes/Data/ObjectManager.php
4 files changed, 113 insertions(+), 12 deletions(-)

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



diff --git a/FlowActions.php b/FlowActions.php
index b8d5501..423017c 100644
--- a/FlowActions.php
+++ b/FlowActions.php
@@ -470,6 +470,21 @@
'button-method' => 'GET',
),
 
+   'board-history' => array(
+   'performs-writes' => false,
+   'log_type' => false,
+   'permissions' => array(
+   PostRevision::MODERATED_NONE => '',
+   PostRevision::MODERATED_HIDDEN => function( 
PostRevision $post, RevisionActionPermissions $permissions ) {
+   // visible for logged in users (or 
anyone with hide permission)
+   return 
$permissions->getUser()->isLoggedIn() ? '' : 'flow-hide';
+   },
+   PostRevision::MODERATED_DELETED => array( 
'flow-delete', 'flow-suppress' ),
+   PostRevision::MODERATED_SUPPRESSED => 'flow-suppress',
+   ),
+   'button-method' => 'GET',
+   ),
+
'view' => array(
'performs-writes' => false,
'log_type' => false, // don't log views
diff --git a/includes/Block/Header.php b/includes/Block/Header.php
index 4dec609..a272148 100644
--- a/includes/Block/Header.php
+++ b/includes/Block/Header.php
@@ -91,7 +91,7 @@
// if $wgFlowContentFormat is set to 
html the Header::create
// call will convert the wikitext input 
into html via parsoid, and
// parsoid requires the page exist.
-   Container::get( 'occupation_controller' 
)->ensureFlowRevision( new \Article( $title, 0 ) ); 
+   Container::get( 'occupation_controller' 
)->ensureFlowRevision( new \Article( $title, 0 ) );
}
 
$this->header = Header::create( 
$this->workflow, $this->user, $this->submitted['content'], 'create-header' );
@@ -139,10 +139,11 @@
'historyExists' => false,
);
 
-   $historyRecord = $this->loadBoardHistory();
-   if ( $historyRecord ) {
+   $history = $this->filterBoardHistory( 
$this->loadBoardHistory() );
+
+   if ( $history ) {
$tplVars['historyExists'] = true;
-   $tplVars['history'] = new History( 
$historyRecord );
+   $tplVars['history'] = new History( $history );
$tplVars['historyRenderer'] = new 
HistoryRenderer( $templating, $this );
}
 
@@ -160,6 +161,52 @@
}
}
 
+   protected function filterBoardHistory( array $history ) {
+   // get rid of history entries user doesn't have sufficient 
permissions for
+   $query = $needed = array();
+   foreach ( $history as $i => $revision ) {
+   switch( $revision->getRevisionType() ) {
+   case 'header':
+   // headers can't be moderated
+   break;
+   case 'post':
+   // comments should not be in board 
history
+   if ( $revision->isTopicTitle() ) {
+   
$needed[$revision->getPostId()->getHex()] = $i;
+   $query[] = array( 
'tree_rev_descendant_id' => $revision->getPostId() );
+   } else {
+   unset( $history[$i] );
+   }
+   break;
+   }
+   }
+
+   if ( !$needed ) {
+   return $history;
+   }
+
+   // check permissions against most recent revision
+   $found = $this->storage->findMulti(
+   'PostRevision',
+   $query,
+   array( '

[MediaWiki-commits] [Gerrit] Remove version check for mysql 4.1 from Maintenance scripts - change (mediawiki/core)

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

Change subject: Remove version check for mysql 4.1 from Maintenance scripts
..


Remove version check for mysql 4.1 from Maintenance scripts

Removed version check for mysql from initEditCount.php and
storage/fixBug20757.php. Mediawiki needs MYSQL Ver 5.0.2 or
later, so the check is unnecessary.
Removed white spaces

Bug: 59126
Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7
---
M maintenance/initEditCount.php
M maintenance/storage/fixBug20757.php
2 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php
index 4b04683..7c6e7d4 100644
--- a/maintenance/initEditCount.php
+++ b/maintenance/initEditCount.php
@@ -47,7 +47,7 @@
 
// Autodetect mode...
$backgroundMode = wfGetLB()->getServerCount() > 1 ||
-   ( $dbw instanceof DatabaseMysql && version_compare( 
$dbver, '4.1' ) < 0 );
+   ( $dbw instanceof DatabaseMysql );
 
if ( $this->hasOption( 'background' ) ) {
$backgroundMode = true;
diff --git a/maintenance/storage/fixBug20757.php 
b/maintenance/storage/fixBug20757.php
index e832b4e..dd86619 100644
--- a/maintenance/storage/fixBug20757.php
+++ b/maintenance/storage/fixBug20757.php
@@ -57,14 +57,9 @@
 
$totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', false, 
__METHOD__ );
 
-   if ( $dbr->getType() == 'mysql'
-   && version_compare( $dbr->getServerVersion(), '4.1.0', 
'>=' )
-   ) {
+   if ( $dbr->getType() == 'mysql' ) {
// In MySQL 4.1+, the binary field old_text has a 
non-working LOWER() function
$lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING 
latin1))';
-   } else {
-   // No CONVERT() in MySQL 4.0
-   $lowerLeft = 'LOWER(LEFT(old_text,22))';
}
 
while ( true ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I29e2ca8764fad8bf4d15bba307e80f3aacea1db7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Higher-level move function, to cross filesystems - change (wikimedia...tools)

2013-12-31 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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


Change subject: Higher-level move function, to cross filesystems
..

Higher-level move function, to cross filesystems

Change-Id: I7c6cfef705128a15e6f641b4b39322668756aea8
---
M audit/paypal/parse_nightly
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/60/104760/1

diff --git a/audit/paypal/parse_nightly b/audit/paypal/parse_nightly
index 44240b9..8f0b2c8 100755
--- a/audit/paypal/parse_nightly
+++ b/audit/paypal/parse_nightly
@@ -2,6 +2,7 @@
 
 import os, os.path
 import re
+import shutil
 from process.logging import Logger as log
 from process.globals import load_config
 load_config("paypal-audit")
@@ -41,7 +42,7 @@
 dest_path = os.path.join(config.archive_path, filename)
 
 log.info("Archiving {orig} to {new}".format(orig=path, new=dest_path))
-os.rename(path, dest_path)
+shutil.move(path, dest_path)
 
 if __name__ == '__main__':
 lock.begin()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c6cfef705128a15e6f641b4b39322668756aea8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Adamw 

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


[MediaWiki-commits] [Gerrit] Add Arabic namespace names - change (mediawiki...EducationProgram)

2013-12-31 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Add Arabic namespace names
..

Add Arabic namespace names

Bug: 57729
Change-Id: I891198aa1b15203a9f52c862b1933dbf534e075c
---
M EducationProgram.i18n.ns.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/EducationProgram.i18n.ns.php b/EducationProgram.i18n.ns.php
index c81ac43..0cfd3a3 100644
--- a/EducationProgram.i18n.ns.php
+++ b/EducationProgram.i18n.ns.php
@@ -23,6 +23,11 @@
EP_NS_TALK => 'Education_Program_talk',
 );
 
+$namespaceNames['ar'] = array(
+   EP_NS  => 'برنامج_التعليم',
+   EP_NS_TALK => 'نقاش_برنامج_التعليم',
+);
+
 $namespaceNames['fa'] = array(
EP_NS  => 'برنامه_آموزشی',
EP_NS_TALK => 'بحث_برنامه_آموزشی',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I891198aa1b15203a9f52c862b1933dbf534e075c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EducationProgram
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] No-js css tweaks - change (mediawiki...Flow)

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

Change subject: No-js css tweaks
..


No-js css tweaks

* post and topic flyouts start small and transition width on hover
* reposition timestamps slightly to accomidate always visible flyouts
* shrink non-active empty textareas

Bug: 58019
Mingle: 589
Change-Id: Id0c651e2cc20ee2fc7a9adbffabebac270e7666d
---
M Resources.php
M modules/base/styles/actionbox.less
A modules/discussion/styles/nojs.less
3 files changed, 49 insertions(+), 0 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 79cac71..5fba780 100644
--- a/Resources.php
+++ b/Resources.php
@@ -55,6 +55,7 @@
'discussion/styles/post.less',
'discussion/styles/collapse.less',
'discussion/styles/modified.less',
+   'discussion/styles/nojs.less',
),
'scripts' => array(
'discussion/ui.js',
diff --git a/modules/base/styles/actionbox.less 
b/modules/base/styles/actionbox.less
index 938cdb6..ddb7944 100644
--- a/modules/base/styles/actionbox.less
+++ b/modules/base/styles/actionbox.less
@@ -59,8 +59,24 @@
display: none;
}
 
+   .flow-tipsy {
+   width: 100%;
+   }
+
.flow-tipsy-flyout {
display: block;
+
+   // give the action menu an animated width
+   ul li .mw-ui-button {
+   transition: width 0.1s, text-indent 0.1s, padding-right 
0.1s;
+   }
+
+   // unless when hovered, shorten buttons to only display the icon
+   &:not(:hover) ul li .mw-ui-button {
+   width: 0;
+   text-indent: -px;
+   padding-right: 4px;
+   }
}
 }
 
diff --git a/modules/discussion/styles/nojs.less 
b/modules/discussion/styles/nojs.less
new file mode 100644
index 000..94280f7
--- /dev/null
+++ b/modules/discussion/styles/nojs.less
@@ -0,0 +1,32 @@
+.client-nojs .flow-container {
+   // position tipsy window in upper right hand corner
+   .flow-tipsy {
+   position: absolute;
+   top: 0;
+   right: 0;
+   }
+
+   // flyout doesn't need to be pushed down below the icon; there's no JS, 
so
+   // no event handlers when clicking the flyout; so the flyout will 
always be
+   // displayed
+   .flow-tipsy-flyout {
+   position: inherit;
+   top: 0;
+   }
+
+   // shrink textarea's until they are focused
+   .flow-post-container,
+   .flow-new-topic-container {
+   textarea:empty:not(:focus) {
+   height: 34px;
+   }
+   }
+
+   // make room for the always visible flyout
+   .flow-element-container .flow-datestamp {
+   right: 50px;
+   }
+   .flow-post-content {
+   padding-right: 45px;
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0c651e2cc20ee2fc7a9adbffabebac270e7666d
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Post content with more than 5 lines is showing a scrollbar - change (mediawiki...Flow)

2013-12-31 Thread Bsitu (Code Review)
Bsitu has uploaded a new change for review.

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


Change subject: Post content with more than 5 lines is showing a scrollbar
..

Post content with more than 5 lines is showing a scrollbar

It turns out this is caused by the tipsy link, somehow the icon is
creating an overflow even the height/width are the same as icon
height/width.  Adding overflow: hidden seems to fixe the
problem.  Not sure if this is a good fix but this does address
the issue, :)

Change-Id: Iae275a3d1c18e7b9693811e20cf3e742a48f23be
---
M modules/discussion/styles/modified.less
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/discussion/styles/modified.less 
b/modules/discussion/styles/modified.less
index 1bfc037..454ecb1 100644
--- a/modules/discussion/styles/modified.less
+++ b/modules/discussion/styles/modified.less
@@ -7,6 +7,7 @@
display: inline-block;
text-indent: -px;
vertical-align: middle;
+   overflow: hidden;
 
background-position: center;
background-size: 14px auto;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae275a3d1c18e7b9693811e20cf3e742a48f23be
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] Fix to makeSepIndentPreSafe: always safe when nested in an i... - change (mediawiki...parsoid)

2013-12-31 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Fix to makeSepIndentPreSafe: always safe when nested in an 
indentPre!
..

Fix to makeSepIndentPreSafe: always safe when nested in an indentPre!

* echo " ''a''\n  ''b''" | node parse --wt2wt was normalizing
  whitespace on the second line because makeSepIndentPreSafe was
  not checking if the separator came from a node that was nested
  inside an indentPre. A simple check for state.inIndentPre fixes
  this issue.

* Added a parser test to capture this which passes wt2wt mode.

* This eliminates dirty diffs seen in RT testing
  Ex: jawiki:ベルマン-フォード法

* Additional change: separator constraints were being destructively
  updated in --trace wts mode. Fixed this to prevent hair-tearing
  during debugging.

Change-Id: I2cc2e79137637df191c2544982cc08b2a0777de4
---
M lib/mediawiki.WikitextSerializer.js
M tests/parserTests.txt
2 files changed, 22 insertions(+), 3 deletions(-)


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

diff --git a/lib/mediawiki.WikitextSerializer.js 
b/lib/mediawiki.WikitextSerializer.js
index d0617c7..186b519 100644
--- a/lib/mediawiki.WikitextSerializer.js
+++ b/lib/mediawiki.WikitextSerializer.js
@@ -3880,7 +3880,7 @@
}
 
if (this.debugging) {
-   var constraints = nlConstraints;
+   var constraints = Util.clone(nlConstraints);
constraints.constraintInfo = undefined;
this.trace('makeSeparator', sep, origSep, minNls, sepNlCount, 
constraints);
}
@@ -4004,8 +4004,9 @@
// We also should test for onSOL state to deal with HTML like
//  foo
// and strip the leading space before non-indent-pre-safe tags
-   if (sep.match(/\n+ +([^\n]*)?$/g) || (
-   (constraintInfo.onSOL && sep.match(/ 
+([^\n]*)?$/g
+   if (!state.inIndentPre &&
+   (sep.match(/\n+ +([^\n]*)?$/g) || (
+   (constraintInfo.onSOL && sep.match(/ 
+([^\n]*)?$/g)
{
// 'sep' is the separator before 'nodeB' and it has leading 
spaces on a newline.
// We have to decide whether that leading space will trigger 
indent-pres in wikitext.
@@ -4085,6 +4086,12 @@
}
}
 
+   if (this.debugging) {
+   var constraints = nlConstraints;
+   constraints.constraintInfo = undefined;
+   this.trace('makePreSafe  ', sep, constraints);
+   }
+
return sep;
 };
 
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 6f2f7de..a6b9e63 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -2284,6 +2284,18 @@
 
 !! end
 
+!! test
+5c. White-space in indent-pre
+!! input
+ ''a''
+  ''b''
+   ''c''
+!! result
+a
+ b
+  c
+
+!! end
 
 !! test
 6. Pre-blocks should extend across lines with leading WS even when there is no 
wrappable content

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cc2e79137637df191c2544982cc08b2a0777de4
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] Combine var statements - change (mediawiki...CodeEditor)

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

Change subject: Combine var statements
..


Combine var statements

Change-Id: If005690ab8ecf21e64399781acbecd1ec3b02172
---
M modules/ext.codeEditor.geshi.js
M modules/jquery.codeEditor.js
2 files changed, 89 insertions(+), 53 deletions(-)

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



diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index 6a6e6bd..771f80a 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -5,10 +5,15 @@
  */
 
 $( function () {
-   var $sources = $( '.mw-geshi' );
+   var $sources, setupEditor, openEditor;
+
+   $sources = $( '.mw-geshi' );
+
if ( $sources.length > 0 ) {
-   var setupEditor = function ( $div ) {
-   var $link = $( '' )
+   setupEditor = function ( $div ) {
+   var $link, $edit;
+
+   $link = $( '' )
.text( mediaWiki.msg( 'editsection' ) )
.attr( 'href', '#' )
.attr( 'title', 'Edit this code section' )
@@ -16,23 +21,29 @@
openEditor( $div );
event.preventDefault();
} );
-   var $edit = $( '' )
+   $edit = $( '' )
.addClass( 'mw-editsection' )
.append( '[' )
.append( $link )
.append( ']' );
$div.prepend( $edit );
};
-   var openEditor = function ( $div ) {
-   var $main = $div.find( 'div' ),
-   geshiLang = null,
-   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+
+   openEditor = function ( $div ) {
+   var $main, geshiLang, matches, $label, $langDropDown, 
$xcontainer, codeEditor;
+
+   $main = $div.find( 'div' );
+   geshiLang = null;
+   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+
if ( matches ) {
geshiLang = matches[1];
}
mediaWiki.loader.using( 'ext.codeEditor.ace.modes', 
function () {
+   var map, canon, $container, $save, $cancel, 
$controls, setLanguage, closeEditor;
+
// @fixme de-duplicate
-   var map = {
+   map = {
c: 'c_cpp',
cpp: 'c_cpp',
clojure: 'clojure',
@@ -57,17 +68,17 @@
};
 
// Disable some annoying commands
-   var canon = require( 'pilot/canon' );
+   canon = require( 'pilot/canon' );
canon.removeCommand( 'replace' );  // 
ctrl+R
canon.removeCommand( 'transposeletters' ); // 
ctrl+T
canon.removeCommand( 'gotoline' ); // 
ctrl+L
 
-   var $container = $( '' )
+   $container = $( '' )
.attr( 'style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray' )
.text( $main.text() ); // quick hack :D
 
-   var $label = $( '' ).text( 'Source 
language: ' );
-   var $langDropDown = $( '' );
+   $label = $( '' ).text( 'Source language: 
' );
+   $langDropDown = $( '' );
$.each( map, function ( geshiLang, aceLang ) {
var $opt = $( '' )
.text( geshiLang )
@@ -80,12 +91,14 @@
.change( function ( event ) {
setLanguage( $( this ).val() );
} );
-   var $save = $( '' )
+   $save = $( '' )
.text( mediaWiki.msg( 'savearticle' ) )
.click( function ( event ) {
// horrible hack ;)
-   var src = 
codeEditor.getSession().getVa

[MediaWiki-commits] [Gerrit] Revert 164a6469b6d95c447869a1a427a66150b76a2c58 - change (mediawiki...ParserFunctions)

2013-12-31 Thread Chad (Code Review)
Chad has submitted this change and it was merged.

Change subject: Revert 164a6469b6d95c447869a1a427a66150b76a2c58
..


Revert 164a6469b6d95c447869a1a427a66150b76a2c58

Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
---
M ParserFunctions.i18n.magic.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/ParserFunctions.i18n.magic.php b/ParserFunctions.i18n.magic.php
index f546247..05adca0 100644
--- a/ParserFunctions.i18n.magic.php
+++ b/ParserFunctions.i18n.magic.php
@@ -216,15 +216,15 @@
'expr' => array( 0, 'חשב' ),
'if' => array( 0, 'תנאי' ),
'ifeq' => array( 0, 'שווה' ),
-   'ifexpr' => array( 0, 'חשב_תנאי' ),
-   'iferror' => array( 0, 'תנאי_שגיאה' ),
+   'ifexpr' => array( 0, 'חשב תנאי' ),
+   'iferror' => array( 0, 'תנאי שגיאה' ),
'switch' => array( 0, 'בחר' ),
-   'default' => array( 0, '#ברירת_מחדל' ),
+   'default' => array( 0, '#ברירת מחדל' ),
'ifexist' => array( 0, 'קיים' ),
'time' => array( 0, 'זמן' ),
'timel' => array( 0, 'זמןמ' ),
-   'rel2abs' => array( 0, 'יחסי_למוחלט' ),
-   'titleparts' => array( 0, 'חלק_בכותרת' ),
+   'rel2abs' => array( 0, 'יחסי למוחלט' ),
+   'titleparts' => array( 0, 'חלק בכותרת' ),
'count' => array( 0, 'מספר' ),
 );
 
@@ -642,4 +642,4 @@
'ifeq' => array( 0, '若相等', '如果相等' ),
'default' => array( 0, '#默认' ),
'ifexist' => array( 0, '若有', '如果存在' ),
-);
\ No newline at end of file
+);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Eranroz 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Siebrand 

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


[MediaWiki-commits] [Gerrit] Allow category prefix when entering categories - change (mediawiki...UploadWizard)

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

Change subject: Allow category prefix when entering categories
..


Allow category prefix when entering categories

When users are entering categories, allow either
"Foo" or "Category:Foo" (with the prefix text
localized as necessary).

Bug: 56273
Change-Id: Ie5cc9dbcfeae48398ab0fe3c43e2a85f2307e3dc
---
M resources/jquery/jquery.mwCoolCats.js
1 file changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/resources/jquery/jquery.mwCoolCats.js 
b/resources/jquery/jquery.mwCoolCats.js
index 7f6bdb0..d27d7a3 100644
--- a/resources/jquery/jquery.mwCoolCats.js
+++ b/resources/jquery/jquery.mwCoolCats.js
@@ -166,8 +166,16 @@
 */
function _fetchSuggestions() {
var _input = this;
-   // ignore bad characters, they will be stripped out
-   var prefix = _stripText( $( this ).val() );
+
+   // Get the name of the category (no "Category:"), stripping out
+   // bad characters as necessary.
+   var prefix = _stripText( $( this ).val() ),
+   title = mw.Title.newFromText( prefix, catNsId );
+   if ( title && title.getNamespaceId() === catNsId ) {
+   prefix = title.getMainText();
+   } else {
+   prefix = title.getPrefixedText();
+   }
 
var ok = function( catList ) {
for ( var c in catList ) {
@@ -176,7 +184,7 @@
$( _input ).suggestions( 'suggestions', catList );
};
 
-   $( _input ).data( 'request', 
settings.api.getCategoriesByPrefix( prefix, ok ) );
+   $( _input ).data( 'request', 
settings.api.getCategoriesByPrefix( prefix, ok ) );
}
 
var defaults = {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5cc9dbcfeae48398ab0fe3c43e2a85f2307e3dc
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Theopolisme 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Qgil 
Gerrit-Reviewer: Theopolisme 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Focus to Flickr URL input field after "upload from Flickr" i... - change (mediawiki...UploadWizard)

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

Change subject: Focus to Flickr URL input field after "upload from Flickr" is 
clicked
..


Focus to Flickr URL input field after "upload from Flickr" is clicked

Change-Id: I68932a4d9202218d9c692b1a436cee5594b776e1
---
M resources/mw.UploadWizard.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index a25de16..6eef0eb 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -374,6 +374,8 @@
 
// Set up the submit button
$flickrButton.button( { label: mw.message( 
'mwe-upwiz-add-flickr' ).escaped() } );
+
+   $flickrInput.focus();
},
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68932a4d9202218d9c692b1a436cee5594b776e1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
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] Fix some users appearing twice in the user list - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Fix some users appearing twice in the user list
..


Fix some users appearing twice in the user list

It seems this was not updated with the user object change, and I've also
simplyfied the code slightly.
Also, I've bumped the version up (should have been with the sidebar
commit)

Brickimedia/brickimedia#149

Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
---
M MediaWikiChat.js
M MediaWikiChat.php
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index e63ca96..38e4d75 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -366,11 +366,11 @@
 
var add = true;
 
-   $.each( $( '#mwchat-users div' ), ( function( index, item ) {
-   if ( item.id == user.userE ) {
-   add = false;
+   $( '#mwchat-users div' ).each( function( index ) {
+   if ( $( this ).attr( 'data-id' ) == user.id ) {
+   add = false;
+   }
}
-   })
);
 
if ( add ) {
diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index 7caa320..773c8d7 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -17,7 +17,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'MediaWikiChat',
-   'version' => '2.1',
+   'version' => '2.2',
'author' => 'Adam Carter/UltrasonicNXT',
'url' => 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat',
'descriptionmsg' => 'chat-desc',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 
Gerrit-Reviewer: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] Fix some users appearing twice in the user list - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Fix some users appearing twice in the user list
..

Fix some users appearing twice in the user list

It seems this was not updated with the user object change, and I've also
simplyfied the code slightly

Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
---
M MediaWikiChat.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index e63ca96..38e4d75 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -366,11 +366,11 @@
 
var add = true;
 
-   $.each( $( '#mwchat-users div' ), ( function( index, item ) {
-   if ( item.id == user.userE ) {
-   add = false;
+   $( '#mwchat-users div' ).each( function( index ) {
+   if ( $( this ).attr( 'data-id' ) == user.id ) {
+   add = false;
+   }
}
-   })
);
 
if ( add ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5206199c7bac087c1233fb30aa426104a0ec749
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] Change id to add mwe-upwiz prefix and match casing style - change (mediawiki...UploadWizard)

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

Change subject: Change id to add mwe-upwiz prefix and match casing style
..


Change id to add mwe-upwiz prefix and match casing style

Change-Id: I98d1a908607a6f7fdfba468cef721b2962901ddb
---
M resources/mw.UploadWizard.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index cf68bb5..f9d6a1a 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -1218,7 +1218,7 @@
return;
}
var thumbWikiText,
-   id = 'thanksDiv' + i,
+   id = 'mwe-upwiz-thanks-div-' + i,
$thanksDiv = $( '' ).attr( 'id', id 
).addClass( 'mwe-upwiz-thanks ui-helper-clearfix' ),
$thumbnailDiv = $( '' ).addClass( 
'mwe-upwiz-thumbnail' ),
$thumbnailCaption = $( '' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98d1a908607a6f7fdfba468cef721b2962901ddb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: MarkTraceur 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow switching from edit preview to editor - change (mediawiki...MobileFrontend)

2013-12-31 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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


Change subject: Allow switching from edit preview to editor
..

Allow switching from edit preview to editor

Bug: 59166
Change-Id: If6e4da42f74e6e05f426d7c557a9591edced4df8
---
M javascripts/modules/editor/EditorOverlay.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index efaf5bf..bf2aebb 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -99,7 +99,10 @@
 
hide: function() {
var confirmMessage = mw.msg( 
'mobile-frontend-editor-cancel-confirm' );
-   if ( !this.api.hasChanged || this.canHide || 
window.confirm( confirmMessage ) ) {
+   if ( this.inPreviewMode ) {
+   this._hidePreview();
+   return false;
+   } else if ( !this.api.hasChanged || this.canHide || 
window.confirm( confirmMessage ) ) {
return this._super();
} else {
return false;
@@ -107,6 +110,7 @@
},
 
_showPreview: function() {
+   this.inPreviewMode = true;
var self = this, params = {
action: 'parse',
// Enable section preview mode to avoid errors 
(bug 49218)
@@ -173,6 +177,7 @@
},
 
_hidePreview: function() {
+   this.inPreviewMode = false;
this.$preview.hide();
this.$content.show();
window.scrollTo( 0, this.scrollTop );

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

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

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


[MediaWiki-commits] [Gerrit] Delete all but the 50 newest messages - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Delete all but the 50 newest messages
..


Delete all but the 50 newest messages

This should have been happening for ages, but it wasn't working, because
(a) a number to big for an int was being converted to an int, and (b),
ORDER BY was incorrectly written as ORDER_BY (underscore)

Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
---
M MediaWikiChatClass.php
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php
index 5bb55c0..4ce1e4f 100644
--- a/MediaWikiChatClass.php
+++ b/MediaWikiChatClass.php
@@ -225,21 +225,20 @@
 */
static function deleteEntryIfNeeded() {
$dbr = wfGetDB( DB_SLAVE );
-   $dbw = wfGetDB( DB_MASTER );
$field = $dbr->selectField(
'chat',
'chat_timestamp',
array(),
__METHOD__,
array(
-   'ORDER_BY' => 'chat_timestamp DESC',
+   'ORDER BY' => 'chat_timestamp DESC',
'OFFSET' => 50,
'LIMIT' => 1
)
);
 
-   if ( is_int( $field ) ) {
-   $field = intval( $field );
+   if ( $field ) {
+   $dbw = wfGetDB( DB_MASTER );
$dbw->delete(
'chat',
array( "chat_timestamp < $field" ),
@@ -247,4 +246,4 @@
);
}
}
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 
Gerrit-Reviewer: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] Delete all but the 50 newest messages - change (mediawiki...MediaWikiChat)

2013-12-31 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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


Change subject: Delete all but the 50 newest messages
..

Delete all but the 50 newest messages

This should have been happening for ages, but it wasn't working, because
(a) a number to big for an int was being converted to an int, and (b),
ORDER BY was incorrectly written as ORDER_BY (underscore)

Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
---
M MediaWikiChatClass.php
1 file changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/MediaWikiChatClass.php b/MediaWikiChatClass.php
index 5bb55c0..4ce1e4f 100644
--- a/MediaWikiChatClass.php
+++ b/MediaWikiChatClass.php
@@ -225,21 +225,20 @@
 */
static function deleteEntryIfNeeded() {
$dbr = wfGetDB( DB_SLAVE );
-   $dbw = wfGetDB( DB_MASTER );
$field = $dbr->selectField(
'chat',
'chat_timestamp',
array(),
__METHOD__,
array(
-   'ORDER_BY' => 'chat_timestamp DESC',
+   'ORDER BY' => 'chat_timestamp DESC',
'OFFSET' => 50,
'LIMIT' => 1
)
);
 
-   if ( is_int( $field ) ) {
-   $field = intval( $field );
+   if ( $field ) {
+   $dbw = wfGetDB( DB_MASTER );
$dbw->delete(
'chat',
array( "chat_timestamp < $field" ),
@@ -247,4 +246,4 @@
);
}
}
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1692f54f60d8ba672e2d712116a62242ee3f2516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] Ensure that EnableMobileModules hook always gets an OutputPage - change (mediawiki...MobileFrontend)

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

Change subject: Ensure that EnableMobileModules hook always gets an OutputPage
..


Ensure that EnableMobileModules hook always gets an OutputPage

Bug: 59143
Change-Id: I0971d3a9d7e22c65327b5dcca4c701b0fd2056b1
---
M includes/skins/SkinMinerva.php
1 file changed, 21 insertions(+), 25 deletions(-)

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



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 1c646c5..cc8264e 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -15,7 +15,7 @@
protected $mode = 'stable';
 
protected function prepareQuickTemplate() {
-   global $wgAppleTouchIcon;
+   global $wgAppleTouchIcon, $wgMFNoindexPages;
wfProfileIn( __METHOD__ );
$out = $this->getOutput();
// add head items
@@ -37,6 +37,9 @@
$out->addHeadItem( 'loadingscript', Html::inlineScript(
"document.documentElement.className += ' page-loading';"
) );
+   if ( $wgMFNoindexPages ) {
+   $out->setRobotPolicy( 'noindex,nofollow' );
+   }
 
// Generate template after doing the above...
$tpl = parent::prepareQuickTemplate();
@@ -687,15 +690,26 @@
}
 
public function outputPage( OutputPage $out = null ) {
+   global $wgMFWap, $wgMFTransitionalWapLifetime;
+   wfProfileIn( __METHOD__ );
+
+   // This might seem weird but now the meaning of 'mobile' is 
morphing to mean 'minerva skin'
+   // FIXME: Explore disabling this via a user preference and see 
what explodes
+   // Important: This must run before outputPage which generates 
script and style tags
+   // If run later incompatible desktop code will leak into 
Minerva.
+   $out = $this->getOutput();
+   $out->setTarget( 'mobile' );
if ( $this->isMobileMode ) {
+   # Restrict cache lifetime for potentially WAPy requests 
during the transitional period
+   if ( $wgMFWap == 'transitional' && 
$this->getRequest()->getText( 'X-WAP' ) == 'yes' ) {
+   $out->setSquidMaxage( min( $out->mSquidMaxage, 
$wgMFTransitionalWapLifetime ) );
+   }
+   // FIXME: Merge these hooks?
wfRunHooks( 'EnableMobileModules', array( $out, 
$this->getMode() ) );
-   $this->outputMobilePage();
-   } else {
-   // This might seem weird but now the meaning of 
'mobile' is morphing to mean 'minerva skin'
-   // FIXME: Explore disabling this via a user preference 
and see what explodes
-   $out = $this->getOutput()->setTarget( 'mobile' );
-   parent::outputPage();
+   wfRunHooks( 'BeforePageDisplayMobile', array( &$out ) );
}
+   parent::outputPage( $out );
+   wfProfileOut( __METHOD__ );
}
 
//
@@ -703,24 +717,6 @@
// Mobile specific functions
// FIXME: Try to kill any of the functions that follow
//
-   //
-
-   public function outputMobilePage() {
-   global $wgMFNoindexPages, $wgMFWap, 
$wgMFTransitionalWapLifetime;
-   wfProfileIn( __METHOD__ );
-   $out = $this->getOutput();
-   $out->setTarget( 'mobile' );
-   if ( $out && $wgMFNoindexPages ) {
-   $out->setRobotPolicy( 'noindex,nofollow' );
-   }
-   # Restrict cache lifetime for potentially WAPy requests during 
the transitional period
-   if ( $wgMFWap == 'transitional' && 
$this->getRequest()->getText( 'X-WAP' ) == 'yes' ) {
-   $out->setSquidMaxage( min( $out->mSquidMaxage, 
$wgMFTransitionalWapLifetime ) );
-   }
-
-   wfRunHooks( 'BeforePageDisplayMobile', array( &$out ) );
-   parent::outputPage();
-   }
 
/**
 * Returns the site name for the footer, either as a text or  tag

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0971d3a9d7e22c65327b5dcca4c701b0fd2056b1
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Change Title::getInterwiki() in conditions to Title::isExter... - change (mediawiki/core)

2013-12-31 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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


Change subject: Change Title::getInterwiki() in conditions to 
Title::isExternal()
..

Change Title::getInterwiki() in conditions to Title::isExternal()

Change-Id: Icce26e6194ae96f262029554e05b49117d5e112e
---
M includes/Export.php
M includes/Import.php
M includes/Linker.php
M includes/PrefixSearch.php
M includes/Title.php
M includes/Wiki.php
M includes/api/ApiQueryBase.php
M includes/job/jobs/DoubleRedirectJob.php
M includes/parser/ParserOutput.php
M includes/specials/SpecialExport.php
M includes/specials/SpecialRecentchangeslinked.php
11 files changed, 16 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/104753/1

diff --git a/includes/Export.php b/includes/Export.php
index b4a507d..639ba28 100644
--- a/includes/Export.php
+++ b/includes/Export.php
@@ -866,7 +866,7 @@
 * @since 1.18
 */
public static function canonicalTitle( Title $title ) {
-   if ( $title->getInterwiki() ) {
+   if ( $title->isExternal() ) {
return $title->getPrefixedText();
}
 
diff --git a/includes/Import.php b/includes/Import.php
index 8b7af02..721b94b 100644
--- a/includes/Import.php
+++ b/includes/Import.php
@@ -1717,7 +1717,7 @@
return Status::newFatal( 'import-noarticle' );
}
$link = Title::newFromText( "$interwiki:Special:Export/$page" );
-   if ( is_null( $link ) || $link->getInterwiki() == '' ) {
+   if ( is_null( $link ) || !$link->isExternal() ) {
return Status::newFatal( 'importbadinterwiki' );
} else {
$params = array();
diff --git a/includes/Linker.php b/includes/Linker.php
index 27f8ab4..c4e2608 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -1446,7 +1446,7 @@
 
$target = Title::newFromText( $linkTarget );
if ( $target ) {
-   if ( $target->getText() == '' && 
$target->getInterwiki() === ''
+   if ( $target->getText() == '' && 
!$target->isExternal()
&& !self::$commentLocal && 
self::$commentContextTitle
) {
$newTarget = clone ( 
self::$commentContextTitle );
diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php
index 3c464c5..780cae5 100644
--- a/includes/PrefixSearch.php
+++ b/includes/PrefixSearch.php
@@ -44,7 +44,7 @@
 
// Find a Title which is not an interwiki and is in NS_MAIN
$title = Title::newFromText( $search );
-   if ( $title && $title->getInterwiki() == '' ) {
+   if ( $title && !$title->isExternal() ) {
$ns = array( $title->getNamespace() );
if ( $ns[0] == NS_MAIN ) {
$ns = $namespaces; // no explicit prefix, use 
default namespaces
@@ -57,7 +57,7 @@
$title = Title::newFromText( $search . 'Dummy' );
if ( $title && $title->getText() == 'Dummy'
&& $title->getNamespace() != NS_MAIN
-   && $title->getInterwiki() == '' ) {
+   && !$title->isExternal() ) {
return self::searchBackend(
array( $title->getNamespace() ), '', $limit );
}
diff --git a/includes/Title.php b/includes/Title.php
index 5ab9e94..6826910 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1014,7 +1014,7 @@
 * @return Bool TRUE or FALSE
 */
public function isMovable() {
-   if ( !MWNamespace::isMovable( $this->getNamespace() ) || 
$this->getInterwiki() != '' ) {
+   if ( !MWNamespace::isMovable( $this->getNamespace() ) || 
$this->isExternal() ) {
// Interwiki title or immovable namespace. Hooks don't 
get to override here
return false;
}
@@ -3582,7 +3582,7 @@
if ( !$this->isMovable() ) {
$errors[] = array( 'immobile-source-namespace', 
$this->getNsText() );
}
-   if ( $nt->getInterwiki() != '' ) {
+   if ( $nt->isExternal() ) {
$errors[] = array( 'immobile-target-namespace-iw' );
}
if ( !$nt->isMovable() ) {
diff --git a/includes/Wiki.php b/includes/Wiki.php
index 5ebf5a0..1bb9c40 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -121,7 +121,7 @@
$ret = Title::newMainPage();
}
 
-   if ( $ret === null || ( $ret->getDBkey() == '' && 
$ret->getInterwik

[MediaWiki-commits] [Gerrit] Revert 164a6469b6d95c447869a1a427a66150b76a2c58 - change (mediawiki...ParserFunctions)

2013-12-31 Thread Eranroz (Code Review)
Eranroz has uploaded a new change for review.

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


Change subject: Revert 164a6469b6d95c447869a1a427a66150b76a2c58
..

Revert 164a6469b6d95c447869a1a427a66150b76a2c58

Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
---
M ParserFunctions.i18n.magic.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/ParserFunctions.i18n.magic.php b/ParserFunctions.i18n.magic.php
index f546247..05adca0 100644
--- a/ParserFunctions.i18n.magic.php
+++ b/ParserFunctions.i18n.magic.php
@@ -216,15 +216,15 @@
'expr' => array( 0, 'חשב' ),
'if' => array( 0, 'תנאי' ),
'ifeq' => array( 0, 'שווה' ),
-   'ifexpr' => array( 0, 'חשב_תנאי' ),
-   'iferror' => array( 0, 'תנאי_שגיאה' ),
+   'ifexpr' => array( 0, 'חשב תנאי' ),
+   'iferror' => array( 0, 'תנאי שגיאה' ),
'switch' => array( 0, 'בחר' ),
-   'default' => array( 0, '#ברירת_מחדל' ),
+   'default' => array( 0, '#ברירת מחדל' ),
'ifexist' => array( 0, 'קיים' ),
'time' => array( 0, 'זמן' ),
'timel' => array( 0, 'זמןמ' ),
-   'rel2abs' => array( 0, 'יחסי_למוחלט' ),
-   'titleparts' => array( 0, 'חלק_בכותרת' ),
+   'rel2abs' => array( 0, 'יחסי למוחלט' ),
+   'titleparts' => array( 0, 'חלק בכותרת' ),
'count' => array( 0, 'מספר' ),
 );
 
@@ -642,4 +642,4 @@
'ifeq' => array( 0, '若相等', '如果相等' ),
'default' => array( 0, '#默认' ),
'ifexist' => array( 0, '若有', '如果存在' ),
-);
\ No newline at end of file
+);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I714b5d192b1e1f77528feb360f520199f010a528
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFunctions
Gerrit-Branch: master
Gerrit-Owner: Eranroz 

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


[MediaWiki-commits] [Gerrit] Corrected regex to handle unix domain socket and IPV4 format... - change (mediawiki/core)

2013-12-31 Thread Jqnatividad (Code Review)
Jqnatividad has uploaded a new change for review.

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


Change subject: Corrected regex to handle unix domain socket and IPV4 formats.  
IPV6 is not supported for now.
..

Corrected regex to handle unix domain socket and IPV4 formats.  IPV6 is not 
supported for now.

Change-Id: I92263183ebd21fcb6a13e83b2193d5ddb92659b4
---
M includes/objectcache/MemcachedClient.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/104751/1

diff --git a/includes/objectcache/MemcachedClient.php 
b/includes/objectcache/MemcachedClient.php
index 9c0c638..79c5187 100644
--- a/includes/objectcache/MemcachedClient.php
+++ b/includes/objectcache/MemcachedClient.php
@@ -729,7 +729,7 @@
 * @access  private
 */
function _connect_sock( &$sock, $host ) {
-   list( $ip, $port ) = preg_split('/(?!\w):(?=\d)/' , $host );
+   list( $ip, $port ) = preg_split('/:(?=\d)/' , $host );
$sock = false;
$timeout = $this->_connect_timeout;
$errno = $errstr = null;

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

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

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


[MediaWiki-commits] [Gerrit] Add variable to disable WAP - change (mediawiki...MobileFrontend)

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

Change subject: Add variable to disable WAP
..


Add variable to disable WAP

Change-Id: I429484b9687ff09ce43eae3d89b6d7c91338ea99
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M includes/formatters/MobileFormatter.php
M includes/skins/SkinMinerva.php
4 files changed, 23 insertions(+), 4 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index 7d9850b..701b21c 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -449,3 +449,16 @@
  * Controls whether API action=mobileview should have every HTML section 
tidied for invalid markup
  */
 $wgMFTidyMobileViewSections = true;
+
+/**
+ * Controls the use of WAP view. Possible values:
+ *   enabled  - WAP is enabled;
+ *   transitional - disabled but output still varied by X-WAP and requests 
with X-WAP: yes have shorter expiry time;
+ *   disabled - WAP is disabled;
+ */
+$wgMFWap = 'enabled';
+
+/**
+ * Maximum HTTP lifetime for page views with $wgMFWap = 'transitional'
+ */
+$wgMFTransitionalWapLifetime = 3 * 86400;
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 9bd19e3..35da4ee 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -41,7 +41,7 @@
 * @return bool
 */
public static function onRequestContextCreateSkin( $context, &$skin ) {
-   global $wgMFEnableDesktopResources, $wgMFDefaultSkinClass, 
$wgULSPosition;
+   global $wgMFEnableDesktopResources, $wgMFDefaultSkinClass, 
$wgULSPosition, $wgMFWap;
 
// check whether or not the user has requested to toggle their 
view
$mobileContext = MobileContext::singleton();
@@ -78,7 +78,7 @@
// log whether user is using alpha/beta/stable
$mobileContext->logMobileMode();
 
-   if ( $mobileContext->getContentFormat() == 'WML' ) {
+   if ( $mobileContext->getContentFormat() == 'WML' && $wgMFWap == 
'enabled' ) {
# Grab the skin class and initialise it.
$skin = new SkinMobileWML( $context );
} else {
diff --git a/includes/formatters/MobileFormatter.php 
b/includes/formatters/MobileFormatter.php
index 4bb2304..314d371 100644
--- a/includes/formatters/MobileFormatter.php
+++ b/includes/formatters/MobileFormatter.php
@@ -48,6 +48,8 @@
 * @return MobileFormatter
 */
public static function newFromContext( $context, $html ) {
+   global $wgMFWap;
+
wfProfileIn( __METHOD__ );
 
$title = $context->getTitle();
@@ -56,7 +58,7 @@
$isSpecialPage = $title->isSpecialPage();
 
$html = self::wrapHTML( $html );
-   if ( $context->getContentFormat() === 'WML' ) {
+   if ( $context->getContentFormat() === 'WML' && $wgMFWap === 
'enabled' ) {
$wmlContext = new WmlContext( $context );
$formatter = new MobileFormatterWML( $html, $title, 
$wmlContext );
} else {
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 5e339b0..1c646c5 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -706,13 +706,17 @@
//
 
public function outputMobilePage() {
-   global $wgMFNoindexPages;
+   global $wgMFNoindexPages, $wgMFWap, 
$wgMFTransitionalWapLifetime;
wfProfileIn( __METHOD__ );
$out = $this->getOutput();
$out->setTarget( 'mobile' );
if ( $out && $wgMFNoindexPages ) {
$out->setRobotPolicy( 'noindex,nofollow' );
}
+   # Restrict cache lifetime for potentially WAPy requests during 
the transitional period
+   if ( $wgMFWap == 'transitional' && 
$this->getRequest()->getText( 'X-WAP' ) == 'yes' ) {
+   $out->setSquidMaxage( min( $out->mSquidMaxage, 
$wgMFTransitionalWapLifetime ) );
+   }
 
wfRunHooks( 'BeforePageDisplayMobile', array( &$out ) );
parent::outputPage();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I429484b9687ff09ce43eae3d89b6d7c91338ea99
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot


[MediaWiki-commits] [Gerrit] Add Title::hasFragment and use it - change (mediawiki/core)

2013-12-31 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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


Change subject: Add Title::hasFragment and use it
..

Add Title::hasFragment and use it

Makes checks against the fragment easier to read and all the same.
At the moment some using strval, some use type safe comparsion.
The new function used the same check as used in Title.php before.

Change-Id: I27d9c3e40e6de6800f4488de167cf06e83c88ce6
---
M includes/Article.php
M includes/FakeTitle.php
M includes/Linker.php
M includes/Title.php
M includes/api/ApiPageSet.php
M includes/parser/CoreParserFunctions.php
M includes/parser/LinkHolderArray.php
M includes/parser/Parser.php
M includes/specials/SpecialMovepage.php
9 files changed, 23 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/50/104750/1

diff --git a/includes/Article.php b/includes/Article.php
index c82b39f..d0d9919 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -988,7 +988,7 @@
$outputPage->addSubtitle( wfMessage( 
'redirectedfrom' )->rawParams( $redir ) );
 
// Set the fragment if one was specified in the 
redirect
-   if ( strval( $this->getTitle()->getFragment() ) 
!= '' ) {
+   if ( $this->getTitle()->hasFragment() ) {
$outputPage->addInlineScript( 
Xml::encodeJsCall(
'redirectToFragment', array( 
$this->getTitle()->getFragmentForURL() )
) );
diff --git a/includes/FakeTitle.php b/includes/FakeTitle.php
index efa213f..4aa15bf 100644
--- a/includes/FakeTitle.php
+++ b/includes/FakeTitle.php
@@ -39,6 +39,7 @@
function canTalk() { $this->error(); }
function getInterwiki() { $this->error(); }
function getFragment() { $this->error(); }
+   function hasFragment() { $this->error(); }
function getFragmentForURL() { $this->error(); }
function getDefaultNamespace() { $this->error(); }
function getIndexTitle() { $this->error(); }
diff --git a/includes/Linker.php b/includes/Linker.php
index 27f8ab4..db0063b 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -387,7 +387,7 @@
 
// If the target is just a fragment, with no title, we return 
the fragment
// text.  Otherwise, we return the title text itself.
-   if ( $target->getPrefixedText() === '' && 
$target->getFragment() !== '' ) {
+   if ( $target->getPrefixedText() === '' && 
$target->hasFragment() ) {
return htmlspecialchars( $target->getFragment() );
}
return htmlspecialchars( $target->getPrefixedText() );
diff --git a/includes/Title.php b/includes/Title.php
index 5ab9e94..62d74d3 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -1201,14 +1201,24 @@
}
 
/**
+* Check if a Title fragment is set
+*
+* @return bool
+* @since 1.23
+*/
+   public function hasFragment() {
+   return $this->mFragment != '';
+   }
+
+   /**
 * Get the fragment in URL form, including the "#" character if there 
is one
 * @return String Fragment in URL form
 */
public function getFragmentForURL() {
-   if ( $this->mFragment == '' ) {
+   if ( !$this->hasFragment() ) {
return '';
} else {
-   return '#' . Title::escapeFragmentForURL( 
$this->mFragment );
+   return '#' . Title::escapeFragmentForURL( 
$this->getFragment() );
}
}
 
@@ -1291,8 +1301,8 @@
 */
public function getFullText() {
$text = $this->getPrefixedText();
-   if ( $this->mFragment != '' ) {
-   $text .= '#' . $this->mFragment;
+   if ( $this->hasFragment() ) {
+   $text .= '#' . $this->getFragment();
}
return $text;
}
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index e95e680..a25c445 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -387,7 +387,7 @@
'from' => strval( $titleStrFrom ),
'to' => $titleTo->getPrefixedText(),
);
-   if ( $titleTo->getFragment() !== '' ) {
+   if ( $titleTo->hasFragment() ) {
$r['tofragment'] = $titleTo->getFragment();
}
$values[] = $r;
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index ca27112..f6bd9d8 100644
--

[MediaWiki-commits] [Gerrit] Try to make sure env and old documents are freed early - change (mediawiki...parsoid)

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

Change subject: Try to make sure env and old documents are freed early
..


Try to make sure env and old documents are freed early

Based on heap dumps and memcheck diffs, I tried to make sure that the
environment and all data it hangs onto (such as page.dom) are freed as early
as possible, even if the HTTP connection is still in a lingering state. Also:

* changed some document callbacks from on('document',..) to .once to break the
  link as early as possible for faster GC

* removed old ci entry points in web service

* removed old caching code in tokenizer

Change-Id: Ic929b054441c786fa4d3fc0f0f9c74e2182471e6
---
M api/ParserService.js
M lib/mediawiki.Util.js
M lib/mediawiki.tokenizer.peg.js
3 files changed, 23 insertions(+), 101 deletions(-)

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



diff --git a/api/ParserService.js b/api/ParserService.js
index e6b2826..2103962 100644
--- a/api/ParserService.js
+++ b/api/ParserService.js
@@ -20,6 +20,7 @@
 // global includes
 var express = require('express'),
domino = require('domino'),
+   // memwatch = require('memwatch'),
jsDiff = require('diff'),
childProc = require('child_process'),
spawn = childProc.spawn,
@@ -594,6 +595,7 @@
 
 function html2wt( req, res, html ) {
var env = res.locals.env;
+   res.locals.env = {};
env.page.id = req.body.oldid || null;
 
var html2wtCb = function () {
@@ -601,8 +603,9 @@
try {
doc = DU.parseHTML( html.replace( /\r/g, '' ) );
} catch ( e ) {
-   console.log( 'There was an error in the HTML5 parser! 
Sending it back to the editor.' );
+   console.log( 'There was an error in the HTML5 parser!' 
);
env.errCB( e );
+   res.end();
return;
}
 
@@ -616,9 +619,11 @@
res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
res.end( out.join( '' ) );
+   res.locals = {};
} );
} catch ( e ) {
env.errCB( e );
+   res.end();
}
};
 
@@ -640,11 +645,12 @@
 
 function wt2html( req, res, wt ) {
var env = res.locals.env;
+   res.locals.env = {};
var prefix = res.locals.iwp;
var target = env.resolveTitle( env.normalizeTitle( env.page.name ), '' 
);
 
-   // Set the timeout to 900 seconds..
-   req.connection.setTimeout( 900 * 1000 );
+   // Set the timeout to 600 seconds..
+   req.connection.setTimeout( 600 * 1000 );
 
console.log( 'starting parsing of ' + prefix + ':' + target );
 
@@ -666,7 +672,7 @@
}
 
var parser = Util.getParserPipeline( env, 
'text/x-mediawiki/full' );
-   parser.on( 'document', function ( document ) {
+   parser.once( 'document', function ( document ) {
// Don't cache requests when wt is set in case somebody 
uses
// GET for wikitext parsing
res.setHeader( 'Cache-Control', 
'private,no-cache,s-maxage=0' );
@@ -686,6 +692,7 @@
parser.processToplevelDoc( wt );
} catch ( e ) {
env.errCB( e, true );
+   res.end();
return;
}
};
@@ -713,6 +720,7 @@
tmpCb = function ( err, src_and_metadata ) {
if ( err ) {
env.errCB( err, true );
+   res.end();
return;
}
 
@@ -764,45 +772,6 @@
}
 });
 
-
-/**
- * Continuous integration end points
- *
- * No longer used currently, as our testing now happens on the central Jenkins
- * server.
- */
-app.get( /\/_ci\/refs\/changes\/(\d+)\/(\d+)\/(\d+)/, function ( req, res ) {
-   var gerritChange = 'refs/changes/' + req.params[0] + '/' + 
req.params[1] + '/' + req.params[2];
-   var testSh = spawn( './testGerritChange.sh', [ gerritChange ], {
-   cwd: '.'
-   } );
-
-   res.setHeader('Content-Type', 'text/xml; charset=UTF-8');
-
-   testSh.stdout.on( 'data', function ( data ) {
-   res.write( data );
-   } );
-
-   testSh.on( 'exit', function () {
-   res.end( '' );
-   } );
-} );
-
-app.get( /\/_ci\/master/, fun

[MediaWiki-commits] [Gerrit] Prevent preview and editor being shown at the same time - change (mediawiki...MobileFrontend)

2013-12-31 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Prevent preview and editor being shown at the same time
..

Prevent preview and editor being shown at the same time

Bug: 58945
Change-Id: I7b2510f252c990779205db63b49caaa2cb92be1d
---
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/editorNew/EditorOverlay.js
M tests/javascripts/modules/editor/test_EditorApi.js
4 files changed, 60 insertions(+), 64 deletions(-)


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

diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index a400626..5a18714 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -151,6 +151,37 @@
this.getToken().done( saveContent ).fail( $.proxy( 
result, 'reject' ) );
 
return result;
+   },
+
+   getPreview: function( options ) {
+   var result = $.Deferred();
+
+   $.extend( options, {
+   action: 'parse',
+   // Enable section preview mode to avoid errors 
(bug 49218)
+   sectionpreview: true,
+   // needed for pre-save transform to work (bug 
53692)
+   pst: true,
+   // Output mobile HTML (bug 54243)
+   mobileformat: true,
+   title: this.title,
+   prop: 'text'
+   } );
+
+   this.post( options ).done( function( resp ) {
+   if ( resp && resp.parse && resp.parse.text ) {
+   // FIXME: hacky
+   var $tmp = $( '' ).html( 
resp.parse.text['*'] );
+   // remove heading from the parsed output
+   $tmp.find( 'h1, h2' ).eq( 0 ).remove();
+
+   result.resolve( $tmp.html() );
+   } else {
+   result.reject();
+   }
+   } ).fail( $.proxy( result, 'reject' ) );
+
+   return result;
}
} );
 
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index efaf5bf..e4615c6 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -5,7 +5,6 @@
Page = M.require( 'Page' ),
schema = M.require( 'loggingSchemas/mobileWebEditing' ),
popup = M.require( 'toast' ),
-   api = M.require( 'api' ),
inBetaOrAlpha = M.isBetaGroupMember(),
inCampaign = M.query.campaign ? true : false,
inKeepGoingCampaign = M.query.campaign === 'mobile-keepgoing',
@@ -107,18 +106,7 @@
},
 
_showPreview: function() {
-   var self = this, params = {
-   action: 'parse',
-   // Enable section preview mode to avoid errors 
(bug 49218)
-   sectionpreview: true,
-   // needed for pre-save transform to work (bug 
53692)
-   pst: true,
-   // Output mobile HTML (bug 54243)
-   mobileformat: true,
-   title: self.options.title,
-   text: self.$content.val(),
-   prop: 'text'
-   };
+   var self = this, params = { text: this.$content.val() };
 
// log save button click
this.log( 'save' );
@@ -138,34 +126,16 @@
if ( mw.config.get( 'wgIsMainPage' ) ) {
params.mainpage = 1; // Setting it to 0 will 
have the same effect
}
-   api.post( params ).then( function( resp ) {
-   var html;
-   if ( resp && resp.parse && resp.parse.text ) {
-   html = resp.parse.text['*'];
-   return $.Deferred().resolve( html );
-   } else {
-   return $.Deferred().reject();
-   }
-   } ).done( function( parsedText ) {
-   

[MediaWiki-commits] [Gerrit] Leak less memory in forceSearchIndex.php - change (mediawiki...CirrusSearch)

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

Change subject: Leak less memory in forceSearchIndex.php
..


Leak less memory in forceSearchIndex.php

On my test wiki with 6461 pages (yeah, not many) this uses ~25% less memory.
I'm sure this isn't all the leaks, but it was a pretty simple one to fix.

Also, fix some missing use statements on maintenance scripts.

Bug:  59164
Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
---
M includes/ReindexForkController.php
M maintenance/forceSearchIndex.php
M maintenance/updateOneSearchIndexConfig.php
3 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/includes/ReindexForkController.php 
b/includes/ReindexForkController.php
index 2279f5b..9f2ecaa 100644
--- a/includes/ReindexForkController.php
+++ b/includes/ReindexForkController.php
@@ -1,6 +1,7 @@
 clear();
wfProfileOut( __METHOD__ . '::decodeResults' );
wfProfileOut( __METHOD__ );
return $result;
diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 3092360..a94cc35 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/104745
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix another missing use statement - change (mediawiki...CirrusSearch)

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

Change subject: Fix another missing use statement
..


Fix another missing use statement

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

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



diff --git a/includes/Updater.php b/includes/Updater.php
index 6f5b350..1e62872 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/104746
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id88c17efa22bad06b8a8d51ad8f6ce1b21f91081
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles 
Gerrit-Reviewer: Chad 
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 job for labs/toollabs - change (integration/jenkins-job-builder-config)

2013-12-31 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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


Change subject: Add job for labs/toollabs
..

Add job for labs/toollabs

Change-Id: I784a96b6da6620e39e97831c275781cfb19a892c
---
M labs.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/labs.yaml b/labs.yaml
index 1549fb2..553a00c 100644
--- a/labs.yaml
+++ b/labs.yaml
@@ -11,6 +11,11 @@
  - python-jobs
 
 - project:
+name: 'labs-toollabs'
+jobs:
+ - '{name}-debian-glue'
+
+- project:
 name: 'labs-tools-grrrit'
 jobs:
  - '{name}-jslint'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I784a96b6da6620e39e97831c275781cfb19a892c
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] Add job for labs/toollabs - change (integration/zuul-config)

2013-12-31 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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


Change subject: Add job for labs/toollabs
..

Add job for labs/toollabs

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


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

diff --git a/layout.yaml b/layout.yaml
index 2d44461..441fe05 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -820,6 +820,10 @@
   - name: 'python-lint'
 prefix: 'labs-nagios-builder'
 
+  - name: labs/toollabs
+test:
+ - labs-toollabs-debian-glue
+
   - name: labs/tools/grrrit
 check-voter:
  - labs-tools-grrrit-jslint

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9da6ea332b0854a5cc0f9c516129d060637dad86
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] Add ParsoidConfig option fetchWT to fetch original wikitext ... - change (mediawiki...parsoid)

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

Change subject: Add ParsoidConfig option fetchWT to fetch original wikitext 
before html2wt
..


Add ParsoidConfig option fetchWT to fetch original wikitext before html2wt

This is to reduce the number of unnecessary semantic differences shown
in round-trip testing.

Change-Id: Iba29fbc4ae98ffe4c88e77d11e01176b0fbb0e56
---
M api/ParserService.js
M lib/mediawiki.ParsoidConfig.js
M tests/test.localsettings.js
3 files changed, 48 insertions(+), 21 deletions(-)

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



diff --git a/api/ParserService.js b/api/ParserService.js
index 682de3b..e6b2826 100644
--- a/api/ParserService.js
+++ b/api/ParserService.js
@@ -596,28 +596,45 @@
var env = res.locals.env;
env.page.id = req.body.oldid || null;
 
-   var doc;
-   try {
-   doc = DU.parseHTML( html.replace( /\r/g, '' ) );
-   } catch ( e ) {
-   console.log( 'There was an error in the HTML5 parser! Sending 
it back to the editor.' );
-   env.errCB( e );
-   return;
-   }
+   var html2wtCb = function () {
+   var doc;
+   try {
+   doc = DU.parseHTML( html.replace( /\r/g, '' ) );
+   } catch ( e ) {
+   console.log( 'There was an error in the HTML5 parser! 
Sending it back to the editor.' );
+   env.errCB( e );
+   return;
+   }
 
-   try {
-   var out = [];
-   new Serializer( { env: env, oldid: env.page.id } ).serializeDOM(
-   doc.body,
-   function ( chunk ) {
-   out.push( chunk );
-   }, function () {
-   res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
-   res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
-   res.end( out.join( '' ) );
-   } );
-   } catch ( e ) {
-   env.errCB( e );
+   try {
+   var out = [];
+   new Serializer( { env: env, oldid: env.page.id } 
).serializeDOM(
+   doc.body,
+   function ( chunk ) {
+   out.push( chunk );
+   }, function () {
+   res.setHeader( 'Content-Type', 
'text/x-mediawiki; charset=UTF-8' );
+   res.setHeader( 'X-Parsoid-Performance', 
env.getPerformanceHeader() );
+   res.end( out.join( '' ) );
+   } );
+   } catch ( e ) {
+   env.errCB( e );
+   }
+   };
+
+   if ( env.conf.parsoid.fetchWT ) {
+   var target = env.resolveTitle( env.normalizeTitle( 
env.page.name ), '' );
+   var tpr = new TemplateRequest( env, target, env.page.id );
+   tpr.once( 'src', function ( err, src_and_metadata ) {
+   if ( err ) {
+   console.log( 'There was an error fetching the 
original wikitext for', target );
+   } else {
+   env.setPageSrcInfo( src_and_metadata );
+   }
+   html2wtCb();
+   } );
+   } else {
+   html2wtCb();
}
 }
 
diff --git a/lib/mediawiki.ParsoidConfig.js b/lib/mediawiki.ParsoidConfig.js
index cd89874..80c583e 100644
--- a/lib/mediawiki.ParsoidConfig.js
+++ b/lib/mediawiki.ParsoidConfig.js
@@ -171,6 +171,13 @@
  */
 ParsoidConfig.prototype.storeDataParsoid = false;
 
+/**
+ * @property {boolean} fetchWT
+ * When transforming from html to wt, fetch the original wikitext before.
+ * Intended for use in round-trip testing.
+ */
+ ParsoidConfig.prototype.fetchWT = false;
+
 if (typeof module === "object") {
module.exports.ParsoidConfig = ParsoidConfig;
 }
diff --git a/tests/test.localsettings.js b/tests/test.localsettings.js
index 9a1c71f..b5e173a 100644
--- a/tests/test.localsettings.js
+++ b/tests/test.localsettings.js
@@ -21,4 +21,7 @@
 
// Set editMode to false for round-trip testing
parsoidConfig.editMode = false;
+
+   // Fetch the wikitext for a page before doing html2wt
+   parsoidConfig.fetchWT = true;
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba29fbc4ae98ffe4c88e77d11e01176b0fbb0e56
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil 
Gerrit-Reviewer: Marcoil 

[MediaWiki-commits] [Gerrit] Fix another missing use statement - change (mediawiki...CirrusSearch)

2013-12-31 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Fix another missing use statement
..

Fix another missing use statement

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/46/104746/1

diff --git a/includes/Updater.php b/includes/Updater.php
index 6f5b350..1e62872 100644
--- a/includes/Updater.php
+++ b/includes/Updater.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/104746
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id88c17efa22bad06b8a8d51ad8f6ce1b21f91081
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles 

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


[MediaWiki-commits] [Gerrit] Leak less memory in forceSearchIndex.php - change (mediawiki...CirrusSearch)

2013-12-31 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Leak less memory in forceSearchIndex.php
..

Leak less memory in forceSearchIndex.php

On my test wiki with 6461 pages (yeah, not many) this uses ~25% less memory.
I'm sure this isn't all the leaks, but it was a pretty simple one to fix.

Also, fix some missing use statements on maintenance scripts.

Bug:  59164
Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
---
M includes/ReindexForkController.php
M maintenance/forceSearchIndex.php
M maintenance/updateOneSearchIndexConfig.php
3 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/includes/ReindexForkController.php 
b/includes/ReindexForkController.php
index 2279f5b..9f2ecaa 100644
--- a/includes/ReindexForkController.php
+++ b/includes/ReindexForkController.php
@@ -1,6 +1,7 @@
 clear();
wfProfileOut( __METHOD__ . '::decodeResults' );
wfProfileOut( __METHOD__ );
return $result;
diff --git a/maintenance/updateOneSearchIndexConfig.php 
b/maintenance/updateOneSearchIndexConfig.php
index 3092360..a94cc35 100644
--- a/maintenance/updateOneSearchIndexConfig.php
+++ b/maintenance/updateOneSearchIndexConfig.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/104745
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1eae0f32dc0e4288818548218facac8a18d60732
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles 

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


[MediaWiki-commits] [Gerrit] A few fixes and reverts for the last change - change (mediawiki...ExternalData)

2013-12-31 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: A few fixes and reverts for the last change
..


A few fixes and reverts for the last change

Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 15 insertions(+), 15 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index 550cbcc..c8e09f8 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -265,9 +265,9 @@
 * Render the #external_value parser function
 */
static function doExternalValue( &$parser, $local_var = '' ) {
-   global $edgValues, $edgSuppressNoLocalVarMsg;
+   global $edgValues;
if ( ! array_key_exists( $local_var, $edgValues ) ) {
-   return $edgSuppressNoLocalVarMsg ? '' : "Error: no 
local variable \"$local_var\" was set.";
+   return "Error: no local variable \"$local_var\" was 
set.";
} elseif ( is_array( $edgValues[$local_var] ) ) {
return $edgValues[$local_var][0];
} else {
diff --git a/ED_Utils.php b/ED_Utils.php
index 5cc28ec..5bf569e 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -288,16 +288,16 @@
static function getMongoDBData( $db_server, $db_username, $db_password, 
$db_name, $from, $columns, $where, $sqlOptions, $otherParams ) {
global $wgMainCacheType, $wgMemc, $edgMemCachedMongoDBSeconds;
 
-// use MEMCACHED if configured to cache mongodb queries
-if ($wgMainCacheType === CACHE_MEMCACHED  && 
$edgMemCachedMongoDBSeconds > 0) {
-   // check if cache entry exists
-   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
-   $values = $wgMemc->get( $mckey );
+   // Use MEMCACHED if configured to cache mongodb queries.
+   if ($wgMainCacheType === CACHE_MEMCACHED && 
$edgMemCachedMongoDBSeconds > 0) {
+   // Check if cache entry exists.
+   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
+   $values = $wgMemc->get( $mckey );
 
-   if ($values !== false) {
-   return $values;
-   }
-}
+   if ($values !== false) {
+   return $values;
+   }
+   }
 
// MongoDB login is done using a single string.
// When specifying extra connect string options (e.g. 
replicasets,timeout, etc.),
@@ -325,9 +325,9 @@
$db = $m->selectDB( $db_name );
 
// Check if collection exists
-   if ($db->system->namespaces->findOne(array('name'=>$db_name . 
"." . $from)) === null){
-return wfMessage( "externaldata-db-unknown-collection:")->text() . 
 $db_name . "." . $from;
-}
+   if ( $db->system->namespaces->findOne( array( 'name'=>$db_name 
. "." . $from ) ) === null ){
+   return wfMessage( 
"externaldata-db-unknown-collection:")->text() . $db_name . "." . $from;
+   }
 
$collection = new MongoCollection( $db, $from );
 
@@ -447,7 +447,7 @@
}
 
if ($wgMainCacheType === CACHE_MEMCACHED && 
$edgMemCachedMongoDBSeconds > 0 ) {
-   $wgMemc->set( $mckey, $values, 
$edgMemCachedMongoDBSeconds ); 
+   $wgMemc->set( $mckey, $values, 
$edgMemCachedMongoDBSeconds );
}
 
return $values;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExternalData
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] A few fixes and reverts for the last change - change (mediawiki...ExternalData)

2013-12-31 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: A few fixes and reverts for the last change
..

A few fixes and reverts for the last change

Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 15 insertions(+), 15 deletions(-)


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

diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index 550cbcc..c8e09f8 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -265,9 +265,9 @@
 * Render the #external_value parser function
 */
static function doExternalValue( &$parser, $local_var = '' ) {
-   global $edgValues, $edgSuppressNoLocalVarMsg;
+   global $edgValues;
if ( ! array_key_exists( $local_var, $edgValues ) ) {
-   return $edgSuppressNoLocalVarMsg ? '' : "Error: no 
local variable \"$local_var\" was set.";
+   return "Error: no local variable \"$local_var\" was 
set.";
} elseif ( is_array( $edgValues[$local_var] ) ) {
return $edgValues[$local_var][0];
} else {
diff --git a/ED_Utils.php b/ED_Utils.php
index 5cc28ec..5bf569e 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -288,16 +288,16 @@
static function getMongoDBData( $db_server, $db_username, $db_password, 
$db_name, $from, $columns, $where, $sqlOptions, $otherParams ) {
global $wgMainCacheType, $wgMemc, $edgMemCachedMongoDBSeconds;
 
-// use MEMCACHED if configured to cache mongodb queries
-if ($wgMainCacheType === CACHE_MEMCACHED  && 
$edgMemCachedMongoDBSeconds > 0) {
-   // check if cache entry exists
-   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
-   $values = $wgMemc->get( $mckey );
+   // Use MEMCACHED if configured to cache mongodb queries.
+   if ($wgMainCacheType === CACHE_MEMCACHED && 
$edgMemCachedMongoDBSeconds > 0) {
+   // Check if cache entry exists.
+   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
+   $values = $wgMemc->get( $mckey );
 
-   if ($values !== false) {
-   return $values;
-   }
-}
+   if ($values !== false) {
+   return $values;
+   }
+   }
 
// MongoDB login is done using a single string.
// When specifying extra connect string options (e.g. 
replicasets,timeout, etc.),
@@ -325,9 +325,9 @@
$db = $m->selectDB( $db_name );
 
// Check if collection exists
-   if ($db->system->namespaces->findOne(array('name'=>$db_name . 
"." . $from)) === null){
-return wfMessage( "externaldata-db-unknown-collection:")->text() . 
 $db_name . "." . $from;
-}
+   if ( $db->system->namespaces->findOne( array( 'name'=>$db_name 
. "." . $from ) ) === null ){
+   return wfMessage( 
"externaldata-db-unknown-collection:")->text() . $db_name . "." . $from;
+   }
 
$collection = new MongoCollection( $db, $from );
 
@@ -447,7 +447,7 @@
}
 
if ($wgMainCacheType === CACHE_MEMCACHED && 
$edgMemCachedMongoDBSeconds > 0 ) {
-   $wgMemc->set( $mckey, $values, 
$edgMemCachedMongoDBSeconds ); 
+   $wgMemc->set( $mckey, $values, 
$edgMemCachedMongoDBSeconds );
}
 
return $values;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I563037f23b58f898d8c4bbcdd6a26fd713934aa0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExternalData
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] added $edgSuppressNoLocalVarMsg flag; added MongoDB memcache... - change (mediawiki...ExternalData)

2013-12-31 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: added $edgSuppressNoLocalVarMsg flag; added MongoDB memcached 
support; removed deprecated MongoDB slaveOkay flag; refactored collection 
exists logic; added isset check to suppress PHP Notice in apache error log
..


added $edgSuppressNoLocalVarMsg flag; added MongoDB memcached support; removed 
deprecated MongoDB slaveOkay flag; refactored
collection exists logic; added isset check to suppress PHP Notice in apache 
error log

Change-Id: I14f019c5cec113ba2950d393e50b6df0957435ac
---
M ED_ParserFunctions.php
M ED_Utils.php
2 files changed, 25 insertions(+), 18 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved



diff --git a/ED_ParserFunctions.php b/ED_ParserFunctions.php
index c8e09f8..550cbcc 100644
--- a/ED_ParserFunctions.php
+++ b/ED_ParserFunctions.php
@@ -265,9 +265,9 @@
 * Render the #external_value parser function
 */
static function doExternalValue( &$parser, $local_var = '' ) {
-   global $edgValues;
+   global $edgValues, $edgSuppressNoLocalVarMsg;
if ( ! array_key_exists( $local_var, $edgValues ) ) {
-   return "Error: no local variable \"$local_var\" was 
set.";
+   return $edgSuppressNoLocalVarMsg ? '' : "Error: no 
local variable \"$local_var\" was set.";
} elseif ( is_array( $edgValues[$local_var] ) ) {
return $edgValues[$local_var][0];
} else {
diff --git a/ED_Utils.php b/ED_Utils.php
index 7fc0944..5cc28ec 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -286,6 +286,19 @@
 * MongoDB.
 */
static function getMongoDBData( $db_server, $db_username, $db_password, 
$db_name, $from, $columns, $where, $sqlOptions, $otherParams ) {
+   global $wgMainCacheType, $wgMemc, $edgMemCachedMongoDBSeconds;
+
+// use MEMCACHED if configured to cache mongodb queries
+if ($wgMainCacheType === CACHE_MEMCACHED  && 
$edgMemCachedMongoDBSeconds > 0) {
+   // check if cache entry exists
+   $mckey = wfMemcKey( 'mongodb', $from, 
md5(json_encode($otherParams) . json_encode($columns) . $where . 
json_encode($sqlOptions) . $db_name . $db_server));
+   $values = $wgMemc->get( $mckey );
+
+   if ($values !== false) {
+   return $values;
+   }
+}
+
// MongoDB login is done using a single string.
// When specifying extra connect string options (e.g. 
replicasets,timeout, etc.),
// use $db_server to pass these values
@@ -308,23 +321,13 @@
} catch ( Exception $e ) {
return wfMessage( "externaldata-db-could-not-connect" 
)->text();
}
-   // If working against a MongoDB replica set, it's OK to go to
-   // secondary/slaves should the primary go down.
-   MongoCursor::$slaveOkay = true;
 
$db = $m->selectDB( $db_name );
 
-   // MongoDB doesn't seem to have a way to check whether either
-   // a database or a collection exists, so instead we'll use
-   // getCollectionNames() to check for both.
-   $collectionNames = $db->getCollectionNames();
-   if ( count( $collectionNames ) == 0 ) {
-   return wfMessage( "externaldata-db-could-not-connect" 
)->text();
-   }
-
-   if ( !in_array( $from, $collectionNames ) ) {
-   return wfMessage( "externaldata-db-unknown-collection" 
)->text();
-   }
+   // Check if collection exists
+   if ($db->system->namespaces->findOne(array('name'=>$db_name . 
"." . $from)) === null){
+return wfMessage( "externaldata-db-unknown-collection:")->text() . 
 $db_name . "." . $from;
+}
 
$collection = new MongoCollection( $db, $from );
 
@@ -416,7 +419,7 @@
// specified using dots (e.g., "a.b.c"),
// get the value that way.
$values[$column][] = 
self::getValueFromJSONArray( $doc, $column );
-   } elseif ( is_array( $doc[$column] ) ) {
+   } elseif ( isset( $doc[$column] ) && is_array( 
$doc[$column] ) ) {
// If MongoDB returns an array for a 
column,
// but the exact location of the value 
wasn't specified,
// do some extra processing.
@@ -438,11 +441,15 @@
}
} else {
// It's a simple literal.
- 

[MediaWiki-commits] [Gerrit] retab certs.pp - change (operations/puppet)

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

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


Change subject: retab certs.pp
..

retab certs.pp

No code change, simply changed spaces to tabs at beginning of lines.

Change-Id: Ifd5c8cb6cfc46826796908bfb9e794a7fe62d06f
---
M manifests/certs.pp
1 file changed, 198 insertions(+), 198 deletions(-)


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

diff --git a/manifests/certs.pp b/manifests/certs.pp
index bfd37d4..6a0f646 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,270 +1,270 @@
 define create_pkcs12( $certname="$name", $cert_alias="", $password="", 
$user="root", $group="ssl-cert", $location="/etc/ssl/private" ) {
 
-   include passwords::certs
+include passwords::certs
 
-   if ( $cert_alias == "" ) {
-   $certalias = $certname
-   } else {
-   $certalias = $cert_alias
-   }
+if ( $cert_alias == "" ) {
+$certalias = $certname
+} else {
+$certalias = $cert_alias
+}
 
-   if ( $password == "" ) {
-   $defaultpassword = $passwords::certs::certs_default_pass
-   } else {
-   $defaultpassword = $password
-   }
+if ( $password == "" ) {
+$defaultpassword = $passwords::certs::certs_default_pass
+} else {
+$defaultpassword = $password
+}
 
-   exec {
-   # pkcs12 file, used by things like opendj, nss, and tomcat
-   "${name}_create_pkcs12":
-   creates => "${location}/${certname}.p12",
-   command => "/usr/bin/openssl pkcs12 -export -name 
\"${certalias}\" -passout pass:${defaultpassword} -in 
/etc/ssl/certs/${certname}.pem -inkey /etc/ssl/private/${certname}.key -out 
${location}/${certname}.p12",
-   onlyif  => "/usr/bin/test -s 
/etc/ssl/private/${certname}.key",
-   require => [Package["openssl"], 
File["/etc/ssl/private/${certname}.key", "/etc/ssl/certs/${certname}.pem"]];
-   }
+exec {
+# pkcs12 file, used by things like opendj, nss, and tomcat
+"${name}_create_pkcs12":
+creates => "${location}/${certname}.p12",
+command => "/usr/bin/openssl pkcs12 -export -name \"${certalias}\" 
-passout pass:${defaultpassword} -in /etc/ssl/certs/${certname}.pem -inkey 
/etc/ssl/private/${certname}.key -out ${location}/${certname}.p12",
+onlyif  => "/usr/bin/test -s /etc/ssl/private/${certname}.key",
+require => [Package["openssl"], 
File["/etc/ssl/private/${certname}.key", "/etc/ssl/certs/${certname}.pem"]];
+}
 
-   file {
-   # Fix permissions on the p12 file, and make it available as
-   # a puppet resource
-   "${location}/${certname}.p12":
-   mode => 0440,
-   owner => $user,
-   group => $group,
-   require => Exec["${name}_create_pkcs12"],
-   ensure => file;
-   }
+file {
+# Fix permissions on the p12 file, and make it available as
+# a puppet resource
+"${location}/${certname}.p12":
+mode => 0440,
+owner => $user,
+group => $group,
+require => Exec["${name}_create_pkcs12"],
+ensure => file;
+}
 }
 
 define create_chained_cert( $certname="$name", $ca, $user="root", 
$group="ssl-cert", $location="/etc/ssl/certs" ) {
-   exec {
-   # chained cert, used when needing to provide an entire 
certificate chain to a client
-   "${name}_create_chained_cert":
-   creates => "${location}/${certname}.chained.pem",
-   command => "/bin/cat ${certname}.pem ${ca} > 
${location}/${certname}.chained.pem",
-   cwd => "/etc/ssl/certs",
-   require => [Package["openssl"], 
File["/etc/ssl/certs/${certname}.pem"]];
-   }
+exec {
+# chained cert, used when needing to provide an entire certificate 
chain to a client
+"${name}_create_chained_cert":
+creates => "${location}/${certname}.chained.pem",
+command => "/bin/cat ${certname}.pem ${ca} > 
${location}/${certname}.chained.pem",
+cwd => "/etc/ssl/certs",
+require => [Package["openssl"], 
File["/etc/ssl/certs/${certname}.pem"]];
+}
 
-   file {
-   # Fix permissions on the chained file, and make it available as
-   # a puppet resource
-   "${location}/${certname}.chained.pem":
-   mode => 0444,
-   owner => $user,
-   group => $group,
-   require => Exec["${name}_create_chained_cert"],
-   ensure => file;
-   }
+file {
+# Fix permissions on th

[MediaWiki-commits] [Gerrit] certs.pp puppet lint fixes - change (operations/puppet)

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

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


Change subject: certs.pp puppet lint fixes
..

certs.pp puppet lint fixes

* double quoted string containing no variables
* unquoted file mode
* string containing only a variable
* indentation of => is not properly aligned
* Made statements and titles on the same line, reindenting block
* ensure found on line but it's not the first attribute. Thus add to
  remove trailing semicolon and replace them with commas
* exploded some oneline arrays to have each member on each own line,
  also made sure we have trailing commas for such arrays.

Change-Id: I2e1a13dc497a7d52da729fc5f8b90abf12329dbb
---
M manifests/certs.pp
1 file changed, 158 insertions(+), 155 deletions(-)


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

diff --git a/manifests/certs.pp b/manifests/certs.pp
index 6a0f646..5eb25fe 100644
--- a/manifests/certs.pp
+++ b/manifests/certs.pp
@@ -1,188 +1,199 @@
-define create_pkcs12( $certname="$name", $cert_alias="", $password="", 
$user="root", $group="ssl-cert", $location="/etc/ssl/private" ) {
+define create_pkcs12( $certname=$name, $cert_alias='', $password='', 
$user='root', $group='ssl-cert', $location='/etc/ssl/private' ) {
 
 include passwords::certs
 
-if ( $cert_alias == "" ) {
+if ( $cert_alias == '' ) {
 $certalias = $certname
 } else {
 $certalias = $cert_alias
 }
 
-if ( $password == "" ) {
+if ( $password == '' ) {
 $defaultpassword = $passwords::certs::certs_default_pass
 } else {
 $defaultpassword = $password
 }
 
-exec {
-# pkcs12 file, used by things like opendj, nss, and tomcat
-"${name}_create_pkcs12":
-creates => "${location}/${certname}.p12",
-command => "/usr/bin/openssl pkcs12 -export -name \"${certalias}\" 
-passout pass:${defaultpassword} -in /etc/ssl/certs/${certname}.pem -inkey 
/etc/ssl/private/${certname}.key -out ${location}/${certname}.p12",
-onlyif  => "/usr/bin/test -s /etc/ssl/private/${certname}.key",
-require => [Package["openssl"], 
File["/etc/ssl/private/${certname}.key", "/etc/ssl/certs/${certname}.pem"]];
+# pkcs12 file, used by things like opendj, nss, and tomcat
+exec { "${name}_create_pkcs12":
+creates => "${location}/${certname}.p12",
+command => "/usr/bin/openssl pkcs12 -export -name \"${certalias}\" 
-passout pass:${defaultpassword} -in /etc/ssl/certs/${certname}.pem -inkey 
/etc/ssl/private/${certname}.key -out ${location}/${certname}.p12",
+onlyif  => "/usr/bin/test -s /etc/ssl/private/${certname}.key",
+require => [
+Package['openssl'],
+File["/etc/ssl/private/${certname}.key"],
+File["/etc/ssl/certs/${certname}.pem"],
+],
 }
 
-file {
-# Fix permissions on the p12 file, and make it available as
-# a puppet resource
-"${location}/${certname}.p12":
-mode => 0440,
-owner => $user,
-group => $group,
-require => Exec["${name}_create_pkcs12"],
-ensure => file;
+# Fix permissions on the p12 file, and make it available as
+# a puppet resource
+file { "${location}/${certname}.p12":
+ensure  => file,
+mode=> '0440',
+owner   => $user,
+group   => $group,
+require => Exec["${name}_create_pkcs12"],
 }
 }
 
-define create_chained_cert( $certname="$name", $ca, $user="root", 
$group="ssl-cert", $location="/etc/ssl/certs" ) {
-exec {
-# chained cert, used when needing to provide an entire certificate 
chain to a client
-"${name}_create_chained_cert":
-creates => "${location}/${certname}.chained.pem",
-command => "/bin/cat ${certname}.pem ${ca} > 
${location}/${certname}.chained.pem",
-cwd => "/etc/ssl/certs",
-require => [Package["openssl"], 
File["/etc/ssl/certs/${certname}.pem"]];
+define create_chained_cert( $certname=$name, $ca, $user='root', 
$group='ssl-cert', $location='/etc/ssl/certs' ) {
+# chained cert, used when needing to provide an entire certificate chain to
+# a client.
+exec { "${name}_create_chained_cert":
+creates => "${location}/${certname}.chained.pem",
+command => "/bin/cat ${certname}.pem ${ca} > 
${location}/${certname}.chained.pem",
+cwd => '/etc/ssl/certs',
+require => [
+Package['openssl'],
+File["/etc/ssl/certs/${certname}.pem"],
+],
 }
 
-file {
-# Fix permissions on the chained file, and make it available as
-# a puppet resource
-"${location}/${certname}.chained.pem":
-mode => 0444,
-owner => $user,
-group => $group,
-require => Exec["${name}_create_chained_c

[MediaWiki-commits] [Gerrit] Don't run this test until Bug 59135 is sorted - change (qa/browsertests)

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

Change subject: Don't run this test until Bug 59135 is sorted
..


Don't run this test until Bug 59135 is sorted

Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
---
M features/search.feature
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/features/search.feature b/features/search.feature
index d1e0a47..8bb638c 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -9,7 +9,7 @@
 # qa-browsertests top-level directory and at
 # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
 #
-@en.wikipedia.beta.wmflabs.org @test2.wikipedia.org
+
 Feature: Search
 
   Scenario: Search suggestions

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] beta: gwtoolset filebackend - change (operations/mediawiki-config)

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

Change subject: beta: gwtoolset filebackend
..


beta: gwtoolset filebackend

the filebackend reference was accidentally deleted in 
https://gerrit.wikimedia.org/r/#/c/102510.

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

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 08851f2..46d33e9 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -61,6 +61,11 @@
);
 }
 
+// the beta cluster uses a different filebackend than production
+if ( $wmgUseGWToolset ) {
+   $wgGWTFileBackend = 'gwtoolset-backend';
+}
+
 if ( $wmgUseOAuth ) {
$wgMWOAuthCentralWiki = 'labswiki';  # bug 57403
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If770f4897bf44ef2ebdc1c2d93987656896ae2db
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl 
Gerrit-Reviewer: Hashar 
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] production: add gwtoolset to extension-list - change (operations/mediawiki-config)

2013-12-31 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

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


Change subject: production: add gwtoolset to extension-list
..

production: add gwtoolset to extension-list

when Commons was updated to 1.23wmf8 the extension-list reference for GWToolset
was not moved from extension-list-1.23wmf7 into extension-list

i am guessing that by placing the reference in extension-list it is no longer
needed in either extension-list-labs or extension-list-1.23wmf7, so i have
removed the reference from those two files.

Change-Id: If1376178384bc356f9f0697d098118c42384300b
---
M wmf-config/extension-list
M wmf-config/extension-list-1.23wmf7
M wmf-config/extension-list-labs
3 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index f53dbd7..e1fbf39 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -58,6 +58,7 @@
 $IP/extensions/GlobalUsage/GlobalUsage.php
 $IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php
 $IP/extensions/GuidedTour/GuidedTour.php
+$IP/extensions/GWToolset/GWToolset.php
 $IP/extensions/ImageMap/ImageMap.php
 $IP/extensions/InputBox/InputBox.php
 $IP/extensions/Insider/Insider.php
diff --git a/wmf-config/extension-list-1.23wmf7 
b/wmf-config/extension-list-1.23wmf7
index fef7adb..8b13789 100644
--- a/wmf-config/extension-list-1.23wmf7
+++ b/wmf-config/extension-list-1.23wmf7
@@ -1 +1 @@
-$IP/extensions/GWToolset/GWToolset.php
+
diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs
index fef7adb..8b13789 100644
--- a/wmf-config/extension-list-labs
+++ b/wmf-config/extension-list-labs
@@ -1 +1 @@
-$IP/extensions/GWToolset/GWToolset.php
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1376178384bc356f9f0697d098118c42384300b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl 

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


[MediaWiki-commits] [Gerrit] Don't run this test until Bug 59135 is sorted - change (qa/browsertests)

2013-12-31 Thread Cmcmahon (Code Review)
Cmcmahon has uploaded a new change for review.

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


Change subject: Don't run this test until Bug 59135 is sorted
..

Don't run this test until Bug 59135 is sorted

Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
---
M features/search.feature
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/40/104740/1

diff --git a/features/search.feature b/features/search.feature
index d1e0a47..8bb638c 100644
--- a/features/search.feature
+++ b/features/search.feature
@@ -9,7 +9,7 @@
 # qa-browsertests top-level directory and at
 # https://git.wikimedia.org/blob/qa%2Fbrowsertests/HEAD/CREDITS
 #
-@en.wikipedia.beta.wmflabs.org @test2.wikipedia.org
+
 Feature: Search
 
   Scenario: Search suggestions

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic31aa232ff513177898e1f255833e9f9533a
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon 

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


[MediaWiki-commits] [Gerrit] Add kr.wikimedia DNS entry - change (operations/dns)

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

Change subject: Add kr.wikimedia DNS entry
..


Add kr.wikimedia DNS entry

Change-Id: I5ef05e9ab509ffca50165f368c7e37517d27b7f7
---
M templates/wikimedia.org
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jeremyb: Looks good to me, but someone else must approve
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 9b3b228..af802e8 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -553,6 +553,7 @@
 incubator  1H  IN CNAMEwikimedia-lb
 internal   1H  IN CNAMEwikimedia-lb
 it 1H  IN CNAMEwikimedia-lb
+kr 1H  IN CNAMEwikimedia-lb
 langcom1H  IN CNAMEwikimedia-lb
 meta   1H  IN CNAMEwikimedia-lb
 www.meta   1H  IN CNAMEwikimedia-lb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ef05e9ab509ffca50165f368c7e37517d27b7f7
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: John F. Lewis 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Jeremyb 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] beta: gwtoolset filebackend - change (operations/mediawiki-config)

2013-12-31 Thread Dan-nl (Code Review)
Dan-nl has uploaded a new change for review.

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


Change subject: beta: gwtoolset filebackend
..

beta: gwtoolset filebackend

the filebackend reference was accidentally deleted in 
https://gerrit.wikimedia.org/r/#/c/102510.

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


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 08851f2..46d33e9 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -61,6 +61,11 @@
);
 }
 
+// the beta cluster uses a different filebackend than production
+if ( $wmgUseGWToolset ) {
+   $wgGWTFileBackend = 'gwtoolset-backend';
+}
+
 if ( $wmgUseOAuth ) {
$wgMWOAuthCentralWiki = 'labswiki';  # bug 57403
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If770f4897bf44ef2ebdc1c2d93987656896ae2db
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dan-nl 

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


[MediaWiki-commits] [Gerrit] Changed Page.change_category for category_redirect - change (pywikibot/core)

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

Change subject: Changed Page.change_category for category_redirect
..


Changed Page.change_category for category_redirect

Note #1: Page.change_category now returns True or
False instead of always None.
Note #2: The category_redirect version of
change_category saves the page also if it is
not changed. Since MediaWiki automatically
purges pages this is imho not needed. The
original does not do this.
Note #3: This should fix the bug reported in bug 59119

Change-Id: I0dd0c3758b3c6dfa542ddba44fc6139a9b415d3e
---
M pywikibot/page.py
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index f0150cd..6504d10 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1455,6 +1455,7 @@
 
 @param inPlace: if True, change categories in place rather than
   rearranging them.
+@return: True if page was saved changed, otherwise False.
 
 """
 # get list of Category objects the article is in and remove possible
@@ -1472,12 +1473,12 @@
 if not self.canBeEdited():
 pywikibot.output(u"Can't edit %s, skipping it..."
  % self.title(asLink=True))
-return
+return False
 
 if oldCat not in cats:
 pywikibot.error(u'%s is not in category %s!'
 % (self.title(asLink=True), oldCat.title()))
-return
+return False
 
 if inPlace or self.namespace() == 10:
 oldtext = self.get(get_redirect=True)
@@ -1496,10 +1497,12 @@
 # a ValueError is in the case of interwiki links to self.
 pywikibot.output(u'Skipping %s because of interwiki link to '
  u'self' % self.title())
+return False
 
 if oldtext != newtext:
 try:
 self.put(newtext, comment)
+return True
 except pywikibot.EditConflict:
 pywikibot.output(u'Skipping %s because of edit conflict'
  % self.title())
@@ -1515,6 +1518,7 @@
 except pywikibot.PageNotSaved as error:
 pywikibot.output(u'Saving page %s failed: %s'
  % (self.title(asLink=True), error.message))
+return False
 
 @property
 def categoryinfo(self):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0dd0c3758b3c6dfa542ddba44fc6139a9b415d3e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Pyfisch 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] category.py: Replaced catlib except in move bot. - change (pywikibot/core)

2013-12-31 Thread Pyfisch (Code Review)
Pyfisch has uploaded a new change for review.

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


Change subject: category.py: Replaced catlib except in move bot.
..

category.py: Replaced catlib except in move bot.

Removed catlib with other functions.
Used easier syntax without Link class to create
Category objects.

Change-Id: I5360fd4bebeb2d736fb5b86fc6d71a921acbebfb
---
M scripts/category.py
1 file changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/38/104738/1

diff --git a/scripts/category.py b/scripts/category.py
index a72d33a..c90c1e7 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -500,7 +500,7 @@
 self.overwrite = overwrite
 self.showImages = showImages
 self.site = pywikibot.getSite()
-self.cat = catlib.Category(pywikibot.Link('Category:' + catTitle))
+self.cat = pywikibot.Category(self.site, catTitle)
 self.list = pywikibot.Page(self.site, listTitle)
 self.subCats = subCats
 self.talkPages = talkPages
@@ -554,7 +554,7 @@
  pagesonly=False):
 self.editSummary = editSummary
 self.site = pywikibot.getSite()
-self.cat = catlib.Category(pywikibot.Link('Category:' + catTitle))
+self.cat = pywikibot.Category(self.site, catTitle) 
 # get edit summary message
 self.useSummaryForDeletion = useSummaryForDeletion
 self.batchMode = batchMode
@@ -574,8 +574,8 @@
 for article in articles:
 if not self.titleRegex or re.search(self.titleRegex,
 article.title()):
-catlib.change_category(article, self.cat, None,
-   comment=self.editSummary,
+article.change_category(self.cat, None,
+comment=self.editSummary,
inPlace=self.inPlace)
 if self.pagesonly:
 return
@@ -587,9 +587,9 @@
  % self.cat.title())
 else:
 for subcategory in subcategories:
-catlib.change_category(subcategory, self.cat, None,
-   comment=self.editSummary,
-   inPlace=self.inPlace)
+subcategory.change_category(self.cat, None,
+comment=self.editSummary,
+inPlace=self.inPlace)
 # Deletes the category page
 if self.cat.exists() and self.cat.isEmptyCategory():
 if self.useSummaryForDeletion and self.editSummary:
@@ -708,8 +708,8 @@
 if current_cat == original_cat:
 pywikibot.output('No changes necessary.')
 else:
-catlib.change_category(article, original_cat, current_cat,
-   comment=self.editSummary)
+article.change_category(original_cat, current_cat,
+comment=self.editSummary)
 flag = True
 elif choice in ['j', 'J']:
 newCatTitle = pywikibot.input(u'Please enter the category the '
@@ -721,8 +721,8 @@
 flag = True
 elif choice in ['r', 'R']:
 # remove the category tag
-catlib.change_category(article, original_cat, None,
-   comment=self.editSummary)
+article.change_category(original_cat, None,
+comment=self.editSummary)
 flag = True
 elif choice == '?':
 contextLength += 500
@@ -755,7 +755,7 @@
 flag = True
 
 def run(self):
-cat = catlib.Category(pywikibot.Link('Category:' + self.catTitle))
+cat = pywikibot.Category(self.site, self.catTitle)
 
 articles = set(cat.articles())
 if len(articles) == 0:
@@ -847,7 +847,7 @@
 * maxDepth - the limit beyond which no subcategories will be listed
 
 """
-cat = catlib.Category(pywikibot.Link('Category:' + self.catTitle))
+cat = pywikibot.Category(self.site, catTitle)
 tree = self.treeview(cat)
 if self.filename:
 pywikibot.output(u'Saving results in %s' % self.filename)

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

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

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

[MediaWiki-commits] [Gerrit] Reduce comment cache time - change (mediawiki...Comments)

2013-12-31 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Reduce comment cache time
..


Reduce comment cache time

I (we) have found that having a 24 hour cache for NUMBEROFCOMMENTSPAGE can be
too much, as articles are most frequently commented on in the few hours
after their publishing, and so you can end up with very out of date
figures with a 24 hour cache. I've reduced it to 1 hour here, which should
have an almost insignificant effect in performance, while giving much more
up to date stats.

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

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



diff --git a/NumberOfComments.php b/NumberOfComments.php
index 8f2a75b..e43f594 100644
--- a/NumberOfComments.php
+++ b/NumberOfComments.php
@@ -123,7 +123,7 @@
} else {
$val = intval( $res );
}
-   $wgMemc->set( $key, $val, 60 * 60 * 24 ); // cache for 
24 hours
+   $wgMemc->set( $key, $val, 60 * 60 ); // cache for an 
hour
}
return $val;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: UltrasonicNXT 

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


[MediaWiki-commits] [Gerrit] Update formatting of JavaScript files - change (mediawiki...CodeEditor)

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

Change subject: Update formatting of JavaScript files
..


Update formatting of JavaScript files

Change-Id: I7a18b7f76f7c0a064645f23974f1fe09dafc4ca2
---
M modules/ext.codeEditor.geshi.js
M modules/ext.codeEditor.js
M modules/jquery.codeEditor.js
3 files changed, 485 insertions(+), 489 deletions(-)

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



diff --git a/modules/ext.codeEditor.geshi.js b/modules/ext.codeEditor.geshi.js
index cc8681d..6a6e6bd 100644
--- a/modules/ext.codeEditor.geshi.js
+++ b/modules/ext.codeEditor.geshi.js
@@ -4,33 +4,33 @@
  * Needs some code de-dup with the full-page JS/CSS page editing.
  */
 
-$(function() {
-   var $sources = $('.mw-geshi');
-   if ($sources.length > 0) {
-   var setupEditor = function($div) {
-   var $link = $('')
-   .text(mediaWiki.msg('editsection'))
-   .attr('href', '#')
-   .attr('title', 'Edit this code section')
-   .click(function(event) {
-   openEditor($div);
+$( function () {
+   var $sources = $( '.mw-geshi' );
+   if ( $sources.length > 0 ) {
+   var setupEditor = function ( $div ) {
+   var $link = $( '' )
+   .text( mediaWiki.msg( 'editsection' ) )
+   .attr( 'href', '#' )
+   .attr( 'title', 'Edit this code section' )
+   .click( function ( event ) {
+   openEditor( $div );
event.preventDefault();
-   });
-   var $edit = $('')
-   .addClass('mw-editsection')
-   .append('[')
-   .append($link)
-   .append(']');
-   $div.prepend($edit);
+   } );
+   var $edit = $( '' )
+   .addClass( 'mw-editsection' )
+   .append( '[' )
+   .append( $link )
+   .append( ']' );
+   $div.prepend( $edit );
};
-   var openEditor = function($div) {
-   var $main = $div.find('div'),
+   var openEditor = function ( $div ) {
+   var $main = $div.find( 'div' ),
geshiLang = null,
-   matches = /(?:^| 
)source-([a-z0-9_-]+)/.exec($main.attr('class'));
-   if (matches) {
+   matches = /(?:^| )source-([a-z0-9_-]+)/.exec( 
$main.attr( 'class' ) );
+   if ( matches ) {
geshiLang = matches[1];
}
-   mediaWiki.loader.using('ext.codeEditor.ace.modes', 
function() {
+   mediaWiki.loader.using( 'ext.codeEditor.ace.modes', 
function () {
// @fixme de-duplicate
var map = {
c: 'c_cpp',
@@ -55,95 +55,93 @@
scala: 'scala',
xml: 'xml'
};
-   
 
// Disable some annoying commands
-   var canon = require('pilot/canon');
-   canon.removeCommand('replace');  // 
ctrl+R
-   canon.removeCommand('transposeletters'); // 
ctrl+T
-   canon.removeCommand('gotoline'); // 
ctrl+L
+   var canon = require( 'pilot/canon' );
+   canon.removeCommand( 'replace' );  // 
ctrl+R
+   canon.removeCommand( 'transposeletters' ); // 
ctrl+T
+   canon.removeCommand( 'gotoline' ); // 
ctrl+L
 
-   var $container = $('')
-   .attr('style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray')
-   .text($main.text()); // quick hack :D
+   var $container = $( '' )
+   .attr( 'style', 'top: 32px; left: 0px; 
right: 0px; bottom: 0px; border: 1px solid gray' )
+   .text( $main.text() ); // quick hack :D
 
-   var $label = $('').text('Source 
languag

[MediaWiki-commits] [Gerrit] (bug 58140) Multiple moderated topics in a row takes up too ... - change (mediawiki...Flow)

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

Change subject: (bug 58140) Multiple moderated topics in a row takes up too 
much space
..


(bug 58140) Multiple moderated topics in a row takes up too much space

Use collapsed-one-line style for moderated topics

Bug: 58140
Change-Id: I570c47ae5a4b43a9b6292835c0ba783005e29a3e
---
M modules/discussion/styles/collapse.less
A modules/discussion/styles/mixins/collapse.less
M modules/discussion/styles/topic.less
3 files changed, 99 insertions(+), 91 deletions(-)

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



diff --git a/modules/discussion/styles/collapse.less 
b/modules/discussion/styles/collapse.less
index d076b55..3de34fe 100644
--- a/modules/discussion/styles/collapse.less
+++ b/modules/discussion/styles/collapse.less
@@ -1,3 +1,4 @@
+@import 'mixins/collapse.less';
 @import 'mediawiki.mixins.less';
 
 .collapseButtonIcon(@icon-prefix; @dir: '') {
@@ -41,67 +42,13 @@
 }
 
 .flow-container {
-   .flow-topic-posts-meta-minimal {
-   display: none;
-   margin: 0;
+   .flow-collapse-complete;
+
+   &.topic-collapsed-full .flow-topic-closed {
+   .flow-collapse-full;
}
 
&.topic-collapsed-one-line .flow-topic-closed {
-   .flow-titlebar {
-   height: 30px;
-   }
-   .flow-topic-title {
-   overflow: hidden;
-   white-space: nowrap;
-   padding: 0;
-
-   .flow-realtitle {
-   text-overflow: ellipsis;
-   }
-   }
-
-
-   .flow-topic-posts-meta,
-   .flow-datestamp {
-   display: none;
-   }
-
-   .flow-topic-posts-meta-minimal {
-   display: block;
-
-   // position in upper right hand corner
-   position: absolute;
-   right: 22px;
-   top: 15px;
-
-   font-weight: bold;
-   color: #FFF;
-   background-color: #CCC;
-
-   // title height = 30px; this only 22, so add 4px margin 
bottom & top
-   line-height: 22px;
-   height: 22px;
-   margin: 4px 0;
-   padding: 0 10px;
-
-   // this creates the small bottom-right arrow
-   &:after {
-   // :after should have some content in order to 
show up
-   content: '.';
-   text-indent: -px;
-   display: block;
-
-   width: 0;
-   height: 0;
-   border-top: 5px solid transparent;
-   border-left: 5px solid #CCC;
-
-   position: relative;
-   bottom: 5px; // "icon" height - arrow height
-   // calc's are LESS-escaped below because I want 
CSS to do the
-   // calc, not LESS (which incorrectly returns 
110%)
-   left: calc(~"100% + 10px"); // "icon" width + 
"icon" padding-right
-   }
-   }
+   .flow-collapse-one-line;
}
 }
diff --git a/modules/discussion/styles/mixins/collapse.less 
b/modules/discussion/styles/mixins/collapse.less
new file mode 100644
index 000..1e36eb6
--- /dev/null
+++ b/modules/discussion/styles/mixins/collapse.less
@@ -0,0 +1,80 @@
+// complete view is default
+.flow-collapse-complete {
+   .flow-topic-posts-meta-minimal {
+   display: none;
+   margin: 0;
+   }
+}
+
+// medium-collapsed: children not visible, but full topic details
+.flow-collapse-full {
+   // also hide minimal meta info here
+   .flow-collapse-complete;
+
+   .flow-topic-children-container {
+// display: none; // hiding is done in JS, with slideUp effect
+   }
+}
+
+// max-collapsed: children not visible, condensed title
+.flow-collapse-one-line {
+   .flow-titlebar {
+   height: 30px;
+   }
+   .flow-topic-title {
+   overflow: hidden;
+   white-space: nowrap;
+   padding: 0 !important;
+
+   .flow-realtitle {
+   text-overflow: ellipsis;
+   }
+   }
+
+   .flow-topic-posts-meta,
+   .flow-datestamp {
+   display: none;
+   }
+
+   .flow-topic-posts-meta-minimal {
+   display: block;
+
+   // position in upper right hand corner
+   position: absolute;
+

[MediaWiki-commits] [Gerrit] config for 2013.12 - change (translatewiki)

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

Change subject: config for 2013.12
..


config for 2013.12

ULS is at: 760b0f2 (2013-12-31).
Translate is at: 34eee43 (2013-12-31).

Change-Id: Ic7e584e87cf8219f62bae3cbc773e39e3c537880
---
M melange/config.ini
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/melange/config.ini b/melange/config.ini
index 14ffa14..9811807 100644
--- a/melange/config.ini
+++ b/melange/config.ini
@@ -2,8 +2,8 @@
 mediawikirepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/core.git
 extensionrepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/extensions/
 branches=origin/master origin/REL1_21 origin/REL1_20
-releasever=2013.11
-releasever-prev=2013.10
+releasever=2013.12
+releasever-prev=2013.11
 bundlename=MediaWiki language extension bundle
 downloadurl=https://translatewiki.net/mleb
 hasher=sha256sum
@@ -18,8 +18,8 @@
 cldr=origin/master
 CleanChanges=origin/master
 LocalisationUpdate=origin/master
-Translate=715c2da
-UniversalLanguageSelector=78152b9
+Translate=760b0f2
+UniversalLanguageSelector=34eee43
 
 [install]
 dbname=melange

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7e584e87cf8219f62bae3cbc773e39e3c537880
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


  1   2   >