[MediaWiki-commits] [Gerrit] Allow debug params X-CS and X-SUBDOMAIN in URL - change (mediawiki...ZeroRatedMobileAccess)

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

Change subject: Allow debug params X-CS and X-SUBDOMAIN in URL
..


Allow debug params X-CS and X-SUBDOMAIN in URL

* Having X-CS in URL overrides the X-CS header and ignores
the 'enabled' parameter of the zero configuration
* Having X-SUBDOMAIN in URL overrides header with the same name

Change-Id: Ifc869adea24f3b9d27918557ac7fa954e406c7d0
---
M includes/PageRenderingHooks.php
1 file changed, 13 insertions(+), 8 deletions(-)

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



diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index d7e5346..1017af7 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -498,7 +498,8 @@
$config = null;
// Allow URL override of the X-CS parameter for testing purposes
$id = $wgRequest->getVal( 'X-CS' );
-   if ( $id === null ) {
+   $isDebug = $id !== null;
+   if ( !$isDebug ) {
$id = $wgRequest->getHeader( 'X-CS' );
}
if ( $id === '(null)' || !$id ) {
@@ -511,7 +512,7 @@
$conf = new CarrierConfig( $text );
if ( !$conf->isError() ) {
$config = $conf->getData();
-   if ( !self::isZeroEnabled( $config ) ) {
+   if ( !self::isZeroEnabled( $config, 
$isDebug ) ) {
$config = null;
}
}
@@ -525,18 +526,17 @@
 * As part of self::getConfig(), determine if zero should be enabled
 * for this site based on configuration
 * @param array $config
+* @param bool $isDebug If true, overrides 'enabled' config value
 * @return bool
 */
-   private static function isZeroEnabled( $config ) {
-   if ( !$config['enabled'] ) {
+   private static function isZeroEnabled( $config, $isDebug ) {
+   if ( !$isDebug && !$config['enabled'] ) {
// If the configuration is disabled, pretend like it 
doesn't exist
return false;
}
// Check if the wiki is in the allowed list
// @FIXME: expand to allow non-wikipedia sites
-   global $wgRequest;
-   $subdomain = $wgRequest->getHeader( 'X-SUBDOMAIN' );
-   $site = strtolower( $subdomain ) . '.wikipedia';
+   $site = self::isZeroSubdomain() ? 'zero.wikipedia' : 
'm.wikipedia';
if ( !in_array( $site, $config['sites'] ) ) {
return false;
}
@@ -563,7 +563,12 @@
static $isZero = null;
if ( $isZero === null ) {
global $wgRequest;
-   $isZero = $wgRequest->getHeader( 'X-SUBDOMAIN' ) === 
'ZERO';
+   // Allow URL override for testing purposes
+   $subdomain = $wgRequest->getVal( 'X-SUBDOMAIN' );
+   if ( $subdomain === null ) {
+   $subdomain = $wgRequest->getHeader( 
'X-SUBDOMAIN' );
+   }
+   $isZero = strcasecmp( $subdomain, 'ZERO' ) === 0;
}
return $isZero;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc869adea24f3b9d27918557ac7fa954e406c7d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add a way to make categories more require-looking - change (mediawiki...UploadWizard)

2013-06-17 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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


Change subject: Add a way to make categories more require-looking
..

Add a way to make categories more require-looking

Bug: 49710
Change-Id: I72ed4a357d09d7ba5b1ebf5cb6e19f580f4860ea
---
M UploadWizard.i18n.php
M UploadWizardHooks.php
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardDetails.js
4 files changed, 52 insertions(+), 4 deletions(-)


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

diff --git a/UploadWizard.i18n.php b/UploadWizard.i18n.php
index fbbc76d..1e8cb8c 100644
--- a/UploadWizard.i18n.php
+++ b/UploadWizard.i18n.php
@@ -246,6 +246,9 @@
'mwe-upwiz-file-too-large-ok' => 'OK',
'mwe-upwiz-file-too-large-text' => 'You can only upload files with a 
size of up to $1. You tried to upload a file that is $2.',
'mwe-upwiz-file-too-large' => 'File too large.',
+   'mwe-upwiz-necessary-confirm' => 'It is recommended that you fill in a 
category for your uploads. Do you want to continue without filling all the 
fields?',
+   'mwe-upwiz-dialog-yes' => 'Yes',
+   'mwe-upwiz-dialog-no' => 'No',
 
/* LICENSES & combinations of licenses */
/* may be a good idea to shift to WikimediaLicenseTexts? */
@@ -759,6 +762,9 @@
 * $1 is the maximum file size;
 * $2 is the size of the file they tried to upload.',
'mwe-upwiz-file-too-large' => 'Error dialog title',
+   'mwe-upwiz-necessary-confirm' => 'Confirmation box suggesting that it 
is recommended to fill in a category for uploads and asking the uploader 
whether they want to continue without them',
+   'mwe-upwiz-dialog-yes' => 'Yes',
+   'mwe-upwiz-dialog-no' => 'No',
'mwe-upwiz-license-cc-by-sa-3.0' => 
'{{CreativeCommonsLicense|by-sa|3.0}}
 For more information, see https://www.mediawiki.org/wiki/UploadWizard',
'mwe-upwiz-license-cc-by-sa-3.0-at' => 
'{{CreativeCommonsLicense|by-sa|3.0|at}}
diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index 7dc6fbf..58d55a1 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -450,6 +450,9 @@
'mwe-upwiz-file-too-large-ok',
'mwe-upwiz-file-too-large-text',
'mwe-upwiz-file-too-large',
+   'mwe-upwiz-necessary-confirm',
+   'mwe-upwiz-dialog-yes',
+   'mwe-upwiz-dialog-no',
'prefs-uploads',
'prefs-upwiz-interface',
'colon-separator',
diff --git a/resources/mw.UploadWizard.js b/resources/mw.UploadWizard.js
index 1c7a638..a540c1b 100644
--- a/resources/mw.UploadWizard.js
+++ b/resources/mw.UploadWizard.js
@@ -1038,9 +1038,10 @@
 * @return boolean
 */
detailsValid: function(cb, cberr) {
-   var _this = this;
-   var valid = 0;
-   var total = 0;
+   var _this = this,
+   valid = 0,
+   necessary = 0,
+   total = 0;
$j.each( _this.uploads, function(i, upload) {
if ( upload === undefined ) {
return;
@@ -1049,9 +1050,35 @@
upload.details.valid( function () {
valid += 1;
});
+   upload.details.necessaryFilled( function () {
+   necessary += 1;
+   });
});
-   if ( valid == total ) {
+
+   // Set up buttons for dialog box. We have to do it the hard way 
since the json keys are localized
+   var buttons = {};
+   buttons[ mw.msg( 'mwe-upwiz-dialog-yes' ) ] = function() {
+   $( this ).dialog( "close" );
cb();
+   };
+   buttons[ mw.msg( 'mwe-upwiz-dialog-no' ) ] = function() {
+   $( this ).dialog( "close" );
+   };
+   var confirmationDialog = $j( '' )
+   .html( mw.msg( 'mwe-upwiz-necessary-confirm' ) )
+   .dialog( {
+   width: 500,
+   zIndex: 20,
+   autoOpen: false,
+   modal: true,
+   buttons: buttons
+   } );
+   if ( valid == total ) {
+   if ( necessary == total ) {
+   cb();
+   } else {
+   confirmationDialog.dialog( 'open' );
+   }
} else {
   

[MediaWiki-commits] [Gerrit] Remove Zero banner cruft - change (mediawiki...MobileFrontend)

2013-06-17 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Remove Zero banner cruft
..


Remove Zero banner cruft

Rely on GetMobileNotice hook for it instead

Change-Id: Ia7ede9c5b782db6e9b7dbf23952e939cc18a7cc8
---
M includes/MobileFrontend.body.php
M includes/skins/SkinMobileBase.php
2 files changed, 1 insertion(+), 38 deletions(-)

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



diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index b712cac..1286d51 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -2,25 +2,8 @@
 
 class ExtMobileFrontend extends ContextSource {
 
-   protected $zeroRatedBanner;
-
public function __construct( IContextSource $context ) {
$this->setContext( $context );
-   }
-
-   /**
-* FIXME: Move to ZeroRatedMobileAccess extension
-* @return string
-*/
-   public function getZeroRatedBanner() {
-   $zeroRatedBanner = $this->zeroRatedBanner ? str_replace( 
'display:none;', '', $this->zeroRatedBanner ) : '';
-
-   if ( $zeroRatedBanner ) {
-   if ( strstr( $zeroRatedBanner, 
'id="zero-rated-banner">getDoc();
wfProfileOut( __METHOD__ . '-formatter-init' );
-
-   wfProfileIn( __METHOD__ . '-zero' );
-   $zeroRatedBannerElement = $doc->getElementById( 
'zero-rated-banner' );
-
-   if ( !$zeroRatedBannerElement ) {
-   $zeroRatedBannerElement = $doc->getElementById( 
'zero-rated-banner-red' );
-   }
-
-   if ( $zeroRatedBannerElement ) {
-   $this->zeroRatedBanner = $doc->saveXML( 
$zeroRatedBannerElement, LIBXML_NOEMPTYTAG );
-   }
-   wfProfileOut( __METHOD__ . '-zero' );
 
wfProfileIn( __METHOD__ . '-filter' );
if ( $context->getContentTransformations() ) {
diff --git a/includes/skins/SkinMobileBase.php 
b/includes/skins/SkinMobileBase.php
index 658eb28..cd6c0e3 100644
--- a/includes/skins/SkinMobileBase.php
+++ b/includes/skins/SkinMobileBase.php
@@ -26,12 +26,6 @@
$tpl->set( '_show_menu_headers', $menuHeaders );
$tpl->set( 'searchBox', $search );
 
-   $banners = $tpl->data['banners'];
-   // FIXME: Move to Zero extension MinervaPreRender hook
-   if ( isset( $tpl->data['zeroRatedBanner'] ) ) {
-   $banners[] = $tpl->data['zeroRatedBanner'];
-   }
-   $tpl->set( 'banners', $banners );
if ( $inBeta ) {
$this->prepareDataBeta( $tpl );
}
@@ -199,8 +193,6 @@
$tpl = $this->prepareTemplate();
$tpl->set( 'headelement', $out->headElement( $this ) );
$tpl->set( 'bodytext', $html );
-   // FIXME: Move to ZeroRatedMobileAccess extension
-   $tpl->set( 'zeroRatedBanner', 
$this->extMobileFrontend->getZeroRatedBanner() );
$notice = '';
wfRunHooks( 'GetMobileNotice', array( $this, &$notice ) );
$tpl->set( 'notice', $notice );

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

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

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


[MediaWiki-commits] [Gerrit] Further decouple banners from MobileFrontend. Dependent on c... - change (mediawiki...ZeroRatedMobileAccess)

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

Change subject: Further decouple banners from MobileFrontend. Dependent on 
change 67546.
..


Further decouple banners from MobileFrontend. Dependent on change 67546.

* Puts banners into template rendering hook instead of article render hook.
* Removed superfluous display:none now that only one banner is needed.
* Converted 'x' close symbol to an HTML entity for i18n.
* Some code reformat fixes from IDE.
* Display clickthrough URL in case user accidentally accessed Zero.

Change-Id: I1c05d1f97e2d6794b5e16eb20062df7153adbc05
---
M includes/PageRenderingHooks.php
1 file changed, 162 insertions(+), 66 deletions(-)

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



diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index d7e5346..74fc587 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -25,6 +25,9 @@
  * @ingroup Extensions
  */
 class PageRenderingHooks {
+
+   // TODO: Clean up HTML concatenation. Review for any non-escaped user 
input.
+
private static $formatMobileUrl = '//%s.m.wikipedia.org/wiki/Main_Page';
private static $formatZeroUrl = 
'//%s.zero.wikipedia.org/wiki/Main_Page';
private static $originParent = '.wikipedia.org/';
@@ -46,13 +49,39 @@
return true;
}
 
-
public static function onMinervaPreRender( \BaseTemplate $template ) {
-   global $wgRequest;
+   $req = $template->getSkin()->getRequest();
+   $out = $template->getSkin()->getOutput();
+
+   // TODO: alias $template->data where appropriate
+   $bannersSupported = array_key_exists( 'banners', 
$template->data );
 
$config = self::getConfig();
if ( $config === null ) {
+   if ( self::isZeroSubdomain() && $bannersSupported ) {
+   $unsupported = self::renderUnknownCarrier( 
$req, $out);
+   $template->data['banners'] = array( 
$unsupported );
+   $template->set( 'banners', 
$template->data['banners'] );
+   }
return true;
+   }
+
+   $redirectWarningQPS = 'renderZeroRatedRedirect=true&returnto=';
+
+   $warning = self::renderWarning( $config, $req, $out );
+
+   // TODO: If clearer way to put this, make it clearer
+   // trump all existing banners when in a banner-rendering context
+   if ( $bannersSupported ) {
+   if ( isset( $warning ) ) {
+   $template->data['banners'] = array( $warning );
+   $template->set( 'banners', 
$template->data['banners'] );
+   self::emptyLangLinks( $template );
+   } else {
+   $template->data['banners'] = array( 
self::renderBanner( $config ) );
+   $template->set( 'banners', 
$template->data['banners'] );
+   self::rewriteLangLinks( $template, $config, 
$redirectWarningQPS, $req );
+   }
}
 
$skin = new SkinTemplate();
@@ -63,35 +92,13 @@
$privacyText = $skin->footerLink( 
'mobile-frontend-privacy-link-text', 'privacypage' );
$termsText = wfMessage( 'mobile-frontend-terms-use-text' 
)->parse();
 
-   $licenseText = self::addWarning( $wgRequest, $pattern, 
$licenseText, $redirectWarning ) ;
-   $privacyText = self::addWarning( $wgRequest, $pattern, 
$privacyText, $redirectWarning );
-   $termsText = self::addWarning( $wgRequest, $pattern, 
$termsText, $redirectWarning );
+   $licenseText = self::addWarning( $req, $pattern, $licenseText, 
$redirectWarning );
+   $privacyText = self::addWarning( $req, $pattern, $privacyText, 
$redirectWarning );
+   $termsText = self::addWarning( $req, $pattern, $termsText, 
$redirectWarning );
 
$template->set( 'mobile-license', $licenseText );
$template->set( 'privacy', $privacyText );
$template->set( 'terms-use', $termsText );
-
-   $redirectWarningQPS = 'renderZeroRatedRedirect=true&returnto=';
-
-   if ( isset( $template->data['language_urls'] )
-   && 0 < count( $template->data['language_urls'] )
-   ) {
-   $languageUrls = $template->data['language_urls'];
-   $freeLangs = $config['whitelistedLangs'];
-   foreach ( $languageUrls as &$lang ) {
-   if ( 
preg_match('#^//([-a-zA-Z_]+)\.(zero|m)\.#', $lang['href'], $match ) ) {
-

[MediaWiki-commits] [Gerrit] Fixed link to mobile homepage - change (mediawiki...MobileFrontend)

2013-06-17 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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


Change subject: Fixed link to mobile homepage
..

Fixed link to mobile homepage

Change-Id: Ibe2c001cd1f979337c9e7db90273e179f4c84070
---
M MobileFrontend.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 891ad70..6fdfe8d 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -39,7 +39,7 @@
 
'mobile-frontend-back-to-top-of-section' => 'Jump back a section',
'mobile-frontend-close-section' => 'Close this section',
-   'mobile-frontend-empty-homepage-text' => 'This homepage needs to be 
configured. 
[//meta.wikimedia.org/wiki/Mobile_Projects/Mobile_Gateway#Mobile_homepage 
Instructions on how to get this site mobile enabled]',
+   'mobile-frontend-empty-homepage-text' => 'This homepage needs to be 
configured. 
[//www.mediawiki.org/wiki/Wikimedia_Mobile_engineering/imported/Mobile_projects/Mobile_Gateway/Mobile_homepage_formatting
 Instructions on how to get this site mobile enabled]',
'mobile-frontend-regular-site' => 'Desktop view',
'mobile-frontend-wml-continue' => 'Continue...',
'mobile-frontend-wml-back' => 'Back...',

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

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

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


[MediaWiki-commits] [Gerrit] Improve appearence of task toolbar on low width screens. - change (mediawiki...GettingStarted)

2013-06-17 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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


Change subject: Improve appearence of task toolbar on low width screens.
..

Improve appearence of task toolbar on low width screens.

Bug: 48562
Change-Id: I44a472e97e99f4107a964f64422e7892533d194b
---
M GettingStarted.php
M resources/ext.gettingstarted.taskToolbar.css
M resources/ext.gettingstarted.taskToolbar.js
A resources/ext.gettingstarted.taskToolbar.lowWidth.css
4 files changed, 42 insertions(+), 10 deletions(-)


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

diff --git a/GettingStarted.php b/GettingStarted.php
index 3bdeb61..bbb158a 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -173,10 +173,16 @@
'styles' => 'ext.gettingstarted.css',
 ) + $gettingStartedModuleInfo;
 
-// Added if they are in the test group and this page is one of their 
GettingStarted tasks
+// Added if this page is one of their GettingStarted tasks
 $wgResourceModules[ 'ext.gettingstarted.taskToolbar' ] = array(
'scripts' => 'ext.gettingstarted.taskToolbar.js',
-   'styles' => 'ext.gettingstarted.taskToolbar.css',
+   'styles' => array(
+   'ext.gettingstarted.taskToolbar.css' => array( 'media' => 
'screen' ),
+   'ext.gettingstarted.taskToolbar.lowWidth.css' => array( 'media' 
=> 'screen and (max-width: 1005px)' ),
+
+   // Requires fix for 
https://bugzilla.wikimedia.org/show_bug.cgi?id=49722 to work.
+   'ext.gettingstarted.taskToolbar.print.css' => array( 'media' => 
'print' ),
+   ),
'dependencies' => array(
'mediawiki.action.view.postEdit',
'mediawiki.jqueryMsg',
diff --git a/resources/ext.gettingstarted.taskToolbar.css 
b/resources/ext.gettingstarted.taskToolbar.css
index d6117e7..2deb569 100644
--- a/resources/ext.gettingstarted.taskToolbar.css
+++ b/resources/ext.gettingstarted.taskToolbar.css
@@ -2,12 +2,12 @@
below the onboarding toolbar.
TODO (mattflaschen, 2013-04-18): This can probably be done in a better way. 
*/
 
-.mw-gettingstarted-relative-40 {
+.mw-gettingstarted-relative-vshift {
position: relative;
top: 40px;
 }
 
-.mw-gettingstarted-margin-40 {
+.mw-gettingstarted-margin-vshift {
margin-top: 40px;
 }
 
diff --git a/resources/ext.gettingstarted.taskToolbar.js 
b/resources/ext.gettingstarted.taskToolbar.js
index bfd3c19..3adcc02 100644
--- a/resources/ext.gettingstarted.taskToolbar.js
+++ b/resources/ext.gettingstarted.taskToolbar.js
@@ -1,6 +1,6 @@
 ( function ( $, mw ) {
$( document ).ready( function () {
-   var $toolbar, $left, $center, $right, $tryAnother, $close,
+   var $toolbar, $left, $center, $centerMessage, $right, 
$tryAnother, $close,
toolbarInfo, $relativeElements, $marginElements, logging,
cfg, $returnToList, returnToListUri, tryAnotherUri, $showGuide,
fullTask;
@@ -43,6 +43,10 @@
 
$center = $( '' ).attr( {
'class': 'mw-gettingstarted-toolbar-center'
+   } );
+
+   $centerMessage = $( '' ).attr( {
+   'class': 'mw-gettingstarted-toolbar-center-message'
} ).text( mw.message( toolbarInfo.description ) );
 
$showGuide = $( '' ).attr( {
@@ -55,7 +59,7 @@
evt.stopPropagation();
} );
 
-   $center.append( $showGuide );
+   $center.append( $centerMessage, $showGuide );
 
 
tryAnotherUri = new mw.Uri(
@@ -97,8 +101,8 @@
logging.setTask( title.getPrefixedText(), null );
 
$toolbar.slideUp( 200, function () {
-   $relativeElements.removeClass( 
'mw-gettingstarted-relative-40' );
-   $marginElements.removeClass( 
'mw-gettingstarted-margin-40' );
+   $relativeElements.removeClass( 
'mw-gettingstarted-relative-vshift' );
+   $marginElements.removeClass( 
'mw-gettingstarted-margin-vshift' );
} );
} );
 
@@ -116,8 +120,8 @@
$marginElements = $( '#mw-head, #mw-panel' );
 
function showToolbarInternal() {
-   $relativeElements.addClass( 
'mw-gettingstarted-relative-40' );
-   $marginElements.addClass( 'mw-gettingstarted-margin-40' 
);
+   $relativeElements.addClass( 
'mw-gettingstarted-relative-vshift' );
+   $marginElements.addClass( 
'mw-gettingstarted-margin-vshift' );
 
$toolbar.slideDown( 200, function () {
mw.libs.guiders.reposition();
diff --git a/resources/ext.gettingstarted.task

[MediaWiki-commits] [Gerrit] (bug 49354) New config variable: $wgNoticeUseLanguageConversion - change (mediawiki...CentralNotice)

2013-06-17 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: (bug 49354) New config variable: $wgNoticeUseLanguageConversion
..


(bug 49354) New config variable: $wgNoticeUseLanguageConversion

This setting disables variant languages and use an automatically
converted version of banners fetched from their parent language
(zh for zh-cn, for example) instead.

Bug: 49354
Change-Id: I16292800b857c681e0ed54a221cd4c4e5def91b5
---
M CentralNotice.php
M includes/BannerMessage.php
M includes/BannerRenderer.php
3 files changed, 23 insertions(+), 4 deletions(-)

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



diff --git a/CentralNotice.php b/CentralNotice.php
index b157a62..575abe7 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -257,6 +257,10 @@
 // Whether to use the Translation extension for banner message translation
 $wgNoticeUseTranslateExtension = false;
 
+// Whether to disable variant languages and use an automatically converted 
version of banners
+// fetched from their parent language (zh for zh-cn, for example) instead.
+$wgNoticeUseLanguageConversion = false;
+
 // When using the group review feature of translate; this will be the 
namespace ID for the banner
 // staging area -- ie: banners here are world editable and will not be moved 
to the MW namespace
 // until they are in @ref $wgNoticeTranslateDeployStates
diff --git a/includes/BannerMessage.php b/includes/BannerMessage.php
index 9e16186..92e5341 100644
--- a/includes/BannerMessage.php
+++ b/includes/BannerMessage.php
@@ -63,7 +63,12 @@
}
 
function toHtml( IContextSource $context ) {
-   return $context->msg( $this->getDbKey() )->inLanguage( 
$context->getLanguage() )->text();
+   global $wgNoticeUseLanguageConversion;
+   $lang = $context->getLanguage();
+   if ( $wgNoticeUseLanguageConversion && 
$lang->getParentLanguage() ) {
+   $lang = $lang->getParentLanguage();
+   }
+   return $context->msg( $this->getDbKey() )->inLanguage( $lang 
)->text();
}
 
/**
diff --git a/includes/BannerRenderer.php b/includes/BannerRenderer.php
index 6b300f8..ec33781 100644
--- a/includes/BannerRenderer.php
+++ b/includes/BannerRenderer.php
@@ -95,10 +95,20 @@
 * FIXME: "->inLanguage( $context->getLanguage() )" is necessary due to 
a bug in DerivativeContext
 */
function toHtml() {
-   $bannerHtml = $this->context->msg( $this->banner->getDbKey() 
)->inLanguage( $this->context->getLanguage() )->text();
-   $bannerHtml .= $this->getResourceLoaderHtml();
+   global $wgNoticeUseLanguageConversion;
+   $parentLang = $lang = $this->context->getLanguage();
+   if ( $wgNoticeUseLanguageConversion && 
$lang->getParentLanguage() ) {
+   $parentLang = $lang->getParentLanguage();
+   }
 
-   return $this->substituteMagicWords( $bannerHtml );
+   $bannerHtml = $this->context->msg( $this->banner->getDbKey() 
)->inLanguage( $parentLang )->text();
+   $bannerHtml .= $this->getResourceLoaderHtml();
+   $bannerHtml = $this->substituteMagicWords( $bannerHtml );
+
+   if ( $wgNoticeUseLanguageConversion ) {
+   $bannerHtml = $parentLang->getConverter()->convertTo( 
$bannerHtml, $lang->getCode() );
+   }
+   return $bannerHtml;
}
 
function getPreloadJs() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16292800b857c681e0ed54a221cd4c4e5def91b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Liangent 
Gerrit-Reviewer: Liangent 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] [WIP] Link surface fix for RTL - change (mediawiki...VisualEditor)

2013-06-17 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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


Change subject: [WIP] Link surface fix for RTL
..

[WIP] Link surface fix for RTL

This is NOT ready for merge, I fixed most of the problem and the link
surface appears in RTL, however, I got stuck with the position for the
TextInputMenuWidget, and I need a second (third/fourth/tenth) pair of
eyes. Help is appreciated, and thanks in advance!

Bug: 49416
Change-Id: I312610ca630a8f75f1a0778e97f227f35a003b41
---
M modules/ve/ui/styles/ve.ui.Surface.css
M modules/ve/ui/ve.ui.Context.js
M modules/ve/ui/ve.ui.Surface.js
M modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
4 files changed, 40 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve/ui/styles/ve.ui.Surface.css 
b/modules/ve/ui/styles/ve.ui.Surface.css
index 5e45bc0..6a7fcbf 100644
--- a/modules/ve/ui/styles/ve.ui.Surface.css
+++ b/modules/ve/ui/styles/ve.ui.Surface.css
@@ -23,3 +23,14 @@
left: 0;
z-index: 1000;
 }
+
+   /* @noflip */
+.ve-ui-surface-overlay-rtl {
+   font-family: sans-serif;
+   line-height: 1.5em;
+   font-size: 1em;
+   position: absolute;
+   top: 0;
+   right: 0;
+   z-index: 1000;
+}
\ No newline at end of file
diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js
index 99ceb77..325a3f8 100644
--- a/modules/ve/ui/ve.ui.Context.js
+++ b/modules/ve/ui/ve.ui.Context.js
@@ -276,7 +276,14 @@
$container = inspector ? this.inspectors.$ : this.$menu;
this.popup.align = 'center';
}
-   this.$.css( { 'left': position.x, 'top': position.y } );
+
+   if ( $('html').css( 'direction' ) === 'rtl' ) {
+   position.x = (window.innerWidth - position.x);
+   this.$.css( { 'right': position.x, 'top': position.y } 
);
+   } else {
+   this.$.css( { 'left': position.x, 'top': position.y } );
+   }
+
this.popup.display(
position.x,
position.y,
diff --git a/modules/ve/ui/ve.ui.Surface.js b/modules/ve/ui/ve.ui.Surface.js
index d21adfd..494099b 100644
--- a/modules/ve/ui/ve.ui.Surface.js
+++ b/modules/ve/ui/ve.ui.Surface.js
@@ -33,9 +33,16 @@
this.$
.addClass( 've-ui-surface' )
.append( this.view.$ );
-   this.$localOverlay
+   if ( $( 'body' ).hasClass( 'rtl' ) ) {
+   // If the language direction is RTL, switch left/right 
directions:
+   this.$localOverlay
+   .addClass( 've-ui-surface-overlay-rtl 
ve-ui-surface-overlay-local' )
+   .append( this.context.$ );
+   } else {
+   this.$localOverlay
.addClass( 've-ui-surface-overlay ve-ui-surface-overlay-local' )
.append( this.context.$ );
+   }
this.$globalOverlay
.addClass( 've-ui-surface-overlay ve-ui-surface-overlay-global' 
)
.append( this.dialogs.$ );
diff --git a/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js 
b/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
index 8639d1f..a16c517 100644
--- a/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
@@ -96,6 +96,19 @@
dimensions.top += frameOffset.top;
}
 
+   if ( $('html').css( 'direction' ) === 'rtl' ) {
+   frameOffset = this.input.$$.frame.$.offset();
+   // The dimension should change from 'left' to 'right' to 
accommodate the changes
+   // in the link surface definition. *However* the current 
position of this container
+   // is all screwed up.
+
+   // The math here is driving me crazy. I've tried multiple 
calculations over the left/right
+   // and widths so I can have the right position, but I keep 
getting it wrong.
+   //Is there a way to get the 'right' property of the link of the 
ve.ui.Surface 
+   //that is defined for the link popup?
+   dimensions.right = window.innerWidth - frameOffset.left;
+   }
+
this.$.css( dimensions );
return this;
 };

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

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

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


[MediaWiki-commits] [Gerrit] Add fix for longstanding bug in contribution_tracking DB - change (mediawiki...ContributionTracking)

2013-06-17 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Add fix for longstanding bug in contribution_tracking DB
..


Add fix for longstanding bug in contribution_tracking DB

See http://www.mediawiki.org/wiki/User:MarkTraceur/FR-tech_setup_notes
for the messed-up manual query I had to run while installing CT for the
first time. I don't want that to be part of the setup. So let's fix this
in a normal...ish way.

Change-Id: Ie85278fb22a8b857ba086a69383c48f0789f9542
---
M ContributionTracking.php
M ContributionTracking.sql
2 files changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/ContributionTracking.php b/ContributionTracking.php
index 40e5470..4d57109 100644
--- a/ContributionTracking.php
+++ b/ContributionTracking.php
@@ -140,7 +140,12 @@
$updater->addExtensionUpdate( array( 'addField', 
'contribution_tracking', 'owa_session',
$dir . 'patches/patch-owa.sql', true ) );
$updater->addExtensionUpdate( array( 'addField', 
'contribution_tracking', 'utm_key',
-  $dir . 'patches/patch-owa.sql', true ) );
+   $dir . 'patches/patch-owa.sql', true ) );
+
+   // Not sure how to do this in the other configurations, 
but I guess
+   // "manually" might be the answer.
+   $updater->addExtensionUpdate( array( 'modifyField', 
'contribution_tracking', 'anonymous',
+   $dir . 'patches/make-null.patch.sql' ) );
} else { //We are configured not to use the main mediawiki db.
//Unless the updater is modified not to run
//'LoadExtensionSchemaUpdates' hooks in its constructor 
(or do so
diff --git a/ContributionTracking.sql b/ContributionTracking.sql
index dc7a1da..7b79c9a 100644
--- a/ContributionTracking.sql
+++ b/ContributionTracking.sql
@@ -5,13 +5,13 @@
   usd_amount decimal(20,2) default NULL,
   note text,
   referrer varchar(4096) default NULL,
-  anonymous tinyint(1) unsigned NOT NULL,
+  anonymous tinyint(1) unsigned default NULL,
   utm_source varchar(128) default NULL,
   utm_medium varchar(128) default NULL,
   utm_campaign varchar(128) default NULL,
   utm_key varchar(128) default NULL,
   payments_form varchar(50) default NULL,
-  optout tinyint(1) unsigned NOT NULL,
+  optout tinyint(1) unsigned default NULL,
   language varchar(8) default NULL,
   country varchar(2) default NULL,
   ts char(14) default NULL,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie85278fb22a8b857ba086a69383c48f0789f9542
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContributionTracking
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Allow debug params X-CS and X-SUBDOMAIN in URL - change (mediawiki...ZeroRatedMobileAccess)

2013-06-17 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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


Change subject: Allow debug params X-CS and X-SUBDOMAIN in URL
..

Allow debug params X-CS and X-SUBDOMAIN in URL

* Having X-CS in URL overrides the X-CS header and ignores
the 'enabled' parameter of the zero configuration
* Having X-SUBDOMAIN in URL overrides header with the same name

Change-Id: Ifc869adea24f3b9d27918557ac7fa954e406c7d0
---
M includes/PageRenderingHooks.php
1 file changed, 13 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroRatedMobileAccess 
refs/changes/80/69280/1

diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index d7e5346..1017af7 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -498,7 +498,8 @@
$config = null;
// Allow URL override of the X-CS parameter for testing purposes
$id = $wgRequest->getVal( 'X-CS' );
-   if ( $id === null ) {
+   $isDebug = $id !== null;
+   if ( !$isDebug ) {
$id = $wgRequest->getHeader( 'X-CS' );
}
if ( $id === '(null)' || !$id ) {
@@ -511,7 +512,7 @@
$conf = new CarrierConfig( $text );
if ( !$conf->isError() ) {
$config = $conf->getData();
-   if ( !self::isZeroEnabled( $config ) ) {
+   if ( !self::isZeroEnabled( $config, 
$isDebug ) ) {
$config = null;
}
}
@@ -525,18 +526,17 @@
 * As part of self::getConfig(), determine if zero should be enabled
 * for this site based on configuration
 * @param array $config
+* @param bool $isDebug If true, overrides 'enabled' config value
 * @return bool
 */
-   private static function isZeroEnabled( $config ) {
-   if ( !$config['enabled'] ) {
+   private static function isZeroEnabled( $config, $isDebug ) {
+   if ( !$isDebug && !$config['enabled'] ) {
// If the configuration is disabled, pretend like it 
doesn't exist
return false;
}
// Check if the wiki is in the allowed list
// @FIXME: expand to allow non-wikipedia sites
-   global $wgRequest;
-   $subdomain = $wgRequest->getHeader( 'X-SUBDOMAIN' );
-   $site = strtolower( $subdomain ) . '.wikipedia';
+   $site = self::isZeroSubdomain() ? 'zero.wikipedia' : 
'm.wikipedia';
if ( !in_array( $site, $config['sites'] ) ) {
return false;
}
@@ -563,7 +563,12 @@
static $isZero = null;
if ( $isZero === null ) {
global $wgRequest;
-   $isZero = $wgRequest->getHeader( 'X-SUBDOMAIN' ) === 
'ZERO';
+   // Allow URL override for testing purposes
+   $subdomain = $wgRequest->getVal( 'X-SUBDOMAIN' );
+   if ( $subdomain === null ) {
+   $subdomain = $wgRequest->getHeader( 
'X-SUBDOMAIN' );
+   }
+   $isZero = strcasecmp( $subdomain, 'ZERO' ) === 0;
}
return $isZero;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc869adea24f3b9d27918557ac7fa954e406c7d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] RelocatableNode for Inline and Block Images - change (mediawiki...VisualEditor)

2013-06-17 Thread Christian (Code Review)
Christian has uploaded a new change for review.

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


Change subject: RelocatableNode for Inline and Block Images
..

RelocatableNode for Inline and Block Images

HTML5's drag and drop has a ton of benefits an a couple
limitations. To achieve a native drag marker, an image tag helper
is used to indicate the size of the relocatable node. Chrome
shades the marker gray natively, Firefox is styled to match.

Change-Id: I755b698a3d968cc7e6ff125109d68ac83fd8a8a2
---
M modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js
M modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
M modules/ve/ce/styles/ve.ce.Node.css
M modules/ve/ce/ve.ce.RelocatableNode.js
M modules/ve/ce/ve.ce.ResizableNode.js
M modules/ve/ce/ve.ce.Surface.js
6 files changed, 95 insertions(+), 23 deletions(-)


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

diff --git a/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js 
b/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js
index 8ea8f73..c618052 100644
--- a/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js
+++ b/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js
@@ -26,6 +26,7 @@
ve.ce.ProtectedNode.call( this );
ve.ce.FocusableNode.call( this );
ve.ce.ResizableNode.call( this );
+   ve.ce.RelocatableNode.call( this );
 
if ( this.model.getAttribute( 'align' ) === 'center' ) {
this.$.addClass( 'center' );
@@ -83,6 +84,8 @@
 
 ve.mixinClass( ve.ce.MWBlockImageNode, ve.ce.ResizableNode );
 
+ve.mixinClass( ve.ce.MWBlockImageNode, ve.ce.RelocatableNode );
+
 /* Static Properties */
 
 ve.ce.MWBlockImageNode.static.name = 'mwBlockImage';
diff --git a/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js 
b/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
index eb9e9f2..f373163 100644
--- a/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
+++ b/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
@@ -35,6 +35,7 @@
// Mixin constructors
ve.ce.ProtectedNode.call( this );
ve.ce.FocusableNode.call( this );
+   ve.ce.RelocatableNode.call( this );
 
this.$image
.attr( 'src', this.model.getAttribute( 'src' ) )
@@ -62,6 +63,8 @@
 
 ve.mixinClass( ve.ce.MWInlineImageNode, ve.ce.FocusableNode );
 
+ve.mixinClass( ve.ce.MWInlineImageNode, ve.ce.RelocatableNode );
+
 /* Static Properties */
 
 ve.ce.MWInlineImageNode.static.name = 'mwInlineImage';
diff --git a/modules/ve/ce/styles/ve.ce.Node.css 
b/modules/ve/ce/styles/ve.ce.Node.css
index e51f48b..6d61749 100644
--- a/modules/ve/ce/styles/ve.ce.Node.css
+++ b/modules/ve/ce/styles/ve.ce.Node.css
@@ -70,24 +70,17 @@
 
 /* ve.ce.ResizableNode */
 
-.ve-ce-resizableNode-transitioning {
-   -webkit-transition: width 100ms ease-in-out, height 100ms ease-in-out;
-   -moz-transition: width 100ms ease-in-out, height 100ms ease-in-out;
-   -ms-transition: width 100ms ease-in-out, height 100ms ease-in-out;
-   -o-transition: width 100ms ease-in-out, height 100ms ease-in-out;
-   transition: width 100ms ease-in-out, height 100ms ease-in-out;
-}
-
-.ve-ce-resizableNode-handles-resizing {
-   z-index: 1;
-}
-
 .ve-ce-resizableNode-handles {
position: absolute;
box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
+   z-index: 1; /* Position above RelocatableNode's relocatableMarker */
+}
+
+.ve-ce-resizableNode-handles.resizing {
+   z-index: 1;
 }
 
 .ve-ce-resizableNode-handles div {
@@ -127,6 +120,17 @@
right: -0.33em;
 }
 
+/* ve.ce.RelocatableNode */
+
+.ve-ce-relocatableMarker {
+   cursor: move;
+   position: absolute;
+}
+
+.ve-ce-relocatableMarker.relocating {
+   background: rgba(0,0,0,1);
+}
+
 /* ve.ce.ImageNode */
 
 .ve-ce-imageNode {
diff --git a/modules/ve/ce/ve.ce.RelocatableNode.js 
b/modules/ve/ce/ve.ce.RelocatableNode.js
index b87950a..2e026c4 100644
--- a/modules/ve/ce/ve.ce.RelocatableNode.js
+++ b/modules/ve/ce/ve.ce.RelocatableNode.js
@@ -8,31 +8,71 @@
 /**
  * ContentEditable relocatable node.
  *
+ * Requires that the node also is Focusable
+ *
  * @class
  * @abstract
  *
  * @constructor
- * @param {jQuery} [$draggable=this.$] Draggable DOM element
  */
-ve.ce.RelocatableNode = function VeCeRelocatableNode( $draggable ) {
+ve.ce.RelocatableNode = function VeCeRelocatableNode() {
// Properties
-   this.$draggable = $draggable || this.$;
this.relocatingSurface = null;
+   this.$relocatableMarker = $('');
 
// Events
-   this.$draggable.on( {
-   'dragstart': ve.bind( this.onRelocatableDragStart, this ),
-   'dragend': ve.bind( this.onRelocatableDragEnd, this )
+   this.connect( this, {
+   'focus': 'onRelocatableFocus',
+   'blur': 'onRelocatableBlur',
+   'resize': 'on

[MediaWiki-commits] [Gerrit] fix. formatting. - change (sartoris)

2013-06-17 Thread Rfaulk (Code Review)
Rfaulk has submitted this change and it was merged.

Change subject: fix. formatting.
..


fix. formatting.

Change-Id: I633fd6021ce050ecf8ccbd694680b9511778337a
---
M README.rst
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/README.rst b/README.rst
index 98edb3f..468f2a5 100644
--- a/README.rst
+++ b/README.rst
@@ -26,9 +26,13 @@
 First set the "hook-dir" and "tag-prefix" for the deploy section in your 
global .gitconfig:
 
git config --global deploy.target {%target host%} # e.g. 
my.remotehost.com:8080 a.k.a deploy host
+
git config --global deploy.path {%remote deploy path%}
+
git config --global deploy.user {%authorized user on deploy target%}
+
git config --global deploy.hook-dir .git/deploy/hooks
+
git config --global deploy.tag-prefix {%project name%}
 
 Next create the sartoris configuration file by first copying 
./sartoris/config.py.example to 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I633fd6021ce050ecf8ccbd694680b9511778337a
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk 
Gerrit-Reviewer: Rfaulk 

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


[MediaWiki-commits] [Gerrit] fix. formatting. - change (sartoris)

2013-06-17 Thread Rfaulk (Code Review)
Rfaulk has uploaded a new change for review.

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


Change subject: fix. formatting.
..

fix. formatting.

Change-Id: I633fd6021ce050ecf8ccbd694680b9511778337a
---
M README.rst
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/78/69278/1

diff --git a/README.rst b/README.rst
index 98edb3f..468f2a5 100644
--- a/README.rst
+++ b/README.rst
@@ -26,9 +26,13 @@
 First set the "hook-dir" and "tag-prefix" for the deploy section in your 
global .gitconfig:
 
git config --global deploy.target {%target host%} # e.g. 
my.remotehost.com:8080 a.k.a deploy host
+
git config --global deploy.path {%remote deploy path%}
+
git config --global deploy.user {%authorized user on deploy target%}
+
git config --global deploy.hook-dir .git/deploy/hooks
+
git config --global deploy.tag-prefix {%project name%}
 
 Next create the sartoris configuration file by first copying 
./sartoris/config.py.example to 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I633fd6021ce050ecf8ccbd694680b9511778337a
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk 

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


[MediaWiki-commits] [Gerrit] code cosmetics: changing to Html class - change (mediawiki...UserMerge)

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

Change subject: code cosmetics: changing to Html class
..


code cosmetics: changing to Html class

Change-Id: Ie9923de3d52eb5f5e8b0e95fe741f1d732cdce74
---
M UserMerge.php
M UserMerge_body.php
2 files changed, 112 insertions(+), 36 deletions(-)

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



diff --git a/UserMerge.php b/UserMerge.php
index ed400c8..ed1a969 100644
--- a/UserMerge.php
+++ b/UserMerge.php
@@ -37,7 +37,7 @@
'url'=> 
'https://www.mediawiki.org/wiki/Extension:User_Merge_and_Delete',
'author' => array( 'Tim Laqua', 'Thomas Gries', 'Matthew April' 
),
'descriptionmsg' => 'usermerge-desc',
-   'version'=> '1.7.2'
+   'version'=> '1.7.3'
 );
 
 $wgAvailableRights[] = 'usermerge';
diff --git a/UserMerge_body.php b/UserMerge_body.php
index 9573213..969aa67 100644
--- a/UserMerge_body.php
+++ b/UserMerge_body.php
@@ -105,7 +105,14 @@
}
} else {
$validOldUser = false;
-   $out->addHTML( "" . 
$this->msg( 'usermerge-noolduser' )->escaped() . "\n" );
+   $out->addHTML(
+   Html::rawElement( 'span',
+   array( 'class' => 'warning' ),
+   $this->msg( 
'usermerge-noolduser' )->escaped()
+   ) .
+   Html::element( 'br' ) .
+   "\n"
+   );
}
}
 
@@ -153,7 +160,13 @@
// go time, baby
if ( !$user->matchEditToken( $request->getVal( 'token' 
) ) ) {
// bad editToken
-   $out->addHTML( "" . 
$this->msg( 'usermerge-badtoken' )->escaped() . "\n" );
+   $out->addHTML(
+   Html::rawElement( 'span',
+   array( 'class' => 'warning' ),
+   $this->msg( 
'usermerge-badtoken' )->escaped()
+   ) .
+   Html::element( 'br' ) . "\n"
+   );
} else {
// good editToken
$this->mergeEditcount( $newuserID, $olduserID );
@@ -179,8 +192,14 @@
 */
private function deleteUser( $objOldUser, $olduserID, $olduser_text ) {
$dbw = wfGetDB( DB_MASTER );
-   $dbw->delete( 'user_groups', array( 'ug_user' => $olduserID ) );
-   $dbw->delete( 'user', array( 'user_id' => $olduserID ) );
+   $dbw->delete(
+   'user_groups',
+   array( 'ug_user' => $olduserID )
+   );
+   $dbw->delete(
+   'user',
+   array( 'user_id' => $olduserID )
+   );
$this->getOutput()->addHTML(
$this->msg( 'usermerge-userdeleted', $olduser_text, 
$olduserID )->escaped() .
Html::element( 'br' ) . "\n"
@@ -191,7 +210,11 @@
 
wfRunHooks( 'DeleteAccount', array( &$objOldUser ) );
 
-   $users = $dbw->selectField( 'user', 'COUNT(*)', array() );
+   $users = $dbw->selectField(
+   'user',
+   'COUNT(*)',
+   array()
+   );
$dbw->update( 'site_stats',
array( 'ss_users' => $users ),
array( 'ss_row_id' => 1 )
@@ -243,21 +266,44 @@
$out = $this->getOutput();
 
foreach ( $idUpdateFields as $idUpdateField ) {
-   $dbw->update( $idUpdateField[0], array( 
$idUpdateField[1] => $newuserID ), array( $idUpdateField[1] => $olduserID ) );
-   $out->addHTML( $this->msg( 'usermerge-updating', 
$idUpdateField[0], $olduserID, $newuserID )->escaped() . "\n" );
+   $dbw->update(
+   $idUpdateField[0],
+   array( $idUpdateField[1] => $newuserID ),
+   array( $idUpdateField[1] => $olduserID )
+   );
+   $out->addHTML(
+   $this->msg( 'usermerge-updating', 
$idUpdateField[0], $olduserID, $newuserID )->escaped() .
+   Html::element( 'br' ) . "\n"
+   );
}
 
foreach ( $textUpd

[MediaWiki-commits] [Gerrit] Fix fatal error on user registration due to hook fail - change (mediawiki...VisualEditor)

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

Change subject: Fix fatal error on user registration due to hook fail
..


Fix fatal error on user registration due to hook fail

Hooks need to return true if they succeed. Fatal errors in production.

Change-Id: Ie5ec5881a8d158bd675dbb6db4540f02fd33290d
---
M VisualEditor.hooks.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 45e9db6..9c9f2f3 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -208,5 +208,7 @@
$user->setOption( 'visualeditor-enable', 1 );
$user->saveSettings();
}
+
+   return true;
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5ec5881a8d158bd675dbb6db4540f02fd33290d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Spage 
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 fatal error on user registration due to hook fail - change (mediawiki...VisualEditor)

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

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


Change subject: Fix fatal error on user registration due to hook fail
..

Fix fatal error on user registration due to hook fail

Hooks need to return true if they succeed. Fatal errors in production.

Change-Id: Ie5ec5881a8d158bd675dbb6db4540f02fd33290d
---
M VisualEditor.hooks.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 45e9db6..9c9f2f3 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -208,5 +208,7 @@
$user->setOption( 'visualeditor-enable', 1 );
$user->saveSettings();
}
+
+   return true;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5ec5881a8d158bd675dbb6db4540f02fd33290d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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] mediawiki.api: Implement login method - change (mediawiki/core)

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

Change subject: mediawiki.api: Implement login method
..


mediawiki.api: Implement login method

Change-Id: I1113a076ff66e20ece1db9380969e7a7b5a68f1a
---
M resources/Resources.php
A resources/mediawiki.api/mediawiki.api.login.js
2 files changed, 60 insertions(+), 0 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 90c6c95..078a38e 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -585,6 +585,12 @@
'mediawiki.Title',
),
),
+   'mediawiki.api.login' => array(
+   'scripts' => 'resources/mediawiki.api/mediawiki.api.login.js',
+   'dependencies' => array(
+   'mediawiki.api',
+   ),
+   ),
'mediawiki.api.parse' => array(
'scripts' => 'resources/mediawiki.api/mediawiki.api.parse.js',
'dependencies' => 'mediawiki.api',
diff --git a/resources/mediawiki.api/mediawiki.api.login.js 
b/resources/mediawiki.api/mediawiki.api.login.js
new file mode 100644
index 000..ccbae06
--- /dev/null
+++ b/resources/mediawiki.api/mediawiki.api.login.js
@@ -0,0 +1,54 @@
+/**
+ * Make the two-step login easier.
+ * @author Niklas Laxström
+ * @class mw.Api.plugin.login
+ * @since 1.22
+ */
+( function ( mw, $ ) {
+   'use strict';
+
+   $.extend( mw.Api.prototype, {
+   /**
+* @param {string} username
+* @param {string} password
+* @return {jQuery.Promise} See mw.Api#post
+*/
+   login: function ( username, password ) {
+   var params, request,
+   deferred = $.Deferred(),
+   api = this;
+
+   params = {
+   action: 'login',
+   lgname: username,
+   lgpassword: password
+   };
+
+   request = api.post( params );
+   request.fail( deferred.reject );
+   request.done( function ( data ) {
+   params.lgtoken = data.login.token;
+   api.post( params )
+   .fail( deferred.reject )
+   .done( function ( data ) {
+   var code;
+   if ( data.login && 
data.login.result === 'Success' ) {
+   deferred.resolve( data 
);
+   } else {
+   // Set proper error 
code whenever possible
+   code = data.error && 
data.error.code || 'unknown';
+   deferred.reject( code, 
data );
+   }
+   } );
+   } );
+
+   return deferred.promise( { abort: request.abort } );
+   }
+   } );
+
+   /**
+* @class mw.Api
+* @mixins mw.Api.plugin.login
+*/
+
+}( mediaWiki, jQuery ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1113a076ff66e20ece1db9380969e7a7b5a68f1a
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Address Krinkle's review comments from I51c441d61 - change (mediawiki...VisualEditor)

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

Change subject: Address Krinkle's review comments from I51c441d61
..


Address Krinkle's review comments from I51c441d61

See 
.

Change-Id: I14442070c0998d724d67ec41cca813ef5bce2c19
---
M modules/ve/init/mw/ve.init.mw.splitTest.js
1 file changed, 11 insertions(+), 10 deletions(-)

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



diff --git a/modules/ve/init/mw/ve.init.mw.splitTest.js 
b/modules/ve/init/mw/ve.init.mw.splitTest.js
index 592c6f0..6ff9779 100644
--- a/modules/ve/init/mw/ve.init.mw.splitTest.js
+++ b/modules/ve/init/mw/ve.init.mw.splitTest.js
@@ -2,10 +2,6 @@
 ( function ( mw, $ ) {
'use strict';
 
-   if ( !mw.config.get( 'wgVisualEditorConfig', {} ).enableEventLogging ) {
-   return;
-   }
-
function log( action ) {
var dfd = $.Deferred();
setTimeout( dfd.reject, 1000 );
@@ -25,29 +21,34 @@
return dfd;
}
 
+   if ( !mw.config.get( 'wgVisualEditorConfig', {} ).enableEventLogging ) {
+   return;
+   }
+
mw.hook( 'postEdit' ).add( function () {
log( 'page-save-success' );
} );
 
-   if ( mw.config.get('wgAction') === 'edit' ) {
+   if ( mw.config.get( 'wgAction' ) === 'edit' ) {
log( 'page-edit-impression' );
}
 
// Log clicks on page edit and section edit links
$( '#ca-edit a, .mw-editsection a' ).on( 'click', function ( e ) {
-   var href = this.href,
-   action = /section=/.test( href ) ? 
'section-edit-link-click' : 'edit-link-click';
+   var el = this,
+   action = /section=/.test( el.href ) ? 
'section-edit-link-click' : 'edit-link-click';
+
log( action ).always( function () {
-   window.location = href;
+   window.location = el.href;
} );
e.preventDefault();
} );
 
// Log edit submit
$( '#wpSave' ).one( 'click', function ( e ) {
-   var $save = $( this );
+   var el = this;
log( 'page-save-attempt' ).always( function () {
-   $save.trigger( 'click' );
+   $( el ).trigger( 'click' );
} );
e.preventDefault();
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14442070c0998d724d67ec41cca813ef5bce2c19
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] ResourceLoader Pass printable parameter to load.php. - change (mediawiki/core)

2013-06-17 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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


Change subject: ResourceLoader Pass printable parameter to load.php.
..

ResourceLoader Pass printable parameter to load.php.

* This ensures "Printable version" works with JavaScript-loaded CSS.
* Adds a wg variable to pass this information to mediawiki.js
Bug: 49722

Change-Id: I691588c39da7fadeac1ca2ace2c1b769fc4e1bd6
---
M includes/OutputPage.php
M resources/mediawiki/mediawiki.js
2 files changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 3657ac3..819a496 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3057,6 +3057,9 @@
if ( $title->isMainPage() ) {
$vars['wgIsMainPage'] = true;
}
+   if ( $this->isPrintable() ) {
+   $vars['wgPrintableMode'] = true;
+   }
if ( $this->mRedirectedFrom ) {
$vars['wgRedirectedFrom'] = 
$this->mRedirectedFrom->getPrefixedDBkey();
}
diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js
index d199132..d608f29 100644
--- a/resources/mediawiki/mediawiki.js
+++ b/resources/mediawiki/mediawiki.js
@@ -1165,7 +1165,8 @@
reqBase = {
skin: mw.config.get( 'skin' ),
lang: mw.config.get( 
'wgUserLanguage' ),
-   debug: mw.config.get( 'debug' )
+   debug: mw.config.get( 'debug' ),
+   printable: mw.config.get( 
'wgPrintableMode' ) ? '1' : '0'
};
// Split module batch by source and by 
group.
splits = {};

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

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

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


[MediaWiki-commits] [Gerrit] Divide communitytwitter-access-error into sub-messages - change (mediawiki...CommunityTwitter)

2013-06-17 Thread RAN1 (Code Review)
RAN1 has uploaded a new change for review.

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


Change subject: Divide communitytwitter-access-error into sub-messages
..

Divide communitytwitter-access-error into sub-messages

The communitytwitter-access-error message is problematic. First of all, it 
includes links encoded in
plain HTML, which is not desirable from a development standpoint since it mixes 
raw code with messages.
It also makes the messages harder to translate. This is reflected in the fact 
that only half of the 18
languages that CommunityTwitter has translations for have the 
communitytwitter-access-error message
translated. The mixing of HTML code that should not be translated with messages 
that should also obscures
the fact that the title of each link needs its own translation, a translation 
that has been absent in
half of the remaining 9 languages that include the link for the link titles. 
With a full translation
rate of 25%, the communitytwitter-access-error message has to be split up in a 
way such that the HTML
does not obfuscate translation.

In this patchset, the message has been split into one large message and 4 
smaller messages:
communitytwitter-access-error-loginlink, 
communitytwitter-access-error-logintitle, communitytwitter-
access-error-rightslink, and communitytwitter-access-error-rightstitle. The two 
messages for each link
are combined into a link in CommunityTwitter_body.php. The 
communitytwitter-access-error takes the
two links, the loginLink and the rightsLink in that order, as parameters for 
the message to be output
to the user. With the removal of HTML from the error message, this should make 
for a much easier to
translate extension.

Notes regarding this patchset: I don’t like the idea of mixing up the messages 
when we’ve got the
extension up on TranslateWiki already. It’s not good having to retranslate some 
of this too. On the
other hand, it’s better than leaving the HTML in there and making translation 
harder.

Change-Id: I4fc3f17879b30bd5bc36b64e317ec56c9ab24ec2
---
M CommunityTwitter.i18n.php
M CommunityTwitter_body.php
2 files changed, 27 insertions(+), 4 deletions(-)


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

diff --git a/CommunityTwitter.i18n.php b/CommunityTwitter.i18n.php
index 622c0ac..95fb308 100755
--- a/CommunityTwitter.i18n.php
+++ b/CommunityTwitter.i18n.php
@@ -62,9 +62,11 @@
'communitytwitter-no-last-tweets' => 'No tweets available',
'communitytwitter-description-template' => 'CommunityTwitter 
description',
'communitytwitter-advice-template' => 'CommunityTwitter advice',
-   'communitytwitter-access-error' => "You have to be logged in and \n".
-   
"allowed to access 
this page.",
+   'communitytwitter-access-error' => 'You have to be $1 and $2 to access 
this page.',
+   'communitytwitter-access-error-loginlink' => 'logged in',
+   'communitytwitter-access-error-logintitle' => 'Log in',
+   'communitytwitter-access-error-rightslink' => 'allowed',
+   'communitytwitter-access-error-rightstitle' => 'See group rights',
'communitytwitter-userlinks-name' => 'Twitter',
'right-twitter' => 'Use Twitter special page',
 );
diff --git a/CommunityTwitter_body.php b/CommunityTwitter_body.php
index fbdb310..3346c61 100755
--- a/CommunityTwitter_body.php
+++ b/CommunityTwitter_body.php
@@ -236,7 +236,28 @@
}
} else {
// Not logged in or no adequate group status
-   
$wgOut->addHTML(wfMsg("communitytwitter-access-error")."\n");
+
+   $loginLink = Linker::linkKnown(
+   SpecialPage::getTitleFor( 'UserLogin' ),
+   $this->msg( 
'communitytwitter-access-error-loginlink' )->escaped(),
+   array(
+   'title' => $this->msg( 
'communitytwitter-access-error-logintitle' )->escaped()
+   ),
+   // FIXME: If Special page name is localized, 
the returnto query string will have to be set to the relevant MediaWiki message.
+   array(
+   'returnto' => "Special:Community 
Twitter"
+   )
+   );
+   $rightsLink = Linker::linkKnown(
+   SpecialPage::getTitleFor( 'ListGroupRights' ),
+   $this->msg( 
'communitytwitter-access-error-rightslink' )->escaped(),
+   array(
+   'title' => $this->msg( 
'communitytwitter-access-error-rightstitle' )->escaped()
+ 

[MediaWiki-commits] [Gerrit] Allow users to select preferred license for their contributions - change (apps...commons)

2013-06-17 Thread SuchABot (Code Review)
SuchABot has uploaded a new change for review.

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


Change subject: Allow users to select preferred license for their contributions
..

Allow users to select preferred license for their contributions

Needs some UI love on both selection & intimation, but works otherwise

People can pick from CC BY-SA, CC BY, or CC0. The commons templates
are set using {[self}}, which I think is good enough.

Change-Id: Iffca6f75c63de6fbe61c4dc41b93dd5f692065a5
GitHub: https://github.com/wikimedia/apps-android-commons/pull/14
---
M commons/res/layout/fragment_single_upload.xml
M commons/res/values/strings.xml
M commons/res/xml/preferences.xml
M commons/src/main/java/org/wikimedia/commons/Media.java
M commons/src/main/java/org/wikimedia/commons/Prefs.java
M commons/src/main/java/org/wikimedia/commons/SettingsActivity.java
M commons/src/main/java/org/wikimedia/commons/SingleUploadFragment.java
M commons/src/main/java/org/wikimedia/commons/StartUploadTask.java
M commons/src/main/java/org/wikimedia/commons/Utils.java
M commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java
10 files changed, 108 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons 
refs/changes/74/69274/1

diff --git a/commons/res/layout/fragment_single_upload.xml 
b/commons/res/layout/fragment_single_upload.xml
index 30046ec..a11df61 100644
--- a/commons/res/layout/fragment_single_upload.xml
+++ b/commons/res/layout/fragment_single_upload.xml
@@ -36,5 +36,7 @@
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="@string/share_license_summary"
-android:id="@+id/licenseLabel" android:layout_gravity="center" 
android:layout_marginTop="16dp"/>
+android:id="@+id/share_license_summary"
+android:layout_gravity="center"
+android:layout_marginTop="16dp"/>
 
diff --git a/commons/res/values/strings.xml b/commons/res/values/strings.xml
index c76dc96..d09c8a2 100644
--- a/commons/res/values/strings.xml
+++ b/commons/res/values/strings.xml
@@ -88,7 +88,12 @@
 Retry
 Abort
 
-You agree to upload under the terms 
of the CC-BY-SA 3.0 license.
+This image will be licensed as 
%1$s
 
 Download
+License
+
+CC Attribution-ShareAlike
+CC Attribution
+CC0
 
diff --git a/commons/res/xml/preferences.xml b/commons/res/xml/preferences.xml
index b489e2e..50457fc 100644
--- a/commons/res/xml/preferences.xml
+++ b/commons/res/xml/preferences.xml
@@ -7,5 +7,11 @@
 android:summary="@string/preference_tracking_summary"
 android:defaultValue="true"
 />
+
+
 
 
\ No newline at end of file
diff --git a/commons/src/main/java/org/wikimedia/commons/Media.java 
b/commons/src/main/java/org/wikimedia/commons/Media.java
index f96e0cf..d300f30 100644
--- a/commons/src/main/java/org/wikimedia/commons/Media.java
+++ b/commons/src/main/java/org/wikimedia/commons/Media.java
@@ -119,6 +119,14 @@
 this.height = height;
 }
 
+public String getLicense() {
+return license;
+}
+
+public void setLicense(String license) {
+this.license = license;
+}
+
 protected Uri localUri;
 protected String imageUrl;
 protected String filename;
@@ -128,6 +136,7 @@
 protected Date dateUploaded;
 protected int width;
 protected int height;
+protected String license;
 
 
 protected String creator;
@@ -160,6 +169,7 @@
 parcel.writeSerializable(tags);
 parcel.writeInt(width);
 parcel.writeInt(height);
+parcel.writeString(license);
 }
 
 public Media(Parcel in) {
@@ -174,6 +184,7 @@
 tags = (HashMap)in.readSerializable();
 width = in.readInt();
 height = in.readInt();
+license = in.readString();
 }
 
 public void setDescription(String description) {
diff --git a/commons/src/main/java/org/wikimedia/commons/Prefs.java 
b/commons/src/main/java/org/wikimedia/commons/Prefs.java
index 9dbf173..b59dce6 100644
--- a/commons/src/main/java/org/wikimedia/commons/Prefs.java
+++ b/commons/src/main/java/org/wikimedia/commons/Prefs.java
@@ -4,4 +4,12 @@
 public static String GLOBAL_PREFS = "org.wikimedia.commons.preferences";
 
 public static String TRACKING_ENABLED = "eventLogging";
+public static final String DEFAULT_LICENSE = "defaultLicense";
+
+
+public static class Licenses {
+public static final String CC_BY_SA = "CC BY-SA";
+public static final String CC_BY = "CC BY";
+public static final String CC0 = "CC0";
+}
 }
diff --git a/commons/src/main/java/org/wikimedia/commons/SettingsActivity.java 
b/commons/src/main/java/org/wikimedia/commons/SettingsActivity.java
index 9c59c86..967e9d8 100644
--- a/commons/src/main/java/org/wikimedia/commons/SettingsActivity.java
+++ b/commons/src/main/java/org/wikime

[MediaWiki-commits] [Gerrit] Persist width & height to Parcelables - change (apps...commons)

2013-06-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Persist width & height to Parcelables
..


Persist width & height to Parcelables

Makes sure value is persisted when passing from an activity to
another

Change-Id: I9ad12bd794cb3bceb7cf94246bc40f4b80d4815b
GitHub: https://github.com/wikimedia/apps-android-commons/pull/12
---
M commons/src/main/java/org/wikimedia/commons/Media.java
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/commons/src/main/java/org/wikimedia/commons/Media.java 
b/commons/src/main/java/org/wikimedia/commons/Media.java
index 9ff0126..f96e0cf 100644
--- a/commons/src/main/java/org/wikimedia/commons/Media.java
+++ b/commons/src/main/java/org/wikimedia/commons/Media.java
@@ -158,6 +158,8 @@
 parcel.writeSerializable(dateUploaded);
 parcel.writeString(creator);
 parcel.writeSerializable(tags);
+parcel.writeInt(width);
+parcel.writeInt(height);
 }
 
 public Media(Parcel in) {
@@ -170,6 +172,8 @@
 dateUploaded = (Date) in.readSerializable();
 creator = in.readString();
 tags = (HashMap)in.readSerializable();
+width = in.readInt();
+height = in.readInt();
 }
 
 public void setDescription(String description) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ad12bd794cb3bceb7cf94246bc40f4b80d4815b
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: master
Gerrit-Owner: SuchABot 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add .jshintrc file - change (mediawiki...OpenStackManager)

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

Change subject: Add .jshintrc file
..


Add .jshintrc file

Change-Id: Ibaf9790c536f3e0bc343cba86d2b950bdeb81aab
---
A .jshintrc
1 file changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..eb7dc06
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,26 @@
+{
+   /* Common */
+
+   // Enforcing
+   "camelcase": true,
+   "curly": true,
+   "eqeqeq": true,
+   "immed": true,
+   "latedef": true,
+   "newcap": true,
+   "noarg": true,
+   "noempty": true,
+   "nonew": true,
+   "quotmark": "single",
+   "trailing": true,
+   "undef": true,
+   "unused": true,
+   // Legacy
+   "onevar": true,
+
+   /* Local */
+   "predef": [
+   "mediaWiki",
+   "jQuery"
+   ]
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibaf9790c536f3e0bc343cba86d2b950bdeb81aab
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Ryan Lane 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Make mwext-OpenStackManager-jslint voting - change (integration/zuul-config)

2013-06-17 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: Make mwext-OpenStackManager-jslint voting
..


Make mwext-OpenStackManager-jslint voting

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

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



diff --git a/layout.yaml b/layout.yaml
index 4556897..9ad65bf 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -366,6 +366,8 @@
 voting: true
   - name: mwext-MobileFrontend-jslint
 voting: true
+  - name: mwext-OpenStackManager-jslint
+voting: true
   - name: mwext-PHPExcel-jslint
 voting: true
   - name: mwext-PostEdit-jslint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5695a3b988e9ec3138f45e75839568cf3d7531b3
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ryan Lane 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Make mwext-OpenStackManager-jslint voting - change (integration/zuul-config)

2013-06-17 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: Make mwext-OpenStackManager-jslint voting
..

Make mwext-OpenStackManager-jslint voting

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


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

diff --git a/layout.yaml b/layout.yaml
index 4556897..9ad65bf 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -366,6 +366,8 @@
 voting: true
   - name: mwext-MobileFrontend-jslint
 voting: true
+  - name: mwext-OpenStackManager-jslint
+voting: true
   - name: mwext-PHPExcel-jslint
 voting: true
   - name: mwext-PostEdit-jslint

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

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

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


[MediaWiki-commits] [Gerrit] Fixing packet_loss_log file on oxygen udp2log instance - change (operations/puppet)

2013-06-17 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Fixing packet_loss_log file on oxygen udp2log instance
..


Fixing packet_loss_log file on oxygen udp2log instance

Change-Id: I0e485795ca8c7e644f79e3c30660554c11c86b8a
---
M manifests/role/logging.pp
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/logging.pp b/manifests/role/logging.pp
index 5192dfb..d09aa12 100644
--- a/manifests/role/logging.pp
+++ b/manifests/role/logging.pp
@@ -273,8 +273,9 @@
$webrequest_log_directory= "$log_directory/webrequest"
 
misc::udp2log::instance { 'oxygen':
-   multicast => true,
-   log_directory => $webrequest_log_directory,
+   multicast   => true,
+   packet_loss_log => '/var/log/udp2log/packet-loss.log',
+   log_directory   => $webrequest_log_directory,
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e485795ca8c7e644f79e3c30660554c11c86b8a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fixing packet_loss_log file on oxygen udp2log instance - change (operations/puppet)

2013-06-17 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Fixing packet_loss_log file on oxygen udp2log instance
..

Fixing packet_loss_log file on oxygen udp2log instance

Change-Id: I0e485795ca8c7e644f79e3c30660554c11c86b8a
---
M manifests/role/logging.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/manifests/role/logging.pp b/manifests/role/logging.pp
index 5192dfb..bb9304a 100644
--- a/manifests/role/logging.pp
+++ b/manifests/role/logging.pp
@@ -274,6 +274,7 @@
 
misc::udp2log::instance { 'oxygen':
multicast => true,
+   packet_loss_log => '/var/log/udp2log/packet-loss.log'
log_directory => $webrequest_log_directory,
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Enable CentralNotice on Stable Mobile Site - change (mediawiki...CentralNotice)

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

Change subject: Enable CentralNotice on Stable Mobile Site
..


Enable CentralNotice on Stable Mobile Site

The beta phase seems to have been fairly successful. Let's do
more of the same just one the stable site!

Change-Id: I7214b088bc53853d92a0179026bf0676cccf8bae
---
M CentralNotice.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/CentralNotice.php b/CentralNotice.php
index b157a62..e92924f 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -163,9 +163,7 @@
'ext.centralNotice.bannerController.mobiledevice',
'ext.centralNotice.bannerController.mobile',
);
-   if ( $mode !== 'stable' ) {
-   $out->addModules( $names );
-   }
+   $out->addModules( $names );
return true;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7214b088bc53853d92a0179026bf0676cccf8bae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Enable CentralNotice on Stable Mobile Site - change (mediawiki...CentralNotice)

2013-06-17 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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


Change subject: Enable CentralNotice on Stable Mobile Site
..

Enable CentralNotice on Stable Mobile Site

The beta phase seems to have been fairly successful. Let's do
more of the same just one the stable site!

Change-Id: I7214b088bc53853d92a0179026bf0676cccf8bae
---
M CentralNotice.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/CentralNotice.php b/CentralNotice.php
index b157a62..e92924f 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -163,9 +163,7 @@
'ext.centralNotice.bannerController.mobiledevice',
'ext.centralNotice.bannerController.mobile',
);
-   if ( $mode !== 'stable' ) {
-   $out->addModules( $names );
-   }
+   $out->addModules( $names );
return true;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7214b088bc53853d92a0179026bf0676cccf8bae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] Refund Actions! - change (wikimedia...PaymentsListeners)

2013-06-17 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Refund Actions!
..


Refund Actions!

This will failmail for us so that at least we know we got one :)

Change-Id: Id7bca5543b65ccf7ceb45834db780669f2dd29bc
---
A SmashPig/PaymentProviders/Adyen/Actions/RefundInitiatedAction.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
2 files changed, 50 insertions(+), 0 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git a/SmashPig/PaymentProviders/Adyen/Actions/RefundInitiatedAction.php 
b/SmashPig/PaymentProviders/Adyen/Actions/RefundInitiatedAction.php
new file mode 100644
index 000..706508c
--- /dev/null
+++ b/SmashPig/PaymentProviders/Adyen/Actions/RefundInitiatedAction.php
@@ -0,0 +1,28 @@
+pspReference}' with correlation id '" .
+   "{$msg->correlationId}'! What do we do 
now?",
+   $msg
+   );
+   }
+
+   Logger::leaveContext();
+   return true;
+   }
+}
diff --git 
a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
index bf572b4..db9f3ff 100644
--- a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
+++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
@@ -1,4 +1,26 @@
 execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7bca5543b65ccf7ceb45834db780669f2dd29bc
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Katie Horn 

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


[MediaWiki-commits] [Gerrit] Bug 49557: Fix talk topic add overlay - change (mediawiki...MobileFrontend)

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

Change subject: Bug 49557: Fix talk topic add overlay
..


Bug 49557: Fix talk topic add overlay

* Run _super to ensure that parent is opened on a close
* invalidate cache so that when the talk button is clicked on again it
loads the new talk page content
* Hide the button bar when save is clicked to prevent duplicate edits
with the same content

Change-Id: I6775efa41e098c015af30c63c68af8f66f58fc0f
---
M javascripts/modules/talk.js
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/javascripts/modules/talk.js b/javascripts/modules/talk.js
index a4c861a..ac0ad9e 100644
--- a/javascripts/modules/talk.js
+++ b/javascripts/modules/talk.js
@@ -15,6 +15,7 @@
},
template: M.template.get( 'overlays/talkSectionAdd' ),
initialize: function( options ) {
+   this._super( options );
this.talkOverlay = options.parent;
this.title = 'Talk:' + mw.config.get( 'wgTitle' 
);
},
@@ -32,6 +33,7 @@
$subject.removeClass( 'error' );
if ( text && heading ) {
this.$( '.content' ).empty().addClass( 
'loading' );
+   this.$( '.buttonBar' ).hide();
api.getToken().done( function( token ) {
api.post( {
action: 'edit',
@@ -43,6 +45,7 @@
text: text + ' '
} ).done( function() {
self.hide();
+   
M.history.invalidateCachedPage( self.title );

self.talkOverlay.appendSection( { heading: heading, content: text } ); // 
FIXME: doesn't add signature and doesn't wikify
} );
} );

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

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

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


[MediaWiki-commits] [Gerrit] Adyen Chargeback Handling - change (wikimedia...PaymentsListeners)

2013-06-17 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Adyen Chargeback Handling
..


Adyen Chargeback Handling

This will at least give us some intelligent failmail when we get
a chargeback :)

Change-Id: I564f64676e01cb6aa52dfd199f49df5428bf7692
---
M SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
A SmashPig/PaymentProviders/Adyen/Actions/ChargebackInitiatedAction.php
A SmashPig/PaymentProviders/Adyen/Actions/ChargebackReversedAction.php
A SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/ChargebackReversed.php
A 
SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php
A SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php
7 files changed, 194 insertions(+), 0 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git a/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php 
b/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
index b313b16..2e8bb90 100644
--- a/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
+++ b/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
@@ -5,6 +5,11 @@
 use SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Capture;
 use SmashPig\Core\Logging\Logger;
 
+/**
+ * Action that takes place after a Capture modification request has completed.
+ *
+ * @package SmashPig\PaymentProviders\Adyen\Actions
+ */
 class CaptureResponseAction implements IListenerMessageAction {
public function execute( ListenerMessage $msg ) {
Logger::enterContext( 'CaptureResponseAction' );
diff --git 
a/SmashPig/PaymentProviders/Adyen/Actions/ChargebackInitiatedAction.php 
b/SmashPig/PaymentProviders/Adyen/Actions/ChargebackInitiatedAction.php
new file mode 100644
index 000..6a0835f
--- /dev/null
+++ b/SmashPig/PaymentProviders/Adyen/Actions/ChargebackInitiatedAction.php
@@ -0,0 +1,34 @@
+pspReference}' with correlation id '" .
+   "{$msg->correlationId}'! What do we do 
now?",
+   $msg
+   );
+   }
+
+   Logger::leaveContext();
+   return true;
+   }
+}
diff --git 
a/SmashPig/PaymentProviders/Adyen/Actions/ChargebackReversedAction.php 
b/SmashPig/PaymentProviders/Adyen/Actions/ChargebackReversedAction.php
new file mode 100644
index 000..aebcff5
--- /dev/null
+++ b/SmashPig/PaymentProviders/Adyen/Actions/ChargebackReversedAction.php
@@ -0,0 +1,28 @@
+pspReference}' with correlation id '" .
+   "{$msg->correlationId}'! What do we do 
now?",
+   $msg
+   );
+   }
+
+   Logger::leaveContext();
+   return true;
+   }
+}
diff --git a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php
new file mode 100644
index 000..3e5f2a4
--- /dev/null
+++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Chargeback.php
@@ -0,0 +1,34 @@
+execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
+}
\ No newline at end of file
diff --git 
a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/ChargebackReversed.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/ChargebackReversed.php
index ce8e21a..907beba 100644
--- a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/ChargebackReversed.php
+++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/ChargebackReversed.php
@@ -1,5 +1,32 @@
 execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
 }
diff --git 
a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php
 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php
new file mode 100644
index 000..a7267fd
--- /dev/null
+++ 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/NotificationOfChargeback.php
@@ -0,0 +1,33 @@
+execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
+}
\ No newline at end of file
diff --git 
a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php
new file mode 100644
index 000..99d900f
--- /dev/null
+++ 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RequestForInformation.php
@@ -0,0 +1,33 

[MediaWiki-commits] [Gerrit] Make editor disappear after a successful save - change (mediawiki...MobileFrontend)

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

Change subject: Make editor disappear after a successful save
..


Make editor disappear after a successful save

After changing the back button behavior, the editor would reappear after
saving an edit. This prevents it.

Also make Router use an object for routes so that subsequent Router#route()
calls don't add duplicate entries.

Change-Id: I85c3613c789f65883b7ad470d15571a11b0b14d0
---
M javascripts/common/Router.js
M javascripts/modules/editor/EditorOverlay.js
M tests/javascripts/common/test_Router.js
3 files changed, 21 insertions(+), 8 deletions(-)

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



diff --git a/javascripts/common/Router.js b/javascripts/common/Router.js
index 2643a4c..bfbd310 100644
--- a/javascripts/common/Router.js
+++ b/javascripts/common/Router.js
@@ -2,10 +2,10 @@
 
var EventEmitter = M.require( 'eventemitter' );
 
-   function matchRoute( hash, route ) {
-   var match = hash.match( route.path );
+   function matchRoute( hash, entry ) {
+   var match = hash.match( entry.path );
if ( match ) {
-   route.callback.apply( this, match.slice( 1 ) );
+   entry.callback.apply( this, match.slice( 1 ) );
return true;
}
return false;
@@ -18,7 +18,9 @@
 
function Router() {
var self = this;
-   this.routes = [];
+   // use an object instead of an array for routes so that we don't
+   // duplicate entries that already exist
+   this.routes = {};
this._enabled = true;
 
$( window ).on( 'hashchange', function( ev ) {
@@ -33,7 +35,7 @@
self.emit( 'route', routeEv );
 
if ( !routeEv.isDefaultPrevented() ) {
-   $.each( self.routes, function( i, entry ) {
+   $.each( self.routes, function( id, entry ) {
return !matchRoute( hash, entry );
} );
} else {
@@ -60,13 +62,23 @@
 */
Router.prototype.route = function( path, callback ) {
var entry = {
-   path: path instanceof RegExp ? path : new RegExp( '^' + 
path + '$' ),
+   path: typeof path === 'string' ? new RegExp( '^' + path 
+ '$' ) : path,
callback: callback
};
-   this.routes.push( entry );
+   this.routes[entry.path] = entry;
matchRoute( window.location.hash.slice( 1 ), entry );
};
 
+   /**
+* Navigate to a specific route. This is only a wrapper for changing the
+* hash now.
+*
+* @param {string} path String with a route (hash without #).
+*/
+   Router.prototype.navigate = function( path ) {
+   window.location.hash = path;
+   };
+
Router.prototype.isSupported = function() {
return 'onhashchange' in window;
};
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index 649730b..a7a9364 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -175,6 +175,7 @@
self.log( 'success' );
M.history.invalidateCachedPage( title );
new Page( { title: title, el: $( 
'#content' ) } );
+   M.router.navigate( '' );
self.hide();
popup.show(
mw.msg( 
'mobile-frontend-editor-success' ),
diff --git a/tests/javascripts/common/test_Router.js 
b/tests/javascripts/common/test_Router.js
index 6082f5d..09ba082 100644
--- a/tests/javascripts/common/test_Router.js
+++ b/tests/javascripts/common/test_Router.js
@@ -26,7 +26,7 @@
} );
 
QUnit.asyncTest( '#route, RegExp', 1, function( assert ) {
-   router.route( /testre-(\d+)/, function( param ) {
+   router.route( /^testre-(\d+)$/, function( param ) {
assert.strictEqual( param, '123', 'run callback for 
route with correct params' );
QUnit.start();
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85c3613c789f65883b7ad470d15571a11b0b14d0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Rev

[MediaWiki-commits] [Gerrit] Bug 49279: Style upload button correctly in Opera and Firefox - change (mediawiki...MobileFrontend)

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

Change subject: Bug 49279: Style upload button correctly in Opera and Firefox
..


Bug 49279: Style upload button correctly in Opera and Firefox

The file input is a pain to style. So apply the styling to the list
item itself. Make the file input invisible using opacity so it is
still clickable. Set a width and height for the purpose of Firefox so
that entire button is clickable.

Bug: 49279
Change-Id: I0ebcb9a569e7dccaea41e3462885e1f607b1c3ae
---
M less/common/pageactions.less
M stylesheets/common/pageactions.css
2 files changed, 37 insertions(+), 35 deletions(-)

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



diff --git a/less/common/pageactions.less b/less/common/pageactions.less
index b5a546f..c7d1472 100644
--- a/less/common/pageactions.less
+++ b/less/common/pageactions.less
@@ -26,26 +26,26 @@
position: relative;
height: 40px;
width: 40px;
+   text-indent: -px;
+   background-position: center center;
+   background-repeat: no-repeat;
+   .background-size( auto, @watchStarSize );
 
-   button,
+   // file inputs are notoriously difficult to style
+   input {
+   opacity: 0;
+   }
+
input,
a {
-   width: 40px; // undo rules set in watchlist / nearby 
lists
-   background-position: center center;
-   .background-size( auto, @watchStarSize );
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
-   text-indent: -px;
-   background-repeat: no-repeat;
+   width: 100%;
+   height: 100%;
}
-   }
-
-   .edit-page {
-   margin-top: 0;
-   background-image: url(images/pagemenu/edit.png);
}
 }
 
@@ -56,17 +56,19 @@
}
 }
 
+#ca-edit {
+   background-image: url(images/pagemenu/edit.png);
+}
+
 #ca-talk {
-   a {
-   background-image: url(images/pagemenu/talk.png);
-   }
+   background-image: url(images/pagemenu/talk.png);
+}
+
+#ca-upload {
+   background-image: url(images/pagemenu/upload.png);
 }
 
 #ca-edit.enabled,
 #ca-upload.enabled {
display: inline-block;
-   input {
-   border: none;
-   background-image: url(images/pagemenu/upload.png);
-   }
 }
diff --git a/stylesheets/common/pageactions.css 
b/stylesheets/common/pageactions.css
index 7d80397..c771b49 100644
--- a/stylesheets/common/pageactions.css
+++ b/stylesheets/common/pageactions.css
@@ -19,29 +19,28 @@
   position: relative;
   height: 40px;
   width: 40px;
-}
-#page-actions li button,
-#page-actions li input,
-#page-actions li a {
-  width: 40px;
+  text-indent: -px;
   background-position: center center;
+  background-repeat: no-repeat;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
   -moz-background-size: auto 22px;
   -o-background-size: auto 22px;
   -webkit-background-size: auto 22px;
   background-size: auto 22px;
+}
+#page-actions li input {
+  opacity: 0;
+}
+#page-actions li input,
+#page-actions li a {
   position: absolute;
   top: 0;
   right: 0;
   bottom: 0;
   left: 0;
-  text-indent: -px;
-  background-repeat: no-repeat;
-}
-#page-actions .edit-page {
-  margin-top: 0;
-  background-image: url(images/pagemenu/edit.png);
+  width: 100%;
+  height: 100%;
 }
 .watch-this-article {
   background-image: url(images/pagemenu/watch.png);
@@ -49,15 +48,16 @@
 .watch-this-article.watched {
   background-image: url(images/pagemenu/watched.png);
 }
-#ca-talk a {
+#ca-edit {
+  background-image: url(images/pagemenu/edit.png);
+}
+#ca-talk {
   background-image: url(images/pagemenu/talk.png);
+}
+#ca-upload {
+  background-image: url(images/pagemenu/upload.png);
 }
 #ca-edit.enabled,
 #ca-upload.enabled {
   display: inline-block;
-}
-#ca-edit.enabled input,
-#ca-upload.enabled input {
-  border: none;
-  background-image: url(images/pagemenu/upload.png);
 }

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

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

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


[MediaWiki-commits] [Gerrit] Spike 820: Reduce API errors related to anonymous tokens (ho... - change (mediawiki...MobileFrontend)

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

Change subject: Spike 820: Reduce API errors related to anonymous tokens 
(hopefully)
..


Spike 820: Reduce API errors related to anonymous tokens (hopefully)

When wgMFUseCentralAuthToken is enabled ask for centralauth tokens
to avoid not logged in on foreign wiki issues

Change-Id: Iada82266e0108189a727c39dad9e32c6cc1c120c
---
M MobileFrontend.php
M includes/skins/SkinMinerva.php
M javascripts/common/mf-api.js
M javascripts/common/uploads/PhotoApi.js
4 files changed, 41 insertions(+), 9 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index 980d397..e3b96fe 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -147,6 +147,12 @@
  */
 $wgMFDefaultSkinClass = 'SkinMobile';
 
+/*
+ * Allow editing (uploading) to external CentralAuth-enabled wikis where
+ * the user might not be logged in.
+ */
+$wgMFUseCentralAuthToken = false;
+
 /**
  * An api to which any photos should be uploaded
  * e.g. $wgMFPhotoUploadEndpoint = 'http://commons.wikimedia.org/w/api.php';
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 38fb19d..9403b7d 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -88,6 +88,7 @@
 */
public function getSkinConfigVariables() {
global $wgMFLeadPhotoUploadCssSelector, 
$wgMFEnableCssAnimations,
+   $wgMFUseCentralAuthToken,
$wgMFAnonymousEditing, $wgMFEnablePhotoUploadCTA,
$wgMFPhotoUploadEndpoint, $wgMFPhotoUploadAppendToDesc;
 
@@ -96,6 +97,7 @@
$userCanCreatePage = !$title->exists() && $title->quickUserCan( 
'create', $user );
 
$vars = array(
+   'wgMFUseCentralAuthToken' => $wgMFUseCentralAuthToken,
'wgMFAnonymousEditing' => $wgMFAnonymousEditing,
'wgMFEnablePhotoUploadCTA' => $wgMFEnablePhotoUploadCTA,
'wgMFPhotoUploadAppendToDesc' => 
$wgMFPhotoUploadAppendToDesc,
diff --git a/javascripts/common/mf-api.js b/javascripts/common/mf-api.js
index 4e772e1..2c255c8 100644
--- a/javascripts/common/mf-api.js
+++ b/javascripts/common/mf-api.js
@@ -130,20 +130,24 @@
 *
 * @param {String} tokenType: Name of the type of token needed e.g. 
edit, upload - defaults to edit
 * @param {String} endpoint: Optional alternative host to query via CORS
+* @param {String} caToken: Optional additional CentralAuth token to be
+* sent with the request. This is needed for requests to external wikis
+* where the user is not logged in. caToken is for single use only.
 * @return {jQuery.Deferred} Object returned by $.ajax(), callback will 
be passed
 *   the token string, false if the user is anon or undefined where not 
available or a warning is set
 */
-   Api.prototype.getToken = function( tokenType, endpoint ) {
-   var data, d = $.Deferred();
+   Api.prototype.getToken = function( tokenType, endpoint, caToken ) {
+   var data, d = $.Deferred(), isCacheable;
 
tokenType = tokenType || 'edit';
+   isCacheable = tokenType !== 'centralauth';
 
if ( !this.tokenCache[ endpoint ] ) {
this.tokenCache[ endpoint ] = {};
}
if ( !M.isLoggedIn() ) {
return d.reject( 'Token requested when not logged in.' 
);
-   } else if ( this.tokenCache[ endpoint ].hasOwnProperty( 
tokenType ) ) {
+   } else if ( isCacheable && this.tokenCache[ endpoint 
].hasOwnProperty( tokenType ) ) {
return this.tokenCache[ endpoint ][ tokenType ];
} else {
data = {
@@ -152,6 +156,9 @@
};
if ( endpoint ) {
data.origin = M.getOrigin();
+   if ( caToken ) {
+   data.centralauthtoken = caToken;
+   }
}
this.ajax( data, {
url: endpoint || M.getApiUrl(),
diff --git a/javascripts/common/uploads/PhotoApi.js 
b/javascripts/common/uploads/PhotoApi.js
index 81e2ba5..f284952 100644
--- a/javascripts/common/uploads/PhotoApi.js
+++ b/javascripts/common/uploads/PhotoApi.js
@@ -76,6 +76,7 @@
}
 
PhotoApi = Api.extend( {
+   useCentralAuthToken: mw.config.get( 'wgMFUseCentralAuthToken' ),
updatePage: function( options, callback ) {
var self = this;
self.getToken().done( function( token ) {
@@ -119,7 +12

[MediaWiki-commits] [Gerrit] Test case for 95733390dc87894fe85b3479a9268fe2d797b26e - change (mediawiki...VisualEditor)

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

Change subject: Test case for 95733390dc87894fe85b3479a9268fe2d797b26e
..


Test case for 95733390dc87894fe85b3479a9268fe2d797b26e

Change-Id: I8c2e239e945466f3e46c92efab03f7e615bc6887
---
M modules/ve/test/dm/ve.dm.example.js
1 file changed, 79 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve/test/dm/ve.dm.example.js 
b/modules/ve/test/dm/ve.dm.example.js
index f106ee9..236e907 100644
--- a/modules/ve/test/dm/ve.dm.example.js
+++ b/modules/ve/test/dm/ve.dm.example.js
@@ -3161,6 +3161,85 @@
{ 'type': 'internalList' },
{ 'type': '/internalList' }
]
+   },
+   'attribute preservation does not crash due to text node split': {
+   'html': ' foo bar baz',
+   'data': [
+   {
+   'type': 'mwBlockImage',
+   'attributes': {
+   'type': 'thumb',
+   'align': 'default',
+   'href': 'Foo',
+   'src': 'Bar',
+   'width': '1',
+   'height': '2',
+   'resource': 'FooBar'
+   },
+   'htmlAttributes': [ {
+   'values': { 'data-parsoid': '{}' },
+   'children': [
+   {
+   'values': { 
'data-parsoid': '{}' },
+   'children': [ {
+   'values': { 
'data-parsoid': '{}' }
+   } ]
+   },
+   {
+   'values': { 
'data-parsoid': '{}' },
+   'children': [
+   { 'values': { 
'data-parsoid': '{}' } }
+   ]
+   }
+]
+   } ]
+   },
+   { 'type': 'mwImageCaption', 'internal': { 'whitespace': 
[ undefined, ' ' ] } },
+   { 'type': 'paragraph', 'internal': { 'generated': 
'wrapper', 'whitespace': [ ' ' ] } },
+   'f', 'o', 'o', ' ',
+   [
+   'b',
+   [ {
+   'type': 'link/mwInternal',
+   'attributes': {
+   'title': 'Bar',
+   'origTitle': 'Bar',
+   'hrefPrefix': './'
+   },
+   'htmlAttributes': [ { 'values': { 
'href': './Bar', 'rel': 'mw:WikiLink', 'data-parsoid': '{}' } } ]
+   } ]
+   ],
+   [
+   'a',
+   [ {
+   'type': 'link/mwInternal',
+   'attributes': {
+   'title': 'Bar',
+   'origTitle': 'Bar',
+   'hrefPrefix': './'
+   },
+   'htmlAttributes': [ { 'values': { 
'href': './Bar', 'rel': 'mw:WikiLink', 'data-parsoid': '{}' } } ]
+   } ]
+   ],
+   [
+   'r',
+   [ {
+   'type': 'link/mwInternal',
+   'attributes': {
+   'title': 'Bar',
+   'origTitle': 'Bar',
+   'hrefPrefix': './'
+   },
+   'htmlAttributes': [ { 'values': { 
'href': './Bar', 'rel': 'mw:WikiLink', 'data-parsoid': '{}' } } ]
+   } ]
+   ],
+   ' ', 'b', 'a', 'z',
+ 

[MediaWiki-commits] [Gerrit] Merge SkinMobileBase into SkinMobile - change (mediawiki...MobileFrontend)

2013-06-17 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Merge SkinMobileBase into SkinMobile
..

Merge SkinMobileBase into SkinMobile

Change-Id: I59649f4e856febf867c31131b46b9dcdfb9c140f
---
M MobileFrontend.php
M includes/skins/SkinMobile.php
D includes/skins/SkinMobileBase.php
3 files changed, 238 insertions(+), 252 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 980d397..4ed9014 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -69,7 +69,6 @@
'MobileTemplateWML' => 'skins/MobileTemplateWML',
'SkinMinerva' => 'skins/SkinMinerva',
'SkinMobile' => 'skins/SkinMobile',
-   'SkinMobileBase' => 'skins/SkinMobileBase',
'SkinMobileWML' => 'skins/SkinMobileWML',
'UserLoginAndCreateTemplate' => 'skins/UserLoginAndCreateTemplate',
'UserLoginMobileTemplate' => 'skins/UserLoginMobileTemplate',
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index d0778ea..c4be939 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -1,7 +1,99 @@
 setContext( $extMobileFrontend );
+   $this->extMobileFrontend = $extMobileFrontend;
+   $ctx = MobileContext::singleton();
+   $this->addPageClass( 'mobile' );
+   if ( $ctx->isAlphaGroupMember() ) {
+   $this->addPageClass( 'alpha' );
+   } else if ( $ctx->isBetaGroupMember() ) {
+   $this->addPageClass( 'beta' );
+   } else {
+   $this->addPageClass( 'stable' );
+   }
+   }
+
+   public function outputPage( OutputPage $out = null ) {
+   global $wgMFNoindexPages;
+   wfProfileIn( __METHOD__ );
+   if ( !$out ) {
+   $out = $this->getOutput();
+   }
+   if ( $wgMFNoindexPages ) {
+   $out->setRobotPolicy( 'noindex,nofollow' );
+   }
+
+   $options = null;
+   if ( wfRunHooks( 'BeforePageDisplayMobile', array( &$out, 
&$options ) ) ) {
+   if ( is_array( $options ) ) {
+   $this->hookOptions = $options;
+   }
+   }
+   $html = $this->extMobileFrontend->DOMParse( $out );
+
+   wfProfileIn( __METHOD__  . '-tpl' );
+   $tpl = $this->prepareTemplate();
+   $tpl->set( 'headelement', $out->headElement( $this ) );
+   $tpl->set( 'bodytext', $html );
+   // FIXME: Move to ZeroRatedMobileAccess extension
+   $tpl->set( 'zeroRatedBanner', 
$this->extMobileFrontend->getZeroRatedBanner() );
+   $notice = '';
+   wfRunHooks( 'GetMobileNotice', array( $this, &$notice ) );
+   $tpl->set( 'notice', $notice );
+   $tpl->set( 'reporttime', wfReportTime() );
+   $tpl->execute();
+   wfProfileOut( __METHOD__  . '-tpl' );
+
+   wfProfileOut( __METHOD__ );
+   }
+
+   /**
+* This will be called by OutputPage::headElement when it is creating 
the
+* "" tag, - adds output property bodyClassName to the existing 
classes
+* @param $out OutputPage
+* @param $bodyAttrs Array
+*/
+   public function addToBodyAttributes( $out, &$bodyAttrs ) {
+   // does nothing by default
+   $classes = $out->getProperty( 'bodyClassName' );
+   $bodyAttrs[ 'class' ] .= ' ' . $classes;
+   }
+
+   /**
+* @param string $className: valid class name
+*/
+   private function addPageClass( $className ) {
+   $this->pageClassNames[ $className ] = true;
+   }
+
+   /**
+* Takes a title and returns classes to apply to the body tag
+* @param $title Title
+* @return String
+*/
+   public function getPageClasses( $title ) {
+   if ( $title->isMainPage() ) {
+   $className = 'page-Main_Page ';
+   } else if ( $title->isSpecialPage() ) {
+   $className = 'mw-mf-special ';
+   } else {
+   $className = '';
+   }
+   return $className . implode( ' ', array_keys( 
$this->pageClassNames ) );
+   }
 
public function initPage( OutputPage $out ) {
parent::initPage( $out );
@@ -9,6 +101,125 @@
if ( $ctx->isBetaGroupMember() ) {
$out->addModuleStyles( 'mobile.styles.beta' );
}
+   }
+
+   public function prepareData( BaseTemplate $tpl ) {
+   parent::prepareData( $tpl );
+ 

[MediaWiki-commits] [Gerrit] Create an empty /etc/exim4/defer_domains if it does not exist. - change (operations/puppet)

2013-06-17 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Create an empty /etc/exim4/defer_domains if it does not exist.
..


Create an empty /etc/exim4/defer_domains if it does not exist.

It's referred to in the conf file and exim bails if it can't find it.

Change-Id: I62dffea8a62402081043884b15f597229869f0d3
---
M manifests/mail.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/mail.pp b/manifests/mail.pp
index 7eb69f4..45a267e 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -169,6 +169,11 @@
group => Debian-exim,
mode => 0444,
content => 
template("exim/system_filter.conf.erb");
+   "/etc/exim4/defer_domains":
+   owner => root,
+   group => Debian-exim,
+   mode => 0444,
+   ensure => present;
}
 
class mail_relay {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62dffea8a62402081043884b15f597229869f0d3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Make rc_cur_id have proper value for upload log entries. - change (mediawiki/core)

2013-06-17 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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


Change subject: Make rc_cur_id have proper value for upload log entries.
..

Make rc_cur_id have proper value for upload log entries.

Primary motivation here is to make Special:Recentchangelinked work
correctly for uploads where the description page doesn't exist yet.
(Previously it was mostly only showing reupload log entries)

Mild downside to this approach is adding the recentchanges row is
now in a different commit...

Change-Id: I74c68b972c47c03066d3065e3748769a27a654fb
---
M RELEASE-NOTES-1.22
M includes/filerepo/file/LocalFile.php
2 files changed, 12 insertions(+), 2 deletions(-)


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

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 1b434d9..e98ed8e 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -150,6 +150,7 @@
   'pageid', 'page', 'title', and 'text' (e.g. if only passed 'summary'). A
   warning will instead be issued if 'title' is non-default, unless no props are
   requested.
+* Special:Recentchangeslinked will now include upload log entries
 
 === API changes in 1.22 ===
 * (bug 46626) xmldoublequote parameter was removed. Because of a bug, the
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index b21b87a..4a2f692 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -1294,11 +1294,16 @@
// creation, page doesn't exist yet, so log_page = 0
// but we want it to point to the page we're making,
// so we later modify the log entry.
+   // For a similar reason, we avoid making an RC entry
+   // now and wait until the page exists.
$logId = $logEntry->insert();
-   $logEntry->publish( $logId );
 
-   wfProfileIn( __METHOD__ . '-edit' );
$exists = $descTitle->exists();
+   if ( $exists ) {
+   // Page exists, do RC entry now (otherwise we wait for 
later).
+   $logEntry->publish( $logId );
+   }
+   wfProfileIn( __METHOD__ . '-edit' );
 
if ( $exists ) {
# Create a null revision
@@ -1343,9 +1348,13 @@
array( 'log_id' => $logId ),
__METHOD__
);
+   // Now that the page exists, make an RC entry.
+   $logEntry->publish( $logId );
$dbw->commit( __METHOD__ ); // commit before 
anything bad can happen
}
}
+
+
wfProfileOut( __METHOD__ . '-edit' );
 
# Save to cache and purge the squid

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

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

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


[MediaWiki-commits] [Gerrit] (WIP) Re-create DOM element for MWBlockImageNode only when n... - change (mediawiki...VisualEditor)

2013-06-17 Thread Inez (Code Review)
Inez has uploaded a new change for review.

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


Change subject: (WIP) Re-create DOM element for MWBlockImageNode only when 
necessary
..

(WIP) Re-create DOM element for MWBlockImageNode only when necessary

Change-Id: I2119d5fa1d705728bdf0f8f6a9196adf2b38020e
---
M modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
1 file changed, 31 insertions(+), 3 deletions(-)


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

diff --git a/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js 
b/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
index 1aa2d50..33c75ea 100644
--- a/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
+++ b/modules/ve/dm/nodes/ve.dm.MWBlockImageNode.js
@@ -16,6 +16,14 @@
  */
 ve.dm.MWBlockImageNode = function VeDmMWBlockImageNode( length, element ) {
ve.dm.BranchNode.call( this, 0, element );
+
+   /*
+   // Properties
+   this.dirty = false;
+
+   // Events
+   this.connect( this, { 'attributeChange': 'onAttributeChange' } );
+   */
 };
 
 /* Inheritance */
@@ -50,7 +58,8 @@
width: $img.attr( 'width' ),
height: $img.attr( 'height' ),
resource: $img.attr( 'resource' )
-   };
+   },
+   dataElement;
 
// Extract individual classes
classes = typeof classes === 'string' ?
@@ -85,17 +94,24 @@
}
 
if ( $caption.length === 0 ) {
-   return [
+   dataElement = [
{ 'type': 'mwBlockImage', 'attributes': attributes },
{ 'type': 'mwImageCaption' },
{ 'type': '/mwImageCaption' },
{ 'type': '/mwBlockImage' }
];
} else {
-   return [ { 'type': 'mwBlockImage', 'attributes': attributes } ].
+   dataElement = [ { 'type': 'mwBlockImage', 'attributes': 
attributes } ].
concat( converter.getDataFromDomRecursionClean( 
$caption[0], { 'type': 'mwImageCaption' } ) ).
concat( [ { 'type': '/mwBlockImage' } ] );
}
+
+   converter.getStore().index(
+   domElements,
+   ve.getHash( this.getHashObject( dataElement[0] ) )
+   );
+
+   return dataElement;
 };
 
 // TODO: Consider using jQuery instead of pure JS.
@@ -107,6 +123,11 @@
a = doc.createElement( 'a' ),
img = doc.createElement( 'img' ),
wrapper = doc.createElement( 'div' );
+
+   var index = converter.getStore().indexOfHash( ve.getHash( 
this.getHashObject( dataElement ) ) );
+   if ( index ) {
+   return ve.copyArray( converter.getStore().value( index ) );
+   }
 
// Type
if ( dataElement.attributes.type === 'thumb' ) {
@@ -152,6 +173,13 @@
return [ figure ];
 };
 
+/* Methods */
+/*
+ve.dm.MWBlockImageNode.prototype.onAttributeChange = function () {
+   this.dirty = true;
+};
+*/
+
 /* Registration */
 
 ve.dm.modelRegistry.register( ve.dm.MWBlockImageNode );

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

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

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


[MediaWiki-commits] [Gerrit] Create an empty /etc/exim4/defer_domains if it does not exist. - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Create an empty /etc/exim4/defer_domains if it does not exist.
..

Create an empty /etc/exim4/defer_domains if it does not exist.

It's referred to in the conf file and exim bails if it can't find it.

Change-Id: I62dffea8a62402081043884b15f597229869f0d3
---
M manifests/mail.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/69267/1

diff --git a/manifests/mail.pp b/manifests/mail.pp
index 7eb69f4..45a267e 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -169,6 +169,11 @@
group => Debian-exim,
mode => 0444,
content => 
template("exim/system_filter.conf.erb");
+   "/etc/exim4/defer_domains":
+   owner => root,
+   group => Debian-exim,
+   mode => 0444,
+   ensure => present;
}
 
class mail_relay {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62dffea8a62402081043884b15f597229869f0d3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] Failing test case for 95733390dc87894fe85b3479a9268fe2d797b26e - change (mediawiki...VisualEditor)

2013-06-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Failing test case for 95733390dc87894fe85b3479a9268fe2d797b26e
..

Failing test case for 95733390dc87894fe85b3479a9268fe2d797b26e

Change-Id: I8c2e239e945466f3e46c92efab03f7e615bc6887
---
M modules/ve/test/dm/ve.dm.example.js
1 file changed, 81 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve/test/dm/ve.dm.example.js 
b/modules/ve/test/dm/ve.dm.example.js
index f106ee9..56d092e 100644
--- a/modules/ve/test/dm/ve.dm.example.js
+++ b/modules/ve/test/dm/ve.dm.example.js
@@ -3161,6 +3161,87 @@
{ 'type': 'internalList' },
{ 'type': '/internalList' }
]
+   },
+   'attribute preservation does not crash due to text node split': {
+   'html': ' foo bar baz',
+   'data': [
+   {
+   'type': 'mwBlockImage',
+   'attributes': {
+   'type': 'thumb',
+   'align': 'default',
+   'href': 'Foo',
+   'src': 'Bar',
+   'width': '1',
+   'height': '2',
+   'resource': 'FooBar'
+   },
+   'htmlAttributes': [ {
+   'values': { 'data-parsoid': '{}' },
+   'children': [
+   {
+   'values': { 
'data-parsoid': '{}' },
+   'children': [ {
+   'values': { 
'data-parsoid': '{}' }
+   } ]
+   },
+   {
+   'values': { 
'data-parsoid': '{}' },
+   'children': [
+   { 'values': {} 
},
+   { 'values': { 
'data-parsoid': '{}' } },
+   { 'values': {} }
+   ]
+   }
+]
+   } ]
+   },
+   { 'type': 'mwImageCaption', 'internal': { 'whitespace': 
[ undefined, ' ' ] } },
+   { 'type': 'paragraph', 'internal': { 'generated': 
'wrapper', 'whitespace': [ ' ' ] } },
+   'f', 'o', 'o', ' ',
+   [
+   'b',
+   [ {
+   'type': 'link/mwInternal',
+   'attributes': {
+   'title': 'Bar',
+   'origTitle': 'Bar',
+   'hrefPrefix': './'
+   },
+   'htmlAttributes': [ { 'values': { 
'href': './Bar', 'rel': 'mw:WikiLink', 'data-parsoid': '{}' } } ]
+   } ]
+   ],
+   [
+   'a',
+   [ {
+   'type': 'link/mwInternal',
+   'attributes': {
+   'title': 'Bar',
+   'origTitle': 'Bar',
+   'hrefPrefix': './'
+   },
+   'htmlAttributes': [ { 'values': { 
'href': './Bar', 'rel': 'mw:WikiLink', 'data-parsoid': '{}' } } ]
+   } ]
+   ],
+   [
+   'r',
+   [ {
+   'type': 'link/mwInternal',
+   'attributes': {
+   'title': 'Bar',
+   'origTitle': 'Bar',
+   'hrefPrefix': './'
+   },
+  

[MediaWiki-commits] [Gerrit] Address Krinkle's review comments from I51c441d61 - change (mediawiki...VisualEditor)

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

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


Change subject: Address Krinkle's review comments from I51c441d61
..

Address Krinkle's review comments from I51c441d61

See 
.

Change-Id: I14442070c0998d724d67ec41cca813ef5bce2c19
---
M modules/ve/init/mw/ve.init.mw.splitTest.js
1 file changed, 9 insertions(+), 10 deletions(-)


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

diff --git a/modules/ve/init/mw/ve.init.mw.splitTest.js 
b/modules/ve/init/mw/ve.init.mw.splitTest.js
index 592c6f0..7a50f83 100644
--- a/modules/ve/init/mw/ve.init.mw.splitTest.js
+++ b/modules/ve/init/mw/ve.init.mw.splitTest.js
@@ -2,10 +2,6 @@
 ( function ( mw, $ ) {
'use strict';
 
-   if ( !mw.config.get( 'wgVisualEditorConfig', {} ).enableEventLogging ) {
-   return;
-   }
-
function log( action ) {
var dfd = $.Deferred();
setTimeout( dfd.reject, 1000 );
@@ -25,29 +21,32 @@
return dfd;
}
 
+   if ( !mw.config.get( 'wgVisualEditorConfig', {} ).enableEventLogging ) {
+   return;
+   }
+
mw.hook( 'postEdit' ).add( function () {
log( 'page-save-success' );
} );
 
-   if ( mw.config.get('wgAction') === 'edit' ) {
+   if ( mw.config.get( 'wgAction' ) === 'edit' ) {
log( 'page-edit-impression' );
}
 
// Log clicks on page edit and section edit links
$( '#ca-edit a, .mw-editsection a' ).on( 'click', function ( e ) {
-   var href = this.href,
-   action = /section=/.test( href ) ? 
'section-edit-link-click' : 'edit-link-click';
+   var el = this, action = /section=/.test( el.href ) ? 
'section-edit-link-click' : 'edit-link-click';
log( action ).always( function () {
-   window.location = href;
+   window.location = el.href;
} );
e.preventDefault();
} );
 
// Log edit submit
$( '#wpSave' ).one( 'click', function ( e ) {
-   var $save = $( this );
+   var el = this;
log( 'page-save-attempt' ).always( function () {
-   $save.trigger( 'click' );
+   $( el ).trigger( 'click' );
} );
e.preventDefault();
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14442070c0998d724d67ec41cca813ef5bce2c19
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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] Adding Capture Message - change (wikimedia...PaymentsListeners)

2013-06-17 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Adding Capture Message
..


Adding Capture Message

Apparently I forgot a key message -- the Capture message is sent once
the payment has been totally completed. We dont do anything here yet
but maybe in the future we will. Mostly this allows us to check that
nothing silly happens.

Change-Id: I7b79253698e623bfd4cead623317a879a6e0cc71
---
A SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
A SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php
2 files changed, 69 insertions(+), 0 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git a/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php 
b/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
new file mode 100644
index 000..b313b16
--- /dev/null
+++ b/SmashPig/PaymentProviders/Adyen/Actions/CaptureResponseAction.php
@@ -0,0 +1,32 @@
+success ) {
+   // Crap; we've already recorded that this 
message has succeeded; guess
+   // we should just send an email saying hey! 
something unexpected happened!
+   Logger::error(
+   "Payment with reference 
{$msg->pspReference} and correlation id {$msg->correlationId} previously " .
+   "recorded as a success has 
failed to be successfully captured! Fix your records!",
+   $msg
+   );
+   }
+   /* else {
+   // TODO: This is probably where we should 
record payment, but I don't want to
+   // add the complexity of a second job at this 
time.
+   }
+   */
+   }
+
+   Logger::leaveContext();
+   return true;
+   }
+}
\ No newline at end of file
diff --git a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php
new file mode 100644
index 000..eb25a7a
--- /dev/null
+++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Capture.php
@@ -0,0 +1,37 @@
+execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b79253698e623bfd4cead623317a879a6e0cc71
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Katie Horn 

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


[MediaWiki-commits] [Gerrit] Actions Should be Associated with their Messages - change (wikimedia...PaymentsListeners)

2013-06-17 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Actions Should be Associated with their Messages
..


Actions Should be Associated with their Messages

Instead of going through the global action chain this will have
the message be responsible for running it's actions.

Change-Id: Ibc2a408e847aa1d229b9d8967599198cf512
---
M SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php
M SmashPig/config_defaults.php
3 files changed, 22 insertions(+), 4 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git a/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php 
b/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php
index b2ace0f..8cdd2b6 100644
--- a/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php
+++ b/SmashPig/PaymentProviders/Adyen/Actions/PaymentCaptureAction.php
@@ -4,7 +4,6 @@
 use SmashPig\Core\Messages\ListenerMessage;
 use SmashPig\Core\Actions\IListenerMessageAction;
 use SmashPig\PaymentProviders\Adyen\ExpatriatedMessages\Authorisation;
-use SmashPig\Core\DataStores\KeyedOpaqueDataStore;
 use SmashPig\PaymentProviders\Adyen\Jobs\ProcessCaptureRequestJob;
 use SmashPig\Core\Logging\Logger;
 
diff --git 
a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php
index edeac2b..4f711a8 100644
--- a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php
+++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Authorisation.php
@@ -1,6 +1,7 @@
 correlationId = static::createCorrelationId( 
$this->merchantReference );
}
+
+   /**
+* Will run all the actions that are loaded (from the 'actions' 
configuration
+* node) and that are applicable to this message type. Will return true
+* if all actions returned true. Otherwise will return false. This 
implicitly
+* means that the message will be re-queued if any action fails. 
Therefore
+* all actions need to be idempotent.
+*
+* @returns bool True if all actions were successful. False otherwise.
+*/
+   public function runActionChain() {
+   $action = new PaymentCaptureAction();
+   $result = $action->execute( $this );
+
+   if ( $result === true ) {
+   return parent::runActionChain();
+   } else {
+   return false;
+   }
+   }
 }
diff --git a/SmashPig/config_defaults.php b/SmashPig/config_defaults.php
index 5fa0e36..c8a4ce9 100644
--- a/SmashPig/config_defaults.php
+++ b/SmashPig/config_defaults.php
@@ -108,9 +108,7 @@
 ),
 ),
 
-   'actions' => array(
-   
'SmashPig\PaymentProviders\Adyen\Actions\PaymentCaptureAction',
-   )
+   'actions' => array( ),
 ),
 
'paypal' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc2a408e847aa1d229b9d8967599198cf512
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Katie Horn 

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


[MediaWiki-commits] [Gerrit] Refactor exim::rt to use the new exim template. - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Refactor exim::rt to use the new exim template.
..


Refactor exim::rt to use the new exim template.

Change-Id: If1fb27d94e34aa6fb62406c708b401c17c66a9a2
---
D files/exim/exim4.rt.conf
M manifests/mail.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
3 files changed, 87 insertions(+), 227 deletions(-)

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



diff --git a/files/exim/exim4.rt.conf b/files/exim/exim4.rt.conf
deleted file mode 100644
index dd06e5e..000
--- a/files/exim/exim4.rt.conf
+++ /dev/null
@@ -1,209 +0,0 @@
-# Exim 4 configuration file for streber.wikimedia.org
-# Written on 2010-08-10 by Mark Bergsma 
-
-##
-# Macros #
-##
-
-CONFDIR=/etc/exim4
-
-###
-# Main configuration settings #
-###
-
-# Standard lists
-hostlist wikimedia_nets = <; 208.80.152.0/22 ; 91.198.174.0/24 ; 
2620:0:860::/46 ; 10.0.0.0/16
-domainlist system_domains = @
-
-domainlist local_domains = +system_domains
-domainlist rt_domains = rt.wikimedia.org
-hostlist rt_mail_from_hosts = mchenry.wikimedia.org
-hostlist relay_from_hosts = <; @[]
-
-# Interfaces
-daemon_smtp_ports = smtp
-
-# Administration
-log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
-
-# Policy control
-acl_smtp_connect = acl_check_connect
-acl_smtp_rcpt = acl_check_rcpt
-
-helo_try_verify_hosts = *
-
-# Allow RT to use any sender address
-untrusted_set_sender = *
-local_from_check = false
-
-# Resource control
-check_spool_space = 50M
-deliver_queue_load_max = 75.0
-queue_only_load = 50.0
-smtp_accept_max = 100
-smtp_accept_max_per_host = 10
-smtp_reserve_hosts = <; 127.0.0.1 ; ::1 ; +wikimedia_nets
-smtp_accept_reserve = 20
-smtp_accept_queue_per_connection = 500
-remote_max_parallel = 25
-smtp_connect_backlog = 32
-
-# Lookups
-host_lookup = *
-rfc1413_hosts = 
-rfc1413_query_timeout = 5s
-
-# Other
-never_users = root : daemon : bin
-ignore_bounce_errors_after = 0h
-
-###
-# Access Control Lists (ACLs) #
-###
-
-begin acl
-
-acl_check_connect:
-# We only accept mail from our own mail relays
-require message = This server does not accept external mail
-   hosts = <; 127.0.0.0/8 ; ::1 ; +wikimedia_nets
-
-   accept
-
-acl_check_rcpt:
-
-# Accept if the source is local SMTP (a pipe)
-
-accept hosts = :
-
-# Deny if the local part contains @, %, /, | or !, or starts with a dot
-
-deny local_parts = ^.*[@%!/|] : ^\\.
-
-# Accept relaying from networks we control. Note: no address 
verification
-# is done at this point, which is good for mail submission, but may 
render
-# recipient callout verification by affected hosts useless.
-
-accept hosts = +rt_mail_from_hosts : +relay_from_hosts
-
-# Require recipient domain to be local, or a domain we relay for
-   
-   require message = Relay not permitted
-   domains = +local_domains
-
-# { recipient domain is under our administrative control }
-
-# Verify the recipient address for local domains, or require the
-# recipient domain to exist for remote domains
-
-require verify = recipient
-
-# Mail can be safely accepted here, but we may want to do more
-# rfc compliance checking and spam filtering.
-
-   # Trust that the mail relay has done all checking
-
-accept
-
-
-###
-# Routers #
-###
-
-begin routers
-
-# Use the system aliasfile /etc/aliases for system domains
-
-system_aliases:
-driver = redirect
-domains = +system_domains
-data = ${lookup{$local_part}lsearch{/etc/aliases}}
-pipe_transport = address_pipe
-allow_fail
-allow_defer
-forbid_file
-
-# Mail destined for RT
-
-# This router checks whether the local part consists of solely digits,
-# and assumes this is the ticket number of an existing ticket if this is
-# the case. It rewrites the address to the general queue, and puts the
-# ticket nr in $address_data, where the rt_pipe transport can access it.
-
-rt_ticket:
-   driver = redirect
-   domains = +rt_domains
-   local_part_suffix = -comment
-   local_part_suffix_optional
-   condition = ${if match{$local_part}{\N^\d+$\N}{yes}{no}}
-   address_data = EXTENSION=$local_part
-   data = general$local_part_suffix@$domain
-   redirect_router = rt
-   no_verify
-
-rt:
-   driver = accept
-   domains = +rt_domains
-   local_part_suffix = -comment
-   local_part_suffix_optional
-   transport = rt_pipe
-
-
-# Send all mail not destined for the

[MediaWiki-commits] [Gerrit] Refactor exim::rt to use the new exim template. - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Refactor exim::rt to use the new exim template.
..

Refactor exim::rt to use the new exim template.

Change-Id: If1fb27d94e34aa6fb62406c708b401c17c66a9a2
---
D files/exim/exim4.rt.conf
M manifests/mail.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
3 files changed, 87 insertions(+), 227 deletions(-)


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

diff --git a/files/exim/exim4.rt.conf b/files/exim/exim4.rt.conf
deleted file mode 100644
index dd06e5e..000
--- a/files/exim/exim4.rt.conf
+++ /dev/null
@@ -1,209 +0,0 @@
-# Exim 4 configuration file for streber.wikimedia.org
-# Written on 2010-08-10 by Mark Bergsma 
-
-##
-# Macros #
-##
-
-CONFDIR=/etc/exim4
-
-###
-# Main configuration settings #
-###
-
-# Standard lists
-hostlist wikimedia_nets = <; 208.80.152.0/22 ; 91.198.174.0/24 ; 
2620:0:860::/46 ; 10.0.0.0/16
-domainlist system_domains = @
-
-domainlist local_domains = +system_domains
-domainlist rt_domains = rt.wikimedia.org
-hostlist rt_mail_from_hosts = mchenry.wikimedia.org
-hostlist relay_from_hosts = <; @[]
-
-# Interfaces
-daemon_smtp_ports = smtp
-
-# Administration
-log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
-
-# Policy control
-acl_smtp_connect = acl_check_connect
-acl_smtp_rcpt = acl_check_rcpt
-
-helo_try_verify_hosts = *
-
-# Allow RT to use any sender address
-untrusted_set_sender = *
-local_from_check = false
-
-# Resource control
-check_spool_space = 50M
-deliver_queue_load_max = 75.0
-queue_only_load = 50.0
-smtp_accept_max = 100
-smtp_accept_max_per_host = 10
-smtp_reserve_hosts = <; 127.0.0.1 ; ::1 ; +wikimedia_nets
-smtp_accept_reserve = 20
-smtp_accept_queue_per_connection = 500
-remote_max_parallel = 25
-smtp_connect_backlog = 32
-
-# Lookups
-host_lookup = *
-rfc1413_hosts = 
-rfc1413_query_timeout = 5s
-
-# Other
-never_users = root : daemon : bin
-ignore_bounce_errors_after = 0h
-
-###
-# Access Control Lists (ACLs) #
-###
-
-begin acl
-
-acl_check_connect:
-# We only accept mail from our own mail relays
-require message = This server does not accept external mail
-   hosts = <; 127.0.0.0/8 ; ::1 ; +wikimedia_nets
-
-   accept
-
-acl_check_rcpt:
-
-# Accept if the source is local SMTP (a pipe)
-
-accept hosts = :
-
-# Deny if the local part contains @, %, /, | or !, or starts with a dot
-
-deny local_parts = ^.*[@%!/|] : ^\\.
-
-# Accept relaying from networks we control. Note: no address 
verification
-# is done at this point, which is good for mail submission, but may 
render
-# recipient callout verification by affected hosts useless.
-
-accept hosts = +rt_mail_from_hosts : +relay_from_hosts
-
-# Require recipient domain to be local, or a domain we relay for
-   
-   require message = Relay not permitted
-   domains = +local_domains
-
-# { recipient domain is under our administrative control }
-
-# Verify the recipient address for local domains, or require the
-# recipient domain to exist for remote domains
-
-require verify = recipient
-
-# Mail can be safely accepted here, but we may want to do more
-# rfc compliance checking and spam filtering.
-
-   # Trust that the mail relay has done all checking
-
-accept
-
-
-###
-# Routers #
-###
-
-begin routers
-
-# Use the system aliasfile /etc/aliases for system domains
-
-system_aliases:
-driver = redirect
-domains = +system_domains
-data = ${lookup{$local_part}lsearch{/etc/aliases}}
-pipe_transport = address_pipe
-allow_fail
-allow_defer
-forbid_file
-
-# Mail destined for RT
-
-# This router checks whether the local part consists of solely digits,
-# and assumes this is the ticket number of an existing ticket if this is
-# the case. It rewrites the address to the general queue, and puts the
-# ticket nr in $address_data, where the rt_pipe transport can access it.
-
-rt_ticket:
-   driver = redirect
-   domains = +rt_domains
-   local_part_suffix = -comment
-   local_part_suffix_optional
-   condition = ${if match{$local_part}{\N^\d+$\N}{yes}{no}}
-   address_data = EXTENSION=$local_part
-   data = general$local_part_suffix@$domain
-   redirect_router = rt
-   no_verify
-
-rt:
-   driver = accept
-   domains = +rt_domains
-   local_part_suffix = -comment
-   local_part_suffix_optional
-   transport = rt_pipe
-
-
-# Send

[MediaWiki-commits] [Gerrit] Revert "Refactor exim::rt to use the new exim template." - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Revert "Refactor exim::rt to use the new exim template."
..


Revert "Refactor exim::rt to use the new exim template."

This patch somehow glommed on to a different exim
refactor which I'm not ready to merge yet.

This reverts commit b86a33d166c16b9797c817aa7f10eee4359a4a31.

Change-Id: I0faf4e101572ade8de8f808ba10ddf6c05b160eb
---
R files/exim/exim4.listserver_aliases.conf
A files/exim/exim4.rt.conf
R files/exim/exim4.secondary_relay_domains.conf
R files/mailman/docroot/favicon.ico
R files/mailman/docroot/favicon.png
R files/mailman/docroot/robots.txt
R files/mailman/mm_cfg.py
R files/spamassassin/spamassassin.default
A manifests/mail.pp
M manifests/site.pp
D modules/exim/manifests/init.pp
D modules/exim/manifests/mailman.pp
D modules/exim/manifests/role/mediawiki.pp
D modules/exim/manifests/role/rt.pp
D modules/exim/manifests/role/simple-mail-sender.pp
D modules/exim/manifests/spamassassin.pp
R templates/exim/exim4.conf.SMTP_IMAP_MM.erb
R templates/exim/exim4.default.erb
R templates/exim/exim4.donate.erb
R templates/exim/exim4.minimal.erb
R templates/exim/system_filter.conf.erb
21 files changed, 576 insertions(+), 440 deletions(-)

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



diff --git a/modules/exim/files/exim4.listserver_aliases.conf 
b/files/exim/exim4.listserver_aliases.conf
similarity index 100%
rename from modules/exim/files/exim4.listserver_aliases.conf
rename to files/exim/exim4.listserver_aliases.conf
diff --git a/files/exim/exim4.rt.conf b/files/exim/exim4.rt.conf
new file mode 100644
index 000..dd06e5e
--- /dev/null
+++ b/files/exim/exim4.rt.conf
@@ -0,0 +1,209 @@
+# Exim 4 configuration file for streber.wikimedia.org
+# Written on 2010-08-10 by Mark Bergsma 
+
+##
+# Macros #
+##
+
+CONFDIR=/etc/exim4
+
+###
+# Main configuration settings #
+###
+
+# Standard lists
+hostlist wikimedia_nets = <; 208.80.152.0/22 ; 91.198.174.0/24 ; 
2620:0:860::/46 ; 10.0.0.0/16
+domainlist system_domains = @
+
+domainlist local_domains = +system_domains
+domainlist rt_domains = rt.wikimedia.org
+hostlist rt_mail_from_hosts = mchenry.wikimedia.org
+hostlist relay_from_hosts = <; @[]
+
+# Interfaces
+daemon_smtp_ports = smtp
+
+# Administration
+log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
+
+# Policy control
+acl_smtp_connect = acl_check_connect
+acl_smtp_rcpt = acl_check_rcpt
+
+helo_try_verify_hosts = *
+
+# Allow RT to use any sender address
+untrusted_set_sender = *
+local_from_check = false
+
+# Resource control
+check_spool_space = 50M
+deliver_queue_load_max = 75.0
+queue_only_load = 50.0
+smtp_accept_max = 100
+smtp_accept_max_per_host = 10
+smtp_reserve_hosts = <; 127.0.0.1 ; ::1 ; +wikimedia_nets
+smtp_accept_reserve = 20
+smtp_accept_queue_per_connection = 500
+remote_max_parallel = 25
+smtp_connect_backlog = 32
+
+# Lookups
+host_lookup = *
+rfc1413_hosts = 
+rfc1413_query_timeout = 5s
+
+# Other
+never_users = root : daemon : bin
+ignore_bounce_errors_after = 0h
+
+###
+# Access Control Lists (ACLs) #
+###
+
+begin acl
+
+acl_check_connect:
+# We only accept mail from our own mail relays
+require message = This server does not accept external mail
+   hosts = <; 127.0.0.0/8 ; ::1 ; +wikimedia_nets
+
+   accept
+
+acl_check_rcpt:
+
+# Accept if the source is local SMTP (a pipe)
+
+accept hosts = :
+
+# Deny if the local part contains @, %, /, | or !, or starts with a dot
+
+deny local_parts = ^.*[@%!/|] : ^\\.
+
+# Accept relaying from networks we control. Note: no address 
verification
+# is done at this point, which is good for mail submission, but may 
render
+# recipient callout verification by affected hosts useless.
+
+accept hosts = +rt_mail_from_hosts : +relay_from_hosts
+
+# Require recipient domain to be local, or a domain we relay for
+   
+   require message = Relay not permitted
+   domains = +local_domains
+
+# { recipient domain is under our administrative control }
+
+# Verify the recipient address for local domains, or require the
+# recipient domain to exist for remote domains
+
+require verify = recipient
+
+# Mail can be safely accepted here, but we may want to do more
+# rfc compliance checking and spam filtering.
+
+   # Trust that the mail relay has done all checking
+
+accept
+
+
+###
+# Routers #
+###
+
+begin routers
+
+# Use the system aliasfile /etc/aliases for system domains
+
+system_aliases:
+

[MediaWiki-commits] [Gerrit] Center left and right arrows on uploads first time user tuto... - change (mediawiki...MobileFrontend)

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

Change subject: Center left and right arrows on uploads first time user tutorial
..


Center left and right arrows on uploads first time user tutorial

Change-Id: Ib0120cb2a3cb70069b11559b1d69b2a36ed21358
---
M less/specials/uploads.less
M stylesheets/specials/uploads.css
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/less/specials/uploads.less b/less/specials/uploads.less
index 8bbfb54..bbda150 100644
--- a/less/specials/uploads.less
+++ b/less/specials/uploads.less
@@ -29,13 +29,13 @@
 
&.prev {
left: @buttonPadding;
-   background: url(images/uploads/chevron_left.png) 20% 
8px no-repeat;
+   background: url(images/uploads/chevron_left.png) 20% 
center no-repeat;
.background-size( auto, 20px );
}
 
&.next {
right: @buttonPadding;
-   background: url(images/uploads/chevron_right.png) 80% 
8px no-repeat;
+   background: url(images/uploads/chevron_right.png) 80% 
center no-repeat;
.background-size( auto, 20px );
}
 
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 9349346..f750f78 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -27,7 +27,7 @@
 }
 .carousel > button.prev {
   left: 4px;
-  background: url(images/uploads/chevron_left.png) 20% 8px no-repeat;
+  background: url(images/uploads/chevron_left.png) 20% center no-repeat;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
   -moz-background-size: auto 20px;
@@ -37,7 +37,7 @@
 }
 .carousel > button.next {
   right: 4px;
-  background: url(images/uploads/chevron_right.png) 80% 8px no-repeat;
+  background: url(images/uploads/chevron_right.png) 80% center no-repeat;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
   -moz-background-size: auto 20px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0120cb2a3cb70069b11559b1d69b2a36ed21358
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: awjrichards 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Revert "Refactor exim::rt to use the new exim template." - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Revert "Refactor exim::rt to use the new exim template."
..

Revert "Refactor exim::rt to use the new exim template."

This patch somehow glommed on to a different exim
refactor which I'm not ready to merge yet.

This reverts commit b86a33d166c16b9797c817aa7f10eee4359a4a31.

Change-Id: I0faf4e101572ade8de8f808ba10ddf6c05b160eb
---
R files/exim/exim4.listserver_aliases.conf
A files/exim/exim4.rt.conf
R files/exim/exim4.secondary_relay_domains.conf
R files/mailman/docroot/favicon.ico
R files/mailman/docroot/favicon.png
R files/mailman/docroot/robots.txt
R files/mailman/mm_cfg.py
R files/spamassassin/spamassassin.default
A manifests/mail.pp
M manifests/site.pp
D modules/exim/manifests/init.pp
D modules/exim/manifests/mailman.pp
D modules/exim/manifests/role/mediawiki.pp
D modules/exim/manifests/role/rt.pp
D modules/exim/manifests/role/simple-mail-sender.pp
D modules/exim/manifests/spamassassin.pp
R templates/exim/exim4.conf.SMTP_IMAP_MM.erb
R templates/exim/exim4.default.erb
R templates/exim/exim4.donate.erb
R templates/exim/exim4.minimal.erb
R templates/exim/system_filter.conf.erb
21 files changed, 576 insertions(+), 440 deletions(-)


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

diff --git a/modules/exim/files/exim4.listserver_aliases.conf 
b/files/exim/exim4.listserver_aliases.conf
similarity index 100%
rename from modules/exim/files/exim4.listserver_aliases.conf
rename to files/exim/exim4.listserver_aliases.conf
diff --git a/files/exim/exim4.rt.conf b/files/exim/exim4.rt.conf
new file mode 100644
index 000..dd06e5e
--- /dev/null
+++ b/files/exim/exim4.rt.conf
@@ -0,0 +1,209 @@
+# Exim 4 configuration file for streber.wikimedia.org
+# Written on 2010-08-10 by Mark Bergsma 
+
+##
+# Macros #
+##
+
+CONFDIR=/etc/exim4
+
+###
+# Main configuration settings #
+###
+
+# Standard lists
+hostlist wikimedia_nets = <; 208.80.152.0/22 ; 91.198.174.0/24 ; 
2620:0:860::/46 ; 10.0.0.0/16
+domainlist system_domains = @
+
+domainlist local_domains = +system_domains
+domainlist rt_domains = rt.wikimedia.org
+hostlist rt_mail_from_hosts = mchenry.wikimedia.org
+hostlist relay_from_hosts = <; @[]
+
+# Interfaces
+daemon_smtp_ports = smtp
+
+# Administration
+log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
+
+# Policy control
+acl_smtp_connect = acl_check_connect
+acl_smtp_rcpt = acl_check_rcpt
+
+helo_try_verify_hosts = *
+
+# Allow RT to use any sender address
+untrusted_set_sender = *
+local_from_check = false
+
+# Resource control
+check_spool_space = 50M
+deliver_queue_load_max = 75.0
+queue_only_load = 50.0
+smtp_accept_max = 100
+smtp_accept_max_per_host = 10
+smtp_reserve_hosts = <; 127.0.0.1 ; ::1 ; +wikimedia_nets
+smtp_accept_reserve = 20
+smtp_accept_queue_per_connection = 500
+remote_max_parallel = 25
+smtp_connect_backlog = 32
+
+# Lookups
+host_lookup = *
+rfc1413_hosts = 
+rfc1413_query_timeout = 5s
+
+# Other
+never_users = root : daemon : bin
+ignore_bounce_errors_after = 0h
+
+###
+# Access Control Lists (ACLs) #
+###
+
+begin acl
+
+acl_check_connect:
+# We only accept mail from our own mail relays
+require message = This server does not accept external mail
+   hosts = <; 127.0.0.0/8 ; ::1 ; +wikimedia_nets
+
+   accept
+
+acl_check_rcpt:
+
+# Accept if the source is local SMTP (a pipe)
+
+accept hosts = :
+
+# Deny if the local part contains @, %, /, | or !, or starts with a dot
+
+deny local_parts = ^.*[@%!/|] : ^\\.
+
+# Accept relaying from networks we control. Note: no address 
verification
+# is done at this point, which is good for mail submission, but may 
render
+# recipient callout verification by affected hosts useless.
+
+accept hosts = +rt_mail_from_hosts : +relay_from_hosts
+
+# Require recipient domain to be local, or a domain we relay for
+   
+   require message = Relay not permitted
+   domains = +local_domains
+
+# { recipient domain is under our administrative control }
+
+# Verify the recipient address for local domains, or require the
+# recipient domain to exist for remote domains
+
+require verify = recipient
+
+# Mail can be safely accepted here, but we may want to do more
+# rfc compliance checking and spam filtering.
+
+   # Trust that the mail relay has done all checking
+
+accept
+
+
+###
+# Routers #
+###
+
+begin routers
+
+# Use the system aliasfile /etc/aliases for system domain

[MediaWiki-commits] [Gerrit] Don't manage eventlogging.conf during upgrade - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Don't manage eventlogging.conf during upgrade
..


Don't manage eventlogging.conf during upgrade

I'm rolling out updates to the back-end of EventLogging and need to manually
manage the state of various services for a short period (a day or two).

Change-Id: Ic96cd5c41ac4ff1a566c058e746c8918a00d14fe
---
M modules/eventlogging/manifests/supervisor.pp
1 file changed, 7 insertions(+), 6 deletions(-)

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



diff --git a/modules/eventlogging/manifests/supervisor.pp 
b/modules/eventlogging/manifests/supervisor.pp
index 577f55e..8fe40e4 100644
--- a/modules/eventlogging/manifests/supervisor.pp
+++ b/modules/eventlogging/manifests/supervisor.pp
@@ -22,11 +22,12 @@
mode=> '0444',
}
 
-   file { '/etc/supervisor/conf.d/eventlogging.conf':
-   content => template('eventlogging/eventlogging.conf.erb'),
-   require => File['/etc/supervisor/supervisord.conf'],
-   notify  => Service['supervisor'],
-   mode=> '0444',
-   }
+   # Temporarily disabled while I upgrade EL back-end (ori-l, 17-Jun-2013):
+   # file { '/etc/supervisor/conf.d/eventlogging.conf':
+   #   content => template('eventlogging/eventlogging.conf.erb'),
+   #   require => File['/etc/supervisor/supervisord.conf'],
+   #   notify  => Service['supervisor'],
+   #   mode=> '0444',
+   # }
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic96cd5c41ac4ff1a566c058e746c8918a00d14fe
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Asher 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)

2013-06-17 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Update VisualEditor to master
..


Update VisualEditor to master

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

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



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 863c512..9573339 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 863c512d20bbc8c17b43c34601f68c75976848aa
+Subproject commit 95733390dc87894fe85b3479a9268fe2d797b26e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fa9a876c29c1f3d672a4b666b4e416ee4ab191c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf7
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 

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


[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)

2013-06-17 Thread Catrope (Code Review)
Catrope has submitted this change and it was merged.

Change subject: Update VisualEditor to master
..


Update VisualEditor to master

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

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



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 863c512..9573339 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 863c512d20bbc8c17b43c34601f68c75976848aa
+Subproject commit 95733390dc87894fe85b3479a9268fe2d797b26e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4fa9a876c29c1f3d672a4b666b4e416ee4ab191c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf6
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 

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


[MediaWiki-commits] [Gerrit] Refactor exim::rt to use the new exim template. - change (operations/puppet)

2013-06-17 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Refactor exim::rt to use the new exim template.
..


Refactor exim::rt to use the new exim template.

Change-Id: I6dd5b30257643528da3e8bf671e8736bd87e495f
---
D files/exim/exim4.rt.conf
D manifests/mail.pp
M manifests/site.pp
R modules/exim/files/docroot/favicon.ico
R modules/exim/files/docroot/favicon.png
R modules/exim/files/docroot/robots.txt
R modules/exim/files/exim4.listserver_aliases.conf
R modules/exim/files/exim4.secondary_relay_domains.conf
R modules/exim/files/mm_cfg.py
R modules/exim/files/spamassassin.default
A modules/exim/manifests/init.pp
A modules/exim/manifests/mailman.pp
A modules/exim/manifests/role/mediawiki.pp
A modules/exim/manifests/role/rt.pp
A modules/exim/manifests/role/simple-mail-sender.pp
A modules/exim/manifests/spamassassin.pp
R modules/exim/templates/exim4.conf.SMTP_IMAP_MM.erb
R modules/exim/templates/exim4.default.erb
R modules/exim/templates/exim4.donate.erb
R modules/exim/templates/exim4.minimal.erb
R modules/exim/templates/system_filter.conf.erb
21 files changed, 440 insertions(+), 576 deletions(-)

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



diff --git a/files/exim/exim4.rt.conf b/files/exim/exim4.rt.conf
deleted file mode 100644
index dd06e5e..000
--- a/files/exim/exim4.rt.conf
+++ /dev/null
@@ -1,209 +0,0 @@
-# Exim 4 configuration file for streber.wikimedia.org
-# Written on 2010-08-10 by Mark Bergsma 
-
-##
-# Macros #
-##
-
-CONFDIR=/etc/exim4
-
-###
-# Main configuration settings #
-###
-
-# Standard lists
-hostlist wikimedia_nets = <; 208.80.152.0/22 ; 91.198.174.0/24 ; 
2620:0:860::/46 ; 10.0.0.0/16
-domainlist system_domains = @
-
-domainlist local_domains = +system_domains
-domainlist rt_domains = rt.wikimedia.org
-hostlist rt_mail_from_hosts = mchenry.wikimedia.org
-hostlist relay_from_hosts = <; @[]
-
-# Interfaces
-daemon_smtp_ports = smtp
-
-# Administration
-log_selector = +address_rewrite +all_parents +delivery_size +deliver_time 
+incoming_interface +incoming_port +smtp_confirmation +smtp_protocol_error 
+smtp_syntax_error +tls_cipher +tls_peerdn
-
-# Policy control
-acl_smtp_connect = acl_check_connect
-acl_smtp_rcpt = acl_check_rcpt
-
-helo_try_verify_hosts = *
-
-# Allow RT to use any sender address
-untrusted_set_sender = *
-local_from_check = false
-
-# Resource control
-check_spool_space = 50M
-deliver_queue_load_max = 75.0
-queue_only_load = 50.0
-smtp_accept_max = 100
-smtp_accept_max_per_host = 10
-smtp_reserve_hosts = <; 127.0.0.1 ; ::1 ; +wikimedia_nets
-smtp_accept_reserve = 20
-smtp_accept_queue_per_connection = 500
-remote_max_parallel = 25
-smtp_connect_backlog = 32
-
-# Lookups
-host_lookup = *
-rfc1413_hosts = 
-rfc1413_query_timeout = 5s
-
-# Other
-never_users = root : daemon : bin
-ignore_bounce_errors_after = 0h
-
-###
-# Access Control Lists (ACLs) #
-###
-
-begin acl
-
-acl_check_connect:
-# We only accept mail from our own mail relays
-require message = This server does not accept external mail
-   hosts = <; 127.0.0.0/8 ; ::1 ; +wikimedia_nets
-
-   accept
-
-acl_check_rcpt:
-
-# Accept if the source is local SMTP (a pipe)
-
-accept hosts = :
-
-# Deny if the local part contains @, %, /, | or !, or starts with a dot
-
-deny local_parts = ^.*[@%!/|] : ^\\.
-
-# Accept relaying from networks we control. Note: no address 
verification
-# is done at this point, which is good for mail submission, but may 
render
-# recipient callout verification by affected hosts useless.
-
-accept hosts = +rt_mail_from_hosts : +relay_from_hosts
-
-# Require recipient domain to be local, or a domain we relay for
-   
-   require message = Relay not permitted
-   domains = +local_domains
-
-# { recipient domain is under our administrative control }
-
-# Verify the recipient address for local domains, or require the
-# recipient domain to exist for remote domains
-
-require verify = recipient
-
-# Mail can be safely accepted here, but we may want to do more
-# rfc compliance checking and spam filtering.
-
-   # Trust that the mail relay has done all checking
-
-accept
-
-
-###
-# Routers #
-###
-
-begin routers
-
-# Use the system aliasfile /etc/aliases for system domains
-
-system_aliases:
-driver = redirect
-domains = +system_domains
-data = ${lookup{$local_part}lsearch{/etc/aliases}}
-pipe_transport = address_pipe
-allow_fail
-allow_defer
-forbid_file
-
-# Mail destined for RT
-
-# This router checks whether the local part consists of solely digits,
-# and assumes this i

[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)

2013-06-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Update VisualEditor to master
..

Update VisualEditor to master

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/69262/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 863c512..9573339 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 863c512d20bbc8c17b43c34601f68c75976848aa
+Subproject commit 95733390dc87894fe85b3479a9268fe2d797b26e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fa9a876c29c1f3d672a4b666b4e416ee4ab191c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf7
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Update VisualEditor to master - change (mediawiki/core)

2013-06-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Update VisualEditor to master
..

Update VisualEditor to master

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


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

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 863c512..9573339 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 863c512d20bbc8c17b43c34601f68c75976848aa
+Subproject commit 95733390dc87894fe85b3479a9268fe2d797b26e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fa9a876c29c1f3d672a4b666b4e416ee4ab191c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf6
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Uploads page: remove out the progress indicator - change (mediawiki...MobileFrontend)

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

Change subject: Uploads page: remove out the progress indicator
..


Uploads page: remove out the progress indicator

Change-Id: I75018f2edeb902818b8a253d1e726569f9a39760
---
M less/specials/uploads.less
D stylesheets/specials/images/uploads/Indicator_active.png
D stylesheets/specials/images/uploads/Indicator_default.png
M stylesheets/specials/uploads.css
M templates/specials/uploads/carousel.html
5 files changed, 2 insertions(+), 50 deletions(-)

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



diff --git a/less/specials/uploads.less b/less/specials/uploads.less
index d193add..8bbfb54 100644
--- a/less/specials/uploads.less
+++ b/less/specials/uploads.less
@@ -6,8 +6,6 @@
 }
 
 .carousel {
-   @indicatorHeight: 10px;
-   @indicatorPadding: 4px;
@buttonPadding: 4px;
 
position: relative;
@@ -27,7 +25,7 @@
position: absolute;
top: 0;
width: @searchBarPaddingLeft;
-   bottom: @indicatorHeight + @indicatorPadding;
+   bottom: 0;
 
&.prev {
left: @buttonPadding;
@@ -99,28 +97,6 @@
 
&.page-3 {
background-image: url(images/uploads/SplashScreen3.png);
-   }
-   }
-
-   ul {
-   position: absolute;
-   bottom: 0;
-   left: 0;
-   right: 0;
-   padding: @indicatorPadding 0 24px 0;
-   text-align: center;
-
-   li {
-   display: inline-block;
-   text-indent: -999px;
-   overflow: hidden;
-   width: 10px;
-   height: @indicatorHeight;
-   background: url(images/uploads/Indicator_default.png) 
50% 50% no-repeat;
-
-   &.active {
-   background-image: 
url(images/uploads/Indicator_active.png);
-   }
}
}
 }
diff --git a/stylesheets/specials/images/uploads/Indicator_active.png 
b/stylesheets/specials/images/uploads/Indicator_active.png
deleted file mode 100644
index e176109..000
--- a/stylesheets/specials/images/uploads/Indicator_active.png
+++ /dev/null
Binary files differ
diff --git a/stylesheets/specials/images/uploads/Indicator_default.png 
b/stylesheets/specials/images/uploads/Indicator_default.png
deleted file mode 100644
index 6acb2f8..000
--- a/stylesheets/specials/images/uploads/Indicator_default.png
+++ /dev/null
Binary files differ
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 7a41171..9349346 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -23,7 +23,7 @@
   position: absolute;
   top: 0;
   width: 40px;
-  bottom: 14px;
+  bottom: 0;
 }
 .carousel > button.prev {
   left: 4px;
@@ -96,25 +96,6 @@
 }
 .carousel .page.page-3 {
   background-image: url(images/uploads/SplashScreen3.png);
-}
-.carousel ul {
-  position: absolute;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  padding: 4px 0 24px 0;
-  text-align: center;
-}
-.carousel ul li {
-  display: inline-block;
-  text-indent: -999px;
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  background: url(images/uploads/Indicator_default.png) 50% 50% no-repeat;
-}
-.carousel ul li.active {
-  background-image: url(images/uploads/Indicator_active.png);
 }
 .ctaUploadPhoto {
   padding: 8px;
diff --git a/templates/specials/uploads/carousel.html 
b/templates/specials/uploads/carousel.html
index 7d1bc70..216b913 100644
--- a/templates/specials/uploads/carousel.html
+++ b/templates/specials/uploads/carousel.html
@@ -6,9 +6,4 @@
{{#cancel}}{{cancel}}{{/cancel}}
 
 {{/pages}}
-
-{{#pages}}
-   {{id}}
-{{/pages}}
-
 

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

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

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


[MediaWiki-commits] [Gerrit] New assets for first time user upload tutorial - change (mediawiki...MobileFrontend)

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

Change subject: New assets for first time user upload tutorial
..


New assets for first time user upload tutorial

Change-Id: Iade80e9edee7732e3665fc320c39d5472586ec82
---
M less/specials/uploads.less
M stylesheets/specials/images/uploads/SplashScreen1.png
M stylesheets/specials/images/uploads/SplashScreen2.png
M stylesheets/specials/images/uploads/SplashScreen3.png
M stylesheets/specials/uploads.css
5 files changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/less/specials/uploads.less b/less/specials/uploads.less
index db09d05..d193add 100644
--- a/less/specials/uploads.less
+++ b/less/specials/uploads.less
@@ -55,13 +55,13 @@
.border-radius( 0 );
}
 
-   @imageSize: 130px;
+   @imageHeight: 180px;
.page {
-   padding: @imageSize + 16px 0 0 0;
+   padding: @imageHeight 0 0 0;
text-align: center;
-   background-size: auto @imageSize;
+   background-size: auto @imageHeight;
background-repeat: no-repeat;
-   background-position: center 24px;
+   background-position: center 0;
top: 10px;
left: 100%;
bottom: 0;
@@ -81,7 +81,7 @@
strong {
display: block;
font-size: 1.1em;
-   margin: 32px 26px 16px;
+   margin: 0 26px 16px;
}
 
p {
diff --git a/stylesheets/specials/images/uploads/SplashScreen1.png 
b/stylesheets/specials/images/uploads/SplashScreen1.png
index d6e92e5..050348b 100644
--- a/stylesheets/specials/images/uploads/SplashScreen1.png
+++ b/stylesheets/specials/images/uploads/SplashScreen1.png
Binary files differ
diff --git a/stylesheets/specials/images/uploads/SplashScreen2.png 
b/stylesheets/specials/images/uploads/SplashScreen2.png
index 1fe047b..3868d96 100644
--- a/stylesheets/specials/images/uploads/SplashScreen2.png
+++ b/stylesheets/specials/images/uploads/SplashScreen2.png
Binary files differ
diff --git a/stylesheets/specials/images/uploads/SplashScreen3.png 
b/stylesheets/specials/images/uploads/SplashScreen3.png
index 622177d..819fbb5 100644
--- a/stylesheets/specials/images/uploads/SplashScreen3.png
+++ b/stylesheets/specials/images/uploads/SplashScreen3.png
Binary files differ
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 8cdec8d..7a41171 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -59,11 +59,11 @@
   border-radius: 0;
 }
 .carousel .page {
-  padding: 146px 0 0 0;
+  padding: 180px 0 0 0;
   text-align: center;
-  background-size: auto 130px;
+  background-size: auto 180px;
   background-repeat: no-repeat;
-  background-position: center 24px;
+  background-position: center 0;
   top: 10px;
   left: 100%;
   bottom: 0;
@@ -82,7 +82,7 @@
 .carousel .page strong {
   display: block;
   font-size: 1.1em;
-  margin: 32px 26px 16px;
+  margin: 0 26px 16px;
 }
 .carousel .page p {
   font-size: 0.9em;

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

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

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


[MediaWiki-commits] [Gerrit] Use indexes in .children, not .childNodes, for attribute pre... - change (mediawiki...VisualEditor)

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

Change subject: Use indexes in .children, not .childNodes, for attribute 
preservation
..


Use indexes in .children, not .childNodes, for attribute preservation

The difference is that .children excludes non-element nodes (text nodes
and comment nodes). These can't have attributes anyway, so there's
nothing lost by skipping them, and this way we avoid bugs where a
text node split causes the indexes to be off.

(Text node splits are probably due to an interaction between whitespace
preservation and paragraph unwrapping, and aren't necessarily bad. We
just shouldn't rely on indexes into .childNodes)

Change-Id: I905a50e1c299ebafcbd4eaa0f938b06a1b5849ff
---
M modules/ve/dm/ve.dm.Converter.js
1 file changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index d64465a..90f4701 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -129,7 +129,10 @@
if ( deep ) {
attributeList[i].children = [];
childList = ve.dm.Converter.buildHtmlAttributeList(
-   domElements[i].childNodes, spec, deep, 
attributeList[i].children
+   // Use .children rather than .childNodes so we 
don't mess around with things that
+   // can't have attributes anyway. Unfortunately, 
non-element nodes have .children
+   // set to undefined so we have to coerce it to 
an array in that case.
+   domElements[i].children || [], spec, deep, 
attributeList[i].children
);
if ( childList ) {
empty = false;
@@ -177,7 +180,7 @@
}
if ( attributeList[i].children ) {
ve.dm.Converter.renderHtmlAttributeList(
-   attributeList[i].children, 
domElements[i].childNodes, spec
+   attributeList[i].children, 
domElements[i].children, spec
);
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I905a50e1c299ebafcbd4eaa0f938b06a1b5849ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Only add Uploads page in mobile mode - change (mediawiki...MobileFrontend)

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

Change subject: Only add Uploads page in mobile mode
..


Only add Uploads page in mobile mode

This should avoid confusion being caused in
Bug 49606

Left a FIXME to revisit at future time.

Change-Id: Ib80615d678af477bfb57908b75bec8c121df02af
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index ab14665..980d397 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -113,7 +113,6 @@
 $wgHooks['Gadgets::allowLegacy'][] = 
'MobileFrontendHooks::onAllowLegacyGadgets';
 $wgHooks['UnitTestsList'][] = 'MobileFrontendHooks::onUnitTestsList';
 
-$wgSpecialPages['Uploads'] = 'SpecialUploads';
 $wgSpecialPages['MobileDiff'] = 'SpecialMobileDiff';
 $wgSpecialPages['MobileOptions'] = 'SpecialMobileOptions';
 $wgSpecialPages['MobileMenu'] = 'SpecialMobileMenu';
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 852f13a..9de603f 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -277,6 +277,8 @@
if ( MobileContext::singleton()->shouldDisplayMobileView() ) {
// Replace the standard watchlist view with our custom 
one
$list['Watchlist'] = 'SpecialMobileWatchlist';
+   // FIXME: Make uploads work on desktop
+   $list['Uploads'] = 'SpecialUploads';
$list['Userlogin'] = 'SpecialMobileUserlogin';
}
return true;

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

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

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


[MediaWiki-commits] [Gerrit] jshint/jsduck: Include config files in file match filter - change (integration/zuul-config)

2013-06-17 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: jshint/jsduck: Include config files in file match filter
..


jshint/jsduck: Include config files in file match filter

Follows-up e14076e, which made jshint/jsduck no longer run
when changing jsduck.json (or jsduck/config.json,
.docs/config.json, etc.), .jshintrc, .jshintignore etc.

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

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



diff --git a/layout.yaml b/layout.yaml
index e7adefd..4556897 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -247,15 +247,15 @@
 # Non-voting by default (most projects do not pass yet)
 voting: false
 files:
- - '^.*\.js$'
+ - '\.(js|json|jshint.*)$'
 
   - name: ^.*-jsduck$
 files:
- - '^.*\.js$'
+ - '\.(js|json)$'
 
   - name: ^.*-jsduck-publish$
 files:
- - '^.*\.js$'
+ - '\.(js|json)$'
 
   - name: ^.*-pep8$
 # Non-voting (most of our script fail the tests miserably)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I773e84e6f75512fd385df6120634e56d56be7928
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 49312) Add a 'Programs' namespace to metawiki. - change (operations/mediawiki-config)

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

Change subject: (bug 49312) Add a 'Programs' namespace to metawiki.
..


(bug 49312) Add a 'Programs' namespace to metawiki.

Re-submitting a patch originally submitted by Ori as
I2a1ade4 after securing community consensus.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 0d0f8ff..f998cda 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4378,6 +4378,8 @@
205 => 'Participation_talk',
206 => 'Iberocoop', // Bug 38398
207 => 'Iberocoop_talk',
+   208 => 'Programs', // bug 49312
+   209 => 'Programs_talk',
 
// This is a placeholder so that new Zero configuration pages 
can be created and tested
// on meta before the mobile zero extension is fully deployed.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95a8785c7868a190dc085a2556df3828e54c84ab
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bug 49503: Document missing round-tripping of redirect to ca... - change (mediawiki...Parsoid)

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

Change subject: Bug 49503: Document missing round-tripping of redirect to 
category
..


Bug 49503: Document missing round-tripping of redirect to category

Change-Id: Id1a79fe8366a9386191b919c2ce446fbf56d4863
---
M js/lib/ext.core.LinkHandler.js
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/js/lib/ext.core.LinkHandler.js b/js/lib/ext.core.LinkHandler.js
index 129f78b..38f0893 100644
--- a/js/lib/ext.core.LinkHandler.js
+++ b/js/lib/ext.core.LinkHandler.js
@@ -200,6 +200,11 @@
// For '#REDIRECT [[Category:Foo]] we've already "used 
up" our
// tsr on the #REDIRECT part.  Use a zero-width DSR 
here to
// note that this part is synthetic and to disable 
selser.
+   //
+   // Also, this won't round-trip without selser. Instead 
it will
+   // duplicate [[Category:Foo]] on each round-trip. As 
these
+   // redirects should really be to [[:Category:Foo]] 
these cases
+   // should be rare enough to not add much noise in rt 
testing.
if ( redirect ) { delete obj.dataAttribs.tsr; }
 
tokens.push( obj );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1a79fe8366a9386191b919c2ce446fbf56d4863
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] jshint/jsduck: Include config files in file match filter - change (integration/zuul-config)

2013-06-17 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: jshint/jsduck: Include config files in file match filter
..

jshint/jsduck: Include config files in file match filter

Follows-up e14076e, which made jshint/jsduck no longer run
when changing jsduck.json (or jsduck/config.json,
.docs/config.json, etc.), .jshintrc, .jshintignore etc.

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


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

diff --git a/layout.yaml b/layout.yaml
index e7adefd..4556897 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -247,15 +247,15 @@
 # Non-voting by default (most projects do not pass yet)
 voting: false
 files:
- - '^.*\.js$'
+ - '\.(js|json|jshint.*)$'
 
   - name: ^.*-jsduck$
 files:
- - '^.*\.js$'
+ - '\.(js|json)$'
 
   - name: ^.*-jsduck-publish$
 files:
- - '^.*\.js$'
+ - '\.(js|json)$'
 
   - name: ^.*-pep8$
 # Non-voting (most of our script fail the tests miserably)

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

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

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


[MediaWiki-commits] [Gerrit] Use canonical url instead of protocol relative for sitemap f... - change (mediawiki...GoogleNewsSitemap)

2013-06-17 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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


Change subject: Use canonical url instead of protocol relative for sitemap feed.
..

Use canonical url instead of protocol relative for sitemap feed.

No idea if google understand proto-relative, but I would guess no.

Change-Id: If9f05d42866a780753e210f371316eb0bbf8f4a8
---
M FeedSMItem.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/FeedSMItem.php b/FeedSMItem.php
index 7f82bf0..fbbb1b8 100644
--- a/FeedSMItem.php
+++ b/FeedSMItem.php
@@ -35,12 +35,12 @@
$commentsURL = '';
if ( $comment === true ) {
// The comment ns is this article's talk namespace.
-   $commentsURL = $title->getTalkPage()->getFullUrl();
+   $commentsURL = $title->getTalkPage()->getCanonicalURL();
} elseif ( is_int( $comment ) ) {
// There's a specific comments namespace.
$commentsTitle = Title::makeTitle( $comment, 
$title->getDBkey() );
if ( $commentsTitle ) {
-   $commentsURL = $commentsTitle->getFullUrl();
+   $commentsURL = 
$commentsTitle->getCanonicalURL();
}
}
 
@@ -48,7 +48,7 @@
$this->titleObj = $title;
 
parent::__construct( $title->getText(), '' /* Description */,
-   $title->getFullURL(), $pubDate, '' /* Author */, 
$commentsURL  );
+   $title->getCanonicalURL(), $pubDate, '' /* Author */, 
$commentsURL  );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Fixing Messages so We Don't Blow Up - change (wikimedia...PaymentsListeners)

2013-06-17 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Fixing Messages so We Don't Blow Up
..


Fixing Messages so We Don't Blow Up

Had some old stuff in here that would cause the system to not
recognize some IPN messages from Adyen. This patch will prevent
us from getting silly failmail when we don't need it.

Change-Id: Id464ee7143c17cc9496eaf5c31ab721ca764045e
---
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/AdyenMessage.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/Notificationtest.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/OrderClosed.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/OrderOpened.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundWithData.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/RefundedReversed.php
M SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/ReportAvailable.php
7 files changed, 14 insertions(+), 79 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git 
a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/AdyenMessage.php 
b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/AdyenMessage.php
index 6f3d6b4..0b31560 100644
--- a/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/AdyenMessage.php
+++ b/SmashPig/PaymentProviders/Adyen/ExpatriatedMessages/AdyenMessage.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/67554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id464ee7143c17cc9496eaf5c31ab721ca764045e
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/PaymentsListeners
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Katie Horn 

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


[MediaWiki-commits] [Gerrit] Bug 49503: Document missing round-tripping of redirect to ca... - change (mediawiki...Parsoid)

2013-06-17 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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


Change subject: Bug 49503: Document missing round-tripping of redirect to 
category
..

Bug 49503: Document missing round-tripping of redirect to category

Change-Id: Id1a79fe8366a9386191b919c2ce446fbf56d4863
---
M js/lib/ext.core.LinkHandler.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/js/lib/ext.core.LinkHandler.js b/js/lib/ext.core.LinkHandler.js
index 129f78b..38f0893 100644
--- a/js/lib/ext.core.LinkHandler.js
+++ b/js/lib/ext.core.LinkHandler.js
@@ -200,6 +200,11 @@
// For '#REDIRECT [[Category:Foo]] we've already "used 
up" our
// tsr on the #REDIRECT part.  Use a zero-width DSR 
here to
// note that this part is synthetic and to disable 
selser.
+   //
+   // Also, this won't round-trip without selser. Instead 
it will
+   // duplicate [[Category:Foo]] on each round-trip. As 
these
+   // redirects should really be to [[:Category:Foo]] 
these cases
+   // should be rare enough to not add much noise in rt 
testing.
if ( redirect ) { delete obj.dataAttribs.tsr; }
 
tokens.push( obj );

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

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

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


[MediaWiki-commits] [Gerrit] Remove scrollTo call - change (mediawiki...MobileFrontend)

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

Change subject: Remove scrollTo call
..


Remove scrollTo call

Doesn't seem to serve a purpose
Breaks in other skins which don't have a .header element (e.g. vector)

Change-Id: I237b34a04e7d544d9056d8040d7108bbbf687aa8
---
M javascripts/specials/uploads.js
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index bfcb890..a32980e 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -126,9 +126,6 @@
]
} );
carousel.show();
-   $( function() {
-   window.scrollTo( 0, $( '.header' 
).offset().top );
-   } );
}
} );
}

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

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

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


[MediaWiki-commits] [Gerrit] Follow-up 42333412 - Fix behaviour $wgVerifyMimeType = false; - change (mediawiki/core)

2013-06-17 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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


Change subject: Follow-up 42333412 - Fix behaviour $wgVerifyMimeType = false;
..

Follow-up 42333412 - Fix behaviour $wgVerifyMimeType = false;

Should probably be backported to stable.

Bug: 49717
Change-Id: If1d6e8fed575bf2816a10db066ec4e023460ee1e
---
M includes/upload/UploadBase.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/69257/1

diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 2ed20c5..710a501 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -410,10 +410,10 @@
return $status;
}
 
-   if ( $wgVerifyMimeType ) {
-   $this->mFileProps = FSFile::getPropsFromPath( 
$this->mTempPath, $this->mFinalExtension );
-   $mime = $this->mFileProps['file-mime'];
+   $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, 
$this->mFinalExtension );
+   $mime = $this->mFileProps['file-mime'];
 
+   if ( $wgVerifyMimeType ) {
# XXX: Missing extension will be caught by 
validateName() via getTitle()
if ( $this->mFinalExtension != '' && 
!$this->verifyExtension( $mime, $this->mFinalExtension ) ) {
wfProfileOut( __METHOD__ );

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

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

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


[MediaWiki-commits] [Gerrit] Remove unused global variable and update function return type - change (mediawiki...Echo)

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

Change subject: Remove unused global variable and update function return type
..


Remove unused global variable and update function return type

Change-Id: I2f6e0388c2d1218e72b70a69b429884b39dc096f
---
M formatters/BasicFormatter.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index b5cd76f..cedcfb1 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -143,7 +143,7 @@
 * @return array|string
 */
public function format( $event, $user, $type ) {
-   global $wgEchoNotificationCategories, $wgExtensionAssetsPath, 
$wgEchoNotificationIcons;
+   global $wgExtensionAssetsPath, $wgEchoNotificationIcons;
 
// Use the bundle message if use-bundle is true and there is a 
bundle message
$this->generateBundleData( $event, $user, $type );
@@ -259,7 +259,7 @@
 * @param $event EchoEvent
 * @param $user User
 * @param $type
-* @return string
+* @return array
 */
protected function formatEmail( $event, $user, $type ) {
$subject = $this->formatFragment( $this->email['subject'], 
$event, $user )->text();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f6e0388c2d1218e72b70a69b429884b39dc096f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: AzaToth 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Use indexes in .children, not .childNodes, for attribute pre... - change (mediawiki...VisualEditor)

2013-06-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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


Change subject: Use indexes in .children, not .childNodes, for attribute 
preservation
..

Use indexes in .children, not .childNodes, for attribute preservation

The difference is that .children excludes non-element nodes (text nodes
and comment nodes). These can't have attributes anyway, so there's
nothing lost by skipping them, and this way we avoid bugs where a
text node split causes the indexes to be off.

(Text node splits are probably due to an interaction between whitespace
preservation and paragraph unwrapping, and aren't necessarily bad. We
just shouldn't rely on indexes into .childNodes)

Change-Id: I905a50e1c299ebafcbd4eaa0f938b06a1b5849ff
---
M modules/ve/dm/ve.dm.Converter.js
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index d64465a..90f4701 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -129,7 +129,10 @@
if ( deep ) {
attributeList[i].children = [];
childList = ve.dm.Converter.buildHtmlAttributeList(
-   domElements[i].childNodes, spec, deep, 
attributeList[i].children
+   // Use .children rather than .childNodes so we 
don't mess around with things that
+   // can't have attributes anyway. Unfortunately, 
non-element nodes have .children
+   // set to undefined so we have to coerce it to 
an array in that case.
+   domElements[i].children || [], spec, deep, 
attributeList[i].children
);
if ( childList ) {
empty = false;
@@ -177,7 +180,7 @@
}
if ( attributeList[i].children ) {
ve.dm.Converter.renderHtmlAttributeList(
-   attributeList[i].children, 
domElements[i].childNodes, spec
+   attributeList[i].children, 
domElements[i].children, spec
);
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Don't delete instance pages from OpenStackManager. - change (mediawiki...OpenStackManager)

2013-06-17 Thread Ryan Lane (Code Review)
Ryan Lane has submitted this change and it was merged.

Change subject: Don't delete instance pages from OpenStackManager.
..


Don't delete instance pages from OpenStackManager.

Let the instance status plugin mark the pages as deleted.

Change-Id: I589b63c06a81ae659ca2aaa2507549171f3ee17c
---
M special/SpecialNovaInstance.php
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Ryan Lane: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/special/SpecialNovaInstance.php b/special/SpecialNovaInstance.php
index fa767be..7cfbe72 100644
--- a/special/SpecialNovaInstance.php
+++ b/special/SpecialNovaInstance.php
@@ -671,7 +671,6 @@
$success = $this->userNova->terminateInstance( $instanceosid );
if ( $success ) {
OpenStackManagerEvent::createDeletionEvent( 
$instancename, $instanceproject, $this->getUser() );
-   $instance->deleteArticle();
$success = OpenStackNovaHost::deleteHostByInstanceId( 
$instanceid );
if ( $success ) {
$this->getOutput()->addWikiMsg( 
'openstackmanager-deletedinstance', $instanceid );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I589b63c06a81ae659ca2aaa2507549171f3ee17c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Ryan Lane 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] bug 47671 -- don't show crashy photo button if no camera pre... - change (apps...commons)

2013-06-17 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: bug 47671 -- don't show crashy photo button if no camera present
..


bug 47671 -- don't show crashy photo button if no camera present

We were crashing when trying to take a photo if no camera was
present on the device, since no activity can be found for the
camera intent and an exception is thrown.

Work around this by simply checking if the device has a camera
via the package manager feature checks, and hiding the menu item
if relevant.

GitHub: https://github.com/wikimedia/apps-android-commons/pull/13
Change-Id: I635946ed32cf768917db4a8dff0058061e45e6ec
---
M commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
2 files changed, 10 insertions(+), 0 deletions(-)

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



diff --git 
a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java 
b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
index d6e9812..b9492dd 100644
--- a/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
+++ b/commons/src/main/java/org/wikimedia/commons/CommonsApplication.java
@@ -183,5 +183,10 @@
 }
 }
 
+public boolean deviceHasCamera() {
+PackageManager pm = getPackageManager();
+return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) ||
+pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT);
+}
 
 }
diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
index 8ffbaa4..101f4ee 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
@@ -266,6 +266,11 @@
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
 menu.clear(); // See http://stackoverflow.com/a/8495697/17865
 inflater.inflate(R.menu.fragment_contributions_list, menu);
+
+CommonsApplication app = 
(CommonsApplication)getActivity().getApplicationContext();
+if (!app.deviceHasCamera()) {
+menu.findItem(R.id.menu_from_camera).setEnabled(false);
+}
 }
 
 @Override

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I635946ed32cf768917db4a8dff0058061e45e6ec
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/commons
Gerrit-Branch: master
Gerrit-Owner: SuchABot 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Adding a .jshintrc file - change (mediawiki...OpenStackManager)

2013-06-17 Thread Ryan Lane (Code Review)
Ryan Lane has uploaded a new change for review.

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


Change subject: Adding a .jshintrc file
..

Adding a .jshintrc file

Change-Id: Ibaf9790c536f3e0bc343cba86d2b950bdeb81aab
---
A .jshintrc
1 file changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..95dd410
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,20 @@
+{
+/* Common */
+ 
+// Enforcing
+"camelcase": true,
+"curly": true,
+"eqeqeq": true,
+"immed": true,
+"latedef": true,
+"newcap": true,
+"noarg": true,
+"noempty": true,
+"nonew": true,
+"quotmark": "single",
+"trailing": true,
+"undef": true,
+"unused": true,
+// Legacy
+"onevar": true
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaf9790c536f3e0bc343cba86d2b950bdeb81aab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Ryan Lane 

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


[MediaWiki-commits] [Gerrit] Make score work with multi-page files - change (mediawiki...Score)

2013-06-17 Thread Aaron Schulz (Code Review)
Aaron Schulz has submitted this change and it was merged.

Change subject: Make score work with multi-page files
..


Make score work with multi-page files

Score was looking for files of the form "foo-1.png", "foo-2.png"
where really it should have been looking for "foo-page1.png".
(Someone should double check that it isn't just my install of
lilypond being broken or something).

Also there was a variable name mismatch in the multipage handling
code.

I'm not sure if it really is appropriate to have "Page 1" in the
alt text. I can't imagine what a blind person would do with that
info, however I left it there. I also added the page number to
title, as its mildly useful as a tooltip.

As an aside, I'm not sure if it would make sense to add a sanity
check somewhere - only copy over a max 5000 pages or something.

Change-Id: I09f1fca86a38655dfc1583835c3e59823a08653c
---
M Score.body.php
1 file changed, 14 insertions(+), 12 deletions(-)

Approvals:
  Aaron Schulz: Verified; Looks good to me, approved



diff --git a/Score.body.php b/Score.body.php
index 2c1c1bf..11cc593 100644
--- a/Score.body.php
+++ b/Score.body.php
@@ -408,7 +408,7 @@
 
/* Generate PNG and MIDI files if necessary */
$imageFileName = "{$options['file_name_prefix']}.png";
-   $multi1FileName = 
"{$options['file_name_prefix']}-1.png";
+   $multi1FileName = 
"{$options['file_name_prefix']}-page1.png";
$midiFileName = "{$options['file_name_prefix']}.midi";
$metaDataFileName = 
"{$options['file_name_prefix']}.json";
 
@@ -475,19 +475,21 @@
} elseif ( isset( $existingFiles[$multi1FileName] ) ) {
$link = '';
for ( $i = 1; ; ++$i ) {
-   $fileName = 
"{$options['file_name_prefix']}-$i.png";
+   $fileName = 
"{$options['file_name_prefix']}-page$i.png";
if ( !isset( $existingFiles[$fileName] 
) ) {
break;
}
-   list( $width, $height ) = 
$metaData[$imageFileName]['size'];
+   $pageNumb = wfMessage( 'score-page' )
+   ->inContentLanguage()
+   ->numParams( $i )
+   ->plain();
+   list( $width, $height ) = 
$metaData[$fileName]['size'];
$link .= Html::rawElement( 'img', array(
'src' => 
"{$options['dest_url']}/$fileName",
'width' => $width,
'height' => $height,
-   'alt' => wfMessage( 
'score-page' )
-   ->inContentLanguage()
-   ->numParams( $i )
-   ->plain()
+   'alt' => $pageNumb,
+   'title' => $pageNumb
) );
}
} else {
@@ -624,11 +626,11 @@
self::trimImage( $factoryImage, 
$factoryImageTrimmed );
} else {
for ( $i = 1; ; ++$i ) {
-   $src = "$factoryDirectory/file-$i.png";
+   $src = 
"$factoryDirectory/file-page$i.png";
if ( !file_exists( $src ) ) {
break;
}
-   $dest = 
"$factoryDirectory/file-$i-trimmed.png";
+   $dest = 
"$factoryDirectory/file-page$i-trimmed.png";
self::trimImage( $src, $dest );
}
}
@@ -675,14 +677,14 @@
} else {
for ( $i = 1; ; ++$i ) {
if ( $wgScoreTrim ) {
-   $src = 
"$factoryDirectory/file-$i-trimmed.png";
+   $src = 
"$factoryDirectory/file-page$i-trimmed.png";
} else {
-   $src = "$factoryDirectory/file-$i.png";
+   $src = 
"$factoryDirectory/file-page$i

[MediaWiki-commits] [Gerrit] Cache a dict of member ids and names rather than just names. - change (mediawiki...OpenStackManager)

2013-06-17 Thread Ryan Lane (Code Review)
Ryan Lane has submitted this change and it was merged.

Change subject: Cache a dict of member ids and names rather than just names.
..


Cache a dict of member ids and names rather than just names.

Having the ids and names allows for much faster lookup in
SpecialNovaSudoer.

Change-Id: Ifce2f56ce0ded10a6a5c789c64e4aeff20c941ac
---
M nova/OpenStackNovaProject.php
M special/SpecialNovaSudoer.php
2 files changed, 77 insertions(+), 66 deletions(-)

Approvals:
  Ryan Lane: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/nova/OpenStackNovaProject.php b/nova/OpenStackNovaProject.php
index e493014..13e7a25 100644
--- a/nova/OpenStackNovaProject.php
+++ b/nova/OpenStackNovaProject.php
@@ -159,22 +159,25 @@
}
 
/**
-* Return all users who are a member of this project
+* Fill $this->members.
+*
+* $this->members uses the uid as index and the name as value.
 *
 * @return array
 */
-   function getMembers() {
+   function loadMembers() {
global $wgAuth;
global $wgMemc;
global $wgOpenStackManagerLDAPDomain;
 
-   $key = wfMemcKey( 'openstackmanager', 'projectmembers', 
$this->projectname );
-   $members = $wgMemc->get( $key );
-   if ( is_array( $members ) ) {
-   return $members;
+   $key = wfMemcKey( 'openstackmanager', 'projectuidsandmembers', 
$this->projectname );
+   $this->members = $wgMemc->get( $key );
+
+   if ( is_array( $this->members ) ) {
+   return;
}
 
-   $members = array();
+   $this->members = array();
if ( isset( $this->projectInfo[0]['member'] ) ) {
$memberdns = $this->projectInfo[0]['member'];
// The first element in the member list is the count
@@ -182,24 +185,51 @@
// Shift it off.
array_shift( $memberdns );
foreach ( $memberdns as $memberdn ) {
+   $member = explode( '=', $memberdn );
+   $member = explode( ',', $member[1] );
+   $member = $member[0];
+
$searchattr = $wgAuth->getConf( 
'SearchAttribute', $wgOpenStackManagerLDAPDomain );
if ( $searchattr ) {
// We need to look up the search attr 
from the user entry
// this is expensive, but must be done.
$userInfo = 
$wgAuth->getUserInfoStateless( $memberdn );
-   $members[] = 
$userInfo[0][$searchattr][0];
+   $this->members[$member] = 
$userInfo[0][$searchattr][0];
} else {
-   $member = explode( '=', $memberdn );
-   $member = explode( ',', $member[1] );
-   $member = $member[0];
-   $members[] = $member;
+   $this->members[$member] = $member;
}
}
}
 
-   $wgMemc->set( $key, $members, '3600' );
+   $wgMemc->set( $key, $this->members, '3600' );
+   }
 
-   return $members;
+   /**
+* Return UIDs for users who are a member of this project
+*
+* We need this for managing things related to sudoers; generating
+* the list is expensive and caching it here is a big speedup.
+*
+* @return array
+*/
+   function getMemberUIDs() {
+   $this->loadMembers();
+   return array_keys( $this->members );
+   }
+
+   /**
+* Return all users who are a member of this project
+*
+* @return array
+*/
+   function getMembers() {
+   $this->loadMembers();
+   return array_values( $this->members );
+   }
+
+   function memberForUid( $uid ) {
+   $this->loadMembers();
+   return $this->members[$uid];
}
 
/**
@@ -388,7 +418,7 @@
global $wgAuth;
global $wgMemc;
 
-   $key = wfMemcKey( 'openstackmanager', 'projectmembers', 
$this->projectname );
+   $key = wfMemcKey( 'openstackmanager', 'projectuidsandmembers', 
$this->projectname );
$wgMemc->delete( $key );
 
if ( isset( $this->projectInfo[0]['member'] ) ) {
@@ -494,7 +524,7 @@
global $wgAuth;
global $wgMemc;
 
-   $key = wfMemcKey( 'op

[MediaWiki-commits] [Gerrit] Bug 49655: Fix selective serialization when reusing cached HTML - change (mediawiki...Parsoid)

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

Change subject: Bug 49655: Fix selective serialization when reusing cached HTML
..


Bug 49655: Fix selective serialization when reusing cached HTML

This fixes round-trip issues on [[en:Bleak House]] and others.

Change-Id: I6c047ac01bb99c8cd793fbd01db5777f560f492b
---
M js/lib/mediawiki.SelectiveSerializer.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/js/lib/mediawiki.SelectiveSerializer.js 
b/js/lib/mediawiki.SelectiveSerializer.js
index d289ad8..5faf842 100644
--- a/js/lib/mediawiki.SelectiveSerializer.js
+++ b/js/lib/mediawiki.SelectiveSerializer.js
@@ -186,7 +186,7 @@
// And the original 
dom. results[1] is an array
// with the html and 
the content type. Ignore the
// content type here.
-   self.env.page.dom = 
Util.parseHTML(results[1][0]);
+   self.env.page.dom = 
Util.parseHTML(results[1][0]).body;
}
 
// Selective serialization if 
there was no error, full

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c047ac01bb99c8cd793fbd01db5777f560f492b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Ability to get partial result from the API - change (mediawiki...MobileFrontend)

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

Change subject: Ability to get partial result from the API
..


Ability to get partial result from the API

* Small memory devices seem to have issues with large JSON blobs.
This patch allows clients to request a portion of the text by
providing an offset and a maximum length.

* All "text" strings are virtually joined together, and only the
range after offset and no longer than maxlen is actually returned.

* A "continue-offset" value is set if there is more data.

Change-Id: Ib71800c1afa057bf87fd652ecb650bc38e33df68
---
M includes/api/ApiMobileView.php
1 file changed, 54 insertions(+), 3 deletions(-)

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



diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index a48cbd8..fe08f12 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -6,7 +6,8 @@
 */
const CACHE_VERSION = 3;
 
-   private $followRedirects, $noHeadings, $mainPage, $noTransform, 
$variant;
+   private $followRedirects, $noHeadings, $mainPage, $noTransform, 
$variant, $offset, $maxlen;
+
/**
 * @var File
 */
@@ -32,6 +33,14 @@
$this->followRedirects = $params['redirect'] == 'yes';
$this->noHeadings = $params['noheadings'];
$this->noTransform = $params['notransform'];
+   $this->offset = $params['offset'];
+   $this->maxlen = $params['maxlen'];
+
+   if ( $this->offset === 0 && $this->maxlen === 0 ) {
+   $this->offset = -1; // Disable text splitting
+   } elseif ( $this->maxlen === 0 ) {
+   $this->maxlen = PHP_INT_MAX;
+   }
 
$title = Title::newFromText( $params['page'] );
if ( !$title ) {
@@ -73,7 +82,7 @@
}
$section['id'] = $i;
if ( isset( $prop['text'] ) && isset( 
$requestedSections[$i] ) && isset( $data['text'][$i] ) ) {
-   $section[$textElement] = 
$this->prepareSection( $data['text'][$i] );
+   $section[$textElement] = 
$this->stringSplitter( $this->prepareSection( $data['text'][$i] ) );
unset( $requestedSections[$i] );
}
if ( isset( $data['refsections'][$i] ) ) {
@@ -86,7 +95,7 @@
foreach ( array_keys( $requestedSections ) as $index ) {
$section = array( 'id' => $index );
if ( isset( $data['text'][$index] ) ) {
-   $section[$textElement] = 
$data['text'][$index];
+   $section[$textElement] = 
$this->stringSplitter( $data['text'][$index] );
} else {
$missingSections[] = $index;
}
@@ -96,9 +105,39 @@
if ( count( $missingSections ) && isset( $prop['text'] ) ) {
$this->setWarning( 'Section(s) ' . implode( ', ', 
$missingSections ) . ' not found' );
}
+   if ( $this->maxlen < 0 ) {
+   // There is more data available
+   $this->getResult()->addValue( null, 
$this->getModuleName(),
+   array( 'continue-offset' => $params['offset'] + 
$params['maxlen'] )
+   );
+   }
$this->getResult()->setIndexedTagName( $result, 'section' );
$this->getResult()->addValue( null, $this->getModuleName(), 
array( 'sections' => $result ) );
wfProfileOut( __METHOD__ );
+   }
+
+   private function stringSplitter( $text ) {
+   if ( $this->offset < 0  ) {
+   return $text; // NOOP - string splitting mode is off
+   } elseif ( $this->maxlen < 0 ) {
+   return ''; // Limit exceeded
+   }
+   $textLen = mb_strlen( $text );
+   $start = $this->offset;
+   $len = $textLen - $start;
+   if ( $len > 0 ) {
+   // At least part of the $text should be included
+   if ( $len > $this->maxlen ) {
+   $len = $this->maxlen;
+   $this->maxlen = -1;
+   } else {
+   $this->maxlen -= $len;
+   }
+   $this->offset = 0;
+   return mb_substr( $text, $start, $len );
+   }
+   $this->offset -= $textLen;
+

[MediaWiki-commits] [Gerrit] Bug 49655: Fix selective serialization when reusing cached HTML - change (mediawiki...Parsoid)

2013-06-17 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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


Change subject: Bug 49655: Fix selective serialization when reusing cached HTML
..

Bug 49655: Fix selective serialization when reusing cached HTML

This fixes round-trip issues on [[en:Bleak House]] and others.

Change-Id: I6c047ac01bb99c8cd793fbd01db5777f560f492b
---
M js/lib/mediawiki.SelectiveSerializer.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/js/lib/mediawiki.SelectiveSerializer.js 
b/js/lib/mediawiki.SelectiveSerializer.js
index d289ad8..5faf842 100644
--- a/js/lib/mediawiki.SelectiveSerializer.js
+++ b/js/lib/mediawiki.SelectiveSerializer.js
@@ -186,7 +186,7 @@
// And the original 
dom. results[1] is an array
// with the html and 
the content type. Ignore the
// content type here.
-   self.env.page.dom = 
Util.parseHTML(results[1][0]);
+   self.env.page.dom = 
Util.parseHTML(results[1][0]).body;
}
 
// Selective serialization if 
there was no error, full

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

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

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


[MediaWiki-commits] [Gerrit] bug 47671 -- don't show crashy photo button if no camera pre... - change (apps...commons)

2013-06-17 Thread SuchABot (Code Review)
SuchABot has uploaded a new change for review.

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


Change subject: bug 47671 -- don't show crashy photo button if no camera present
..

bug 47671 -- don't show crashy photo button if no camera present

We were crashing when trying to take a photo if no camera was
present on the device, since no activity can be found for the
camera intent and an exception is thrown.

Work around this by simply checking if the device has a camera
via the package manager feature checks, and hiding the menu item
if relevant.

Change-Id: I635946ed32cf768917db4a8dff0058061e45e6ec
GitHub: https://github.com/wikimedia/apps-android-commons/pull/13
---
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons 
refs/changes/53/69253/1

diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
index 8ffbaa4..4ece455 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
@@ -4,6 +4,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.content.pm.PackageManager;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.drawable.BitmapDrawable;
@@ -266,6 +267,13 @@
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
 menu.clear(); // See http://stackoverflow.com/a/8495697/17865
 inflater.inflate(R.menu.fragment_contributions_list, menu);
+menu.findItem(R.id.menu_from_camera).setVisible(deviceHasCamera());
+}
+
+private boolean deviceHasCamera() {
+PackageManager pm = getActivity().getPackageManager();
+return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) ||
+   pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT);
 }
 
 @Override

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I635946ed32cf768917db4a8dff0058061e45e6ec
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: master
Gerrit-Owner: SuchABot 
Gerrit-Reviewer: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] Center left and right arrows on uploads first time user tuto... - change (mediawiki...MobileFrontend)

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

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


Change subject: Center left and right arrows on uploads first time user tutorial
..

Center left and right arrows on uploads first time user tutorial

Change-Id: Ib0120cb2a3cb70069b11559b1d69b2a36ed21358
---
M less/specials/uploads.less
M stylesheets/specials/uploads.css
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/less/specials/uploads.less b/less/specials/uploads.less
index 8bbfb54..bbda150 100644
--- a/less/specials/uploads.less
+++ b/less/specials/uploads.less
@@ -29,13 +29,13 @@
 
&.prev {
left: @buttonPadding;
-   background: url(images/uploads/chevron_left.png) 20% 
8px no-repeat;
+   background: url(images/uploads/chevron_left.png) 20% 
center no-repeat;
.background-size( auto, 20px );
}
 
&.next {
right: @buttonPadding;
-   background: url(images/uploads/chevron_right.png) 80% 
8px no-repeat;
+   background: url(images/uploads/chevron_right.png) 80% 
center no-repeat;
.background-size( auto, 20px );
}
 
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 9349346..f750f78 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -27,7 +27,7 @@
 }
 .carousel > button.prev {
   left: 4px;
-  background: url(images/uploads/chevron_left.png) 20% 8px no-repeat;
+  background: url(images/uploads/chevron_left.png) 20% center no-repeat;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
   -moz-background-size: auto 20px;
@@ -37,7 +37,7 @@
 }
 .carousel > button.next {
   right: 4px;
-  background: url(images/uploads/chevron_right.png) 80% 8px no-repeat;
+  background: url(images/uploads/chevron_right.png) 80% center no-repeat;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
   -moz-background-size: auto 20px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0120cb2a3cb70069b11559b1d69b2a36ed21358
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] New assets for first time user upload tutorial - change (mediawiki...MobileFrontend)

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

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


Change subject: New assets for first time user upload tutorial
..

New assets for first time user upload tutorial

Change-Id: Iade80e9edee7732e3665fc320c39d5472586ec82
---
M less/specials/uploads.less
A stylesheets/specials/images/.DS_Store
M stylesheets/specials/images/uploads/SplashScreen1.png
M stylesheets/specials/images/uploads/SplashScreen2.png
M stylesheets/specials/images/uploads/SplashScreen3.png
M stylesheets/specials/uploads.css
6 files changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/less/specials/uploads.less b/less/specials/uploads.less
index db09d05..d193add 100644
--- a/less/specials/uploads.less
+++ b/less/specials/uploads.less
@@ -55,13 +55,13 @@
.border-radius( 0 );
}
 
-   @imageSize: 130px;
+   @imageHeight: 180px;
.page {
-   padding: @imageSize + 16px 0 0 0;
+   padding: @imageHeight 0 0 0;
text-align: center;
-   background-size: auto @imageSize;
+   background-size: auto @imageHeight;
background-repeat: no-repeat;
-   background-position: center 24px;
+   background-position: center 0;
top: 10px;
left: 100%;
bottom: 0;
@@ -81,7 +81,7 @@
strong {
display: block;
font-size: 1.1em;
-   margin: 32px 26px 16px;
+   margin: 0 26px 16px;
}
 
p {
diff --git a/stylesheets/specials/images/.DS_Store 
b/stylesheets/specials/images/.DS_Store
new file mode 100644
index 000..bd41d2c
--- /dev/null
+++ b/stylesheets/specials/images/.DS_Store
Binary files differ
diff --git a/stylesheets/specials/images/uploads/SplashScreen1.png 
b/stylesheets/specials/images/uploads/SplashScreen1.png
index d6e92e5..050348b 100644
--- a/stylesheets/specials/images/uploads/SplashScreen1.png
+++ b/stylesheets/specials/images/uploads/SplashScreen1.png
Binary files differ
diff --git a/stylesheets/specials/images/uploads/SplashScreen2.png 
b/stylesheets/specials/images/uploads/SplashScreen2.png
index 1fe047b..3868d96 100644
--- a/stylesheets/specials/images/uploads/SplashScreen2.png
+++ b/stylesheets/specials/images/uploads/SplashScreen2.png
Binary files differ
diff --git a/stylesheets/specials/images/uploads/SplashScreen3.png 
b/stylesheets/specials/images/uploads/SplashScreen3.png
index 622177d..819fbb5 100644
--- a/stylesheets/specials/images/uploads/SplashScreen3.png
+++ b/stylesheets/specials/images/uploads/SplashScreen3.png
Binary files differ
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 8cdec8d..7a41171 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -59,11 +59,11 @@
   border-radius: 0;
 }
 .carousel .page {
-  padding: 146px 0 0 0;
+  padding: 180px 0 0 0;
   text-align: center;
-  background-size: auto 130px;
+  background-size: auto 180px;
   background-repeat: no-repeat;
-  background-position: center 24px;
+  background-position: center 0;
   top: 10px;
   left: 100%;
   bottom: 0;
@@ -82,7 +82,7 @@
 .carousel .page strong {
   display: block;
   font-size: 1.1em;
-  margin: 32px 26px 16px;
+  margin: 0 26px 16px;
 }
 .carousel .page p {
   font-size: 0.9em;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iade80e9edee7732e3665fc320c39d5472586ec82
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] Uploads page: remove out the progress indicator - change (mediawiki...MobileFrontend)

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

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


Change subject: Uploads page: remove out the progress indicator
..

Uploads page: remove out the progress indicator

Change-Id: I75018f2edeb902818b8a253d1e726569f9a39760
---
M less/specials/uploads.less
D stylesheets/specials/images/uploads/Indicator_active.png
D stylesheets/specials/images/uploads/Indicator_default.png
M stylesheets/specials/uploads.css
M templates/specials/uploads/carousel.html
5 files changed, 2 insertions(+), 50 deletions(-)


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

diff --git a/less/specials/uploads.less b/less/specials/uploads.less
index d193add..8bbfb54 100644
--- a/less/specials/uploads.less
+++ b/less/specials/uploads.less
@@ -6,8 +6,6 @@
 }
 
 .carousel {
-   @indicatorHeight: 10px;
-   @indicatorPadding: 4px;
@buttonPadding: 4px;
 
position: relative;
@@ -27,7 +25,7 @@
position: absolute;
top: 0;
width: @searchBarPaddingLeft;
-   bottom: @indicatorHeight + @indicatorPadding;
+   bottom: 0;
 
&.prev {
left: @buttonPadding;
@@ -99,28 +97,6 @@
 
&.page-3 {
background-image: url(images/uploads/SplashScreen3.png);
-   }
-   }
-
-   ul {
-   position: absolute;
-   bottom: 0;
-   left: 0;
-   right: 0;
-   padding: @indicatorPadding 0 24px 0;
-   text-align: center;
-
-   li {
-   display: inline-block;
-   text-indent: -999px;
-   overflow: hidden;
-   width: 10px;
-   height: @indicatorHeight;
-   background: url(images/uploads/Indicator_default.png) 
50% 50% no-repeat;
-
-   &.active {
-   background-image: 
url(images/uploads/Indicator_active.png);
-   }
}
}
 }
diff --git a/stylesheets/specials/images/uploads/Indicator_active.png 
b/stylesheets/specials/images/uploads/Indicator_active.png
deleted file mode 100644
index e176109..000
--- a/stylesheets/specials/images/uploads/Indicator_active.png
+++ /dev/null
Binary files differ
diff --git a/stylesheets/specials/images/uploads/Indicator_default.png 
b/stylesheets/specials/images/uploads/Indicator_default.png
deleted file mode 100644
index 6acb2f8..000
--- a/stylesheets/specials/images/uploads/Indicator_default.png
+++ /dev/null
Binary files differ
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 7a41171..9349346 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -23,7 +23,7 @@
   position: absolute;
   top: 0;
   width: 40px;
-  bottom: 14px;
+  bottom: 0;
 }
 .carousel > button.prev {
   left: 4px;
@@ -96,25 +96,6 @@
 }
 .carousel .page.page-3 {
   background-image: url(images/uploads/SplashScreen3.png);
-}
-.carousel ul {
-  position: absolute;
-  bottom: 0;
-  left: 0;
-  right: 0;
-  padding: 4px 0 24px 0;
-  text-align: center;
-}
-.carousel ul li {
-  display: inline-block;
-  text-indent: -999px;
-  overflow: hidden;
-  width: 10px;
-  height: 10px;
-  background: url(images/uploads/Indicator_default.png) 50% 50% no-repeat;
-}
-.carousel ul li.active {
-  background-image: url(images/uploads/Indicator_active.png);
 }
 .ctaUploadPhoto {
   padding: 8px;
diff --git a/templates/specials/uploads/carousel.html 
b/templates/specials/uploads/carousel.html
index 7d1bc70..216b913 100644
--- a/templates/specials/uploads/carousel.html
+++ b/templates/specials/uploads/carousel.html
@@ -6,9 +6,4 @@
{{#cancel}}{{cancel}}{{/cancel}}
 
 {{/pages}}
-
-{{#pages}}
-   {{id}}
-{{/pages}}
-
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75018f2edeb902818b8a253d1e726569f9a39760
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] Remove unused global variable and documentation fix - change (mediawiki...Echo)

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

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


Change subject: Remove unused global variable and documentation fix
..

Remove unused global variable and documentation fix

Change-Id: I2f6e0388c2d1218e72b70a69b429884b39dc096f
---
M formatters/BasicFormatter.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index b5cd76f..cedcfb1 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -143,7 +143,7 @@
 * @return array|string
 */
public function format( $event, $user, $type ) {
-   global $wgEchoNotificationCategories, $wgExtensionAssetsPath, 
$wgEchoNotificationIcons;
+   global $wgExtensionAssetsPath, $wgEchoNotificationIcons;
 
// Use the bundle message if use-bundle is true and there is a 
bundle message
$this->generateBundleData( $event, $user, $type );
@@ -259,7 +259,7 @@
 * @param $event EchoEvent
 * @param $user User
 * @param $type
-* @return string
+* @return array
 */
protected function formatEmail( $event, $user, $type ) {
$subject = $this->formatFragment( $this->email['subject'], 
$event, $user )->text();

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

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

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


[MediaWiki-commits] [Gerrit] Localisation updates from http://translatewiki.net. - change (mediawiki...GeoData)

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

Change subject: Localisation updates from http://translatewiki.net.
..


Localisation updates from http://translatewiki.net.

Change-Id: I33061bde80f8376fd34712832d4d0299ca18f9f0
---
M GeoData.i18n.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/GeoData.i18n.php b/GeoData.i18n.php
index 94dbed5..488f59f 100644
--- a/GeoData.i18n.php
+++ b/GeoData.i18n.php
@@ -713,10 +713,19 @@
  * @author Joetaras
  */
 $messages['roa-tara'] = array(
+   'geodata-desc' => "Aggiunge 'a memorizzazzione de le coordinate 
sciugrafeche  e le funzioanlità de recupere",
+   'geodata-bad-input' => "Argomende invalide onne state passate a 'a 
{{#coordinates:}} funzione",
'geodata-bad-latitude' => '{{#coordinates:}}: 
latitudine invalide',
'geodata-bad-longitude' => '{{#coordinates:}}: 
longitudine invalide',
+   'geodata-bad-type' => '{{#coordinates:}}: tipe non 
acchiate "$1"',
+   'geodata-bad-globe' => '{{#coordinates:}}: globbe non 
acchiate "$1"',
'geodata-bad-region' => "{{#coordinates:}}: formate 
d'u codece d'a reggione invalide",
'geodata-multiple-primary' => "{{#coordinates:}}: non 
ge pozze avè cchiù de 'nu tag prengepàle pe pàgene",
+   'geodata-limit-exceeded' => "'U limite de $1 
{{#coordinates:}} {{PLURAL:$1|tag|tags}} pe pàgene ha state 
sbunnate",
+   'geodata-broken-tags-category' => 'Pàggene cu tag de coordinate fatte 
male',
+   'geodata-unknown-type-category' => "Pàggene cu 'nu tipe de coordinate 
scanusciute",
+   'geodata-unknown-globe-category' => "Pàggene cu 'nu valore de globbe 
scanusciute",
+   'geodata-unknown-region-category' => "Pàggene cu 'nu valore de reggione 
scanusciute",
 );
 
 /** Russian (русский)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33061bde80f8376fd34712832d4d0299ca18f9f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: L10n-bot 
Gerrit-Reviewer: L10n-bot 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Display clickthrough URL in case user accidentally accessed ... - change (mediawiki...ZeroRatedMobileAccess)

2013-06-17 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has uploaded a new change for review.

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


Change subject: Display clickthrough URL in case user accidentally accessed 
Zero.
..

Display clickthrough URL in case user accidentally accessed Zero.

Change-Id: I154a704f2d55d45be3640bae966b37d6a5bc76e8
---
M includes/PageRenderingHooks.php
1 file changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index d7e5346..993ca47 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -12,6 +12,7 @@
 use ResourceLoader;
 use Title;
 use SkinTemplate;
+use Linker;
 
 /**
  * Main class for ZeroRatedMobileAccess extension.
@@ -228,13 +229,22 @@
 */
private static function renderUnknownCarrier() {
global $wgRequest;
+   global $wgOut;
+
+   $title = $wgOut->getTitle();
+   $url = $title->getFullURL();
+   $link = Html::element( 'a',
+   array( 'href' => $url ),
+   $url
+   );
$ip = $wgRequest->getIP();
+
// @FIXME: Unescaped UI text output as HTML in next 3 lines.
$bannerText = wfMessage( 'zero-rated-mobile-access-sorry' 
)->text();
$bannerText .= '' . wfMessage( 
'zero-rated-mobile-access-sorry-ip', $ip )->text();
$bannerText .= '' . wfMessage(
'zero-rated-mobile-access-sorry-goto',
-   'http://m.wikipedia.org/";>m.wikipedia.org' 
)->text();
+   $link )->text();
$bannerText = Html::rawElement( 'div',
array( 'class' => 'mw-mf-message',
'id' => 'zero-rated-banner-text' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I154a704f2d55d45be3640bae966b37d6a5bc76e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ZeroRatedMobileAccess
Gerrit-Branch: master
Gerrit-Owner: Dr0ptp4kt 

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


[MediaWiki-commits] [Gerrit] Split test: instrument edit events for standard editor inter... - change (mediawiki...VisualEditor)

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

Change subject: Split test: instrument edit events for standard editor interface
..


Split test: instrument edit events for standard editor interface

This change adds 'page-edit-impression', 'page-save-(attempt/success)',
and '(section-)edit-link-click' events to the standard (non-VE) editor
interface, mirroring the events we added to VE. This makes the event data
usable for split-test analysis.

Change-Id: I51c441d61daa18d58ca7f62a9e5f07902a099050
---
M VisualEditor.hooks.php
M VisualEditor.php
A modules/ve/init/mw/ve.init.mw.splitTest.js
3 files changed, 66 insertions(+), 0 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 788e61c..45e9db6 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -61,6 +61,10 @@
$output->addModules( array( 'schema.Edit' ) );
}
$output->addModules( array( 
'ext.visualEditor.viewPageTarget' ) );
+   } else {
+   if ( $wgVisualEditorEnableEventLogging ) {
+   $output->addModules( array( 'schema.Edit', 
'ext.visualEditor.splitTest' ) );
+   }
}
return true;
}
diff --git a/VisualEditor.php b/VisualEditor.php
index a114c98..a5ccf33 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -91,6 +91,13 @@
'unicodejs/unicodejs.wordbreak.js',
),
),
+
+   // Added for 18-Jun-2013 split test; safe to remove after
+   'ext.visualEditor.splitTest' => $wgVisualEditorResourceTemplate + array(
+   'scripts' => array(
+   've/init/mw/ve.init.mw.splitTest.js',
+   )
+   ),
// Alias for backwards compat, safe to remove after
'ext.visualEditor.editPageInit' => $wgVisualEditorResourceTemplate + 
array(
'dependencies' => array(
diff --git a/modules/ve/init/mw/ve.init.mw.splitTest.js 
b/modules/ve/init/mw/ve.init.mw.splitTest.js
new file mode 100644
index 000..592c6f0
--- /dev/null
+++ b/modules/ve/init/mw/ve.init.mw.splitTest.js
@@ -0,0 +1,55 @@
+/*global mediaWiki */
+( function ( mw, $ ) {
+   'use strict';
+
+   if ( !mw.config.get( 'wgVisualEditorConfig', {} ).enableEventLogging ) {
+   return;
+   }
+
+   function log( action ) {
+   var dfd = $.Deferred();
+   setTimeout( dfd.reject, 1000 );
+   mw.loader.using( 'schema.Edit', function () {
+   mw.eventLog.logEvent( 'Edit', {
+   version: 0,
+   action: action,
+   editor: 'wikitext',
+   pageId: mw.config.get( 'wgArticleId' ),
+   pageNs: mw.config.get( 'wgNamespaceNumber' ),
+   pageName: mw.config.get( 'wgPageName' ),
+   pageViewSessionId: 
mw.user.generateRandomSessionId(),
+   revId: mw.config.get( 'wgCurRevisionId' ),
+   userId: +mw.config.get( 'wgUserId' )
+   } ).always( dfd.resolve );
+   } );
+   return dfd;
+   }
+
+   mw.hook( 'postEdit' ).add( function () {
+   log( 'page-save-success' );
+   } );
+
+   if ( mw.config.get('wgAction') === 'edit' ) {
+   log( 'page-edit-impression' );
+   }
+
+   // Log clicks on page edit and section edit links
+   $( '#ca-edit a, .mw-editsection a' ).on( 'click', function ( e ) {
+   var href = this.href,
+   action = /section=/.test( href ) ? 
'section-edit-link-click' : 'edit-link-click';
+   log( action ).always( function () {
+   window.location = href;
+   } );
+   e.preventDefault();
+   } );
+
+   // Log edit submit
+   $( '#wpSave' ).one( 'click', function ( e ) {
+   var $save = $( this );
+   log( 'page-save-attempt' ).always( function () {
+   $save.trigger( 'click' );
+   } );
+   e.preventDefault();
+   } );
+
+} ( mediaWiki, jQuery ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51c441d61daa18d58ca7f62a9e5f07902a099050
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

_

[MediaWiki-commits] [Gerrit] fix puppet error on terbium / when misc::maintenance::refres... - change (operations/puppet)

2013-06-17 Thread Asher (Code Review)
Asher has submitted this change and it was merged.

Change subject: fix puppet error on terbium / when 
misc::maintenance::refreshlinks is disabled
..


fix puppet error on terbium / when misc::maintenance::refreshlinks is disabled

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

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 1414349..5215da7 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -37,11 +37,13 @@
 
# Include this to add cron jobs calling refreshLinks.php on all 
clusters. (RT-2355)
 
-   file { '/home/mwdeploy/refreshLinks':
-   ensure => directory,
-   owner => mwdeploy,
-   group => mwdeploy,
-   mode => 0664,
+   if $enabled == true {
+   file { '/home/mwdeploy/refreshLinks':
+   ensure => directory,
+   owner => mwdeploy,
+   group => mwdeploy,
+   mode => 0664,
+   }
}
 
define cronjob( $cronenabled = $enabled ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9546837cbb3525046aa586771dc4558d7f10a378
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Asher 
Gerrit-Reviewer: Asher 
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 puppet error on terbium / when misc::maintenance::refres... - change (operations/puppet)

2013-06-17 Thread Asher (Code Review)
Asher has uploaded a new change for review.

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


Change subject: fix puppet error on terbium / when 
misc::maintenance::refreshlinks is disabled
..

fix puppet error on terbium / when misc::maintenance::refreshlinks is disabled

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/69247/1

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 1414349..5215da7 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -37,11 +37,13 @@
 
# Include this to add cron jobs calling refreshLinks.php on all 
clusters. (RT-2355)
 
-   file { '/home/mwdeploy/refreshLinks':
-   ensure => directory,
-   owner => mwdeploy,
-   group => mwdeploy,
-   mode => 0664,
+   if $enabled == true {
+   file { '/home/mwdeploy/refreshLinks':
+   ensure => directory,
+   owner => mwdeploy,
+   group => mwdeploy,
+   mode => 0664,
+   }
}
 
define cronjob( $cronenabled = $enabled ) {

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

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

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


[MediaWiki-commits] [Gerrit] Update cluster API to node 0.8; remove node 0.6-compatibilit... - change (mediawiki...Parsoid)

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

Change subject: Update cluster API to node 0.8; remove node 0.6-compatibility 
code.
..


Update cluster API to node 0.8; remove node 0.6-compatibility code.

The 'death' event was renamed to 'exit' in node 0.8.

We have dependencies that no longer work on node 0.6, so go ahead and
remove the node 0.6-compatibility barnacles while we're updating this.

Bug: 49599
Change-Id: I2b7119c928ed27e26181c67c6d300f526cd53801
---
M js/api/server.js
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/js/api/server.js b/js/api/server.js
index e85834d..79df13a 100755
--- a/js/api/server.js
+++ b/js/api/server.js
@@ -17,17 +17,18 @@
 cluster.fork();
   }
 
-  cluster.on('death', function(worker) {
-if(!worker.suicide) {
-  console.log('worker ' + worker.pid + ' died, restarting.');
-  // restart worker
+  cluster.on('exit', function(worker, code, signal) {
+if (!worker.suicide) {
+  var exitCode = worker.process.exitCode;
+  console.log('worker', worker.process.pid,
+  'died ('+exitCode+'), restarting.');
   cluster.fork();
 }
   });
+
   process.on('SIGTERM', function() {
 console.log('master shutting down, killing workers');
 var workers = cluster.workers;
-if (!workers) { throw new Error("Force killing node 0.6.x"); }
 Object.keys(workers).forEach(function(id) {
 console.log('Killing worker ' + id);
 workers[id].destroy();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b7119c928ed27e26181c67c6d300f526cd53801
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Don't manage eventlogging.conf during upgrade - change (operations/puppet)

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

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


Change subject: Don't manage eventlogging.conf during upgrade
..

Don't manage eventlogging.conf during upgrade

I'm rolling out updates to the back-end of EventLogging and need to manually
manage the state of various services for a short period (a day or two).

Change-Id: Ic96cd5c41ac4ff1a566c058e746c8918a00d14fe
---
M modules/eventlogging/manifests/supervisor.pp
1 file changed, 7 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/69205/1

diff --git a/modules/eventlogging/manifests/supervisor.pp 
b/modules/eventlogging/manifests/supervisor.pp
index 577f55e..8fe40e4 100644
--- a/modules/eventlogging/manifests/supervisor.pp
+++ b/modules/eventlogging/manifests/supervisor.pp
@@ -22,11 +22,12 @@
mode=> '0444',
}
 
-   file { '/etc/supervisor/conf.d/eventlogging.conf':
-   content => template('eventlogging/eventlogging.conf.erb'),
-   require => File['/etc/supervisor/supervisord.conf'],
-   notify  => Service['supervisor'],
-   mode=> '0444',
-   }
+   # Temporarily disabled while I upgrade EL back-end (ori-l, 17-Jun-2013):
+   # file { '/etc/supervisor/conf.d/eventlogging.conf':
+   #   content => template('eventlogging/eventlogging.conf.erb'),
+   #   require => File['/etc/supervisor/supervisord.conf'],
+   #   notify  => Service['supervisor'],
+   #   mode=> '0444',
+   # }
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic96cd5c41ac4ff1a566c058e746c8918a00d14fe
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add AFTv5 archive feedback cron job - change (operations/puppet)

2013-06-17 Thread Asher (Code Review)
Asher has submitted this change and it was merged.

Change subject: Add AFTv5 archive feedback cron job
..


Add AFTv5 archive feedback cron job

Change-Id: I57523034b3759d14c1a6b11b3b6c3c37a9bfc85c
Resolves: RT#5016
---
M manifests/misc/maintenance.pp
M manifests/site.pp
2 files changed, 19 insertions(+), 0 deletions(-)

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



diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 7d83a5c..1414349 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -355,3 +355,20 @@
}
 }
 
+class misc::maintenance::aft5($enabled=false) {
+   define cronjob($cronenabled) {
+   cron { "aft5-archivefeedback-${title}":
+   command => "/usr/local/bin/mwscript 
extensions/ArticleFeedbackv5/maintenance/archiveFeedback.php --wiki ${title} 
2>&1 > /dev/null",
+   user => apache,
+   hour => 7,
+   minute => 4,
+   ensure => $cronenabled ? {
+   true => present,
+   false => absent,
+   default => absent
+   }
+   }
+   }
+
+   cronjob{ ["enwiki", "dewiki", "frwiki"]: cronenabled => $enabled }
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 7c46aa4..6d1653a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1166,6 +1166,7 @@
class { misc::maintenance::parsercachepurging: enabled => false }
class { misc::maintenance::cleanup_upload_stash: enabled => false }
class { misc::maintenance::tor_exit_node: enabled => false }
+   class { misc::maintenance::aft5: enabled => false }
 
# These cron jobs were left behind for some reason:
 
@@ -2727,6 +2728,7 @@
class { misc::maintenance::parsercachepurging: enabled => true }
class { misc::maintenance::cleanup_upload_stash: enabled => true }
class { misc::maintenance::tor_exit_node: enabled => true }
+   class { misc::maintenance::aft5: enabled => true }
 
# Broken cron jobs moved back to hume:
class { misc::maintenance::geodata: enabled => false }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57523034b3759d14c1a6b11b3b6c3c37a9bfc85c
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma 
Gerrit-Reviewer: Asher 
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] Persist width & height to Parcelables - change (apps...commons)

2013-06-17 Thread SuchABot (Code Review)
SuchABot has uploaded a new change for review.

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


Change subject: Persist width & height to Parcelables
..

Persist width & height to Parcelables

Makes sure value is persisted when passing from an activity to
another

Change-Id: I9ad12bd794cb3bceb7cf94246bc40f4b80d4815b
GitHub: https://github.com/wikimedia/apps-android-commons/pull/12
---
M commons/src/main/java/org/wikimedia/commons/Media.java
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons 
refs/changes/89/69189/1

diff --git a/commons/src/main/java/org/wikimedia/commons/Media.java 
b/commons/src/main/java/org/wikimedia/commons/Media.java
index 9ff0126..f96e0cf 100644
--- a/commons/src/main/java/org/wikimedia/commons/Media.java
+++ b/commons/src/main/java/org/wikimedia/commons/Media.java
@@ -158,6 +158,8 @@
 parcel.writeSerializable(dateUploaded);
 parcel.writeString(creator);
 parcel.writeSerializable(tags);
+parcel.writeInt(width);
+parcel.writeInt(height);
 }
 
 public Media(Parcel in) {
@@ -170,6 +172,8 @@
 dateUploaded = (Date) in.readSerializable();
 creator = in.readString();
 tags = (HashMap)in.readSerializable();
+width = in.readInt();
+height = in.readInt();
 }
 
 public void setDescription(String description) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ad12bd794cb3bceb7cf94246bc40f4b80d4815b
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: master
Gerrit-Owner: SuchABot 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] WIP: Turn edit tab to translate tab on translation pages - change (mediawiki...Translate)

2013-06-17 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: WIP: Turn edit tab to translate tab on translation pages
..

WIP: Turn edit tab to translate tab on translation pages

Bug: 35946
Change-Id: I78effa8ce1c696970803d7d4463341048591e2e5
---
M TranslateHooks.php
M tag/PageTranslationHooks.php
M tag/TranslatablePage.php
3 files changed, 31 insertions(+), 5 deletions(-)


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

diff --git a/TranslateHooks.php b/TranslateHooks.php
index 629556b..2781be9 100644
--- a/TranslateHooks.php
+++ b/TranslateHooks.php
@@ -153,6 +153,9 @@
 
// Show page source code when export tab is opened
$wgHooks['SpecialTranslate::executeTask'][] = 
'PageTranslationHooks::sourceExport';
+
+   // Bunnies
+   $wgHooks['SkinTemplateNavigation'][] = 
'PageTranslationHooks::translateTab';
}
}
 
diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 774edf1..c765588 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -859,4 +859,28 @@
 
return false;
}
+
+   /**
+* Ugagaga
+* Hook: SkinTemplateNavigation
+* @since 2013.06
+*/
+   static function translateTab( Skin $skin, array &$tabs ) {
+   $title = $skin->getTitle();
+   // Set display title
+   $page = TranslatablePage::isTranslationPage( $title );
+   if ( !$page ) {
+   return true;
+   }
+
+   // $code = new MessageHandle( $title )->getCode();
+   $code = call_user_func( function () use ( $title ) { return new 
MessageHandle( $title ); })->getCode();
+
+   if ( isset( $tabs['views']['edit'] ) ) {
+   $tabs['views']['edit']['text'] = 'Translate';
+   $tabs['views']['edit']['href'] = 
$page->getTranslationUrl( $code );
+   }
+
+   return true;
+   }
 }
diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index dba2cce..d9ce007 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -560,17 +560,16 @@
}
 
/**
-* @param bool|string $code
-* @return string
+* @param bunny $code
+* @return string Relative url
 */
-   public function getTranslationUrl( $code = false ) {
-   $translate = SpecialPage::getTitleFor( 'Translate' );
+   public function getTranslationUrl( $code ) {
$params = array(
'group' => $this->getMessageGroupId(),
-   'task' => 'view',
'language' => $code,
);
 
+   $translate = SpecialPage::getTitleFor( 'Translate' );
return $translate->getFullURL( $params );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Split test: instrument edit events for standard editor inter... - change (mediawiki...VisualEditor)

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

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


Change subject: Split test: instrument edit events for standard editor interface
..

Split test: instrument edit events for standard editor interface

This change adds 'page-edit-impression', 'page-save-(attempt/success)',
and '(section-)edit-link-click' events to the standard (non-VE) editor
interface, mirroring the events we added to VE. This makes the event data
usable for split-test analysis.

Change-Id: I51c441d61daa18d58ca7f62a9e5f07902a099050
---
M VisualEditor.hooks.php
M VisualEditor.php
A modules/ve/init/mw/ve.init.mw.splitTest.js
3 files changed, 66 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 788e61c..45e9db6 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -61,6 +61,10 @@
$output->addModules( array( 'schema.Edit' ) );
}
$output->addModules( array( 
'ext.visualEditor.viewPageTarget' ) );
+   } else {
+   if ( $wgVisualEditorEnableEventLogging ) {
+   $output->addModules( array( 'schema.Edit', 
'ext.visualEditor.splitTest' ) );
+   }
}
return true;
}
diff --git a/VisualEditor.php b/VisualEditor.php
index a114c98..a5ccf33 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -91,6 +91,13 @@
'unicodejs/unicodejs.wordbreak.js',
),
),
+
+   // Added for 18-Jun-2013 split test; safe to remove after
+   'ext.visualEditor.splitTest' => $wgVisualEditorResourceTemplate + array(
+   'scripts' => array(
+   've/init/mw/ve.init.mw.splitTest.js',
+   )
+   ),
// Alias for backwards compat, safe to remove after
'ext.visualEditor.editPageInit' => $wgVisualEditorResourceTemplate + 
array(
'dependencies' => array(
diff --git a/modules/ve/init/mw/ve.init.mw.splitTest.js 
b/modules/ve/init/mw/ve.init.mw.splitTest.js
new file mode 100644
index 000..592c6f0
--- /dev/null
+++ b/modules/ve/init/mw/ve.init.mw.splitTest.js
@@ -0,0 +1,55 @@
+/*global mediaWiki */
+( function ( mw, $ ) {
+   'use strict';
+
+   if ( !mw.config.get( 'wgVisualEditorConfig', {} ).enableEventLogging ) {
+   return;
+   }
+
+   function log( action ) {
+   var dfd = $.Deferred();
+   setTimeout( dfd.reject, 1000 );
+   mw.loader.using( 'schema.Edit', function () {
+   mw.eventLog.logEvent( 'Edit', {
+   version: 0,
+   action: action,
+   editor: 'wikitext',
+   pageId: mw.config.get( 'wgArticleId' ),
+   pageNs: mw.config.get( 'wgNamespaceNumber' ),
+   pageName: mw.config.get( 'wgPageName' ),
+   pageViewSessionId: 
mw.user.generateRandomSessionId(),
+   revId: mw.config.get( 'wgCurRevisionId' ),
+   userId: +mw.config.get( 'wgUserId' )
+   } ).always( dfd.resolve );
+   } );
+   return dfd;
+   }
+
+   mw.hook( 'postEdit' ).add( function () {
+   log( 'page-save-success' );
+   } );
+
+   if ( mw.config.get('wgAction') === 'edit' ) {
+   log( 'page-edit-impression' );
+   }
+
+   // Log clicks on page edit and section edit links
+   $( '#ca-edit a, .mw-editsection a' ).on( 'click', function ( e ) {
+   var href = this.href,
+   action = /section=/.test( href ) ? 
'section-edit-link-click' : 'edit-link-click';
+   log( action ).always( function () {
+   window.location = href;
+   } );
+   e.preventDefault();
+   } );
+
+   // Log edit submit
+   $( '#wpSave' ).one( 'click', function ( e ) {
+   var $save = $( this );
+   log( 'page-save-attempt' ).always( function () {
+   $save.trigger( 'click' );
+   } );
+   e.preventDefault();
+   } );
+
+} ( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51c441d61daa18d58ca7f62a9e5f07902a099050
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

___
MediaWiki-commits mailing list
MediaWiki-commi

[MediaWiki-commits] [Gerrit] test: rework interwiki lookup in parser tests - change (mediawiki/core)

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

Change subject: test: rework interwiki lookup in parser tests
..


test: rework interwiki lookup in parser tests

Some of our parser tests lookup interwikis.  This was originally done
(parser/parserTest.inc) by inserting a set of interwikis in the database
and was later lamely copy pasted in the PHPUnit wrapped test suite
(phpunit/includes/parser/NewParserTest.php).

Since that time, we had duplicate code and had the test hitting the
database to fetch interwiki.  Nowadays, we can trick the Interwiki
lookup class by using the InterwikiLoadPrefix hook, that let us skip
database lookup entirely (by having the hook returning false) and get
rid of the duplicate code.

The good old parserTests.php still pass the tests :-]

Change-Id: I36865e3890e08a05b8a6aaafa309a87556e235b9
---
M tests/parser/parserTest.inc
M tests/phpunit/includes/parser/NewParserTest.php
2 files changed, 60 insertions(+), 76 deletions(-)

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



diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 1c3ba1d..4efd708 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -212,6 +212,61 @@
$wgStyleDirectory = "$IP/skins";
}
 
+   self::setupInterwikis();
+   }
+
+   /**
+* Insert hardcoded interwiki in the lookup table.
+*
+* This function insert a set of well known interwikis that are used in
+* the parser tests. They can be considered has fixtures are injected in
+* the interwiki cache by using the 'InterwikiLoadPrefix' hook.
+* Since we are not interested in looking up interwikis in the database,
+* the hook completely replace the existing mechanism (hook returns 
false).
+*/
+   public static function setupInterwikis() {
+   # Hack: insert a few Wikipedia in-project interwiki prefixes,
+   # for testing inter-language links
+   Hooks::register( 'InterwikiLoadPrefix', function ( $prefix, 
&$iwData ) {
+   static $testInterwikis = array(
+   'wikipedia' => array(
+   'iw_url' => 
'http://en.wikipedia.org/wiki/$1',
+   'iw_api' => '',
+   'iw_wikiid' => '',
+   'iw_local' => 0 ),
+   'meatball' => array(
+   'iw_url' => 
'http://www.usemod.com/cgi-bin/mb.pl?$1',
+   'iw_api' => '',
+   'iw_wikiid' => '',
+   'iw_local' => 0 ),
+   'zh' => array(
+   'iw_url' => 
'http://zh.wikipedia.org/wiki/$1',
+   'iw_api' => '',
+   'iw_wikiid' => '',
+   'iw_local' => 1 ),
+   'es' => array(
+   'iw_url' => 
'http://es.wikipedia.org/wiki/$1',
+   'iw_api' => '',
+   'iw_wikiid' => '',
+   'iw_local' => 1 ),
+   'fr' => array(
+   'iw_url' => 
'http://fr.wikipedia.org/wiki/$1',
+   'iw_api' => '',
+   'iw_wikiid' => '',
+   'iw_local' => 1 ),
+   'ru' => array(
+   'iw_url' => 
'http://ru.wikipedia.org/wiki/$1',
+   'iw_api' => '',
+   'iw_wikiid' => '',
+   'iw_local' => 1 ),
+   );
+   if( array_key_exists( $prefix, $testInterwikis ) ) {
+   $iwData = $testInterwikis[$prefix];
+   }
+
+   // We only want to rely on the above fixtures
+   return false;
+   } );// hooks::register
}
 
public function setupRecorder( $options ) {
@@ -828,41 +883,6 @@
'user_id' => 0,
'user_name' => 'Anonymous' ) );
}
-
-   # Hack: insert a few Wikipedia in-project interwiki prefixes,
-   # for testing inter-language links
-   $this->db->insert( 'interwiki', array(
-   array( 'iw_prefix' => 'wikipedia',
-   'iw_url' => 'http://en.wikiped

[MediaWiki-commits] [Gerrit] (bug 49335) Modify wgNamespacesToBeSearchedDefault for ukwik... - change (operations/mediawiki-config)

2013-06-17 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: (bug 49335) Modify wgNamespacesToBeSearchedDefault for 
ukwikinews
..

(bug 49335) Modify wgNamespacesToBeSearchedDefault for ukwikinews

Adding namespace 14 ('Category') to wgNamespacesToBeSearchedDefault
for the Ukrainian Wikinews per bug request and community consensus.

Bug: 49335
Change-Id: I94320b193b8c542f378058442d38ced34f009d13
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d9295a6..81b0f3d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6568,6 +6568,7 @@
'+tewikisource' => array( 102 => 1, 106 => 1 ),
'+tlwikibooks' => array( 100 => 1, 101 => 0 ),
'+trwikisource' => array( 100 => 1 ),
+   '+ukwikinews' => array( 14 => 1), // bug 49335
'+vecwikisource' => array( 100 => 1, 104 => 1 ),
'+viwikibooks' => array( 102 => 1, 104 => 1, 106 => 1 ),
'+viwikisource' => array( 102 => 1, 106 => 1 ),

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

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

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


[MediaWiki-commits] [Gerrit] Added ve.ce.FocusableNode mixin to ve.ce.MWReferenceListNode... - change (mediawiki...VisualEditor)

2013-06-17 Thread Inez (Code Review)
Inez has uploaded a new change for review.

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


Change subject: Added ve.ce.FocusableNode mixin to ve.ce.MWReferenceListNode so 
its selection look better after user click on it
..

Added ve.ce.FocusableNode mixin to ve.ce.MWReferenceListNode so its selection 
look better after user click on it

Change-Id: I4343a67d7b488c42e40270d25b9b4104a07872fb
---
M modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js 
b/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js
index f8ab16b..4ff16b5 100644
--- a/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js
+++ b/modules/ve/ce/nodes/ve.ce.MWReferenceListNode.js
@@ -22,6 +22,7 @@
 
// Mixin constructors
ve.ce.ProtectedNode.call( this );
+   ve.ce.FocusableNode.call( this );
 
// DOM Changes
this.$.addClass( 've-ce-mwReferenceListNode', 'reference' )
@@ -43,6 +44,8 @@
 
 ve.mixinClass( ve.ce.MWReferenceListNode, ve.ce.ProtectedNode );
 
+ve.mixinClass( ve.ce.MWReferenceListNode, ve.ce.FocusableNode );
+
 /* Static Properties */
 
 ve.ce.MWReferenceListNode.static.name = 'mwReferenceList';

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

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

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


[MediaWiki-commits] [Gerrit] Add a test to check the appearance of the IME menu - change (qa/browsertests)

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

Change subject: Add a test to check the appearance of the IME menu
..


Add a test to check the appearance of the IME menu

This is my first Cucumber Ruby code. It's probably naive,
but it seems to work. I'd love to hear your comments.

CM: using Amir's approach removes a deprecation warning

Use be_visible instead

Change-Id: Ib3c1bd0e8a296d6be6fbad4a2e1f35666d471e11
---
M features/step_definitions/uls_ime_steps.rb
M features/support/pages/random_page.rb
M features/uls_ime.feature
3 files changed, 16 insertions(+), 1 deletion(-)

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



diff --git a/features/step_definitions/uls_ime_steps.rb 
b/features/step_definitions/uls_ime_steps.rb
index a5fdb5d..3f09d8b 100644
--- a/features/step_definitions/uls_ime_steps.rb
+++ b/features/step_definitions/uls_ime_steps.rb
@@ -2,6 +2,14 @@
   on(RandomPage).search_input_element.click
 end
 
+When(/^I click on the IME keyboard icon$/) do
+  on(RandomPage).input_method_element.click
+end
+
 Then(/^I should see the input method keyboard icon at the bottom right$/) do
-  on(RandomPage).input_method_element.attribute_value('style').should match 
/display: block/i
+  on(RandomPage).input_method_element.should be_visible
+end
+
+Then(/^I should see the dropdown menu with the a list of keymaps$/) do
+  on(RandomPage).input_method_selector_menu_element.should be_visible
 end
diff --git a/features/support/pages/random_page.rb 
b/features/support/pages/random_page.rb
index 4f97b45..88a1a53 100644
--- a/features/support/pages/random_page.rb
+++ b/features/support/pages/random_page.rb
@@ -16,4 +16,5 @@
   text_field(:search_input, id: 'searchInput')
   button(:search_button, id: 'searchButton')
   div(:input_method, class: 'imeselector imeselector-toggle')
+  div(:input_method_selector_menu, class: 'imeselector-menu')
 end
diff --git a/features/uls_ime.feature b/features/uls_ime.feature
index c3d5b3e..4c87ce3 100644
--- a/features/uls_ime.feature
+++ b/features/uls_ime.feature
@@ -5,3 +5,9 @@
 Given I am at random page
 When I click on an input box
 Then I should see the input method keyboard icon at the bottom right
+
+  Scenario: User can see dropdown menu when they click on the IME icon
+Given I am at random page
+When I click on an input box
+And I click on the IME keyboard icon
+Then I should see the dropdown menu with the a list of keymaps

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3c1bd0e8a296d6be6fbad4a2e1f35666d471e11
Gerrit-PatchSet: 4
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Arrbee 
Gerrit-Reviewer: Cmcmahon 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
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] job: Initialize $mode. - change (labs/toollabs)

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

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


Change subject: job: Initialize $mode.
..

job: Initialize $mode.

Change-Id: I1847f4a8f140bf93cfa9a13ce7d8f001fff25d96
---
M jobutils/bin/job
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/toollabs 
refs/changes/57/69157/1

diff --git a/jobutils/bin/job b/jobutils/bin/job
index 083281f..13cf48f 100755
--- a/jobutils/bin/job
+++ b/jobutils/bin/job
@@ -1,11 +1,11 @@
 #!/usr/bin/perl -w
 #
 # Copyright © 2013 Marc-André Pelletier 
-# 
+#
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 # copyright notice and this permission notice appear in all copies.
-# 
+#
 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@@ -18,7 +18,7 @@
 use strict;
 use warnings;
 
-my $mode;
+my $mode = '';
 $mode = shift  if $#ARGV>0 and $ARGV[0] eq '-v';
 $mode = shift  if $#ARGV>0 and $ARGV[0] eq '-q';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1847f4a8f140bf93cfa9a13ce7d8f001fff25d96
Gerrit-PatchSet: 1
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


  1   2   3   4   >