[MediaWiki-commits] [Gerrit] Fix TeX pool overflow with very long filenames. - change (mediawiki...latex_renderer)

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

Change subject: Fix TeX pool overflow with very long filenames.
..


Fix TeX pool overflow with very long filenames.

Add test case taken from the jawiki.

Change-Id: Iba92c5cd6a275859a38b7015440737751d2a5a36
---
M lib/index.js
A samples/jabug.zip
M test/samples.js
3 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/lib/index.js b/lib/index.js
index 5c5156c..b967a4d 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1040,7 +1040,11 @@
 // filenames are unique without tying ourself in knots).  Returns the
 // new name (which might differ from the basename given)
 var renameFile = guard(guard.n(1), function(dir, oldname, newbase) {
-   return P.call(fs.exists, fs, path.join(dir, 
newbase)).then(function(exists){
+   var exists = function(path, cb) {
+   // fs exists doesn't take the usual 'err' as 1st argument.  fix 
it.
+   this.exists(path, function(exists) { cb(null, exists); });
+   };
+   return P.call(exists, fs, path.join(dir, 
newbase)).then(function(exists) {
if (!exists) {
return path.join(dir, newbase);
}
@@ -1151,6 +1155,8 @@
// only one '.' allowed
safe = safe.split(/(?=[.][^.]+$)/);
safe = safe[0].replace(/[.]/g, '-') + (safe[1] || '');
+   // truncate to 64 characters (keep end w/ extension)
+   safe = safe.slice(-64);
// rename the file if necessary
return (safe === info.filename) ? safe :
renameFile(imagedir, info.filename, safe);
diff --git a/samples/jabug.zip b/samples/jabug.zip
new file mode 100644
index 000..5b7e1e8
--- /dev/null
+++ b/samples/jabug.zip
Binary files differ
diff --git a/test/samples.js b/test/samples.js
index 145f48d..1e19d6c 100644
--- a/test/samples.js
+++ b/test/samples.js
@@ -24,7 +24,7 @@
 // ensure that we don't crash on any of our sample inputs
 describe(Basic crash test, function() {
var hasXeLaTeX = checkXeLaTeX();
-   ['tao.zip', 'hurricanes.zip', 'malayalam.zip', 'multiwiki.zip', 
'papier.zip', 'us.zip'].forEach(function(bundle) {
+   ['tao.zip', 'hurricanes.zip', 'malayalam.zip', 'multiwiki.zip', 
'papier.zip', 'us.zip', 'jabug.zip'].forEach(function(bundle) {
describe(bundle, function() {
var dest = hasXeLaTeX ? 'pdf' : 'tex';
it('should compile to '+dest, function(done) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba92c5cd6a275859a38b7015440737751d2a5a36
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Call Linker::link statically (1.18) - change (mediawiki...BibManager)

2014-01-14 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: Call Linker::link statically (1.18)
..


Call Linker::link statically (1.18)

Change-Id: I234676806f0ae8dd014fee1185d1f3d6e12392fe
---
M includes/BibManagerHooks.php
M includes/BibManagerPagerList.php
M specialpages/BibManagerList_body.php
3 files changed, 44 insertions(+), 44 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/includes/BibManagerHooks.php b/includes/BibManagerHooks.php
index 6ee7527..a483448 100644
--- a/includes/BibManagerHooks.php
+++ b/includes/BibManagerHooks.php
@@ -33,7 +33,7 @@
 *
 * @param OutputPage $out
 * @param Skin $skin
-* @return bool Always true to keep hook running 
+* @return bool Always true to keep hook running
 */
public static function onBeforePageDisplay ( $out, $skin ) {
global $wgBibManagerUseJS, $wgScriptPath;
@@ -67,7 +67,7 @@
/**
 * Init-method for the BibManager-Hooks
 * @param Parser $parser
-* @return bool Always true to keep hooks running 
+* @return bool Always true to keep hooks running
 */
public static function onParserFirstCallInit ( $parser ) {
$parser-setHook( 'bib', 'BibManagerHooks::onBibTag' );
@@ -82,10 +82,10 @@
 * @param array $args
 * @param Parser $parser
 * @param PPFrame $frame
-* @return String the link to the Bib-Cit entered by id 
+* @return String the link to the Bib-Cit entered by id
 */
public static function onBibTag ( $input, $args, $parser, $frame ) {
-   global $wgScript, $wgUser;
+   global $wgUser;
global $wgBibManagerCitationArticleNamespace;
$parser-disableCache();
if ( !isset( $args['id'] ) )
@@ -98,7 +98,7 @@
$sLink = '';
if ( empty( $entry ) ) {
$spTitle = SpecialPage::getTitleFor( 'BibManagerCreate' 
);
-   $sLink = $wgUser-getSkin()-link(
+   $sLink = Linker::link(
$spTitle, $args['id'], array ( 'class' = 'new' ), 
array ( 'bm_bibtexCitation' = $args['id'] ), array ( 'broken' = true )
);
$sTooltip = 'span' . wfMsg('bm_error_not-existing');
@@ -109,7 +109,7 @@
$sTooltip .= '/span';
} else {
$oCitationTitle = Title::newFromText( $args['id'], 
$wgBibManagerCitationArticleNamespace );
-   $sLink = $wgUser-getSkin()-link( $oCitationTitle, 
$oCitationTitle-getText(), array ( 'title' = '' ) );
+   $sLink = Linker::link( $oCitationTitle, 
$oCitationTitle-getText(), array ( 'title' = '' ) );
$sTooltip = self::getTooltip( $entry, $args );
}
return 'span class=bibmanager-citation[' . $sLink . ']' . 
$sTooltip . '/span';
@@ -134,11 +134,11 @@
. XML::element( 'em', null, $value )
.br/;//. XML::element( 'br', null, null ); 
//This is just a little exercise
}
-   
+
$tooltip[] = self::getIcons( $entry );
$tooltipString = implode( , $tooltip );
$tooltipString = 'span' . $tooltipString . '/span';
-   
+
if ( isset( $args['mode'] )  $args['mode'] == 'full' ) {
$format = self::formatEntry( $entry );
$tooltipString = ' ' . $format . ' ' . $tooltipString;
@@ -237,7 +237,7 @@
$filter [$temp[0]] = $temp[1];
}
}
-   
+
$out = self::getTable($entries);
 
return $out;
@@ -258,7 +258,7 @@
 * @param array $args
 * @param Parser $parser
 * @param PPFrame $frame
-* @return string 
+* @return string
 */
public static function onBibprintTag ( $input, $args, $parser, $frame ) 
{
global $wgUser;
@@ -335,14 +335,14 @@
 
if ( $key == 'url' ) {
$urlKey = $prefixedKeys ? 'bm_url' : 'url';
-   $value = ' '.XML::element( 
-   'a', 
-   array( 
-   'href'   = $entry[$urlKey], 
-   'target' = '_blank', 
+   $value = ' '.XML::element(
+   'a',
+   array(
+   'href'   = $entry[$urlKey],
+   

[MediaWiki-commits] [Gerrit] Pass context to HTMLForm, don't use HTMLForm::setTitle - change (mediawiki...BibManager)

2014-01-14 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: Pass context to HTMLForm, don't use HTMLForm::setTitle
..


Pass context to HTMLForm, don't use HTMLForm::setTitle

Change-Id: I3f060734f739d6897715078aa7f049c7102dfdd2
---
M specialpages/BibManagerCreate_body.php
M specialpages/BibManagerDelete_body.php
M specialpages/BibManagerEdit_body.php
M specialpages/BibManagerImport_body.php
M specialpages/BibManagerList_body.php
5 files changed, 19 insertions(+), 24 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/specialpages/BibManagerCreate_body.php 
b/specialpages/BibManagerCreate_body.php
index 58d4680..64dd160 100644
--- a/specialpages/BibManagerCreate_body.php
+++ b/specialpages/BibManagerCreate_body.php
@@ -50,7 +50,7 @@
 
wfRunHooks( 'BibManagerCreateBeforeTypeSelectFormCreate', array 
( $this, $formDescriptor ) );
 
-   $entryTypeSelectionForm = new HTMLForm( $formDescriptor );
+   $entryTypeSelectionForm = new HTMLForm( $formDescriptor, 
$this-getContext() );
$entryTypeSelectionForm-setSubmitText( wfMsg( 
'bm_select_entry_type_submit' ) );
$entryTypeSelectionForm-setSubmitId( 
'bm_select_entry_type_submit' );
$entryTypeSelectionForm-setSubmitCallback( array ( $this, 
'onSubmit' ) );
@@ -62,10 +62,9 @@
$importParams['bm_bibtexCitation'] = $citation;
}
 
-   $entryTypeSelectionForm-setTitle( $this-getTitle() );
$entryTypeSelectionForm-addPostText(
wfMsg(
-   'bm_bibtex_string_import_link', 
+   'bm_bibtex_string_import_link',
SpecialPage::getTitleFor( 'BibManagerImport' 
)-getLocalURL( $importParams )
)
);
@@ -85,7 +84,7 @@
global $wgOut, $wgRequest;
$citation = $wgRequest-getVal( 'bm_bibtexCitation' );
if ( !isset( $formData['bm_bibtexCitation'] )  !empty( 
$citation ) ) {
-   //This should not be necessary, but it seems the hidden 
field from 
+   //This should not be necessary, but it seems the hidden 
field from
//the type selection form is not properly included in 
$formData
$formData['bm_bibtexCitation'] = $citation;
}
@@ -94,4 +93,4 @@
);
return true;
}
-}
\ No newline at end of file
+}
diff --git a/specialpages/BibManagerDelete_body.php 
b/specialpages/BibManagerDelete_body.php
index 85c263e..a6861e8 100644
--- a/specialpages/BibManagerDelete_body.php
+++ b/specialpages/BibManagerDelete_body.php
@@ -68,9 +68,8 @@
)
);
 
-   $htmlForm = new HTMLForm( $formDescriptor, 'bm_delete' );
+   $htmlForm = new HTMLForm( $formDescriptor, $this-getContext(), 
'bm_delete' );
$htmlForm-setSubmitText( wfMsg( 'bm_delete_submit' ) );
-   $htmlForm-setTitle( $this-getTitle() );
$htmlForm-setSubmitCallback( array ( $this, 'formSubmit' ) );
//TODO: Add cancel button that returns user to the place he 
came from. I.e. filtered overview
 
@@ -94,13 +93,13 @@
 
if ( $result === true ) {
$wgOut-addHtml( wfMsg( 'bm_success_save-complete' ) );
-   $wgOut-addHtml( 
-   wfMsg( 
-   'bm_success_link-to-list', 
+   $wgOut-addHtml(
+   wfMsg(
+   'bm_success_link-to-list',
SpecialPage::getTitleFor( 
BibManagerList )-getLocalURL()
)
);
}
return $result;
}
-}
\ No newline at end of file
+}
diff --git a/specialpages/BibManagerEdit_body.php 
b/specialpages/BibManagerEdit_body.php
index f248ad0..bfbaed5 100644
--- a/specialpages/BibManagerEdit_body.php
+++ b/specialpages/BibManagerEdit_body.php
@@ -101,9 +101,8 @@
 
wfRunHooks( 'BibManagerEditBeforeFormCreate', array ( $this, 
$formDescriptor ) );
 
-   $htmlForm = new HTMLForm( $formDescriptor, 'bm_edit' );
+   $htmlForm = new HTMLForm( $formDescriptor, $this-getContext(), 
'bm_edit' );
$htmlForm-setSubmitText( wfMsg( 'bm_edit_submit' ) );
-   $htmlForm-setTitle( $this-getTitle() );
$htmlForm-setSubmitCallback( array ( $this, 'submitForm' ) );
//TODO: Add cancel button that returns user to the place he 
came from. I.e. filtered overview
 
@@ -117,11 +116,11 @@
 * @global OutputPage $wgOut
 * 

[MediaWiki-commits] [Gerrit] Publish the translation under User:UserName - change (mediawiki...ContentTranslation)

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

Change subject: Publish the translation under User:UserName
..


Publish the translation under User:UserName

Change-Id: Ib496ac277bd6554b8c2bdead701d13f94a943c26
---
M Resources.php
M modules/translation/ext.cx.publish.js
2 files changed, 40 insertions(+), 2 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 8d175bc..3e25e68 100644
--- a/Resources.php
+++ b/Resources.php
@@ -66,4 +66,7 @@
 
 $wgResourceModules['ext.cx.publish'] = array(
'scripts' = 'translation/ext.cx.publish.js',
+   'dependencies' = array(
+   'mediawiki.api.edit',
+   ),
 ) + $resourcePaths;
diff --git a/modules/translation/ext.cx.publish.js 
b/modules/translation/ext.cx.publish.js
index cb2145c..3484550 100644
--- a/modules/translation/ext.cx.publish.js
+++ b/modules/translation/ext.cx.publish.js
@@ -13,10 +13,45 @@
mw.cx = mw.cx || {};
 
mw.cx.publish = function () {
-   // TODO: publish the article
-   mw.notify( 'Article published!' );
+   var translatedTitle, translatedContent, summary, sourceTitle;
+
+   sourceTitle = $( '.source  h2' ).text();
+   translatedTitle = $( '.translation .title' ).text();
+   translatedContent = $( '.translation .article' ).text();
+   summary = '[ContentTranslation] Translated from ' + sourceTitle;
+   // To be saved under User:UserName
+   translatedTitle = 'User:' + mw.user.getName() + '/' + 
translatedTitle;
+   publishTranslation( translatedTitle, translatedContent, summary 
)
+   .done( function () {
+   mw.notify( $( 'p' )
+   .text( 'Article published - ' )
+   .append( $( 'a' )
+   .text( translatedTitle )
+   .attr( 'href', mw.util.getUrl( 
translatedTitle ) )
+   )
+   );
+   } ).fail( function () {
+   mw.notify( 'Error while saving article.' );
+   } );
};
 
+   /**
+* @param {string} title
+* @param {string} content
+* @param {string} summary
+*/
+   function publishTranslation( title, content, summary ) {
+   var api = new mw.Api();
+   // FIXME: We need to write ApiPublishTranslation to add
+   // contenttranslation tag to the revisions
+   return api.postWithEditToken( {
+   action: 'edit',
+   title: title,
+   summary: summary,
+   text: content,
+   } );
+   }
+
$( function () {
mw.hook( 'mw.cx.publish' ).add( $.proxy( mw.cx.publish, this ) 
);
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib496ac277bd6554b8c2bdead701d13f94a943c26
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Avoid calling deprecated User::getSkin() - change (mediawiki...Wikilog)

2014-01-14 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Avoid calling deprecated User::getSkin()
..


Avoid calling deprecated User::getSkin()

Change-Id: If8246aa2c192d490d18c405d35e654a3b1c9ae4f
---
M WikilogFeed.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/WikilogFeed.php b/WikilogFeed.php
index 4d9d530..c696042 100644
--- a/WikilogFeed.php
+++ b/WikilogFeed.php
@@ -77,7 +77,7 @@
 */
public function __construct( Title $title, $format, WikilogQuery 
$query, $limit )
{
-   global $wgUser;
+   global $wgOut;
 
$this-mTitle = $title;
$this-mFormat = $format;
@@ -87,7 +87,7 @@
$this-mIndexField = $this-getIndexField();
 
# Retrieve copyright notice.
-   $skin = $wgUser-getSkin();
+   $skin = $wgOut-getSkin();
$saveExpUrls = WikilogParser::expandLocalUrls();
$this-mCopyright = $skin-getCopyright( 'normal' );
WikilogParser::expandLocalUrls( $saveExpUrls );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8246aa2c192d490d18c405d35e654a3b1c9ae4f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikilog
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] dynamicproxy: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: dynamicproxy: lint clean
..

dynamicproxy: lint clean

Change-Id: Id80ecd1fd1a4b5d7eea1bfb9d4cee874353ea970
---
M modules/dynamicproxy/manifests/api.pp
M modules/dynamicproxy/manifests/init.pp
2 files changed, 49 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/107339/1

diff --git a/modules/dynamicproxy/manifests/api.pp 
b/modules/dynamicproxy/manifests/api.pp
index 7529308..4b06da6 100644
--- a/modules/dynamicproxy/manifests/api.pp
+++ b/modules/dynamicproxy/manifests/api.pp
@@ -1,70 +1,74 @@
 class dynamicproxy::api {
 file { '/etc/nginx/sites-available/api':
-ensure = 'file',
+ensure  = 'file',
 content = template('dynamicproxy/api.conf'),
 require = Package['nginx-extras'],
-notify = Service['nginx']
+notify  = Service['nginx'],
 }
 
 file { '/etc/nginx/sites-enabled/api':
-ensure = 'link',
-target = '/etc/nginx/sites-available/api',
-require = File['/etc/nginx/sites-available/api']
+ensure  = 'link',
+target  = '/etc/nginx/sites-available/api',
+require = File['/etc/nginx/sites-available/api'],
 }
 
 package { 'python-flask':
-ensure = 'latest',
+ensure  = 'latest',
 require = Class['misc::labsdebrepo'],
 }
 
 package { ['python-invisible-unicorn', 'python-flask-sqlalchemy', 'uwsgi', 
'uwsgi-plugin-python']:
-ensure = 'present',
+ensure  = 'present',
 require = Package['python-flask'],
 }
 
 generic::upstart_job{ 'dynamicproxy-api':
 require = Package['python-invisible-unicorn', 
'python-flask-sqlalchemy', 'redis', 'python-flask', 'uwsgi', 
'uwsgi-plugin-python'],
-install = 'true',
-start   = 'true'
+install = true,
+start   = true,
 }
 
-file {
-'/etc/dynamicproxy-api':
+file { '/etc/dynamicproxy-api':
 ensure = 'directory',
 owner  = 'www-data',
-group  = 'www-data';
-'/data/project/backup':
+group  = 'www-data',
+}
+
+file { '/data/project/backup':
 ensure = 'directory',
 owner  = 'root',
 group  = 'root',
-mode   = '755';
-'/data/project/backup/README':
-source = 'puppet:///modules/dynamicproxy/BackupReadme',
-require = File['/data/project/backup'];
-'/usr/local/sbin/proxydb-bak.sh':
-mode = '555',
-owner = root,
-group = root,
+mode   = '0755',
+}
+
+file { '/data/project/backup/README':
+source  = 'puppet:///modules/dynamicproxy/BackupReadme',
+require = File['/data/project/backup'],
+}
+
+file { '/usr/local/sbin/proxydb-bak.sh':
+mode   = '0555',
+owner  = 'root',
+group  = 'root',
 source = 'puppet:///modules/dynamicproxy/proxydb-bak.sh',
 }
 
-cron {
-'proxydb-bak':
+cron { 'proxydb-bak':
 ensure  = present,
-user= root,
+user= 'root',
 hour= 1,
 minute  = 0,
 command = '/usr/local/sbin/proxydb-bak.sh  /dev/null 21',
-require = File[/data/project/backup];
+require = File['/data/project/backup'],
 }
 
 # Create initial db file if it doesn't exist, but don't clobber if it does.
 file { '/etc/dynamicproxy-api/data.db':
-ensure = 'file',
-source = 'puppet:///modules/dynamicproxy/initial-data.db',
+ensure  = 'file',
+source  = 'puppet:///modules/dynamicproxy/initial-data.db',
 replace = false,
 require = File['/etc/dynamicproxy-api'],
-owner = 'www-data',
-group = 'www-data',
+owner   = 'www-data',
+group   = 'www-data',
 }
 }
diff --git a/modules/dynamicproxy/manifests/init.pp 
b/modules/dynamicproxy/manifests/init.pp
index 974a198..43fcac7 100644
--- a/modules/dynamicproxy/manifests/init.pp
+++ b/modules/dynamicproxy/manifests/init.pp
@@ -1,61 +1,61 @@
 class dynamicproxy (
-$redis_maxmemory=512MB,
+$redis_maxmemory='512MB',
 $ssl_certificate_name=false,
 $notfound_servers=[],
-$luahandler=domainproxy.lua,
+$luahandler='domainproxy.lua',
 $set_xff=false
 ) {
 class { '::redis':
-persist   = aof,
-dir   = /var/lib/redis,
+persist   = 'aof',
+dir   = '/var/lib/redis',
 maxmemory = $redis_maxmemory,
 }
 
 include misc::labsdebrepo
 
 package { 'nginx-extras':
-ensure = latest,
+ensure  = latest,
 require = Class['misc::labsdebrepo'],
- }
+}
 
 service { 'nginx':
 ensure  = 'running',
-

[MediaWiki-commits] [Gerrit] Avoid using User::getSkin() - change (mediawiki...LinkFilter)

2014-01-14 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Avoid using User::getSkin()
..


Avoid using User::getSkin()

Change-Id: I205c1809a10bf83f5781c8d5f3e6f281b83e3545
---
M LinkPage.php
M SpecialLinkRedirect.php
2 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/LinkPage.php b/LinkPage.php
index 29132d8..65cb85e 100644
--- a/LinkPage.php
+++ b/LinkPage.php
@@ -50,9 +50,9 @@
}
 
function view() {
-   global $wgOut, $wgUser, $wgLinkPageDisplay;
+   global $wgOut, $wgLinkPageDisplay;
 
-   $sk = $wgUser-getSkin();
+   $sk = $wgOut-getSkin();
 
$wgOut-setHTMLTitle( $this-getTitle()-getText() );
$wgOut-setPageTitle( $this-getTitle()-getText() );
@@ -426,4 +426,4 @@
 
return $output;
}
-}
\ No newline at end of file
+}
diff --git a/SpecialLinkRedirect.php b/SpecialLinkRedirect.php
index e9db749..0d08bd4 100644
--- a/SpecialLinkRedirect.php
+++ b/SpecialLinkRedirect.php
@@ -17,16 +17,16 @@
public function execute( $par ) {
$out = $this-getOutput();
$out-setArticleBodyOnly( true );
-   $sk = $this-getUser()-getSkin();
+   $sk = $this-getOutput()-getSkin();
$url = $this-getRequest()-getVal( 'url' );
$out-addHTML(
html
body onload=window.location=\{$url}\
-   {$sk-bottomScripts( $out )}
+   {$sk-bottomScripts()}
/body
/html
);
 
return '';
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I205c1809a10bf83f5781c8d5f3e6f281b83e3545
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Avoid using deprecated User::getSkin() - change (mediawiki...OpenID)

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

Change subject: Avoid using deprecated User::getSkin()
..


Avoid using deprecated User::getSkin()

Also avoid calling deprecated User::getSkin().

Change-Id: I3870ffd3ad3007e6e01e8e5f768e83ddbb5358a5
---
M OpenID.hooks.php
M SpecialOpenIDServer.body.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index 4c3dd0d..bb0e982 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -100,13 +100,13 @@
 * @return bool
 */
public static function onPersonalUrls( $personal_urls, $title ) {
-   global $wgOpenIDHideOpenIDLoginLink, $wgUser, 
$wgOpenIDLoginOnly;
+   global $wgOpenIDHideOpenIDLoginLink, $wgUser, $wgOut, 
$wgOpenIDLoginOnly;
 
if ( !$wgOpenIDHideOpenIDLoginLink
 ( $wgUser-getID() == 0 )
 OpenID::isAllowedMode( 'consumer' ) ) {
 
-   $sk = $wgUser-getSkin();
+   $sk = $wgOut-getSkin();
$returnto = $title-isSpecial( 'Userlogout' ) ? '' : ( 
'returnto=' . $title-getPrefixedURL() );
 
$personal_urls['openidlogin'] = array(
diff --git a/SpecialOpenIDServer.body.php b/SpecialOpenIDServer.body.php
index b75de13..1888fcb 100644
--- a/SpecialOpenIDServer.body.php
+++ b/SpecialOpenIDServer.body.php
@@ -812,7 +812,7 @@
$ok = wfMessage( 'ok' )-text();
$cancel = wfMessage( 'cancel' )-text();
 
-   $sk = $wgUser-getSkin();
+   $sk = $wgOut-getSkin();
 
$wgOut-addHTML( p{$instructions}/p .
'form action=' . $sk-makeSpecialUrl( 
'OpenIDServer/Trust' ) . ' method=POST' .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3870ffd3ad3007e6e01e8e5f768e83ddbb5358a5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OpenID
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...SmoothGallery)

2014-01-14 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Call Linker methods statically
..


Call Linker methods statically

Change-Id: I9731915a5ce5c992885cc0c98569b3827f25d5b6
---
M SmoothGalleryParser.php
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/SmoothGalleryParser.php b/SmoothGalleryParser.php
index e27b30a..6ceb2a3 100644
--- a/SmoothGalleryParser.php
+++ b/SmoothGalleryParser.php
@@ -177,7 +177,6 @@
}
 
function parseImage( $title, $parser, $galleryArray, $description ) {
-   global $wgUser;
global $wgSmoothGalleryThumbHeight, $wgSmoothGalleryThumbWidth;
 
$imageArray = Array();
@@ -242,13 +241,11 @@
}
}
 
-   $skin = $wgUser-getSkin();
-
// Everything is checked, and converted; add to the array and 
return
$imageArray[title] = $title;
 
// We need the following for the image's div
-   $imageArray[heading] = $skin-makeKnownLinkObj( 
$img_obj-getTitle(), $img_obj-getName() );
+   $imageArray[heading] = Linker::makeKnownLinkObj( 
$img_obj-getTitle(), $img_obj-getName() );
$imageArray[description] = $description;
$imageArray[full_url] = $title-getFullURL();
$imageArray[view_url] = $img_obj-getViewURL();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9731915a5ce5c992885cc0c98569b3827f25d5b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SmoothGallery
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Avoid using deprecated User::getSkin() - change (mediawiki...ShoutWikiAds)

2014-01-14 Thread Nikerabbit (Code Review)
Nikerabbit has submitted this change and it was merged.

Change subject: Avoid using deprecated User::getSkin()
..


Avoid using deprecated User::getSkin()

Change-Id: I50a5c8c79a209428da48749831cfeb7cda352d3d
---
M ShoutWikiAds.class.php
1 file changed, 2 insertions(+), 6 deletions(-)

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



diff --git a/ShoutWikiAds.class.php b/ShoutWikiAds.class.php
index 1c6986d..272bb7d 100644
--- a/ShoutWikiAds.class.php
+++ b/ShoutWikiAds.class.php
@@ -684,13 +684,9 @@
 * @return String: skin name in lowercase
 */
public static function determineSkin() {
-   global $wgUser;
+   global $wgOut;
 
-   $skinObj = $wgUser-getSkin();
-
-   $skinName = strtolower( str_replace( 'Skin', '', get_class( 
$skinObj ) ) );
-
-   return $skinName;
+   return strtolower( $wgOut-getSkin()-getSkinName() );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50a5c8c79a209428da48749831cfeb7cda352d3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ShoutWikiAds
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Call Linker methods statically - change (mediawiki...NewestPages)

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

Change subject: Call Linker methods statically
..


Call Linker methods statically

Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
---
M NewestPages.page.php
1 file changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/NewestPages.page.php b/NewestPages.page.php
index de77080..e8fc000 100644
--- a/NewestPages.page.php
+++ b/NewestPages.page.php
@@ -67,7 +67,7 @@
if( $count  0 ) {
# Make list
if( !$this-mIncluding )
-   
+
$wgOut-addWikiMsg( 'newestpages-showing', 
$wgLang-formatNum($count) );
$wgOut-addHTML( ol );
foreach ( $res as $row ) {
@@ -125,13 +125,11 @@
}
 
function makeListItem( $row ) {
-   global $wgUser;
$title = Title::makeTitleSafe( $row-page_namespace, 
$row-page_title );
if( !is_null( $title ) ) {
-   $skin = $wgUser-getSkin();
$link = $row-page_is_redirect
-   ? 'span class=allpagesredirect' . 
$skin-makeKnownLinkObj( $title ) . '/span'
-   : $skin-makeKnownLinkObj( $title );
+   ? 'span class=allpagesredirect' . 
Linker::makeKnownLinkObj( $title ) . '/span'
+   : Linker::makeKnownLinkObj( $title );
return( li{$link}/li\n );
} else {
return( !-- Invalid title  . htmlspecialchars( 
$row-page_title ) .  in namespace  . htmlspecialchars( $row-page_namespace 
) .  --\n );
@@ -158,8 +156,6 @@
}
 
function makeSelfLink( $label, $oname = false, $oval = false ) {
-   global $wgUser;
-   $skin = $wgUser-getSkin();
$self = $this-getTitle();
$attr['limit'] = $this-limit;
$attr['namespace'] = $this-namespace;
@@ -169,7 +165,7 @@
$attr[$oname] = $oval;
foreach( $attr as $aname = $aval )
$attribs[] = {$aname}={$aval};
-   return $skin-makeKnownLinkObj( $self, $label, implode( '', 
$attribs ) );
+   return Linker::makeKnownLinkObj( $self, $label, implode( '', 
$attribs ) );
}
 
function makeNamespaceForm() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I042fe17a5240baa50b75c8498630fea5d80eb51d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/NewestPages
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] download: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: download: lint clean
..

download: lint clean

Change-Id: Iff31abb96b8cae2d65d3a6ab0a1edda467c6
---
M modules/download/manifests/gluster.pp
M modules/download/manifests/kiwix.pp
M modules/download/manifests/mediawiki.pp
M modules/download/manifests/mirror.pp
M modules/download/manifests/primary.pp
M modules/download/manifests/wikimedia.pp
6 files changed, 38 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/41/107341/1

diff --git a/modules/download/manifests/gluster.pp 
b/modules/download/manifests/gluster.pp
index 7495e69..4fa7379 100644
--- a/modules/download/manifests/gluster.pp
+++ b/modules/download/manifests/gluster.pp
@@ -2,7 +2,7 @@
 include role::mirror::common
 include gluster::client
 
-system::role { download::gluster: description = Gluster dumps copy }
+system::role { 'download::gluster': description = 'Gluster dumps copy' }
 
 mount { '/mnt/glusterpublicdata':
 ensure  = mounted,
@@ -26,11 +26,11 @@
 
 cron { 'dumps_gluster_rsync':
 ensure  = present,
-user= root,
+user= 'root',
 minute  = '50',
 hour= '3',
 command = '/usr/local/sbin/gluster-rsync-cron.sh',
 environment = 'MAILTO=ops-du...@wikimedia.org',
-require = [ File[ 
['/usr/local/bin/wmfdumpsmirror.py','/usr/local/sbin/gluster-rsync-cron.sh'] ], 
Mount['/mnt/glusterpublicdata'] ]
+require = [ 
File[['/usr/local/bin/wmfdumpsmirror.py','/usr/local/sbin/gluster-rsync-cron.sh']
 ],Mount['/mnt/glusterpublicdata'] ],
 }
 }
diff --git a/modules/download/manifests/kiwix.pp 
b/modules/download/manifests/kiwix.pp
index 2d3240d..796913f 100644
--- a/modules/download/manifests/kiwix.pp
+++ b/modules/download/manifests/kiwix.pp
@@ -7,7 +7,7 @@
 user { 'mirror':
 name   = mirror,
 gid= mirror,
-groups = www-data,
+groups = 'www-data',
 membership = minimum,
 home   = '/data/home',
 shell  = '/bin/bash',
@@ -16,15 +16,15 @@
 file { '/data/xmldatadumps/public/kiwix':
 ensure = link,
 target = '/data/xmldatadumps/public/other/kiwix',
-owner  = mirror,
-group  = mirror,
+owner  = 'mirror',
+group  = 'mirror',
 mode   = '0644',
 }
 
 cron { 'kiwix-mirror-update':
 ensure  = present,
 command = rsync -vzrlptD  
download.kiwix.org::download.kiwix.org/zim/0.9/ 
/data/xmldatadumps/public/other/kiwix/zim/0.9/ /dev/null 21,
-user= mirror,
+user= 'mirror',
 minute  = '*/15',
 }
 }
diff --git a/modules/download/manifests/mediawiki.pp 
b/modules/download/manifests/mediawiki.pp
index e2506d8..8edda0e 100644
--- a/modules/download/manifests/mediawiki.pp
+++ b/modules/download/manifests/mediawiki.pp
@@ -1,6 +1,6 @@
 class download::mediawiki {
 
-system::role { download::mediawiki: description = MediaWiki download }
+system::role { 'download::mediawiki': description = 'MediaWiki download' }
 
 package { 'apache':
 ensure = present,
@@ -8,24 +8,24 @@
 
 file { '/etc/apache2/sites-available/download.mediawiki.org':
 mode   = '0444',
-owner  = root,
-group  = root,
+owner  = 'root',
+group  = 'root',
 source = 'puppet:///modules/downloads/apache/download.mediawiki.org',
 }
 
 file { '/srv/org/mediawiki':
 ensure = directory,
-owner  = root,
-group  = root,
+owner  = 'root',
+group  = 'root',
 mode   = '0775',
 }
 
 file { '/srv/org/mediawiki/download':
 ensure = directory,
-owner  = mwdeploy,
-group  = mwdeploy,
+owner  = 'mwdeploy',
+group  = 'mwdeploy',
 mode   = '0775',
 }
 
-apache_site { download.mediawiki.org: name = download.mediawiki.org }
+apache_site { 'download.mediawiki.org': name = 'download.mediawiki.org' }
 }
diff --git a/modules/download/manifests/mirror.pp 
b/modules/download/manifests/mirror.pp
index 85410c0..48aec56 100644
--- a/modules/download/manifests/mirror.pp
+++ b/modules/download/manifests/mirror.pp
@@ -1,27 +1,26 @@
 class download::mirror {
-system::role { download::mirror: description = Service for rsync to 
external download mirrors }
+system::role { 'download::mirror': description = 'Service for rsync to 
external download mirrors' }
 
 include role::mirror::common
 
 file { '/etc/rsyncd.conf':
 mode= '0444',
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 source  = 
'puppet:///modules/download/rsync/rsyncd.conf.downloadmirror',
 require = Package['rsync'],
 

[MediaWiki-commits] [Gerrit] Move WikimediaIncubator extension call to be after Scribunto - change (operations/mediawiki-config)

2014-01-14 Thread Hydriz (Code Review)
Hydriz has uploaded a new change for review.

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


Change subject: Move WikimediaIncubator extension call to be after Scribunto
..

Move WikimediaIncubator extension call to be after Scribunto

The WikimediaIncubator extension checks to see if a certain page
is prefixed and requires the knowledge of which namespace to enact
such a policy. Because it calls the constant NS_MODULE (which needs
to be first defined by Scribunto), this extension hence needs to be
loaded *after* Scribunto has been loaded.

This change only affects the Wikimedia Incubator.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 252096f..eea7e26 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11061,11 +11061,6 @@
'enwiki' = true,
 ),
 
-'wmgUseIncubator' = array(
-   'default' = false,
-   'incubatorwiki' = true,
-),
-
 'wmgUseWikiLove' = array(
'default' = false,
'arwiki' = true,
@@ -12625,6 +12620,11 @@
'votewiki' = false,
 ),
 
+'wmgUseIncubator' = array(
+   'default' = false,
+   'incubatorwiki' = true,
+),
+
 'wmgUsePageImages' = array(
'default' = true,
'loginwiki' = false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00f6cd55c2e8d783cefc2615b5730f0e45fff03a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hydriz ad...@alphacorp.tk

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


[MediaWiki-commits] [Gerrit] Remove extra comma from the line - change (mediawiki...ContentTranslation)

2014-01-14 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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


Change subject: Remove extra comma from the line
..

Remove extra comma from the line

Change-Id: I32c667715995123b3de536a80bbf632e5bc97ea8
---
M modules/source/ext.cx.source.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index 9509a31..a0e8fac 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -50,7 +50,7 @@
api.get( {
action: 'parse',
page: this.page,
-   disablepp: true,
+   disablepp: true
} ).done( function ( result ) {
ctSource.$container.find( '.title' ).html( 
result.parse.title );
ctSource.$container.find( '.content' ).html( 
result.parse.text['*'] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32c667715995123b3de536a80bbf632e5bc97ea8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove extra comma from the line - change (mediawiki...ContentTranslation)

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

Change subject: Remove extra comma from the line
..


Remove extra comma from the line

Change-Id: I32c667715995123b3de536a80bbf632e5bc97ea8
---
M modules/source/ext.cx.source.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/source/ext.cx.source.js b/modules/source/ext.cx.source.js
index 9509a31..a0e8fac 100644
--- a/modules/source/ext.cx.source.js
+++ b/modules/source/ext.cx.source.js
@@ -50,7 +50,7 @@
api.get( {
action: 'parse',
page: this.page,
-   disablepp: true,
+   disablepp: true
} ).done( function ( result ) {
ctSource.$container.find( '.title' ).html( 
result.parse.title );
ctSource.$container.find( '.content' ).html( 
result.parse.text['*'] );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32c667715995123b3de536a80bbf632e5bc97ea8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] deployment: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: deployment: lint clean
..

deployment: lint clean

Change-Id: I8019ef99cd804b28bb89434d2985eea9302edf2e
---
M modules/deployment/manifests/deployment_server.pp
M modules/deployment/manifests/packages.pp
M modules/deployment/manifests/salt_master.pp
M modules/deployment/manifests/target.pp
4 files changed, 326 insertions(+), 263 deletions(-)


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

diff --git a/modules/deployment/manifests/deployment_server.pp 
b/modules/deployment/manifests/deployment_server.pp
index cb7652a..69ecb12 100644
--- a/modules/deployment/manifests/deployment_server.pp
+++ b/modules/deployment/manifests/deployment_server.pp
@@ -1,130 +1,158 @@
 class deployment::deployment_server(
-  $deployment_conffile='/etc/git-deploy/git-deploy.conf',
-  $deployment_ignorefile='/etc/git-deploy/gitignore',
-  $deployment_ignores=['.deploy'],
-  $deployment_restrict_umask='002',
-  $deployment_block_file='/etc/ROLLOUTS_BLOCKED',
-  $deployment_support_email='',
-  $deployment_repo_name_detection='dot-git-parent-dir',
-  $deployment_announce_email='',
-  $deployment_send_mail_on_sync='false',
-  $deployment_send_mail_on_revert='false',
-  $deployment_log_directory='/var/log/git-deploy',
-  $deployment_log_timing_data='false',
-  $deployment_git_deploy_dir='/var/lib/git-deploy',
-  $deployment_per_repo_config={},
-  $deployer_groups=[]
-  ) {
-  if ! defined(Package['git-deploy']){
-package { 'git-deploy':
-  ensure = present;
+$deployment_conffile='/etc/git-deploy/git-deploy.conf',
+$deployment_ignorefile='/etc/git-deploy/gitignore',
+$deployment_ignores=['.deploy'],
+$deployment_restrict_umask='002',
+$deployment_block_file='/etc/ROLLOUTS_BLOCKED',
+$deployment_support_email='',
+$deployment_repo_name_detection='dot-git-parent-dir',
+$deployment_announce_email='',
+$deployment_send_mail_on_sync=false,
+$deployment_send_mail_on_revert=false,
+$deployment_log_directory='/var/log/git-deploy',
+$deployment_log_timing_data=false,
+$deployment_git_deploy_dir='/var/lib/git-deploy',
+$deployment_per_repo_config={},
+$deployer_groups=[]
+) {
+if ! defined(Package['git-deploy']){
+package { 'git-deploy':
+ensure = present;
+}
 }
-  }
-  if ! defined(Package['git-core']){
-package { 'git-core':
-  ensure = present;
+if ! defined(Package['git-core']){
+package { 'git-core':
+ensure = present;
+}
 }
-  }
-  if ! defined(Package['python-redis']){
-package { 'python-redis':
-  ensure = present;
+if ! defined(Package['python-redis']){
+package { 'python-redis':
+ensure = present;
+}
 }
-  }
 
-  $deployment_global_hook_dir = ${deployment_git_deploy_dir}/hooks
-  $deployment_dependencies_dir = ${deployment_git_deploy_dir}/dependencies
-  file {
-${$deployment_global_hook_dir}:
-  ensure = directory,
-  mode = 0555,
-  owner = root,
-  group = root;
-${$deployment_dependencies_dir}:
-  ensure = directory,
-  mode = 0555,
-  owner = root,
-  group = root;
-${$deployment_global_hook_dir}/sync:
-  ensure = directory,
-  mode = 0555,
-  owner = root,
-  group = root,
-  require = [File[${$deployment_global_hook_dir}]];
-${$deployment_global_hook_dir}/sync/deploylib.py:
-  source = 'puppet:///deployment/git-deploy/hooks/deploylib.py',
-  mode = 0555,
-  owner = root,
-  group = root,
-  require = [File[${$deployment_global_hook_dir}/sync]];
-${$deployment_global_hook_dir}/sync/shared.py:
-  source = 'puppet:///deployment/git-deploy/hooks/shared.py',
-  mode = 0555,
-  owner = root,
-  group = root,
-  require = [File[${$deployment_global_hook_dir}/sync]];
-${$deployment_global_hook_dir}/sync/depends.py:
-  source = 'puppet:///deployment/git-deploy/hooks/depends.py',
-  mode = 0555,
-  owner = root,
-  group = root,
-  require = [File[${$deployment_global_hook_dir}/sync]];
-${$deployment_dependencies_dir}/l10n:
-  source = 
'puppet:///deployment/git-deploy/dependencies/l10nupdate-quick',
-  mode = 0555,
-  owner = root,
-  group = root,
-  require = [File[${$deployment_dependencies_dir}]];
-  }
-  file {
-'/etc/gitconfig':
-  content = template('deployment/git-deploy/gitconfig.erb'),
-  mode = 0444,
-  owner = root,
-  group = root,
-  require = [Package['git-core']];
-${deployment_conffile}:
-  content = template('deployment/git-deploy/git-deploy.conf.erb'),
-  mode = 0444,
-  owner = root,
-  group = root;
-${deployment_ignorefile}:
-  content = template('deployment/git-deploy/gitignore.erb'),
-  mode = 0444,

[MediaWiki-commits] [Gerrit] Add loading animation to bottom of page when fetching sections - change (apps...wikipedia)

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

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


Change subject: Add loading animation to bottom of page when fetching sections
..

Add loading animation to bottom of page when fetching sections

Change-Id: Ic98d51dc06b04aa87c04b492e1e59633a1150359
---
M wikipedia/assets/index.html
M wikipedia/assets/main.js
M wikipedia/assets/ui.css
3 files changed, 27 insertions(+), 0 deletions(-)


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

diff --git a/wikipedia/assets/index.html b/wikipedia/assets/index.html
index 4a7f4f3..c7c40a9 100644
--- a/wikipedia/assets/index.html
+++ b/wikipedia/assets/index.html
@@ -13,6 +13,7 @@
 body
 h1 id=title/h1
 div id=content/div
+div id=loading_sections/div
 div id=attribution
 a id=lastupdated/a
 br /
diff --git a/wikipedia/assets/main.js b/wikipedia/assets/main.js
index 421caef..f2fa1f4 100644
--- a/wikipedia/assets/main.js
+++ b/wikipedia/assets/main.js
@@ -18,6 +18,8 @@
 content.id = #content_block_0;
 content = transforms.transform( lead, content );
 document.getElementById( content ).appendChild( content );
+
+document.getElementById( loading_sections).className = loading;
 });
 
 function elementsForSection( section ) {
@@ -56,6 +58,8 @@
 });
 if ( !payload.isLast ) {
 bridge.sendMessage( requestSection, { index: payload.index + 1 } 
);
+} else {
+document.getElementById( loading_sections).className = ;
 }
 });
 
diff --git a/wikipedia/assets/ui.css b/wikipedia/assets/ui.css
index 53fe023..ed7748b 100644
--- a/wikipedia/assets/ui.css
+++ b/wikipedia/assets/ui.css
@@ -6,3 +6,25 @@
 float: right;
 display: inline-float;
 }
+
+/* Loading animation in pure CSS
+   Thanks to http://dabblet.com/gist/7708654 */
+.loading {
+border: 4px solid rgba(0, 0, 0, .1);
+border-top: 4px solid rgba(0, 0, 0, .4);
+border-radius: 100%;
+animation: rot .6s infinite linear;
+}
+
+@keyframes rot {
+from {transform: rotate(0deg);}
+to {transform: rotate(359deg);}
+}
+
+#loading_sections {
+margin: 8px;
+margin-left: auto;
+margin-right: auto;
+height: 24px;
+width: 24px;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic98d51dc06b04aa87c04b492e1e59633a1150359
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] CSS class prefixing and BEMification - change (mediawiki...ContentTranslation)

2014-01-14 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: CSS class prefixing and BEMification
..

CSS class prefixing and BEMification

To see how it would look like

Change-Id: I8b79392c03f3dc7fda49f32e9812bc388cd7e5a5
---
M modules/base/ext.cx.base.js
M modules/base/styles/ext.cx.base.less
M modules/header/ext.cx.header.js
M modules/header/ext.cx.progressbar.js
M modules/header/styles/ext.cx.header.less
M modules/header/styles/ext.cx.progressbar.less
M modules/translation/ext.cx.publish.js
M modules/translation/styles/ext.cx.translation.less
M tests/browser/features/support/pages/content_translation_page.rb
9 files changed, 108 insertions(+), 109 deletions(-)


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

diff --git a/modules/base/ext.cx.base.js b/modules/base/ext.cx.base.js
index b826108..ee10ef0 100644
--- a/modules/base/ext.cx.base.js
+++ b/modules/base/ext.cx.base.js
@@ -43,19 +43,22 @@
ContentTranslation.prototype.render = function () {
var $content;
 
-   $content = $( 'div' ).addClass( 'content' )
+   $content = $( 'div' ).addClass( 'cx-widget' )
.append(
-   $( 'div' ).addClass( 'header' ),
-   $( 'div' ).addClass( 'source' ),
-   $( 'div' ).addClass( 'translation' ),
-   $( 'div' ).addClass( 'tools' )
+   $( 'div' ).addClass( 'cx-widget__header' ),
+   $( 'div' ).addClass( 'cx-widget__columns' )
+   .append(
+   $( 'div' ).addClass( 
'cx-column cx-column--source' ),
+   $( 'div' ).addClass( 
'cx-column cx-column--translation' ),
+   $( 'div' ).addClass( 
'cx-column cx-column--aids' )
+   )
);
 
this.$container.append( $content );
-   this.$header = this.$container.find( '.header' );
-   this.$source = this.$container.find( '.source' );
-   this.$translation = this.$container.find( '.translation' );
-   this.$tools = this.$container.find( '.tools' );
+   this.$header = this.$container.find( '.cx-widget__header' );
+   this.$source = this.$container.find( '.cx-column--source' );
+   this.$translation = this.$container.find( 
'.cx-column--translation' );
+   this.$tools = this.$container.find( '.cx-column--aids' );
};
 
$.fn.cx = function ( options ) {
diff --git a/modules/base/styles/ext.cx.base.less 
b/modules/base/styles/ext.cx.base.less
index a025a14..a29bc45 100644
--- a/modules/base/styles/ext.cx.base.less
+++ b/modules/base/styles/ext.cx.base.less
@@ -6,38 +6,36 @@
color: @grey;
 }
 
-.content {
+/**
+ * Container for the translation widget
+ */
+.cx-widget {
.mw-ui-grid;
color: @grey;
 }
 
-.header {
+.cx-widget__header {
.mw-ui-item;
.mw-ui-one-whole;
.mw-ui-palm-one-whole;
 }
 
-.source {
+.cx-column {
.mw-ui-item;
.mw-ui-one-third;
+}
+
+.cx-column--source,
+.cx-column--translation {
.mw-ui-palm-one-half;
 }
 
-.translation {
-   .mw-ui-item;
-   .mw-ui-one-third;
-   .mw-ui-palm-one-half;
-
-}
-
-.tools {
-   .mw-ui-item;
-   .mw-ui-one-third;
+.cx-column--aids {
.mw-ui-palm-one-whole;
background: #f0f0f0;
-
 }
 
+/* Unused? */
 .suggestion-list {
.mw-ui-grid;
 }
diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 8987d21..6f6797e 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -28,14 +28,14 @@
};
 
ContentTranslationHeader.prototype.render = function () {
+   this.$container.addClass( 'cx-header' );
this.$container.append(
$( 'div' )
-   .addClass( 'logo' ),
+   .addClass( 'cx-header__logo' ),
$( 'div' )
-   .addClass( 'user-details' )
+   .addClass( 'cx-header__user-details' )
.append(
$( 'a' )
-   .addClass( 'user-name' )
.attr( 'href', mw.util.getUrl( 
'User:' + mw.user.getName() ) )
.text ( mw.user.getName() )
)
@@ -43,20 +43,20 @@
 
this.$container.append(
   

[MediaWiki-commits] [Gerrit] cpufrequtils: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: cpufrequtils: lint clean
..

cpufrequtils: lint clean

Change-Id: Ibb87b35e6ad5ce49ce5d3146aee3229c14486faf
---
M modules/cpufrequtils/manifests/init.pp
1 file changed, 25 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/107346/1

diff --git a/modules/cpufrequtils/manifests/init.pp 
b/modules/cpufrequtils/manifests/init.pp
index 03988b0..e3b92cf 100644
--- a/modules/cpufrequtils/manifests/init.pp
+++ b/modules/cpufrequtils/manifests/init.pp
@@ -1,32 +1,32 @@
 class cpufrequtils (
-   $governor = 'performance',
+$governor = 'performance',
 ) {
-   case $::operatingsystem {
-   debian, ubuntu: {
-   }
-   default: {
-   fail(Module ${module_name} is not supported on 
${::operatingsystem})
-   }
-   }
+case $::operatingsystem {
+debian, ubuntu: {
+}
+default: {
+fail(Module ${module_name} is not supported on 
${::operatingsystem})
+}
+}
 
-   package { 'cpufrequtils':
-   ensure = present;
-   }
+package { 'cpufrequtils':
+ensure = present,
+}
 
-   # start at boot
-   service { 'cpufrequtils':
-   enable = true,
-   require = Package['cpufrequtils'],
-   }
+# start at boot
+service { 'cpufrequtils':
+enable  = true,
+require = Package['cpufrequtils'],
+}
 
-   file { '/etc/default/cpufrequtils':
-   content = GOVERNOR=${governor}\n,
-   notify = Exec['apply cpufrequtils'],
-   require = Package['cpufrequtils'];
-   }
+file { '/etc/default/cpufrequtils':
+content = GOVERNOR=${governor}\n,
+notify  = Exec['apply cpufrequtils'],
+require = Package['cpufrequtils'],
+}
 
-   exec { 'apply cpufrequtils':
-   command = '/etc/init.d/cpufrequtils start',
-   refreshonly = true
-   }
+exec { 'apply cpufrequtils':
+command = '/etc/init.d/cpufrequtils start',
+refreshonly = true
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb87b35e6ad5ce49ce5d3146aee3229c14486faf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya mata...@foss.co.il

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


[MediaWiki-commits] [Gerrit] contint: lint packages.pp before spliting up - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: contint: lint packages.pp before spliting up
..

contint: lint packages.pp before spliting up

Change-Id: I21aac322abc1afb228e0cf1f69ec2dd3ef6e0339
---
M modules/contint/manifests/packages.pp
1 file changed, 172 insertions(+), 165 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/107347/1

diff --git a/modules/contint/manifests/packages.pp 
b/modules/contint/manifests/packages.pp
index 72073cb..2e410fb 100644
--- a/modules/contint/manifests/packages.pp
+++ b/modules/contint/manifests/packages.pp
@@ -5,207 +5,214 @@
 #
 class contint::packages {
 
-  # Make sure we use ant version 1.8 or we will have a conflict
-  # with android
-  include contint::packages::ant18
+# Make sure we use ant version 1.8 or we will have a conflict
+# with android
+include contint::packages::ant18
 
-  # Get several OpenJDK packages including the jdk to build mobile
-  # applications.
-  # (openjdk is the default distribution for the java define.
-  # The java define is found in modules/java/manifests/init.pp )
-  package { 'openjdk-6-jre':
-ensure = present,
-  }
-  package { 'openjdk-7-jre':
-ensure = present,
-  }
+# Get several OpenJDK packages including the jdk to build mobile
+# applications.
+# (openjdk is the default distribution for the java define.
+# The java define is found in modules/java/manifests/init.pp )
+package { 'openjdk-6-jre':
+ensure = present,
+}
+package { 'openjdk-7-jre':
+ensure = present,
+}
 
-  package { 'maven2':
-ensure = present;
-  }
+package { 'maven2':
+ensure = present,
+}
 
-  # Get perl dependencies so we can lint the wikibugs perl script
+# Get perl dependencies so we can lint the wikibugs perl script
   include misc::irc::wikibugs::packages
 
-  # Let us create packages from Jenkins jobs
-  include misc::package-builder
+# Let us create packages from Jenkins jobs
+include misc::package-builder
 
-  # Lint authdns templates  config
-  include authdns::lint
+# Lint authdns templates  config
+include authdns::lint
 
-  include svn::client
+include svn::client
 
-  # PHP related packages
-  package { [
-'php-pear',
-'php5-cli',
-'php5-curl',
-'php5-dev',  # phpize
-'php5-gd',
-'php5-intl',
-'php5-mysql',
-'php5-parsekit',
-'php5-pgsql',
-'php5-sqlite',
-'php5-tidy',
-'php5-xdebug',
-]: ensure = present,
-  }
+# PHP related packages
+package { [
+'php-pear',
+'php5-cli',
+'php5-curl',
+'php5-dev',  # phpize
+'php5-gd',
+'php5-intl',
+'php5-mysql',
+'php5-parsekit',
+'php5-pgsql',
+'php5-sqlite',
+'php5-tidy',
+'php5-xdebug',
+]:
+ensure = present,
+}
 
-  # luasandbox is a WMF package, we always want to use the very latest version
-  # since the package is used by unit tests
-  package { [
-'php-luasandbox',
-  ]: ensure = latest,
-  }
+# luasandbox is a WMF package, we always want to use the very latest 
version
+# since the package is used by unit tests
+package { [
+'php-luasandbox',
+]:
+ensure = latest,
+}
 
-  # Database related
-  package { [
-'mysql-server',
-'sqlite3',
-'postgresql',
-]: ensure = present,
-  }
+# Database related
+package { [
+'mysql-server',
+'sqlite3',
+'postgresql',
+]:
+ensure = present,
+}
 
-  # Development packages
-  package { [
-'imagemagick',
-'librsvg2-2',
-'librsvg2-bin',
+# Development packages
+package { [
+'imagemagick',
+'librsvg2-2',
+'librsvg2-bin',
 
-'asciidoc',
-'rake',
-'ruby1.9.3',  # To let us syntax check scripts using 1.9
+'asciidoc',
+'rake',
+'ruby1.9.3',  # To let us syntax check scripts using 1.9
 
-'pep8',
-'pyflakes',
-'pylint',
+'pep8',
+'pyflakes',
+'pylint',
 
-'luajit',
-'libevent-dev',  # PoolCounter daemon
-'liblua5.1-0-dev',
-'g++',
-'libthai-dev',
+'luajit',
+'libevent-dev',  # PoolCounter daemon
+'liblua5.1-0-dev',
+'g++',
+'libthai-dev',
 
-'doxygen',
-'python-sphinx',  # python documentation
-'ruby-jsduck',
-]: ensure = present,
-  }
+'doxygen',
+'python-sphinx',  # python documentation
+'ruby-jsduck',
+]:
+ensure = present,
+}
 
-  # Includes packages needed for building
-  # analytics and statistics related packages.
+# Includes packages needed for building
+# analytics and statistics related packages.
 
-  # these are needed to build libanon and udp-filter
-  package { 

[MediaWiki-commits] [Gerrit] Varnish: don't mobile redirect www.$project.org - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Varnish: don't mobile redirect www.$project.org
..


Varnish: don't mobile redirect www.$project.org

URLs such as www.wikivoyage.org/wiki/Article redirect to
en.wikivoyage.org. The issue is not Wikivoyage-specific projects as it
happens with e.g. www.wikipedia.org too. However, www.wikivoyage.org
links are still in old web references  search engine indexes, so it
makes matters especially worse for Wikivoyage.

The problem is the mobile redirector runs before these redirects take
place, and redirects to www.m, which NXDOMAINs and users get error
pages.

Fix this by excluding www from the mobile redirect.

Bug: 48318
Change-Id: Ie9147de410a51e3bd3d3597e27b00ccee4f9f236
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index cde37d0..c3474da 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -26,7 +26,7 @@
 req.http.User-Agent !~ 
(iPad|Android.3|(?i)tablet|PlayBook|Wii)
 req.http.Cookie !~ 
(stopMobileRedirect=true|mf_useformat=desktop)
 req.url ~ ^/wiki/) {
-   set req.http.MobileHost = regsub(req.http.Host, 
^(?:www\.(?=mediawiki))?((?:commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(?=wikimedia)|\w+\.(?!wikimedia|mediawiki)|(?=mediawiki|wikimediafoundation))(wikimedia|wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage|mediawiki|wikimediafoundation)\.,
 \1m.\2.);
+   set req.http.MobileHost = regsub(req.http.Host, 
^(?:www\.(?=mediawiki))?((?:commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(?=wikimedia)|(?!www)\w+\.(?!wikimedia|mediawiki)|(?=mediawiki|wikimediafoundation))(wikimedia|wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage|mediawiki|wikimediafoundation)\.,
 \1m.\2.);
if (req.http.Host != req.http.MobileHost) {
if (req.http.X-Forwarded-Proto) {
set req.http.Location = 
req.http.X-Forwarded-Proto + :// + req.http.MobileHost + req.url;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9147de410a51e3bd3d3597e27b00ccee4f9f236
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Implement more test steps - change (mediawiki...ContentTranslation)

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

Change subject: Implement more test steps
..


Implement more test steps

Change-Id: I1c10201138f2fb5a8d4aef2ce6b510b7ab0d9aec
---
M tests/browser/features/special_content_translation.feature
M tests/browser/features/step_definitions/special_content_translation_steps.rb
M tests/browser/features/support/pages/content_translation_page.rb
3 files changed, 50 insertions(+), 3 deletions(-)

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



diff --git a/tests/browser/features/special_content_translation.feature 
b/tests/browser/features/special_content_translation.feature
index b036038..e814ea8 100644
--- a/tests/browser/features/special_content_translation.feature
+++ b/tests/browser/features/special_content_translation.feature
@@ -21,7 +21,7 @@
 Given I am logged in
 When I am on the content translation page in a wiki in English, 
translating the page Bratislava to Danish
 Then I see a source column with the text Bratislava is the capital of 
Slovakia and the country's largest city.
-  And the source column is not editable
+  And the source column text is not editable
   And the language code of the source column is en
   And the direction of the source column is ltr
   And I see the title Bratislava at the top of the source column
diff --git 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
index f32163f..7ba9c01 100644
--- 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb
+++ 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
@@ -2,6 +2,10 @@
visit(ContentTranslationPage, :using_params = {:extra = 
title=#{page_name}lang=#{target_language}})
 end
 
+When(/^I empty the editing area in the translation column$/) do
+   on(ContentTranslationPage).target_text_element
+end
+
 When(/^I press the Publish Translation button$/) do
on(ContentTranslationPage).publish_translation
 end
@@ -10,12 +14,17 @@
on(ContentTranslationPage).translation_editor.send_keys(translation)
 end
 
+
 Then(/^I don't see a Publish Translation button$/) do
on(ContentTranslationPage).publish_translation_element.should_not 
be_visible
 end
 
 Then(/^I don't see the (.+) column$/) do |column_type|
on(ContentTranslationPage).column(column_type).should_not be_visible
+end
+
+Then(/^I see a (.*?) link that points to the page (.*?) on the same 
wiki$/) do |link_name, page_title|
+   pending # express the regexp above with the code you wish you had
 end
 
 Then(/^I see a Publish Translation button$/) do
@@ -35,7 +44,7 @@
 end
 
 Then(/^I see a source column with the text (.*?)$/) do |text|
-   on(ContentTranslationPage).column(source).should == text
+   on(ContentTranslationPage).source_text.text.should == text
 end
 
 Then(/^I see a translation column with an empty editing area$/) do
@@ -58,6 +67,10 @@
on(ContentTranslationPage).source_title.should == source_page_title
 end
 
+Then(/^I see the username at the top of the page$/) do |username|
+   on(ContentTranslationPage).user_name.should == ENV[MEDIAWIKI_USER]
+end
+
 Then(/^the content of the page is (.*?)$/) do |page_content|
pending # express the regexp above with the code you wish you had
 end
@@ -71,13 +84,33 @@
 end
 
 Then(/^the language code of the (.+) column is (.+)$/) do |column_type, 
language_code|
-   on(ContentTranslationPage).column(column_type).attribute(lang).should 
== language_code
+   
on(ContentTranslationPage).column(column_type).attribute_value(lang).should 
== language_code
 end
 
 Then(/^the page (.+?) is displayed$/) do |page_title|
on(TranslatedPage).title.should == page_title
 end
 
+Then(/^the Publish Translation button is disabled$/) do
+   
on(ContentTranslationPage).publish_translation_element.attribute(disabled).should
 != nil
+end
+
+Then(/^the Publish Translation button is enabled$/) do
+   
on(ContentTranslationPage).publish_translation_element.attribute(disabled).should
 == nil
+end
+
+Then(/^the source column text is not editable$/) do
+   
on(ContentTranslationPage).source_text.attribute_value(contenteditable).should
 == nil
+end
+
+Then(/^the text near the translation progress bar says (.*?)$/) do |text|
+   on(ContentTranslationPage).progress_bar_text.text.should == text
+end
+
+Then(/^the translation progress bar is in (\d+)% state$/) do |percentage|
+   on(ContentTranslationPage).progress_bar_element.status.should == 
percentage
+end
+
 Then(/^the view page link points to the page (.*?) on the same wiki$/) do 
|source_page|
source_page_in_url = source_page.gsub( , _)
on(ContentTranslationPage).view_page_element.attribute(href).should 
match(/#{source_page_in_url}$/)
diff --git 

[MediaWiki-commits] [Gerrit] varnish: simplify the mobile redirect regexp - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: varnish: simplify the mobile redirect regexp
..


varnish: simplify the mobile redirect regexp

Now that we don't have to maintain squid redirector compatibility,
rewrite the huge, almost unreadable, mobile redirect regexp in three
distinct, easier to maintain redirects.

This was done with efficiency in mind and avoids checking for the same
match twice. The three redirects are likely to be slower than one, but
this is hopefully offset by not checking for e.g. wikimedia three
times. Plus, the regsubs are within the multiple-clause UA/cookie/url
guard, so it only does matter for a small minority of hits.

Change-Id: Iebfbc46d1a6a878d5c074ac44b8f2a8cda82
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index c3474da..f857ac3 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -26,7 +26,14 @@
 req.http.User-Agent !~ 
(iPad|Android.3|(?i)tablet|PlayBook|Wii)
 req.http.Cookie !~ 
(stopMobileRedirect=true|mf_useformat=desktop)
 req.url ~ ^/wiki/) {
-   set req.http.MobileHost = regsub(req.http.Host, 
^(?:www\.(?=mediawiki))?((?:commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(?=wikimedia)|(?!www)\w+\.(?!wikimedia|mediawiki)|(?=mediawiki|wikimediafoundation))(wikimedia|wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage|mediawiki|wikimediafoundation)\.,
 \1m.\2.);
+
+   # Separate regexps for clarity, but multiple regsubs instead of
+   # if host ~/regsub matches for efficiency. Be careful to not
+   # write overlapping/chaining regexps.
+   set req.http.MobileHost = regsub(req.http.Host, 
^(www\.)?(mediawiki|wikimediafoundation)\., m.\2.);
+   set req.http.MobileHost = regsub(req.http.Host, 
^(commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(wikimedia)\.,
 \1.m.\2.);
+   set req.http.MobileHost = regsub(req.http.Host, 
^((?!www)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
+
if (req.http.Host != req.http.MobileHost) {
if (req.http.X-Forwarded-Proto) {
set req.http.Location = 
req.http.X-Forwarded-Proto + :// + req.http.MobileHost + req.url;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebfbc46d1a6a878d5c074ac44b8f2a8cda82
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: MaxSem maxsem.w...@gmail.com
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 use complex datatypes as CAS tokens - change (mediawiki/core)

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

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


Change subject: Don't use complex datatypes as CAS tokens
..

Don't use complex datatypes as CAS tokens

For caches where CAS is not natively supported, we have a workaround, where the
CAS token is (based on) the stored value.

To confirm the data can be written to cache, the CAS token is compared against
whatever is currently in cache, so we pull the cached data and rebuild the
value.

In the case of objects, we have now pulled  rebuilt (unserialized) 2 objects
that are actually the same object (for CAS purpose - it's the correct value to
overwrite), but in terms of ===, they're 2 different values.

This patch should make sure CAS tokens are always a serialized version of the
value we're saving (where no native CAS exists); these serialized versions can
reliably be compared.

Bug: 59941
Change-Id: I2760416c48f2ceb7a0e0c874dd70ec07b4dccdfc
---
M includes/objectcache/DBABagOStuff.php
M includes/objectcache/HashBagOStuff.php
M includes/objectcache/RedisBagOStuff.php
3 files changed, 7 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/107348/1

diff --git a/includes/objectcache/DBABagOStuff.php 
b/includes/objectcache/DBABagOStuff.php
index c82b3aa..a81b5c5 100644
--- a/includes/objectcache/DBABagOStuff.php
+++ b/includes/objectcache/DBABagOStuff.php
@@ -125,6 +125,7 @@
}
 
$val = dba_fetch( $key, $handle );
+   $casToken = $val;
list( $val, $expiry ) = $this-decode( $val );
 
# Must close ASAP because locks are held
@@ -138,8 +139,6 @@
wfDebug( __METHOD__ . : $key expired\n );
$val = false;
}
-
-   $casToken = $val;
 
wfProfileOut( __METHOD__ );
 
@@ -193,7 +192,6 @@
// DBA is locked to any other write connection, so we can safely
// compare the current  previous value before saving new value
$val = dba_fetch( $key, $handle );
-   list( $val, $exptime ) = $this-decode( $val );
if ( $casToken !== $val ) {
dba_close( $handle );
wfProfileOut( __METHOD__ );
diff --git a/includes/objectcache/HashBagOStuff.php 
b/includes/objectcache/HashBagOStuff.php
index d061eff..bc5167d 100644
--- a/includes/objectcache/HashBagOStuff.php
+++ b/includes/objectcache/HashBagOStuff.php
@@ -64,7 +64,7 @@
return false;
}
 
-   $casToken = $this-bag[$key][0];
+   $casToken = serialize( $this-bag[$key][0] );
 
return $this-bag[$key][0];
}
@@ -88,7 +88,7 @@
 * @return bool
 */
function cas( $casToken, $key, $value, $exptime = 0 ) {
-   if ( $this-get( $key ) === $casToken ) {
+   if ( serialize( $this-get( $key ) ) === $casToken ) {
return $this-set( $key, $value, $exptime );
}
 
diff --git a/includes/objectcache/RedisBagOStuff.php 
b/includes/objectcache/RedisBagOStuff.php
index adcf762..3c97480 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -79,12 +79,13 @@
return false;
}
try {
-   $result = $this-unserialize( $conn-get( $key ) );
+   $value = $conn-get( $key );
+   $casToken = $value;
+   $result = $this-unserialize( $value );
} catch ( RedisException $e ) {
$result = false;
$this-handleException( $server, $conn, $e );
}
-   $casToken = $result;
 
$this-logRequest( 'get', $key, $server, $result );
return $result;
@@ -125,7 +126,7 @@
try {
$conn-watch( $key );
 
-   if ( $this-get( $key ) !== $casToken ) {
+   if ( $this-serialize( $this-get( $key ) ) !== 
$casToken ) {
$conn-unwatch();
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2760416c48f2ceb7a0e0c874dd70ec07b4dccdfc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf10
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Start using full-qualified ec2 id for the page url. - change (openstack-wikistatus)

2014-01-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Start using full-qualified ec2 id for the page url.
..


Start using full-qualified ec2 id for the page url.

Note that this solution is half-baked since in this context
fqdn is just 'instance_name.' . FLAGS.wiki_instance_dns_domain
so the domain name is essentially hardcoded.

Will probably still work, though, presuming that wiki_instance_dns_domain
is properly set according to what region the nova host is in.

Change-Id: Ib50080a02ddcdc598ebd9bd1cfb227a195a6402e
---
M wikistatus/wikistatus.py
1 file changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/wikistatus/wikistatus.py b/wikistatus/wikistatus.py
index d8d57ce..93fae2b 100644
--- a/wikistatus/wikistatus.py
+++ b/wikistatus/wikistatus.py
@@ -165,11 +165,6 @@
 instance = payload['instance_id']
 instance_name = payload['display_name']
 
-if FLAGS.wiki_instance_dns_domain:
-fqdn = %s.%s % (instance_name, FLAGS.wiki_instance_dns_domain)
-else:
-fqdn = instance_name
-
 template_param_dict = {}
 for field in self.RawTemplateFields:
 template_param_dict[field] = payload[field]
@@ -188,6 +183,13 @@
 
 simple_id = inst.id
 ec2_id = 'i-%08x' % inst.id
+
+if FLAGS.wiki_instance_dns_domain:
+fqdn = %s.%s % (instance_name, FLAGS.wiki_instance_dns_domain)
+resourceName = %s.%s % (ec2_id, FLAGS.wiki_instance_dns_domain)
+else:
+fqdn = instance_name
+resourceName = ec2_id
 
 template_param_dict['cpu_count'] = inst.vcpus
 template_param_dict['disk_gb_current'] = inst.ephemeral_gb
@@ -239,7 +241,7 @@
 end_comment)
 
 self._wiki_login()
-pagename = %s%s % (FLAGS.wiki_page_prefix, ec2_id)
+pagename = %s%s % (FLAGS.wiki_page_prefix, resourceName)
 LOG.debug(wikistatus:  Writing instance info
to page http://%s/wiki/%s; %
   (self.host, pagename))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib50080a02ddcdc598ebd9bd1cfb227a195a6402e
Gerrit-PatchSet: 2
Gerrit-Project: openstack-wikistatus
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Ryan Lane rl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix mobile redirect breakage - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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


Change subject: Fix mobile redirect breakage
..

Fix mobile redirect breakage

Commit Iebfbc46 broke the mobile redirect for mediawiki.org,
wikimediafoundation.org and wikimedia.org subdomains. Fortunately it was
caught very shortly after its deployment and affects a very minor amount
of traffic. Fix this by fixing the regsubs().

Change-Id: I977c3bd04a0b5573efb88774fa6090e5e6f106f8
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index f857ac3..602e53f 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -30,9 +30,10 @@
# Separate regexps for clarity, but multiple regsubs instead of
# if host ~/regsub matches for efficiency. Be careful to not
# write overlapping/chaining regexps.
-   set req.http.MobileHost = regsub(req.http.Host, 
^(www\.)?(mediawiki|wikimediafoundation)\., m.\2.);
-   set req.http.MobileHost = regsub(req.http.Host, 
^(commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(wikimedia)\.,
 \1.m.\2.);
-   set req.http.MobileHost = regsub(req.http.Host, 
^((?!www)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
+   set req.http.MobileHost = req.http.Host;
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^(www\.)?(mediawiki|wikimediafoundation)\., m.\2.);
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^(commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(wikimedia)\.,
 \1.m.\2.);
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^((?!www)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
 
if (req.http.Host != req.http.MobileHost) {
if (req.http.X-Forwarded-Proto) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I977c3bd04a0b5573efb88774fa6090e5e6f106f8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix mobile redirect breakage - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Fix mobile redirect breakage
..


Fix mobile redirect breakage

Commit Iebfbc46 broke the mobile redirect for mediawiki.org,
wikimediafoundation.org and wikimedia.org subdomains. Fortunately it was
caught very shortly after its deployment and affects a very minor amount
of traffic. Fix this by fixing the regsubs().

Change-Id: I977c3bd04a0b5573efb88774fa6090e5e6f106f8
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index f857ac3..602e53f 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -30,9 +30,10 @@
# Separate regexps for clarity, but multiple regsubs instead of
# if host ~/regsub matches for efficiency. Be careful to not
# write overlapping/chaining regexps.
-   set req.http.MobileHost = regsub(req.http.Host, 
^(www\.)?(mediawiki|wikimediafoundation)\., m.\2.);
-   set req.http.MobileHost = regsub(req.http.Host, 
^(commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(wikimedia)\.,
 \1.m.\2.);
-   set req.http.MobileHost = regsub(req.http.Host, 
^((?!www)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
+   set req.http.MobileHost = req.http.Host;
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^(www\.)?(mediawiki|wikimediafoundation)\., m.\2.);
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^(commons|species|meta|incubator|outreach|strategy|wikimania201[234])\.(wikimedia)\.,
 \1.m.\2.);
+   set req.http.MobileHost = regsub(req.http.MobileHost, 
^((?!www)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.,
 \1.m.\2.);
 
if (req.http.Host != req.http.MobileHost) {
if (req.http.X-Forwarded-Proto) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I977c3bd04a0b5573efb88774fa6090e5e6f106f8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Changed OK to Thank in confirmation dialog box - change (mediawiki...Thanks)

2014-01-14 Thread Anjanasasindran123 (Code Review)
Anjanasasindran123 has uploaded a new change for review.

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


Change subject: Changed OK to Thank in confirmation dialog box
..

Changed OK to Thank in confirmation dialog box

 The  confirmation dialogue box in the revision history
 contains Ok/cancel option to thank the edits.This is replaced
 with Thank/Cancel in the respective order.

 Bug: 59853



Change-Id: I59a609f90aa4effe9e261596ff58bf52e7b03f55
---
M modules/ext.thanks.thank.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ext.thanks.thank.js b/modules/ext.thanks.thank.js
index 6526823..d1f5a46 100644
--- a/modules/ext.thanks.thank.js
+++ b/modules/ext.thanks.thank.js
@@ -52,7 +52,7 @@
resizable: false,
buttons: [
{
-   text: mw.msg( 'ok' ),
+   text: mw.msg( 'Thank' ),
'class': 'ui-button-green',
click: function() {
$( this ).dialog( close );
@@ -60,7 +60,7 @@
}
},
{
-   text: mw.msg( 'cancel' ),
+   text: mw.msg( 'Cancel' ),
click: function() { $( this ).dialog( 
close ); }
}
]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59a609f90aa4effe9e261596ff58bf52e7b03f55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Anjanasasindran123 anjanasasindran...@gmail.com

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


[MediaWiki-commits] [Gerrit] i18n for Special:ContentTranslation - change (mediawiki...ContentTranslation)

2014-01-14 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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


Change subject: i18n for Special:ContentTranslation
..

i18n for Special:ContentTranslation

Change-Id: I5c36bb3e92c3f154679f1f18b13180ec55e24b42
---
A ContentTranslation.i18n.php
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/header/ext.cx.header.js
M modules/header/ext.cx.progressbar.js
M modules/source/ext.cx.source.js
M modules/tools/ext.cx.tools.js
M modules/translation/ext.cx.publish.js
M modules/translation/ext.cx.translation.js
10 files changed, 94 insertions(+), 32 deletions(-)


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

diff --git a/ContentTranslation.i18n.php b/ContentTranslation.i18n.php
new file mode 100644
index 000..6207270
--- /dev/null
+++ b/ContentTranslation.i18n.php
@@ -0,0 +1,20 @@
+?php
+$messages = array();
+$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, 
$cachedData ) {
+   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
+   foreach ( $codeSequence as $csCode ) {
+   $fileName = __DIR__ . /i18n/$csCode.json;
+   if ( is_readable( $fileName ) ) {
+   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
+   foreach ( $data as $key = $unused ) {
+   if ( $key === '' || $key[0] === '@' ) {
+   unset( $data[$key] );
+   }
+   }
+   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
+   }
+
+   $cachedData['deps'][] = new FileDependency( $fileName );
+   }
+   return true;
+};
diff --git a/Resources.php b/Resources.php
index 75505d8..2ac9122 100644
--- a/Resources.php
+++ b/Resources.php
@@ -38,12 +38,19 @@
'ext.cx.progressbar',
'ext.cx.publish',
),
+   'messages' = array(
+   'cx-trans-center',
+   'cx-publish-button'
+   ),
 ) + $resourcePaths;
 
 $wgResourceModules['ext.cx.source'] = array(
'scripts' = 'source/ext.cx.source.js',
'dependencies' = array(
'mediawiki.Uri',
+   ),
+   'messages' = array(
+   'cx-source-loading'
),
 ) + $resourcePaths;
 
@@ -52,10 +59,22 @@
'styles' = array(
'translation/styles/ext.cx.translation.less',
),
+   'messages' = array(
+   'cx-trans-title',
+   'cx-trans-text'
+   ),
 ) + $resourcePaths;
 
 $wgResourceModules['ext.cx.tool'] = array(
'scripts' = 'tools/ext.cx.tools.js',
+   'messages' = array(
+   'cx-aid-title',
+   'cx-aid-text1',
+   'cx-aid-text2.1',
+   'cx-aid-text2.2',
+   'cx-aid-text2.3',
+   'cx-aid-text2.4'
+   ),
 ) + $resourcePaths;
 
 $wgResourceModules['ext.cx.progressbar'] = array(
@@ -63,6 +82,9 @@
'styles' = array(
'header/styles/ext.cx.progressbar.less',
),
+   'messages' = array(
+   'cx-trans-progress'
+   ),
 ) + $resourcePaths;
 
 $wgResourceModules['ext.cx.publish'] = array(
@@ -70,4 +92,8 @@
'dependencies' = array(
'mediawiki.api.edit',
),
+   'messages' = array(
+   'cx-publish-article',
+   'cx-publish-article-error'
+   ),
 ) + $resourcePaths;
diff --git a/i18n/en.json b/i18n/en.json
index cc3c4f3..5bb9a58 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -5,5 +5,19 @@
 ]
 },
 cx: Translate page,
-cx-desc: A tool that allows editors to translate pages from one 
language to another with the help of machine translation and other translation 
aids
+cx-aid-title: Create a translation,
+cx-aid-text1: Add some paragraphs to the translation.,
+cx-aid-text2.1: Adjust the automatic translations provided to ensure 
quality,
+cx-aid-text2.2: Machine translation is a useful starting point for 
translations, but translators must revise errors as necessary and confirm that 
the translation is accurate.,
+cx-aid-text2.3: Do not translate text that appears unreliable or 
low-quality. If possible, verify the text with references provided in the 
source article.,
+cx-aid-text2.4: When you are happy with the result, press \Publish 
Translation\ to create the new article.,
+cx-desc: A tool that allows editors to translate pages from one 
language to another with the help of machine translation and other translation 
aids,
+cx-publish-article: Article published - ,
+cx-publish-article-error: Error while saving article.,
+cx-publish-button: Publish translation,
+cx-source-loading: Loading,
+cx-trans-center: 

[MediaWiki-commits] [Gerrit] Add trivial tests for claimview, make them pass - change (mediawiki...Wikibase)

2014-01-14 Thread Adrian Lang (Code Review)
Adrian Lang has uploaded a new change for review.

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


Change subject: Add trivial tests for claimview, make them pass
..

Add trivial tests for claimview, make them pass

Change-Id: Ie70495488a185f5a47b50fe865fcb85ea5be6fe8
---
M lib/WikibaseLib.hooks.php
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
A lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
3 files changed, 47 insertions(+), 1 deletion(-)


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

diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 72f46ec..586473c 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -151,6 +151,15 @@
),
);
 
+   $testModules['qunit']['jquery.wikibase.claimview.tests'] = 
$moduleBase + array(
+   'scripts' = array(
+   
'tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js',
+   ),
+   'dependencies' = array(
+   'jquery.wikibase.claimview'
+   ),
+   );
+
$testModules['qunit']['jquery.wikibase.listview.tests'] = 
$moduleBase + array(
'scripts' = array(

'tests/qunit/jquery.wikibase/jquery.wikibase.listview.tests.js',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
index 5119587..1822799 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
@@ -80,7 +80,7 @@
],
templateShortCuts: {
'$mainSnak': '.wb-claim-mainsnak',
-   '$qualifiers': '.wb-statement-qualifiers'
+   '$qualifiers': '.wb-claim-qualifiers'
},
value: null,
predefined: {
diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
new file mode 100644
index 000..ff386d4
--- /dev/null
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
@@ -0,0 +1,37 @@
+/**
+ * @file
+ * @ingroup WikibaseLib
+ * @licence GNU GPL v2+
+ * @author Adrian Lang  adrian.l...@wikimedia.de 
+ */
+( function( $, mw, wb ) {
+  'use strict';
+
+   function createClaimview( value ) {
+   var options = { value: value || null };
+
+return mw.template('wb-claim', 'new', 'wb-last', '', '')
+  .addClass( 'test_claimview' )
+  .claimview( options );
+   }
+
+  QUnit.module( 'jquery.wikibase.claimview', window.QUnit.newWbEnvironment( {
+   } ) );
+
+  QUnit.test( 'Initialize and destroy', function( assert ) {
+var $node = createClaimview(),
+  claimview = $node.data( 'claimview' );
+
+assert.ok(
+  claimview !== undefined,
+  'Initialized claimview widget.'
+);
+
+claimview.destroy();
+
+assert.ok(
+  $node.data( 'listview' ) === undefined,
+  'Destroyed listview.'
+);
+  } );
+} )( jQuery, mediaWiki, wikibase );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie70495488a185f5a47b50fe865fcb85ea5be6fe8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Prevent race condition causing marshaller to not be registered - change (apps...wikipedia)

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

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


Change subject: Prevent race condition causing marshaller to not be registered
..

Prevent race condition causing marshaller to not be registered

Only happens sometimes and only on super fast phones.

Change-Id: Id73c3f2b2e65fdfc234d6492fc240ff55d210117
---
M wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java 
b/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
index 103964d..4c1ddf5 100644
--- a/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
+++ b/wikipedia/src/main/java/org/wikipedia/CommunicationBridge.java
@@ -31,10 +31,12 @@
 this.marshaller = new BridgeMarshaller();
 
 webView.getSettings().setJavaScriptEnabled(true);
-webView.loadUrl(baseURL);
 
 webView.setWebChromeClient(new CommunicatingChrome());
 webView.addJavascriptInterface(marshaller, marshaller);
+
+webView.loadUrl(baseURL);
+
 eventListeners = new HashMapString, ArrayListJSEventListener();
 this.addListener(DOMLoaded, new JSEventListener() {
 @Override

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id73c3f2b2e65fdfc234d6492fc240ff55d210117
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com

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


[MediaWiki-commits] [Gerrit] warm up db1049 in s1 - change (operations/mediawiki-config)

2014-01-14 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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


Change subject: warm up db1049 in s1
..

warm up db1049 in s1

Change-Id: I408bf88ac76771f2e589220d89058d9cf37f2211
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 4fcb97a..e7fec2d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -88,11 +88,11 @@
's1' = array(
'db1056'= 0, # 2.8TB sas 96GB
'db1050'= 0, # 2.8TB sas 64GB, snapshot
-   #reindexing 'db1049'= 0, # 2.8TB sas 64GB
'db1055'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1043'= 100, # 1.4TB sas 64GB, vslow
'db1033'= 300, # 1.4TB sas 64GB
'db1037'= 300, # 1.4TB sas 64GB
+   'db1049'= 50, # warm up, 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
'db1052'= 400, # 2.8TB sas 96GB
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I408bf88ac76771f2e589220d89058d9cf37f2211
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] warm up db1049 in s1 - change (operations/mediawiki-config)

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

Change subject: warm up db1049 in s1
..


warm up db1049 in s1

Change-Id: I408bf88ac76771f2e589220d89058d9cf37f2211
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 4fcb97a..e7fec2d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -88,11 +88,11 @@
's1' = array(
'db1056'= 0, # 2.8TB sas 96GB
'db1050'= 0, # 2.8TB sas 64GB, snapshot
-   #reindexing 'db1049'= 0, # 2.8TB sas 64GB
'db1055'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1043'= 100, # 1.4TB sas 64GB, vslow
'db1033'= 300, # 1.4TB sas 64GB
'db1037'= 300, # 1.4TB sas 64GB
+   'db1049'= 50, # warm up, 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
'db1052'= 400, # 2.8TB sas 96GB
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I408bf88ac76771f2e589220d89058d9cf37f2211
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] base: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: base: lint clean
..

base: lint clean

Change-Id: I193da61a74887e367db2d3eb75b7c2eb8c9ed69a
---
M modules/base/manifests/environment.pp
M modules/base/manifests/init.pp
M modules/base/manifests/resolving.pp
M modules/base/manifests/standard-packages.pp
M modules/base/manifests/vimconfig.pp
5 files changed, 249 insertions(+), 237 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/107355/1

diff --git a/modules/base/manifests/environment.pp 
b/modules/base/manifests/environment.pp
index 68c2aef..a0fe4c2 100644
--- a/modules/base/manifests/environment.pp
+++ b/modules/base/manifests/environment.pp
@@ -10,42 +10,42 @@
 onlyif  = grep -q '^#alias ll' /root/.bashrc
 }
 
-file {
-'/etc/profile.d/mysql-ps1.sh':
+file { '/etc/profile.d/mysql-ps1.sh':
 ensure = present,
-owner  = root,
-group  = root,
+owner  = 'root',
+group  = 'root',
 mode   = '0444',
-source = 
'puppet:///modules/base/environment/mysql-ps1.sh';
+source = 
'puppet:///modules/base/environment/mysql-ps1.sh',
 }
 } # /production
 'labs': {
-file {
-'/etc/bash.bashrc':
+file { '/etc/bash.bashrc':
 content = template('base/environment/bash.bashrc'),
-owner   = root,
-group   = root,
-mode= '0444';
-'/etc/skel/.bashrc':
+owner   = 'root',
+group   = 'root',
+mode= '0444',
+}
+
+file { '/etc/skel/.bashrc':
 content = template('base/environment/skel/bashrc'),
-owner   = root,
-group   = root,
-mode= '0644';
+owner   = 'root',
+group   = 'root',
+mode= '0644',
 }
 if( $::instancename ) {
 file { '/etc/wmflabs-instancename':
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0444',
-content = ${::instancename}\n ;
+content = ${::instancename}\n,
 }
 }
 if( $::instanceproject ) {
 file { '/etc/wmflabs-project':
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0444',
-content = ${::instanceproject}\n ;
+content = ${::instanceproject}\n,
 }
 }
 } # /labs
@@ -58,17 +58,16 @@
 
 # Once upon a time provided by wikimedia-base debian package
 file { '/etc/wikimedia-site':
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0444',
-content = ${::site}\n ;
+content = ${::site}\n,
 }
 
 file { '/etc/wikimedia-realm':
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0444',
-content = ${::realm}\n ;
+content = ${::realm}\n,
 }
-
 }
diff --git a/modules/base/manifests/init.pp b/modules/base/manifests/init.pp
index 73464e3..b5942c2 100644
--- a/modules/base/manifests/init.pp
+++ b/modules/base/manifests/init.pp
@@ -1,4 +1,3 @@
-
 class base::access::dc-techs {
 # add account and sudoers rules for data center techs
 #include accounts::cmjohnson
@@ -22,43 +21,45 @@
 class base::grub {
 # Disable the 'quiet' kernel command line option so console messages
 # will be printed.
-exec {
-'grub1 remove quiet':
-path = '/bin:/usr/bin',
-command = sed -i '/^# defoptions.*[= ]quiet /s/quiet //' 
/boot/grub/menu.lst,
-onlyif = grep -q '^# defoptions.*[= ]quiet ' 
/boot/grub/menu.lst,
-notify = Exec['update-grub'];
-'grub2 remove quiet':
-path = '/bin:/usr/bin',
-command = sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT=\quiet 
splash\/s/quiet splash//' /etc/default/grub,
-onlyif = grep -q '^GRUB_CMDLINE_LINUX_DEFAULT=\quiet splash\' 
/etc/default/grub,
-notify = Exec['update-grub'];
+exec { 'grub1 remove quiet':
+path= '/bin:/usr/bin',
+command = sed -i '/^# defoptions.*[= ]quiet /s/quiet //' 
/boot/grub/menu.lst,
+onlyif  = grep -q 

[MediaWiki-commits] [Gerrit] bacula: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: bacula: lint clean
..

bacula: lint clean

Change-Id: Ifa52cd25ca01f73228243b797dff6eea2ea124bc
---
M modules/bacula/manifests/client.pp
M modules/bacula/manifests/client/job.pp
M modules/bacula/manifests/client/mysql-bpipe.pp
M modules/bacula/manifests/storage.pp
M modules/bacula/manifests/storage/device.pp
5 files changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/107356/1

diff --git a/modules/bacula/manifests/client.pp 
b/modules/bacula/manifests/client.pp
index 23c9c03..39c2b54 100644
--- a/modules/bacula/manifests/client.pp
+++ b/modules/bacula/manifests/client.pp
@@ -46,8 +46,8 @@
 
 file { '/etc/bacula/bacula-fd.conf':
 ensure  = present,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0400',
 notify  = Service['bacula-fd'],
 content = template('bacula/bacula-fd.conf.erb'),
@@ -61,20 +61,20 @@
 # managed one. Bacula needs the keypair in one single file though hence 
this
 # resource
 exec { 'concat-bacula-keypair':
-command = /bin/cat /var/lib/puppet/ssl/certs/$::fqdn.pem \
- /var/lib/puppet/ssl/private_keys/$::fqdn.pem  \
- /var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
-creates = 
/var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
+command = /bin/cat /var/lib/puppet/ssl/certs/${::fqdn}.pem \
+ /var/lib/puppet/ssl/private_keys/${::fqdn}.pem  \
+ /var/lib/puppet/ssl/private_keys/bacula-keypair-${::fqdn}.pem,
+creates = 
/var/lib/puppet/ssl/private_keys/bacula-keypair-${::fqdn}.pem,
 }
 
 # We export oufself to the director
-@@file { /etc/bacula/clients.d/$::fqdn.conf:
+@@file { /etc/bacula/clients.d/${::fqdn}.conf:
 ensure  = present,
-owner   = root,
-group   = bacula,
+owner   = 'root',
+group   = 'bacula',
 mode= '0440',
 content = template('bacula/bacula-client.erb'),
 notify  = Service['bacula-director'],
-tag = bacula-client-$director,
+tag = bacula-client-${director},
 }
 }
diff --git a/modules/bacula/manifests/client/job.pp 
b/modules/bacula/manifests/client/job.pp
index 5e66b2d..4ccb6fe 100644
--- a/modules/bacula/manifests/client/job.pp
+++ b/modules/bacula/manifests/client/job.pp
@@ -27,12 +27,12 @@
 # We export to the director
 @@file { /etc/bacula/jobs.d/${::fqdn}-${name}.conf:
 ensure  = present,
-owner   = root,
-group   = bacula,
+owner   = 'root',
+group   = 'bacula',
 mode= '0440',
 content = template('bacula/bacula-client-job.erb'),
 notify  = Service['bacula-director'],
 require = File['/etc/bacula/jobs.d'],
-tag = bacula-client-$director,
+tag = bacula-client-${director},
 }
 }
diff --git a/modules/bacula/manifests/client/mysql-bpipe.pp 
b/modules/bacula/manifests/client/mysql-bpipe.pp
index 515d952..6a3aed7 100644
--- a/modules/bacula/manifests/client/mysql-bpipe.pp
+++ b/modules/bacula/manifests/client/mysql-bpipe.pp
@@ -33,10 +33,10 @@
 #
 # Sample Usage:
 #   bacula::client::mysql-bpipe { 'mybpipe':
-#   per_database  = false,
-#   xtrabackup= true,
-#   xbstream_dir   = '/var/tmp/xbstream',
-#   mysqldump_innodb_only  = false,
+#   per_database= false,
+#   xtrabackup  = true,
+#   xbstream_dir= '/var/tmp/xbstream',
+#   mysqldump_innodb_only   = false,
 #   }
 
 define bacula::client::mysql-bpipe(
@@ -50,8 +50,8 @@
 ) {
 file { /etc/bacula/scripts/bpipe-mysql-${name}:
 ensure  = present,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0550',
 content = template('bacula/bpipe-mysql-db.erb'),
 require = Class['bacula::client'],
@@ -64,10 +64,10 @@
 }
 }
 
-file { $xbstream_dir:
+file { $xbstream_dir:
 ensure  = directory,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0440',
 }
 }
diff --git a/modules/bacula/manifests/storage.pp 
b/modules/bacula/manifests/storage.pp
index b8f6c27..fe26f4c 100644
--- a/modules/bacula/manifests/storage.pp
+++ b/modules/bacula/manifests/storage.pp
@@ -35,13 +35,13 @@
 
 # bacula-sd depends on bacula-sd-sqlvariant. Let's rely on dependencies to
 # install it
-package { bacula-sd-$sqlvariant:
+package { bacula-sd-${sqlvariant}:
 ensure  = installed,
 }
 
 service { 

[MediaWiki-commits] [Gerrit] WIP: Fix several test steps - change (mediawiki...ContentTranslation)

2014-01-14 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: WIP: Fix several test steps
..

WIP: Fix several test steps

Very WIP, don't commit

Change-Id: Iaebf221aa636bfdadb45f500d240aedaa04ef5e4
---
M modules/header/ext.cx.header.js
M tests/browser/features/special_content_translation.feature
M tests/browser/features/step_definitions/special_content_translation_steps.rb
M tests/browser/features/support/pages/content_translation_page.rb
4 files changed, 49 insertions(+), 33 deletions(-)


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

diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 6f6797e..29c799b 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -36,6 +36,7 @@
.addClass( 'cx-header__user-details' )
.append(
$( 'a' )
+   .addClass( 
'cx-header__user-details__user-name' )
.attr( 'href', mw.util.getUrl( 
'User:' + mw.user.getName() ) )
.text ( mw.user.getName() )
)
diff --git a/tests/browser/features/special_content_translation.feature 
b/tests/browser/features/special_content_translation.feature
index e814ea8..d164bb6 100644
--- a/tests/browser/features/special_content_translation.feature
+++ b/tests/browser/features/special_content_translation.feature
@@ -22,23 +22,23 @@
 When I am on the content translation page in a wiki in English, 
translating the page Bratislava to Danish
 Then I see a source column with the text Bratislava is the capital of 
Slovakia and the country's largest city.
   And the source column text is not editable
-  And the language code of the source column is en
-  And the direction of the source column is ltr
+  #And the language code of the source column is en
+  #And the direction of the source column is ltr
   And I see the title Bratislava at the top of the source column
-  And I see a language label saying English below the source column's 
title
-  And I see a view page link that points to the page Bratislava on the 
same wiki
-  And I see a translation column with an empty editing area
-  And the language code of the translation column is da
-  And the direction of the translation column is ltr
-  And I see an input box pre-filled with the text Bratislava above the 
editing area in the second column
-  And I see a language label saying dansk below the translation column's 
title
-  And I see a translation information column
+  #And I see a language label saying English below the source column's 
title
+  #And I see a view page link that points to the page Bratislava on 
the same wiki
+  #And I see a translation column with an empty editing area # placeholder
+  #And the language code of the translation column is da
+  #And the direction of the translation column is ltr
+  #And I see an input box pre-filled with the text Bratislava above the 
editing area in the second column
+  #And I see a language label saying dansk below the translation 
column's title
+  And I see a translation aids column
   And I see a Publish Translation button
-  And the Publish Translation button is disabled
+  #And the Publish Translation button is disabled
+  And I see the username at the top of the page
   And I see a translation progress bar
   And the translation progress bar is in 0% state
   And the text near the translation progress bar says 0% translated
-  And I see the username at the top of the page
 
   Scenario: Writing some translation text enables the Publish Translation 
button
 Given I am logged in
diff --git 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
index dea4249..e48da1a 100644
--- 
a/tests/browser/features/step_definitions/special_content_translation_steps.rb
+++ 
b/tests/browser/features/step_definitions/special_content_translation_steps.rb
@@ -1,9 +1,14 @@
 Given(/^I am on the content translation page in a wiki in (.+?), translating 
the page (.+?) to (.+)$/) do |source_language, page_name, target_language|
-   visit(ContentTranslationPage, :using_params = {:extra = 
title=#{page_name}lang=#{target_language}})
+   language_code = {
+   Danish = da,
+   English = en,
+   Hebrew = he,
+   }
+   visit(ContentTranslationPage, :using_params = {:extra = 
page=#{page_name}lang=#{language_code[target_language]}})
 end
 
 When(/^I empty the editing area in the 

[MediaWiki-commits] [Gerrit] bacula: lint clean - change (operations/puppet)

2014-01-14 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: bacula: lint clean
..


bacula: lint clean

Change-Id: Ifa52cd25ca01f73228243b797dff6eea2ea124bc
---
M modules/bacula/manifests/client.pp
M modules/bacula/manifests/client/job.pp
M modules/bacula/manifests/client/mysql-bpipe.pp
M modules/bacula/manifests/storage.pp
M modules/bacula/manifests/storage/device.pp
5 files changed, 34 insertions(+), 34 deletions(-)

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



diff --git a/modules/bacula/manifests/client.pp 
b/modules/bacula/manifests/client.pp
index 23c9c03..39c2b54 100644
--- a/modules/bacula/manifests/client.pp
+++ b/modules/bacula/manifests/client.pp
@@ -46,8 +46,8 @@
 
 file { '/etc/bacula/bacula-fd.conf':
 ensure  = present,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0400',
 notify  = Service['bacula-fd'],
 content = template('bacula/bacula-fd.conf.erb'),
@@ -61,20 +61,20 @@
 # managed one. Bacula needs the keypair in one single file though hence 
this
 # resource
 exec { 'concat-bacula-keypair':
-command = /bin/cat /var/lib/puppet/ssl/certs/$::fqdn.pem \
- /var/lib/puppet/ssl/private_keys/$::fqdn.pem  \
- /var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
-creates = 
/var/lib/puppet/ssl/private_keys/bacula-keypair-$::fqdn.pem,
+command = /bin/cat /var/lib/puppet/ssl/certs/${::fqdn}.pem \
+ /var/lib/puppet/ssl/private_keys/${::fqdn}.pem  \
+ /var/lib/puppet/ssl/private_keys/bacula-keypair-${::fqdn}.pem,
+creates = 
/var/lib/puppet/ssl/private_keys/bacula-keypair-${::fqdn}.pem,
 }
 
 # We export oufself to the director
-@@file { /etc/bacula/clients.d/$::fqdn.conf:
+@@file { /etc/bacula/clients.d/${::fqdn}.conf:
 ensure  = present,
-owner   = root,
-group   = bacula,
+owner   = 'root',
+group   = 'bacula',
 mode= '0440',
 content = template('bacula/bacula-client.erb'),
 notify  = Service['bacula-director'],
-tag = bacula-client-$director,
+tag = bacula-client-${director},
 }
 }
diff --git a/modules/bacula/manifests/client/job.pp 
b/modules/bacula/manifests/client/job.pp
index 5e66b2d..4ccb6fe 100644
--- a/modules/bacula/manifests/client/job.pp
+++ b/modules/bacula/manifests/client/job.pp
@@ -27,12 +27,12 @@
 # We export to the director
 @@file { /etc/bacula/jobs.d/${::fqdn}-${name}.conf:
 ensure  = present,
-owner   = root,
-group   = bacula,
+owner   = 'root',
+group   = 'bacula',
 mode= '0440',
 content = template('bacula/bacula-client-job.erb'),
 notify  = Service['bacula-director'],
 require = File['/etc/bacula/jobs.d'],
-tag = bacula-client-$director,
+tag = bacula-client-${director},
 }
 }
diff --git a/modules/bacula/manifests/client/mysql-bpipe.pp 
b/modules/bacula/manifests/client/mysql-bpipe.pp
index 515d952..6a3aed7 100644
--- a/modules/bacula/manifests/client/mysql-bpipe.pp
+++ b/modules/bacula/manifests/client/mysql-bpipe.pp
@@ -33,10 +33,10 @@
 #
 # Sample Usage:
 #   bacula::client::mysql-bpipe { 'mybpipe':
-#   per_database  = false,
-#   xtrabackup= true,
-#   xbstream_dir   = '/var/tmp/xbstream',
-#   mysqldump_innodb_only  = false,
+#   per_database= false,
+#   xtrabackup  = true,
+#   xbstream_dir= '/var/tmp/xbstream',
+#   mysqldump_innodb_only   = false,
 #   }
 
 define bacula::client::mysql-bpipe(
@@ -50,8 +50,8 @@
 ) {
 file { /etc/bacula/scripts/bpipe-mysql-${name}:
 ensure  = present,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0550',
 content = template('bacula/bpipe-mysql-db.erb'),
 require = Class['bacula::client'],
@@ -64,10 +64,10 @@
 }
 }
 
-file { $xbstream_dir:
+file { $xbstream_dir:
 ensure  = directory,
-owner   = root,
-group   = root,
+owner   = 'root',
+group   = 'root',
 mode= '0440',
 }
 }
diff --git a/modules/bacula/manifests/storage.pp 
b/modules/bacula/manifests/storage.pp
index b8f6c27..fe26f4c 100644
--- a/modules/bacula/manifests/storage.pp
+++ b/modules/bacula/manifests/storage.pp
@@ -35,13 +35,13 @@
 
 # bacula-sd depends on bacula-sd-sqlvariant. Let's rely on dependencies to
 # install it
-package { bacula-sd-$sqlvariant:
+package { bacula-sd-${sqlvariant}:
 ensure  = installed,
 }
 
 service { 'bacula-sd':
 ensure  = 

[MediaWiki-commits] [Gerrit] apt: lint clean - change (operations/puppet)

2014-01-14 Thread Matanya (Code Review)
Matanya has uploaded a new change for review.

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


Change subject: apt: lint clean
..

apt: lint clean

Change-Id: I1631f322f4a0131d76ea6d00060f562ccd9702a9
---
M modules/apt/manifests/conf.pp
M modules/apt/manifests/init.pp
M modules/apt/manifests/noupgrade.pp
M modules/apt/manifests/repository.pp
M modules/apt/manifests/unattendedupgrades.pp
M modules/apt/manifests/update.pp
6 files changed, 95 insertions(+), 95 deletions(-)


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

diff --git a/modules/apt/manifests/conf.pp b/modules/apt/manifests/conf.pp
index d4d2d29..47e96f4 100644
--- a/modules/apt/manifests/conf.pp
+++ b/modules/apt/manifests/conf.pp
@@ -1,9 +1,9 @@
 define apt::conf($key, $value, $priority='20', $ensure=present) {
-   file { /etc/apt/apt.conf.d/${priority}${name}:
-   ensure  = $ensure,
-   owner   = root,
-   group   = root,
-   mode= '0444',
-   content = ${key} \${value}\;\n,
-   }
+file { /etc/apt/apt.conf.d/${priority}${name}:
+ensure  = $ensure,
+owner   = 'root',
+group   = 'root',
+mode= '0444',
+content = ${key} \${value}\;\n,
+}
 }
diff --git a/modules/apt/manifests/init.pp b/modules/apt/manifests/init.pp
index 6d681b8..48a3be3 100644
--- a/modules/apt/manifests/init.pp
+++ b/modules/apt/manifests/init.pp
@@ -1,74 +1,74 @@
 class apt {
-   # Directory to hold the repository signing keys
-   file { '/var/lib/apt/keys':
-   ensure  = directory,
-   owner   = root,
-   group   = root,
-   mode= '0700',
-   recurse = true,
-   purge   = true,
-   }
+# Directory to hold the repository signing keys
+file { '/var/lib/apt/keys':
+ensure  = directory,
+owner   = 'root',
+group   = 'root',
+mode= '0700',
+recurse = true,
+purge   = true,
+}
 
-   package { 'apt-show-versions':
-   ensure = installed,
-   }
+package { 'apt-show-versions':
+ensure = installed,
+}
 
-   package { 'python-apt':
-   ensure = installed,
-   }
+package { 'python-apt':
+ensure = installed,
+}
 
-   file { '/usr/local/bin/apt2xml':
-   ensure  = present,
-   owner   = root,
-   group   = root,
-   mode= '0755',
-   source  = 'puppet:///modules/apt/apt2xml.py',
-   require = Package['python-apt'],
-   }
+file { '/usr/local/bin/apt2xml':
+ensure  = present,
+owner   = 'root',
+group   = 'root',
+mode= '0755',
+source  = 'puppet:///modules/apt/apt2xml.py',
+require = Package['python-apt'],
+}
 
-   apt::repository { 'wikimedia':
-   uri = 'http://apt.wikimedia.org/wikimedia',
-   dist= ${::lsbdistcodename}-wikimedia,
-   components  = 'main universe non-free',
-   comment_old = true,
-   }
+apt::repository { 'wikimedia':
+uri = 'http://apt.wikimedia.org/wikimedia',
+dist= ${::lsbdistcodename}-wikimedia,
+components  = 'main universe non-free',
+comment_old = true,
+}
 
-   # prefer Wikimedia APT repository packages in all cases
-   apt::pin { 'wikimedia':
-   package  = '*',
-   pin  = 'release o=Wikimedia',
-   priority = 1001,
-   }
+# prefer Wikimedia APT repository packages in all cases
+apt::pin { 'wikimedia':
+package  = '*',
+pin  = 'release o=Wikimedia',
+priority = 1001,
+}
 
-   $enable_proxy = $::site ? {
-   pmtpa   = present,
-   eqiad   = present,
-   ulsfo   = present,
-   default = absent
-   }
-   apt::conf {
-   'wikimedia-proxy':
-   priority = '80',
-   key  = 'Acquire::http::Proxy',
-   value= 'http://brewster.wikimedia.org:8080',
-   ensure   = absent;
-   'security-ubuntu-proxy':
-   priority = '80',
-   key  = 'Acquire::http::Proxy::security.ubuntu.com',
-   value= 'http://brewster.wikimedia.org:8080',
-   ensure   = $enable_proxy;
-   'old-releases-proxy':
-   priority = '80',
-   key  = 
'Acquire::http::Proxy::old-releases.ubuntu.com',
-   value= 'http://brewster.wikimedia.org:8080',
-   ensure   = $enable_proxy;
-   }
+$enable_proxy = $::site ? {
+pmtpa   = present,
+

[MediaWiki-commits] [Gerrit] (Bug 60036) Use current skin for live preview - change (mediawiki/core)

2014-01-14 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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


Change subject: (Bug 60036) Use current skin for live preview
..

(Bug 60036) Use current skin for live preview

Change-Id: I76cd4b76bfba50f387b2a9ef4988cd09eb2e0c43
---
M resources/mediawiki.action/mediawiki.action.edit.preview.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/mediawiki.action/mediawiki.action.edit.preview.js 
b/resources/mediawiki.action/mediawiki.action.edit.preview.js
index 43642d0..ca1b331 100644
--- a/resources/mediawiki.action/mediawiki.action.edit.preview.js
+++ b/resources/mediawiki.action/mediawiki.action.edit.preview.js
@@ -59,7 +59,7 @@
$copyElements.animate( { opacity: 0.4 }, 'fast' );
 
$previewDataHolder = $( 'div' );
-   targetUrl = $editform.attr( 'action' );
+   targetUrl = $editform.attr( 'action' ) + 'useskin=' + 
mw.config.get( 'skin' );
 
// Gather all the data from the form
postData = $editform.formToArray();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76cd4b76bfba50f387b2a9ef4988cd09eb2e0c43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com
Gerrit-Reviewer: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add trivial tests for claimview, make them pass - change (mediawiki...Wikibase)

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

Change subject: Add trivial tests for claimview, make them pass
..


Add trivial tests for claimview, make them pass

Change-Id: Ie70495488a185f5a47b50fe865fcb85ea5be6fe8
---
M lib/WikibaseLib.hooks.php
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
A lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
3 files changed, 45 insertions(+), 1 deletion(-)

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



diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 72f46ec..586473c 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -151,6 +151,15 @@
),
);
 
+   $testModules['qunit']['jquery.wikibase.claimview.tests'] = 
$moduleBase + array(
+   'scripts' = array(
+   
'tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js',
+   ),
+   'dependencies' = array(
+   'jquery.wikibase.claimview'
+   ),
+   );
+
$testModules['qunit']['jquery.wikibase.listview.tests'] = 
$moduleBase + array(
'scripts' = array(

'tests/qunit/jquery.wikibase/jquery.wikibase.listview.tests.js',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
index 5119587..1822799 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
@@ -80,7 +80,7 @@
],
templateShortCuts: {
'$mainSnak': '.wb-claim-mainsnak',
-   '$qualifiers': '.wb-statement-qualifiers'
+   '$qualifiers': '.wb-claim-qualifiers'
},
value: null,
predefined: {
diff --git a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
new file mode 100644
index 000..c028dcb
--- /dev/null
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.claimview.tests.js
@@ -0,0 +1,35 @@
+/**
+ * @licence GNU GPL v2+
+ * @author Adrian Lang  adrian.l...@wikimedia.de 
+ */
+( function( $, mw, wb ) {
+   'use strict';
+
+   function createClaimview( value ) {
+   var options = { value: value || null };
+
+   return mw.template('wb-claim', 'new', 'wb-last', '', '')
+   .addClass( 'test_claimview' )
+   .claimview( options );
+   }
+
+   QUnit.module( 'jquery.wikibase.claimview', 
window.QUnit.newWbEnvironment( {
+   } ) );
+
+   QUnit.test( 'Initialize and destroy', function( assert ) {
+   var $node = createClaimview(),
+   claimview = $node.data( 'claimview' );
+
+   assert.ok(
+   claimview !== undefined,
+   'Initialized claimview widget.'
+   );
+
+   claimview.destroy();
+
+   assert.ok(
+   $node.data( 'listview' ) === undefined,
+   'Destroyed listview.'
+   );
+   } );
+} )( jQuery, mediaWiki, wikibase );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie70495488a185f5a47b50fe865fcb85ea5be6fe8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Splitted date and time in message 'rclistfrom' - change (mediawiki/core)

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

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


Change subject: Splitted date and time in message 'rclistfrom'
..

Splitted date and time in message 'rclistfrom'

Any language need a split of date and time to make better translation.
added a new parameter $2 for the rclistform

Bug: 19104
Change-Id: Id9127cf022be2394b2a4843572088e0ba8a888a8
---
M includes/specials/SpecialRecentchanges.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
3 files changed, 12 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/107360/1

diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index a4e0b85..05209f7 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -962,14 +962,18 @@
 
// show from this onward link
$timestamp = wfTimestampNow();
-   $now = $lang-userTimeAndDate( $timestamp, $user );
-   $tl = $this-makeOptionsLink(
-   $now, array( 'from' = $timestamp ), $nondefaults
+   $timenow = $lang-userTime( $timestamp, $user );
+   $datenow = $lang-userDate( $timestamp, $user );
+   $tltime = $this-makeOptionsLink(
+   $timenow, array( 'from' = $timestamp ), $nondefaults
+   );
+   $tldate = $this-makeOptionsLink(
+   $datenow, array( 'from' = $timestamp ), $nondefaults
);
 
$rclinks = $this-msg( 'rclinks' )-rawParams( $cl, $dl, 
$lang-pipeList( $links ) )
-parse();
-   $rclistfrom = $this-msg( 'rclistfrom' )-rawParams( $tl 
)-parse();
+   $rclistfrom = $this-msg( 'rclistfrom' )-rawParams( $tltime , 
$tldate )-parse();
 
return {$note}$rclinksbr /$rclistfrom;
}
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 41a38e4..d6ea3be 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -2196,7 +2196,7 @@
 'recentchanges-legend-newpage'  = '(also see [[Special:NewPages|list of 
new pages]])',
 'recentchanges-legend-plusminus'= (''±123''),
 'rcnotefrom'= Below are the changes since '''$2''' 
(up to '''$1''' shown).,
-'rclistfrom'= 'Show new changes starting from $1',
+'rclistfrom'= 'Show new changes starting from $1, $2',
 'rcshowhideminor'   = '$1 minor edits',
 'rcshowhidebots'= '$1 bots',
 'rcshowhideliu' = '$1 registered users',
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index 1f47bf0..7907c3e 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -3613,7 +3613,7 @@
 'recentchanges-legend-plusminus' = 'A plus/minus sign with a number for the 
legend.',
 'rcnotefrom' = 'This message is displayed at [[Special:RecentChanges]] when 
viewing recentchanges from some specific time.
 
-The corresponding message is {{msg-mw|Rclistfrom}} (without split of date and 
time, [[bugzilla:19104|Bug 19104]]).
+The corresponding message is {{msg-mw|Rclistfrom}} (split into date and 
time,[[bugzilla:19104|Bug 19104]]).
 
 Parameters:
 * $1 - the maximum number of changes that are displayed
@@ -3623,7 +3623,8 @@
 'rclistfrom' = 'Used on [[Special:RecentChanges]].
 
 Parameters:
-* $1 - a link to the revision of a specific date and time. The date and the 
time are the link description (without split of date and time, 
[[bugzilla:19104|Bug 19104]]).
+* $1 - a link to the revision of a specific time. The time is the link 
description (witht split of date and time, [[bugzilla:19104|Bug 19104]]).
+* $2 - a link to the revision of a specific date. The date is the link 
description (witht split of date and time, [[bugzilla:19104|Bug 19104]]).
 
 The corresponding message is {{msg-mw|Rcnotefrom}}.',
 'rcshowhideminor' = 'Option text in [[Special:RecentChanges]]. Parameters:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9127cf022be2394b2a4843572088e0ba8a888a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas 01tonytho...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove unused messages - change (mediawiki...MediaWikiChat)

2014-01-14 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: Remove unused messages
..

Remove unused messages

It looks like they are a copypaste rest.
At least some of the removed messages a duplicate of
https://translatewiki.net/wiki/Special:Translate/ext-wikiforum?filter=action=translate

If I am wrong and these messages are needed, please change the message key
to avoid duplicate message keys with the WikiForum extension

Change-Id: I2956bed83b62e380fcb5a90c011a4057bf10e6db
---
M MediaWikiChat.i18n.php
1 file changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/MediaWikiChat.i18n.php b/MediaWikiChat.i18n.php
index d2d1102..e28225b 100644
--- a/MediaWikiChat.i18n.php
+++ b/MediaWikiChat.i18n.php
@@ -70,14 +70,6 @@
 
'right-mediawikichat-chat' = 'Use Special:Chat',
'right-mediawikichat-modchat' = 'Block and kick (if enabled) users 
from Special:Chat',
-
-   'log-name-forum' = 'Forum log',
-   'log-description-forum' = 'Logs [[Special:WikiForum|WikiForum]] 
events',
-
-   'logentry-forum-add-category' = '$1 {{GENDER:$1|created}} a new 
category, $4',
-   'logentry-forum-add-forum' = '$1 {{GENDER:$1|created}} a new forum, 
$4',
-   'logentry-forum-add-thread' = '$1 {{GENDER:$1|created}} a new thread, 
$4',
-   'logentry-forum-add-reply' = '$1 {{GENDER:$1|replied}} on the thread 
$4',
 );
 
 /** Message documentation

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2956bed83b62e380fcb5a90c011a4057bf10e6db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] removing unused imports in all files - change (pywikibot/compat)

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

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


Change subject: removing unused imports in all files
..

removing unused imports in all files

using a self-written script

Change-Id: Ie946f512a69a7afebe1e4ad00fad484c65852a1e
---
M catlib.py
M censure.py
M commons_category_redirect.py
M copyright.py
M copyright_clean.py
M delinker.py
M disambredir.py
M extract_wikilinks.py
M featured.py
M followlive.py
M i18n
M imagecopy.py
M imageuncat.py
M inline_images.py
M interwiki.py
M isbn.py
M login.py
M logindata.py
M maintcont.py
M noreferences.py
M pagegenerators.py
M pageimport.py
M panoramiopicker.py
M query.py
M redirect.py
M reflinks.py
M replace.py
M saveHTML.py
M selflink.py
M simple_family.py
M spellcheck.py
M standardize_interwiki.py
M standardize_notes.py
M statistics_in_wikitable.py
M subster.py
M table2wiki.py
M tag_nowcommons.py
M touch.py
M us-states.py
M warnfile.py
M weblinkchecker.py
M welcome.py
42 files changed, 2 insertions(+), 55 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/62/107362/1

diff --git a/catlib.py b/catlib.py
index f1cde8b..4f77e9e 100644
--- a/catlib.py
+++ b/catlib.py
@@ -16,7 +16,6 @@
 __version__ = '$Id$'
 #
 import re
-import time
 import urllib
 import wikipedia as pywikibot
 import query
diff --git a/censure.py b/censure.py
index 856d765..e502714 100644
--- a/censure.py
+++ b/censure.py
@@ -13,7 +13,6 @@
 
 import wikipedia as pywikibot
 import sys
-import thread
 
 # The indexes for projects are as: language code.family
 
diff --git a/commons_category_redirect.py b/commons_category_redirect.py
index b1a06a5..0494f87 100644
--- a/commons_category_redirect.py
+++ b/commons_category_redirect.py
@@ -21,7 +21,6 @@
 from datetime import timedelta
 
 import wikipedia as pywikibot
-import config
 import catlib
 from category import *
 
diff --git a/copyright.py b/copyright.py
index bddcfd0..d293b8a 100644
--- a/copyright.py
+++ b/copyright.py
@@ -92,7 +92,6 @@
 import time
 import urllib
 import urllib2
-import httplib
 
 import wikipedia as pywikibot
 import pagegenerators
diff --git a/copyright_clean.py b/copyright_clean.py
index b5e94af..dafe1ec 100644
--- a/copyright_clean.py
+++ b/copyright_clean.py
@@ -12,14 +12,11 @@
 #
 
 import sys
-import httplib
 import socket
 import re
-import time
 from urllib import urlencode
 
 import wikipedia as pywikibot
-import config
 import catlib
 import pagegenerators
 import query
diff --git a/delinker.py b/delinker.py
index 4c4b6fe..f051769 100644
--- a/delinker.py
+++ b/delinker.py
@@ -3,9 +3,7 @@
 __version__ = '$Id$'
 
 import sys
-import os
 import wikipedia
-import config
 
 sys.path.insert(0, 'commonsdelinker')
 
diff --git a/disambredir.py b/disambredir.py
index ffc644e..ff120d9 100644
--- a/disambredir.py
+++ b/disambredir.py
@@ -16,7 +16,6 @@
 import re
 import pywikibot
 import pagegenerators
-import catlib
 
 msg = {
 'ar': u'تغيير التحويلات في صفحة توضيح',
diff --git a/extract_wikilinks.py b/extract_wikilinks.py
index 601cea2..e0ef11b 100644
--- a/extract_wikilinks.py
+++ b/extract_wikilinks.py
@@ -23,7 +23,6 @@
 #
 import sys
 import re
-import codecs
 import wikipedia as pywikibot
 # This bot does not contact the Wiki, so no need to get it on the list
 pywikibot.stopme()
diff --git a/featured.py b/featured.py
index a052f96..de60387 100644
--- a/featured.py
+++ b/featured.py
@@ -66,7 +66,6 @@
 from pywikibot import i18n
 from pagegenerators import PreloadingGenerator
 import catlib
-import config
 
 
 def CAT(site, name, hide):
diff --git a/followlive.py b/followlive.py
index ba7a822..4db8c58 100644
--- a/followlive.py
+++ b/followlive.py
@@ -17,7 +17,6 @@
 
 import sys
 import datetime
-import time
 import traceback
 import wikipedia as pywikibot
 import editarticle
diff --git a/i18n b/i18n
index 3437644..e8ee2a4 16
--- a/i18n
+++ b/i18n
-Subproject commit 3437644e8345a7156af5d1f6fe8e151d324473cd
+Subproject commit e8ee2a4a5bd135d9a93a4a3678525323c08924c1
diff --git a/imagecopy.py b/imagecopy.py
index a146701..c7ab7e9 100644
--- a/imagecopy.py
+++ b/imagecopy.py
@@ -84,19 +84,16 @@
 #
 
 from Tkinter import *
-import os
 import sys
 import re
 import codecs
 import urllib
 import httplib
-import urllib2
 import webbrowser
 import time
 import threading
 import socket
 import wikipedia as pywikibot
-import config
 import pagegenerators
 import add_text
 from upload import *
diff --git a/imageuncat.py b/imageuncat.py
index f86d848..f92a5a3 100644
--- a/imageuncat.py
+++ b/imageuncat.py
@@ -13,10 +13,8 @@
 #
 #
 
-import os
 import sys
 import re
-import codecs
 from datetime import datetime
 from datetime import timedelta
 import pywikibot
diff --git a/inline_images.py b/inline_images.py
index 5876c4d..a278b9d 100644
--- a/inline_images.py
+++ b/inline_images.py
@@ -29,11 +29,9 @@
 __version__ = '$Id$'
 #
 
-import sys
 import re
 import pywikibot
 import 

[MediaWiki-commits] [Gerrit] Send e-mail for every unstable Jenkins job - change (mediawiki/selenium)

2014-01-14 Thread Zfilipin (Code Review)
Zfilipin has uploaded a new change for review.

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


Change subject: Send e-mail for every unstable Jenkins job
..

Send e-mail for every unstable Jenkins job

Bug: 60037
Change-Id: I0a1189d31488d90ecfd084a147ed7856d721c7cc
---
M docs/template.md
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/63/107363/1

diff --git a/docs/template.md b/docs/template.md
index 9a47958..61f3cb0 100644
--- a/docs/template.md
+++ b/docs/template.md
@@ -255,6 +255,22 @@
 contentTypeproject/contentType
   /email
 /hudson.plugins.emailext.plugins.trigger.FailureTrigger
+hudson.plugins.emailext.plugins.trigger.UnstableTrigger
+  email
+recipientList/recipientList
+subject$PROJECT_DEFAULT_SUBJECT/subject
+body$PROJECT_DEFAULT_CONTENT/body
+sendToDevelopersfalse/sendToDevelopers
+sendToRequesterfalse/sendToRequester
+includeCulpritsfalse/includeCulprits
+sendToRecipientListtrue/sendToRecipientList
+attachmentsPattern/attachmentsPattern
+attachBuildLogfalse/attachBuildLog
+compressBuildLogfalse/compressBuildLog
+replyTo$PROJECT_DEFAULT_REPLYTO/replyTo
+contentTypeproject/contentType
+  /email
+/hudson.plugins.emailext.plugins.trigger.UnstableTrigger
   /configuredTriggers
   contentTypetext/html/contentType
   defaultSubject$DEFAULT_SUBJECT/defaultSubject

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a1189d31488d90ecfd084a147ed7856d721c7cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Varnish: don't inadvertently convert 500s to 503s - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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


Change subject: Varnish: don't inadvertently convert 500s to 503s
..

Varnish: don't inadvertently convert 500s to 503s

Currently, when retry5xx is set in the puppet config, we return(restart)
from vcl_fetch() on 500s, to have Varnish retry the request on a
different backend.

However, we have no protection against doing this indefinitely by
checking req.restart, so we end up doing so, and hitting Varnish's
max_restarts loop detection parameter and have the frontend throw its
own cryptic 503 instead of e.g. a backend (either Varnish or MediaWiki)
display its own 500 or 503.

Fix this by guarding the return(restart) with req.restarts, and
hardcoding 4 in the process. We might want to lower this more in the
future (4 retires sounds like a lot) but for now this should do it.

Change-Id: Ibf358a2b3df2e984947347138856c5c7e1b91a5e
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 25621e1..1da3391 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -305,7 +305,16 @@
}
 % if vcl_config.fetch(retry5xx, 0) == 1 -%
if (beresp.status = 500  beresp.status  505) {
-   return(restart);
+   # Retry the backend request 3 times, then give up and display
+   # the backend's error page, instead of our own.
+   #
+   # Note that max_restarts is 4 by default, so Varnish would
+   # otherwise detect this as a loop and present its own 503.
+   if (req.restarts  4) {
+   return(restart);
+   } else {
+   return(pass);
+   }
}
 % end -%
set beresp.grace = 60m;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf358a2b3df2e984947347138856c5c7e1b91a5e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Varnish: don't inadvertently convert 500s to 503s - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Varnish: don't inadvertently convert 500s to 503s
..


Varnish: don't inadvertently convert 500s to 503s

Currently, when retry5xx is set in the puppet config, we return(restart)
from vcl_fetch() on 500s, to have Varnish retry the request on a
different backend.

However, we have no protection against doing this indefinitely by
checking req.restart, so we end up doing so, and hitting Varnish's
max_restarts loop detection parameter and have the frontend throw its
own cryptic 503 instead of e.g. a backend (either Varnish or MediaWiki)
display its own 500 or 503.

Fix this by guarding the return(restart) with req.restarts, and
hardcoding 4 in the process. We might want to lower this more in the
future (4 retires sounds like a lot) but for now this should do it.

Change-Id: Ibf358a2b3df2e984947347138856c5c7e1b91a5e
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 25621e1..1da3391 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -305,7 +305,16 @@
}
 % if vcl_config.fetch(retry5xx, 0) == 1 -%
if (beresp.status = 500  beresp.status  505) {
-   return(restart);
+   # Retry the backend request 3 times, then give up and display
+   # the backend's error page, instead of our own.
+   #
+   # Note that max_restarts is 4 by default, so Varnish would
+   # otherwise detect this as a loop and present its own 503.
+   if (req.restarts  4) {
+   return(restart);
+   } else {
+   return(pass);
+   }
}
 % end -%
set beresp.grace = 60m;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf358a2b3df2e984947347138856c5c7e1b91a5e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Varnish: brown paper bag fix for return(restart) - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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


Change subject: Varnish: brown paper bag fix for return(restart)
..

Varnish: brown paper bag fix for return(restart)

Apparently the author forgot his understanding of Varnish flow control
structures and basic arithmetics.

Change-Id: Iae0f99193f3857a1acdc9733a2124d50f7354c64
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/65/107365/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 1da3391..c509f2a 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -310,10 +310,10 @@
#
# Note that max_restarts is 4 by default, so Varnish would
# otherwise detect this as a loop and present its own 503.
-   if (req.restarts  4) {
+   if (req.restarts  3) {
return(restart);
} else {
-   return(pass);
+   return(deliver);
}
}
 % end -%

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae0f99193f3857a1acdc9733a2124d50f7354c64
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Varnish: brown paper bag fix for return(restart) - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: Varnish: brown paper bag fix for return(restart)
..


Varnish: brown paper bag fix for return(restart)

Change-Id: Iae0f99193f3857a1acdc9733a2124d50f7354c64
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 1da3391..c509f2a 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -310,10 +310,10 @@
#
# Note that max_restarts is 4 by default, so Varnish would
# otherwise detect this as a loop and present its own 503.
-   if (req.restarts  4) {
+   if (req.restarts  3) {
return(restart);
} else {
-   return(pass);
+   return(deliver);
}
}
 % end -%

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae0f99193f3857a1acdc9733a2124d50f7354c64
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] This was turned off for wikidata queries on wb_terms. Howeve... - change (operations/puppet)

2014-01-14 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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


Change subject: This was turned off for wikidata queries on wb_terms. However 
it caused a parformance hit for an ipblocks query on enwiki. Latter trumps 
former. Revert and find another way...
..

This was turned off for wikidata queries on wb_terms. However it caused
a parformance hit for an ipblocks query on enwiki. Latter trumps former.
Revert and find another way...

Change-Id: Iaeddf84229cb72355e45f38c150111328de53184
---
M modules/coredb_mysql/templates/prod.my.cnf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/coredb_mysql/templates/prod.my.cnf.erb 
b/modules/coredb_mysql/templates/prod.my.cnf.erb
index 84ed1cb..b8fa52f 100644
--- a/modules/coredb_mysql/templates/prod.my.cnf.erb
+++ b/modules/coredb_mysql/templates/prod.my.cnf.erb
@@ -71,7 +71,7 @@
 collation_server=binary
 
 log_slow_verbosity=Query_plan
-optimizer_switch='mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on,extended_keys=off,index_merge_sort_union=off'
+optimizer_switch='mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on,extended_keys=off'
 #thread_handling=pool-of-threads
 #extra_port=3308
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaeddf84229cb72355e45f38c150111328de53184
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] This was turned off for wikidata queries on wb_terms. Howeve... - change (operations/puppet)

2014-01-14 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: This was turned off for wikidata queries on wb_terms. However 
it caused a parformance hit for an ipblocks query on enwiki. Latter trumps 
former. Revert and find another way...
..


This was turned off for wikidata queries on wb_terms. However it caused
a parformance hit for an ipblocks query on enwiki. Latter trumps former.
Revert and find another way...

Change-Id: Iaeddf84229cb72355e45f38c150111328de53184
---
M modules/coredb_mysql/templates/prod.my.cnf.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/coredb_mysql/templates/prod.my.cnf.erb 
b/modules/coredb_mysql/templates/prod.my.cnf.erb
index 84ed1cb..b8fa52f 100644
--- a/modules/coredb_mysql/templates/prod.my.cnf.erb
+++ b/modules/coredb_mysql/templates/prod.my.cnf.erb
@@ -71,7 +71,7 @@
 collation_server=binary
 
 log_slow_verbosity=Query_plan
-optimizer_switch='mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on,extended_keys=off,index_merge_sort_union=off'
+optimizer_switch='mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on,extended_keys=off'
 #thread_handling=pool-of-threads
 #extra_port=3308
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaeddf84229cb72355e45f38c150111328de53184
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] gdash: remove logbase from reqstats.5xx - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: gdash: remove logbase from reqstats.5xx
..


gdash: remove logbase from reqstats.5xx

As surprising as that sounds, reqstats.5xx can be 0 sometimes, in which
case Graphite returns a 500 with a backtrace that ends with:

GraphError: Logarithmic scale specified with a dataset with a minimum
value less than or equal to zero.

Change-Id: I55360737d29f7e01f53b23e35c1f89922b9db70f
---
M files/gdash/dashboards/reqerror/1.5xx.graph
M files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
M files/gdash/dashboards/reqerror/5.5xx-1wk.graph
M files/gdash/dashboards/reqerror/7.5xx-2m.graph
M files/gdash/dashboards/reqerror/9.5xx-1y.graph
5 files changed, 0 insertions(+), 5 deletions(-)

Approvals:
  Faidon Liambotis: Verified; Looks good to me, approved



diff --git a/files/gdash/dashboards/reqerror/1.5xx.graph 
b/files/gdash/dashboards/reqerror/1.5xx.graph
index 264b006..014d94d 100644
--- a/files/gdash/dashboards/reqerror/1.5xx.graph
+++ b/files/gdash/dashboards/reqerror/1.5xx.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses -8hours
 linewidth 2
-logbase 2
 linemode connected
 hide_legend false
 from -8hours
diff --git a/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph 
b/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
index 8a505b4..18a185e 100644
--- a/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
+++ b/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses -1day
 linewidth 2
-logbase 2
 linemode staircase
 hide_legend false
 from -1 day
diff --git a/files/gdash/dashboards/reqerror/5.5xx-1wk.graph 
b/files/gdash/dashboards/reqerror/5.5xx-1wk.graph
index 5813884..4105a8c 100644
--- a/files/gdash/dashboards/reqerror/5.5xx-1wk.graph
+++ b/files/gdash/dashboards/reqerror/5.5xx-1wk.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses/hour -1week
 linewidth 2
-logbase 2
 linemode connected
 hide_legend false
 from -1 week
diff --git a/files/gdash/dashboards/reqerror/7.5xx-2m.graph 
b/files/gdash/dashboards/reqerror/7.5xx-2m.graph
index 90af6ad..000126b 100644
--- a/files/gdash/dashboards/reqerror/7.5xx-2m.graph
+++ b/files/gdash/dashboards/reqerror/7.5xx-2m.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses/hour -2month
 linewidth 2
-logbase 10
 linemode connected
 hide_legend false
 from -2month
diff --git a/files/gdash/dashboards/reqerror/9.5xx-1y.graph 
b/files/gdash/dashboards/reqerror/9.5xx-1y.graph
index d1c6a5d..7db424b 100644
--- a/files/gdash/dashboards/reqerror/9.5xx-1y.graph
+++ b/files/gdash/dashboards/reqerror/9.5xx-1y.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses/hour -1year
 linewidth 2
-logbase 10
 linemode connected
 hide_legend false
 from -1year

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55360737d29f7e01f53b23e35c1f89922b9db70f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] gdash: remove logbase from reqstats.5xx - change (operations/puppet)

2014-01-14 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has uploaded a new change for review.

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


Change subject: gdash: remove logbase from reqstats.5xx
..

gdash: remove logbase from reqstats.5xx

As surprising as that sounds, reqstats.5xx can be 0 sometimes, in which
case Graphite returns a 500 with a backtrace that ends with:

GraphError: Logarithmic scale specified with a dataset with a minimum
value less than or equal to zero.

Change-Id: I55360737d29f7e01f53b23e35c1f89922b9db70f
---
M files/gdash/dashboards/reqerror/1.5xx.graph
M files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
M files/gdash/dashboards/reqerror/5.5xx-1wk.graph
M files/gdash/dashboards/reqerror/7.5xx-2m.graph
M files/gdash/dashboards/reqerror/9.5xx-1y.graph
5 files changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/files/gdash/dashboards/reqerror/1.5xx.graph 
b/files/gdash/dashboards/reqerror/1.5xx.graph
index 264b006..014d94d 100644
--- a/files/gdash/dashboards/reqerror/1.5xx.graph
+++ b/files/gdash/dashboards/reqerror/1.5xx.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses -8hours
 linewidth 2
-logbase 2
 linemode connected
 hide_legend false
 from -8hours
diff --git a/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph 
b/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
index 8a505b4..18a185e 100644
--- a/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
+++ b/files/gdash/dashboards/reqerror/3.5xx-sum-1day.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses -1day
 linewidth 2
-logbase 2
 linemode staircase
 hide_legend false
 from -1 day
diff --git a/files/gdash/dashboards/reqerror/5.5xx-1wk.graph 
b/files/gdash/dashboards/reqerror/5.5xx-1wk.graph
index 5813884..4105a8c 100644
--- a/files/gdash/dashboards/reqerror/5.5xx-1wk.graph
+++ b/files/gdash/dashboards/reqerror/5.5xx-1wk.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses/hour -1week
 linewidth 2
-logbase 2
 linemode connected
 hide_legend false
 from -1 week
diff --git a/files/gdash/dashboards/reqerror/7.5xx-2m.graph 
b/files/gdash/dashboards/reqerror/7.5xx-2m.graph
index 90af6ad..000126b 100644
--- a/files/gdash/dashboards/reqerror/7.5xx-2m.graph
+++ b/files/gdash/dashboards/reqerror/7.5xx-2m.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses/hour -2month
 linewidth 2
-logbase 10
 linemode connected
 hide_legend false
 from -2month
diff --git a/files/gdash/dashboards/reqerror/9.5xx-1y.graph 
b/files/gdash/dashboards/reqerror/9.5xx-1y.graph
index d1c6a5d..7db424b 100644
--- a/files/gdash/dashboards/reqerror/9.5xx-1y.graph
+++ b/files/gdash/dashboards/reqerror/9.5xx-1y.graph
@@ -1,6 +1,5 @@
 title   HTTP 5xx Responses/hour -1year
 linewidth 2
-logbase 10
 linemode connected
 hide_legend false
 from -1year

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I55360737d29f7e01f53b23e35c1f89922b9db70f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Renamed 'Credit' to 'FileSource' - change (mediawiki...CommonsMetadata)

2014-01-14 Thread Amruthasangeeth (Code Review)
Amruthasangeeth has uploaded a new change for review.

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


Change subject: Renamed 'Credit' to 'FileSource'
..

Renamed 'Credit' to 'FileSource'

The information template field source was matched to Credit.
Now it is renamed to FileSource.

Bug: 57189
Change-Id: I0c7f60cae0b43d7f475e5d7355b7552e950b1d99
---
M TemplateParser.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/TemplateParser.php b/TemplateParser.php
index c9364ed..ebd6cab 100755
--- a/TemplateParser.php
+++ b/TemplateParser.php
@@ -55,7 +55,7 @@
# could be an agency, a member of an agency or an individual.
# I think Credit fits much more closely to the commons notion
# of source than Source does.
-   'fileinfotpl_src' = 'Credit',
+   'fileinfotpl_src' = 'FileSource',
'fileinfotpl_art_title' = 'ObjectName',
'fileinfotpl_book_title' = 'ObjectName',
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c7f60cae0b43d7f475e5d7355b7552e950b1d99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommonsMetadata
Gerrit-Branch: master
Gerrit-Owner: Amruthasangeeth amruthasange...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Escape more bad syntax - change (mediawiki...CirrusSearch)

2014-01-14 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Escape more bad syntax
..

Escape more bad syntax

Change-Id: I85002767e52558d1021f2c96e5c9e8414a61aed5
---
M includes/Searcher.php
M tests/browser/features/full_text.feature
2 files changed, 35 insertions(+), 9 deletions(-)


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

diff --git a/includes/Searcher.php b/includes/Searcher.php
index 9311410..4dd90a6 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -847,15 +847,22 @@
 */
public static function fixupWholeQueryString( $string ) {
wfProfileIn( __METHOD__ );
+   // Be careful when editing this method because the ordering of 
the replacements matters.
+
+
+   // Escape ~ that don't follow a term or a quote and isn't 
already escaped
+   $string = preg_replace_callback( '/(?![\w])~/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+
// Turn bad fuzzy searches into searches that contain a ~
-   $string = preg_replace_callback( 
'/(?leading[^\s])~(?trailing\S+)/', function ( $matches ) {
+   $string = preg_replace_callback( 
'/(?leading\w)~(?trailing\S+)/', function ( $matches ) {
if ( preg_match( 
'/^(?:0|(?:0?\.[0-9]+)|(?:1(?:\.0)?))$/', $matches[ 'trailing' ] ) ) {
-   wfDebugLog( 'CirrusSearch', Found fuzzy:   . 
$matches[ 'trailing' ] );
return $matches[ 0 ];
} else {
return $matches[ 'leading' ] . '\\~' . 
preg_replace( '/~/', '\~', $matches[ 'trailing' ] );
}
}, $string );
+
// Turn bad proximity searches into searches that contain a ~
$string = preg_replace_callback( '/~(?trailing\S*)/', 
function ( $matches ) {
if ( preg_match( '/[0-9]+/', $matches[ 'trailing' ] ) ) 
{
@@ -864,18 +871,29 @@
return '\\~' . $matches[ 'trailing' ];
}
}, $string );
+
// Escape +, -, and ! when not followed immediately by a term.
-   $string = preg_replace_callback( 
'/([\\+\\-\\!]+)([\\+\\-\\!\\~\s]|$)/', 
'CirrusSearch\Searcher::escapeBadSyntax', $string );
+   $string = preg_replace_callback( '/[+\-!]+(?!\w)/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+
+   // Escape || when not between terms
+   $string = preg_replace_callback( '/^\s*\|\|/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+   $string = preg_replace_callback( '/\|\|\s*$/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+
// Lowercase AND and OR when not surrounded on both sides by a 
term.
// Lowercase NOT when it doesn't have a term after it.
-   $string = preg_replace_callback( '/(?:AND|OR|NOT)\s*$/', 
'CirrusSearch\Searcher::lowercaseMatched', $string );
-   $string = preg_replace_callback( '/^\s*(?:AND|OR)/', 
'CirrusSearch\Searcher::lowercaseMatched', $string );
+   $string = preg_replace_callback( '/^\s*(?:AND|OR)/',
+   'CirrusSearch\Searcher::lowercaseMatched', $string );
+   $string = preg_replace_callback( '/(?:AND|OR|NOT)\s*$/',
+   'CirrusSearch\Searcher::lowercaseMatched', $string );
wfProfileOut( __METHOD__ );
return $string;
}
 
private static function escapeBadSyntax( $matches ) {
-   return \\ . implode( \\, str_split( $matches[ 1 ] ) ) . 
$matches[ 2 ];
+   return \\ . implode( \\, str_split( $matches[ 0 ] ) );
}
 
private static function lowercaseMatched( $matches ) {
diff --git a/tests/browser/features/full_text.feature 
b/tests/browser/features/full_text.feature
index d6b92b9..eb5d01e 100644
--- a/tests/browser/features/full_text.feature
+++ b/tests/browser/features/full_text.feature
@@ -344,9 +344,9 @@
 Then Catapult is in the search results
 And Two Words is in the search results
   Examples:
-  |  query  |
-  | catapult OR África  |
-  | África \|\| catapult|
+  |  query |
+  | catapult OR África |
+  | África \|\| catapult   |
   | catapult OR África   |
   | catapult \|\| África |
   | África OR catapult   |
@@ -383,6 +383,14 @@
   | ++catapultcatapult |
   | :~!$$=!~\!{} catapult |
   | catapult -_~^_~^_^^|
+  | catapult \|\|  |
+  | catapult ~/|
+  | \|\| catapult  |
+  | ~/ catapult|
+  | AND catapult   |
+  | 

[MediaWiki-commits] [Gerrit] db1049 to full steam - change (operations/mediawiki-config)

2014-01-14 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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


Change subject: db1049 to full steam
..

db1049 to full steam

Change-Id: I8d1013484064d054c108d73534024e838dd5d729
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index e7fec2d..fbe7c2b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -92,7 +92,7 @@
'db1043'= 100, # 1.4TB sas 64GB, vslow
'db1033'= 300, # 1.4TB sas 64GB
'db1037'= 300, # 1.4TB sas 64GB
-   'db1049'= 50, # warm up, 2.8TB sas 64GB
+   'db1049'= 300, # 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
'db1052'= 400, # 2.8TB sas 96GB
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d1013484064d054c108d73534024e838dd5d729
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] db1049 to full steam - change (operations/mediawiki-config)

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

Change subject: db1049 to full steam
..


db1049 to full steam

Change-Id: I8d1013484064d054c108d73534024e838dd5d729
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index e7fec2d..fbe7c2b 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -92,7 +92,7 @@
'db1043'= 100, # 1.4TB sas 64GB, vslow
'db1033'= 300, # 1.4TB sas 64GB
'db1037'= 300, # 1.4TB sas 64GB
-   'db1049'= 50, # warm up, 2.8TB sas 64GB
+   'db1049'= 300, # 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
'db1052'= 400, # 2.8TB sas 96GB
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d1013484064d054c108d73534024e838dd5d729
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] reassign db1040 to s4 - change (operations/puppet)

2014-01-14 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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


Change subject: reassign db1040 to s4
..

reassign db1040 to s4

Change-Id: Ieb08637ff57fd5fe283a340337343b1d6213a01a
---
M manifests/site.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/107371/1

diff --git a/manifests/site.pp b/manifests/site.pp
index c03d535..12fce78 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -600,8 +600,8 @@
 }
 }
 
-node /^db10(04|11|20|42|59)\.eqiad\.wmnet/ {
-if $::hostname =~ /^db10(04|11|20|42|59)/ {
+node /^db10(04|11|20|40|42|59)\.eqiad\.wmnet/ {
+if $::hostname =~ /^db10(04|11|20|40|42|59)/ {
 class { role::coredb::s4 : mariadb = true }
 } else {
 include role::coredb::s4
@@ -621,8 +621,8 @@
 }
 }
 
-node /^db10(06|15|22|23|27|40)\.eqiad\.wmnet/ {
-if $::hostname =~ /^db10(06|22|23|40)/ {
+node /^db10(06|15|22|23|27)\.eqiad\.wmnet/ {
+if $::hostname =~ /^db10(06|22|23)/ {
 class { role::coredb::s6 : innodb_file_per_table = true, mariadb = 
true }
 } elsif $::hostname =~ /^db10(15|27)/ {
 class { role::coredb::s6 : mariadb = true }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb08637ff57fd5fe283a340337343b1d6213a01a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] reassign db1040 to s4 - change (operations/puppet)

2014-01-14 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: reassign db1040 to s4
..


reassign db1040 to s4

Change-Id: Ieb08637ff57fd5fe283a340337343b1d6213a01a
---
M manifests/site.pp
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index c03d535..12fce78 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -600,8 +600,8 @@
 }
 }
 
-node /^db10(04|11|20|42|59)\.eqiad\.wmnet/ {
-if $::hostname =~ /^db10(04|11|20|42|59)/ {
+node /^db10(04|11|20|40|42|59)\.eqiad\.wmnet/ {
+if $::hostname =~ /^db10(04|11|20|40|42|59)/ {
 class { role::coredb::s4 : mariadb = true }
 } else {
 include role::coredb::s4
@@ -621,8 +621,8 @@
 }
 }
 
-node /^db10(06|15|22|23|27|40)\.eqiad\.wmnet/ {
-if $::hostname =~ /^db10(06|22|23|40)/ {
+node /^db10(06|15|22|23|27)\.eqiad\.wmnet/ {
+if $::hostname =~ /^db10(06|22|23)/ {
 class { role::coredb::s6 : innodb_file_per_table = true, mariadb = 
true }
 } elsif $::hostname =~ /^db10(15|27)/ {
 class { role::coredb::s6 : mariadb = true }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb08637ff57fd5fe283a340337343b1d6213a01a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@wikimedia.org
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 Wikibase Client on Wikisource - change (operations/mediawiki-config)

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

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


Change subject: Enable Wikibase Client on Wikisource
..

Enable Wikibase Client on Wikisource

Change-Id: I3710de21b15d5434a6ac0f9b07c36412b93f6497
---
M wikidataclient.dblist
M wmf-config/InitialiseSettings.php
M wmf-config/Wikibase.php
3 files changed, 73 insertions(+), 16 deletions(-)


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

diff --git a/wikidataclient.dblist b/wikidataclient.dblist
index 0ba6650..7110913 100644
--- a/wikidataclient.dblist
+++ b/wikidataclient.dblist
@@ -302,3 +302,67 @@
 ukwikivoyage
 viwikivoyage
 commonswiki
+angwikisource
+arwikisource
+aswikisource
+azwikisource
+bewikisource
+bgwikisource
+bnwikisource
+brwikisource
+bswikisource
+cawikisource
+cswikisource
+cywikisource
+dawikisource
+dewikisource
+elwikisource
+enwikisource
+eowikisource
+eswikisource
+etwikisource
+fawikisource
+fiwikisource
+fowikisource
+frwikisource
+glwikisource
+guwikisource
+hewikisource
+hrwikisource
+htwikisource
+huwikisource
+hywikisource
+idwikisource
+iswikisource
+itwikisource
+jawikisource
+knwikisource
+kowikisource
+lawikisource
+liwikisource
+ltwikisource
+mkwikisource
+mlwikisource
+mrwikisource
+nlwikisource
+nowikisource
+plwikisource
+ptwikisource
+rowikisource
+ruwikisource
+sahwikisource
+sawikisource
+skwikisource
+slwikisource
+srwikisource
+svwikisource
+tawikisource
+tewikisource
+thwikisource
+trwikisource
+ukwikisource
+vecwikisource
+viwikisource
+yiwikisource
+zh_min_nanwikisource
+zhwikisource
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 252096f..3a1986f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12513,6 +12513,7 @@
 'wmgWikibaseSiteGroup' = array(
'default' = 'wikipedia',
'wikivoyage' = 'wikivoyage',
+   'wikisource' = 'wikisource',
'commonswiki' = 'commons'
 ),
 
diff --git a/wmf-config/Wikibase.php b/wmf-config/Wikibase.php
index a504526..0e22b46 100644
--- a/wmf-config/Wikibase.php
+++ b/wmf-config/Wikibase.php
@@ -1,13 +1,13 @@
 ?php
 
 if ( $wmfRealm === 'production' ) {
-   require_once( $IP/extensions/DataValues/DataValues.php );
-   require_once( $IP/extensions/DataTypes/DataTypes.php );
-   require_once( $IP/extensions/Diff/Diff.php );
-   require_once( 
$IP/extensions/WikibaseDataModel/WikibaseDataModel.php );
-   require_once( $IP/extensions/Wikibase/lib/WikibaseLib.php );
+   require_once( $IP/extensions/DataValues/DataValues.php );
+   require_once( $IP/extensions/DataTypes/DataTypes.php );
+   require_once( $IP/extensions/Diff/Diff.php );
+   require_once( $IP/extensions/WikibaseDataModel/WikibaseDataModel.php 
);
+   require_once( $IP/extensions/Wikibase/lib/WikibaseLib.php );
 } else {
-   require_once( $IP/extensions/Wikidata/Wikidata.php );
+   require_once( $IP/extensions/Wikidata/Wikidata.php );
 }
 
 if ( $wmgUseWikibaseRepo ) {
@@ -46,19 +46,10 @@
 
$wgWBRepoSettings['siteLinkGroups'] = array(
'wikipedia',
+   'wikisource',
'wikivoyage',
'commons'
);
-
-   // temporary override for test wikidata
-   if ( $wgDBname === 'testwikidatawiki' ) {
-   $wgWBRepoSettings['siteLinkGroups'] = array(
-   'wikipedia',
-   'wikisource',
-   'wikivoyage',
-   'commons'
-   );
-   }
 
if ( $wgDBname === 'testwikidatawiki' ) {
// there is no cronjob dispatcher yet, this will do nothing
@@ -115,6 +106,7 @@
 
$wgWBClientSettings['siteLinkGroups'] = array(
'wikipedia',
+   'wikisource',
'wikivoyage',
'commons'
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3710de21b15d5434a6ac0f9b07c36412b93f6497
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Send e-mail for every unstable Jenkins job - change (mediawiki/selenium)

2014-01-14 Thread Cmcmahon (Code Review)
Cmcmahon has submitted this change and it was merged.

Change subject: Send e-mail for every unstable Jenkins job
..


Send e-mail for every unstable Jenkins job

Bug: 60037
Change-Id: I0a1189d31488d90ecfd084a147ed7856d721c7cc
---
M docs/template.md
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Cmcmahon: Looks good to me, approved



diff --git a/docs/template.md b/docs/template.md
index 9a47958..61f3cb0 100644
--- a/docs/template.md
+++ b/docs/template.md
@@ -255,6 +255,22 @@
 contentTypeproject/contentType
   /email
 /hudson.plugins.emailext.plugins.trigger.FailureTrigger
+hudson.plugins.emailext.plugins.trigger.UnstableTrigger
+  email
+recipientList/recipientList
+subject$PROJECT_DEFAULT_SUBJECT/subject
+body$PROJECT_DEFAULT_CONTENT/body
+sendToDevelopersfalse/sendToDevelopers
+sendToRequesterfalse/sendToRequester
+includeCulpritsfalse/includeCulprits
+sendToRecipientListtrue/sendToRecipientList
+attachmentsPattern/attachmentsPattern
+attachBuildLogfalse/attachBuildLog
+compressBuildLogfalse/compressBuildLog
+replyTo$PROJECT_DEFAULT_REPLYTO/replyTo
+contentTypeproject/contentType
+  /email
+/hudson.plugins.emailext.plugins.trigger.UnstableTrigger
   /configuredTriggers
   contentTypetext/html/contentType
   defaultSubject$DEFAULT_SUBJECT/defaultSubject

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a1189d31488d90ecfd084a147ed7856d721c7cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin zfili...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Jhall jh...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Return timestamp from index rather than database - change (mediawiki...CirrusSearch)

2014-01-14 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Return timestamp from index rather than database
..

Return timestamp from index rather than database

This gives us a really quick way to the last revision that made it into
Cirrus.

Fun fact: the only reason we now load the latest revision of all results
is to check if there is one in the \SearchResult-isMissingRevision.  I
wonder if we can improve page load times by skipping even that somehow

Change-Id: I2c8917167ce4e49ba820661eedcc610d636ce67d
---
M includes/Result.php
M includes/ResultsType.php
2 files changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/includes/Result.php b/includes/Result.php
index f7ebbd6..5dca44b 100644
--- a/includes/Result.php
+++ b/includes/Result.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use \MWTimestamp;
 use \SearchResult;
 use \Title;
 
@@ -39,6 +40,7 @@
private $wordCount;
private $byteSize;
private $score;
+   private $timestamp;
 
/**
 * Build the result.
@@ -54,6 +56,7 @@
// TODO remove ternary once text.word_count is available 
everywhere
$this-wordCount = isset( $data['text.word_count'] ) ? 
$data['text.word_count'] : $result-text_words;
$this-byteSize = $result-text_bytes;
+   $this-timestamp = new MWTimestamp( $result-timestamp );
$highlights = $result-getHighlights();
// TODO remove when Elasticsearch issue 3757 is fixed
$highlights = $this-swapInPlainHighlighting( $highlights, 
'redirect.title' );
@@ -211,4 +214,8 @@
public function getScore() {
return $this-score;
}
+
+   public function getTimestamp() {
+   return $this-timestamp-getTimestamp( TS_MW );
+   }
 }
\ No newline at end of file
diff --git a/includes/ResultsType.php b/includes/ResultsType.php
index 392b45a..76bfe3c 100644
--- a/includes/ResultsType.php
+++ b/includes/ResultsType.php
@@ -60,7 +60,8 @@
 class FullTextResultsType implements ResultsType {
public function getFields() {
// TODO remove text_words once text.word_count is available 
everywhere
-   return array( 'id', 'title', 'namespace', 'redirect', 
'text_bytes', 'text.word_count', 'text_words' );
+   return array( 'id', 'title', 'namespace', 'redirect', 
'timestamp',
+   'text_bytes', 'text.word_count', 'text_words' );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c8917167ce4e49ba820661eedcc610d636ce67d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adjust to changes in DataValuesJavaScript - change (mediawiki...Wikibase)

2014-01-14 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: Adjust to changes in DataValuesJavaScript
..

Adjust to changes in DataValuesJavaScript

Adapt wikibase parser and formatter registration to change
https://github.com/wmde/DataValuesJavascript/pull/6

Change-Id: Ic7be01cf3e5bad38a82c2b3b6faee633ab1fcc21
---
M lib/resources/formatters/wikibase.formatters.register.js
M lib/resources/parsers/wikibase.parsers.js
M lib/tests/qunit/parsers/EntityIdParser.tests.js
3 files changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/lib/resources/formatters/wikibase.formatters.register.js 
b/lib/resources/formatters/wikibase.formatters.register.js
index 6b08e86..2e1ccff 100644
--- a/lib/resources/formatters/wikibase.formatters.register.js
+++ b/lib/resources/formatters/wikibase.formatters.register.js
@@ -8,8 +8,8 @@
// Register Wikibase specific formatter:
 
mw.ext.valueFormatters.valueFormatterProvider.registerFormatter(
-   dv.QuantityValue.TYPE,
-   wb.formatters.QuantityFormatter
+   wb.formatters.QuantityFormatter,
+   dv.QuantityValue.TYPE
);
 
 }( mediaWiki, wikibase, valueFormatters, dataValues ) );
diff --git a/lib/resources/parsers/wikibase.parsers.js 
b/lib/resources/parsers/wikibase.parsers.js
index a1f5979..7b3d2f0 100644
--- a/lib/resources/parsers/wikibase.parsers.js
+++ b/lib/resources/parsers/wikibase.parsers.js
@@ -8,8 +8,8 @@
// Register Wikibase specific parsers:
 
mw.ext.valueParsers.valueParserProvider.registerParser(
-   wb.EntityId.TYPE,
-   wb.EntityIdParser
+   wb.EntityIdParser,
+   wb.EntityId.TYPE
);
 
 }( mediaWiki, wikibase ) );
diff --git a/lib/tests/qunit/parsers/EntityIdParser.tests.js 
b/lib/tests/qunit/parsers/EntityIdParser.tests.js
index de2d3db..820a356 100644
--- a/lib/tests/qunit/parsers/EntityIdParser.tests.js
+++ b/lib/tests/qunit/parsers/EntityIdParser.tests.js
@@ -23,7 +23,7 @@
/**
 * @see vp.tests.ValueParserTest.getObject
 */
-   getObject: function() {
+   getConstructor: function() {
return wb.EntityIdParser;
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7be01cf3e5bad38a82c2b3b6faee633ab1fcc21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] CSS class prefixing and BEMification - change (mediawiki...ContentTranslation)

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

Change subject: CSS class prefixing and BEMification
..


CSS class prefixing and BEMification

To see how it would look like

Change-Id: I8b79392c03f3dc7fda49f32e9812bc388cd7e5a5
---
M modules/base/ext.cx.base.js
M modules/base/styles/ext.cx.base.less
M modules/header/ext.cx.header.js
M modules/header/ext.cx.progressbar.js
M modules/header/styles/ext.cx.header.less
M modules/header/styles/ext.cx.progressbar.less
M modules/source/ext.cx.source.js
M modules/translation/ext.cx.publish.js
M modules/translation/ext.cx.translation.js
M modules/translation/styles/ext.cx.translation.less
M tests/browser/features/step_definitions/special_content_translation_steps.rb
M tests/browser/features/support/pages/content_translation_page.rb
12 files changed, 123 insertions(+), 134 deletions(-)

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



diff --git a/modules/base/ext.cx.base.js b/modules/base/ext.cx.base.js
index b826108..ee10ef0 100644
--- a/modules/base/ext.cx.base.js
+++ b/modules/base/ext.cx.base.js
@@ -43,19 +43,22 @@
ContentTranslation.prototype.render = function () {
var $content;
 
-   $content = $( 'div' ).addClass( 'content' )
+   $content = $( 'div' ).addClass( 'cx-widget' )
.append(
-   $( 'div' ).addClass( 'header' ),
-   $( 'div' ).addClass( 'source' ),
-   $( 'div' ).addClass( 'translation' ),
-   $( 'div' ).addClass( 'tools' )
+   $( 'div' ).addClass( 'cx-widget__header' ),
+   $( 'div' ).addClass( 'cx-widget__columns' )
+   .append(
+   $( 'div' ).addClass( 
'cx-column cx-column--source' ),
+   $( 'div' ).addClass( 
'cx-column cx-column--translation' ),
+   $( 'div' ).addClass( 
'cx-column cx-column--aids' )
+   )
);
 
this.$container.append( $content );
-   this.$header = this.$container.find( '.header' );
-   this.$source = this.$container.find( '.source' );
-   this.$translation = this.$container.find( '.translation' );
-   this.$tools = this.$container.find( '.tools' );
+   this.$header = this.$container.find( '.cx-widget__header' );
+   this.$source = this.$container.find( '.cx-column--source' );
+   this.$translation = this.$container.find( 
'.cx-column--translation' );
+   this.$tools = this.$container.find( '.cx-column--aids' );
};
 
$.fn.cx = function ( options ) {
diff --git a/modules/base/styles/ext.cx.base.less 
b/modules/base/styles/ext.cx.base.less
index a025a14..a29bc45 100644
--- a/modules/base/styles/ext.cx.base.less
+++ b/modules/base/styles/ext.cx.base.less
@@ -6,38 +6,36 @@
color: @grey;
 }
 
-.content {
+/**
+ * Container for the translation widget
+ */
+.cx-widget {
.mw-ui-grid;
color: @grey;
 }
 
-.header {
+.cx-widget__header {
.mw-ui-item;
.mw-ui-one-whole;
.mw-ui-palm-one-whole;
 }
 
-.source {
+.cx-column {
.mw-ui-item;
.mw-ui-one-third;
+}
+
+.cx-column--source,
+.cx-column--translation {
.mw-ui-palm-one-half;
 }
 
-.translation {
-   .mw-ui-item;
-   .mw-ui-one-third;
-   .mw-ui-palm-one-half;
-
-}
-
-.tools {
-   .mw-ui-item;
-   .mw-ui-one-third;
+.cx-column--aids {
.mw-ui-palm-one-whole;
background: #f0f0f0;
-
 }
 
+/* Unused? */
 .suggestion-list {
.mw-ui-grid;
 }
diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index 8987d21..6f6797e 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -28,14 +28,14 @@
};
 
ContentTranslationHeader.prototype.render = function () {
+   this.$container.addClass( 'cx-header' );
this.$container.append(
$( 'div' )
-   .addClass( 'logo' ),
+   .addClass( 'cx-header__logo' ),
$( 'div' )
-   .addClass( 'user-details' )
+   .addClass( 'cx-header__user-details' )
.append(
$( 'a' )
-   .addClass( 'user-name' )
.attr( 'href', mw.util.getUrl( 
'User:' + mw.user.getName() ) )
.text ( mw.user.getName() )
   

[MediaWiki-commits] [Gerrit] Update Wikibase, fix for xml api exceptions - change (mediawiki/core)

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

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


Change subject: Update Wikibase, fix for xml api exceptions
..

Update Wikibase, fix for xml api exceptions

Bug: 59876
Change-Id: I73d26dca84bfd8fb8d7bbe034ea70468eb3337df
---
M extensions/Wikibase
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/107375/1

diff --git a/extensions/Wikibase b/extensions/Wikibase
index 97e5689..cadb236 16
--- a/extensions/Wikibase
+++ b/extensions/Wikibase
-Subproject commit 97e568933e5d25cc6fd089e5e1e1e6db7f062d93
+Subproject commit cadb236b51e187b87e4d554a6f94742cae206dfa

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73d26dca84bfd8fb8d7bbe034ea70468eb3337df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf10
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] [Planet] Fix Guillaume's blog feed URL - change (operations/puppet)

2014-01-14 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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


Change subject: [Planet] Fix Guillaume's blog feed URL
..

[Planet] Fix Guillaume's blog feed URL

Change-Id: Ice3f4ee22420afdbf6744192f17377099a8bc27d
---
M templates/planet/en_config.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/107376/1

diff --git a/templates/planet/en_config.erb b/templates/planet/en_config.erb
index d03514d..ef2b56a 100644
--- a/templates/planet/en_config.erb
+++ b/templates/planet/en_config.erb
@@ -156,7 +156,7 @@
 [http://mariobehling.de/taxonomy/term/1089/feed]
 name=Mario Behling
 
-[http://guillaumepaumier.com/category/wikimedia/]
+[http://guillaumepaumier.com/category/wikimedia/feed/]
 name=Guillaume Paumier
 
 [http://mikeswikidev.wordpress.com/category/technical-on-topic/feed/atom/]
@@ -556,4 +556,4 @@
 name=Wikistaycation
 
 [http://mariapacana.tumblr.com/tagged/parsoid/rss]
-name=Maria Pacana
\ No newline at end of file
+name=Maria Pacana

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice3f4ee22420afdbf6744192f17377099a8bc27d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Nemo bis federicol...@tiscali.it

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


[MediaWiki-commits] [Gerrit] If we fail to CAS, remove cached data so it's re-read from DB - change (mediawiki...Flow)

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

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


Change subject: If we fail to CAS, remove cached data so it's re-read from DB
..

If we fail to CAS, remove cached data so it's re-read from DB

Change-Id: I7a49b9cbf648c22ebb1d508e11769200657c18d2
---
M includes/Data/ObjectManager.php
M includes/Data/RevisionStorage.php
M includes/Repository/TreeRepository.php
3 files changed, 45 insertions(+), 13 deletions(-)


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

diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php
index 2f77533..f73f865 100644
--- a/includes/Data/ObjectManager.php
+++ b/includes/Data/ObjectManager.php
@@ -1290,8 +1290,9 @@
$self = $this;
// If this used redis instead of memcached, could it add to 
index in position
// without retry possibility? need a single number that will 
properly sort rows.
-   $this-cache-merge(
-   $this-cacheKey( $indexed ),
+   $cacheKey = $this-cacheKey( $indexed );
+   $success = $this-cache-merge(
+   $cacheKey,
function( BagOStuff $cache, $key, $value ) use( $self, 
$row ) {
if ( $value === false ) {
return false;
@@ -1305,18 +1306,25 @@
$retval = $self-sortIndex( $retval );
$retval = $self-limitIndexSize( $retval );
if ( $retval === $value ) {
-   // object didnt fit in index
+   // object didn't fit in index
return false;
} else {
return $retval;
}
}
);
+
+   // if we failed to CAS new data, kill the cached value so it'll 
be
+   // re-fetched from DB
+   if ( !$success ) {
+   $this-cache-delete( $cacheKey );
+   }
}
 
protected function removeFromIndex( array $indexed, array $row ) {
-   $this-cache-merge(
-   $this-cacheKey( $indexed ),
+   $cacheKey = $this-cacheKey( $indexed );
+   $success = $this-cache-merge(
+   $cacheKey,
function( BagOStuff $cache, $key, $value ) use( $row ) {
if ( $value === false ) {
return false;
@@ -1329,12 +1337,19 @@
return $value;
}
);
+
+   // if we failed to CAS new data, kill the cached value so it'll 
be
+   // re-fetched from DB
+   if ( !$success ) {
+   $this-cache-delete( $cacheKey );
+   }
}
 
protected function replaceInIndex( array $indexed, array $oldRow, array 
$newRow ) {
$self = $this;
-   $this-cache-merge(
-   $this-cacheKey( $indexed ),
+   $cacheKey = $this-cacheKey( $indexed );
+   $success = $this-cache-merge(
+   $cacheKey,
function( BagOStuff $cache, $key, $value ) use( $self, 
$oldRow, $newRow ) {
if ( $value === false ) {
return false;
@@ -1355,6 +1370,12 @@
}
}
);
+
+   // if we failed to CAS new data, kill the cached value so it'll 
be
+   // re-fetched from DB
+   if ( !$success ) {
+   $this-cache-delete( $cacheKey );
+   }
}
 
// INTERNAL: in 5.4 it can be protected
@@ -1690,7 +1711,14 @@
 */
public function merge( $key, \Closure $callback, $attempts = 10 ) {
if ( $this-buffer === null ) {
-   $this-cache-merge( $key, $callback, $this-exptime, 
$attempts );
+   $success = $this-cache-merge( $key, $callback, 
$this-exptime, $attempts );
+
+   // if we failed to CAS new data, kill the cached value 
so it'll be
+   // re-fetched from DB
+   if ( !$success ) {
+   $this-cache-delete( $key );
+   }
+
} else {
$this-buffer[] = array(
'command' = __FUNCTION__,
diff --git a/includes/Data/RevisionStorage.php 
b/includes/Data/RevisionStorage.php
index f2db7b3..716876e 

[MediaWiki-commits] [Gerrit] [bugfix] fix AttributeError for editor.py - change (pywikibot/core)

2014-01-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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


Change subject: [bugfix] fix AttributeError for editor.py
..

[bugfix] fix AttributeError for editor.py

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/78/107378/1

diff --git a/pywikibot/editor.py b/pywikibot/editor.py
index af10f8d..450ac15 100644
--- a/pywikibot/editor.py
+++ b/pywikibot/editor.py
@@ -104,7 +104,7 @@
 return self.restoreLinebreaks(newcontent)
 else:
 return self.restoreLinebreaks(
-pywikibot.editText(
+pywikibot.ui.editText(
 text,
 jumpIndex=jumpIndex,
 highlight=highlight))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica55aeed03d5df308ccd15807e0173c997544033
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] Don't use complex datatypes as CAS tokens - change (mediawiki/core)

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

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


Change subject: Don't use complex datatypes as CAS tokens
..

Don't use complex datatypes as CAS tokens

For caches where CAS is not natively supported, we have a workaround, where the
CAS token is (based on) the stored value.

To confirm the data can be written to cache, the CAS token is compared against
whatever is currently in cache, so we pull the cached data and rebuild the
value.

In the case of objects, we have now pulled  rebuilt (unserialized) 2 objects
that are actually the same object (for CAS purpose - it's the correct value to
overwrite), but in terms of ===, they're 2 different values.

This patch should make sure CAS tokens are always a serialized version of the
value we're saving (where no native CAS exists); these serialized versions can
reliably be compared.

Bug: 59941
Change-Id: I2760416c48f2ceb7a0e0c874dd70ec07b4dccdfc
---
M includes/objectcache/DBABagOStuff.php
M includes/objectcache/HashBagOStuff.php
M includes/objectcache/RedisBagOStuff.php
3 files changed, 7 insertions(+), 8 deletions(-)


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

diff --git a/includes/objectcache/DBABagOStuff.php 
b/includes/objectcache/DBABagOStuff.php
index c82b3aa..a81b5c5 100644
--- a/includes/objectcache/DBABagOStuff.php
+++ b/includes/objectcache/DBABagOStuff.php
@@ -125,6 +125,7 @@
}
 
$val = dba_fetch( $key, $handle );
+   $casToken = $val;
list( $val, $expiry ) = $this-decode( $val );
 
# Must close ASAP because locks are held
@@ -138,8 +139,6 @@
wfDebug( __METHOD__ . : $key expired\n );
$val = false;
}
-
-   $casToken = $val;
 
wfProfileOut( __METHOD__ );
 
@@ -193,7 +192,6 @@
// DBA is locked to any other write connection, so we can safely
// compare the current  previous value before saving new value
$val = dba_fetch( $key, $handle );
-   list( $val, $exptime ) = $this-decode( $val );
if ( $casToken !== $val ) {
dba_close( $handle );
wfProfileOut( __METHOD__ );
diff --git a/includes/objectcache/HashBagOStuff.php 
b/includes/objectcache/HashBagOStuff.php
index d061eff..bc5167d 100644
--- a/includes/objectcache/HashBagOStuff.php
+++ b/includes/objectcache/HashBagOStuff.php
@@ -64,7 +64,7 @@
return false;
}
 
-   $casToken = $this-bag[$key][0];
+   $casToken = serialize( $this-bag[$key][0] );
 
return $this-bag[$key][0];
}
@@ -88,7 +88,7 @@
 * @return bool
 */
function cas( $casToken, $key, $value, $exptime = 0 ) {
-   if ( $this-get( $key ) === $casToken ) {
+   if ( serialize( $this-get( $key ) ) === $casToken ) {
return $this-set( $key, $value, $exptime );
}
 
diff --git a/includes/objectcache/RedisBagOStuff.php 
b/includes/objectcache/RedisBagOStuff.php
index adcf762..3c97480 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -79,12 +79,13 @@
return false;
}
try {
-   $result = $this-unserialize( $conn-get( $key ) );
+   $value = $conn-get( $key );
+   $casToken = $value;
+   $result = $this-unserialize( $value );
} catch ( RedisException $e ) {
$result = false;
$this-handleException( $server, $conn, $e );
}
-   $casToken = $result;
 
$this-logRequest( 'get', $key, $server, $result );
return $result;
@@ -125,7 +126,7 @@
try {
$conn-watch( $key );
 
-   if ( $this-get( $key ) !== $casToken ) {
+   if ( $this-serialize( $this-get( $key ) ) !== 
$casToken ) {
$conn-unwatch();
return false;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2760416c48f2ceb7a0e0c874dd70ec07b4dccdfc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make sure that the close button is always visible - change (mediawiki...MultimediaViewer)

2014-01-14 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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


Change subject: Make sure that the close button is always visible
..

Make sure that the close button is always visible

Change-Id: Ib1bf72d898220442992c5a30d90a9a683d00d110
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/81
---
M resources/ext.multimediaViewer/ext.multimediaViewer.js
M tests/qunit/ext.multimediaViewer.lightboxinterface.test.js
2 files changed, 6 insertions(+), 55 deletions(-)


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

diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.js 
b/resources/ext.multimediaViewer/ext.multimediaViewer.js
index d1c4ece..292f8f7 100755
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.js
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.js
@@ -363,63 +363,10 @@
};
 
MMVP.updateControls = function () {
-   var isOnButton = false,
-   isOnImage = false,
-   ui = this.ui,
+   var ui = this.ui,
prevNextTop = ( ( ui.$imageWrapper.height() / 2 ) - 60 
) + 'px';
 
-   function fadeIn() {
-   isOnImage = true;
-   ui.$closeButton.fadeIn( 100 );
-   ui.$imageDiv.one( 'click', fadeOut );
-   }
-
-   function fadeOut() {
-   ui.$closeButton.fadeOut( 100 );
-   ui.$imageDiv.one( 'click', fadeIn );
-   }
-
-   function fadeOutDelayed() {
-   isOnImage = false;
-   setTimeout( function () {
-   if ( !isOnImage  !isOnButton ) {
-   fadeOut();
-   }
-   }, 500 );
-   }
-
-   function detectButton() {
-   isOnButton = true;
-   }
-
-   function detectLeaveButton() {
-   isOnButton = false;
-   setTimeout( function () {
-   if ( !isOnImage  !isOnButton ) {
-   fadeOut();
-   }
-   }, 500 );
-   }
-
-   ui.$closeButton
-   .fadeIn( 100 )
-   .delay( 500 )
-   .fadeOut( 100 );
-
ui.$postDiv.css( 'top', ui.$imageWrapper.height() );
-
-   ui.$imageDiv
-   .off( 'mouseenter', fadeIn )
-   .off( 'mouseleave', fadeOutDelayed )
-   .one( 'click', fadeIn )
-   .on( 'mouseenter', fadeIn )
-   .on( 'mouseleave', fadeOutDelayed );
-
-   ui.$closeButton.add( ui.$fullscreenButton )
-   .off( 'mouseenter', detectButton )
-   .off( 'mouseleave', detectLeaveButton )
-   .on( 'mouseenter', detectButton )
-   .on( 'mouseleave', detectLeaveButton );
 
ui.$nextButton.add( ui.$prevButton ).css( {
top: prevNextTop
diff --git a/tests/qunit/ext.multimediaViewer.lightboxinterface.test.js 
b/tests/qunit/ext.multimediaViewer.lightboxinterface.test.js
index 52e5a5e..f8eb5ab 100644
--- a/tests/qunit/ext.multimediaViewer.lightboxinterface.test.js
+++ b/tests/qunit/ext.multimediaViewer.lightboxinterface.test.js
@@ -22,7 +22,7 @@
 
QUnit.module( 'ext.multimediaViewer.lightboxInterface', 
QUnit.newMwEnvironment() );
 
-   QUnit.test( 'Sanity test, object creation and ui construction', 15, 
function ( assert ) {
+   QUnit.test( 'Sanity test, object creation and ui construction', 17, 
function ( assert ) {
var lightbox = new mw.LightboxInterface(),
$document = $( document ),
scrollTopBeforeOpeningLightbox,
@@ -79,6 +79,10 @@
// UI areas should now be attached to the document.
checkIfUIAreasAttachedToDocument(1);
 
+   // Check that the close button on the lightbox still follow the 
spec (being visible right away)
+   assert.strictEqual( $( '#qunit-fixture .mlb-close' ).length, 1, 
'There should be a close button' );
+   assert.strictEqual( $( '#qunit-fixture .mlb-close' 
).is(':visible'), true, 'The close button should be visible' );
+
// Unattach lightbox from document
lightbox.unattach();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1bf72d898220442992c5a30d90a9a683d00d110

[MediaWiki-commits] [Gerrit] Refactor converter test utils to run single cases - change (VisualEditor/VisualEditor)

2014-01-14 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Refactor converter test utils to run single cases
..

Refactor converter test utils to run single cases

This is so we can custom setup/teardowns per case, e.g. in
MWConverter tests.

Required by Id251afe65193f

Change-Id: I0090d1dfccc18348fba5f98e96dd6b82b8740537
---
M modules/ve/test/dm/ve.dm.Converter.test.js
M modules/ve/test/ve.test.utils.js
2 files changed, 56 insertions(+), 50 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/81/107381/1

diff --git a/modules/ve/test/dm/ve.dm.Converter.test.js 
b/modules/ve/test/dm/ve.dm.Converter.test.js
index f2c0f88..24cbb86 100644
--- a/modules/ve/test/dm/ve.dm.Converter.test.js
+++ b/modules/ve/test/dm/ve.dm.Converter.test.js
@@ -40,9 +40,21 @@
 } );
 
 QUnit.test( 'getModelFromDom', function ( assert ) {
-   ve.test.utils.runGetModelFromDomTests( assert, ve.copy( 
ve.dm.example.domToDataCases ) );
+   var msg, cases = ve.dm.example.domToDataCases;
+
+   QUnit.expect( ve.test.utils.countGetModelFromDomTests( cases ) );
+
+   for ( msg in cases ) {
+   ve.test.utils.runGetModelFromDomTest( assert, ve.copy( 
cases[msg] ) );
+   }
 } );
 
 QUnit.test( 'getDomFromModel', function ( assert ) {
-   ve.test.utils.runGetDomFromModelTests( assert, ve.copy( 
ve.dm.example.domToDataCases ) );
+   var msg, cases = ve.dm.example.domToDataCases;
+
+   QUnit.expect( 2 * Object.keys( cases ).length );
+
+   for ( msg in cases ) {
+   ve.test.utils.runGetDomFromModelTest( assert, ve.copy( 
cases[msg] ) );
+   }
 } );
diff --git a/modules/ve/test/ve.test.utils.js b/modules/ve/test/ve.test.utils.js
index 3a260ba..82a8349 100644
--- a/modules/ve/test/ve.test.utils.js
+++ b/modules/ve/test/ve.test.utils.js
@@ -52,9 +52,8 @@
surface.destroy();
 };
 
-ve.test.utils.runGetModelFromDomTests = function ( assert, cases ) {
-   var msg, model, i, length, hash, html, n = 0;
-
+ve.test.utils.countGetModelFromDomTests = function( cases ) {
+   var msg, n = 0;
for ( msg in cases ) {
if ( cases[msg].head !== undefined || cases[msg].body !== 
undefined ) {
n += 2;
@@ -63,60 +62,55 @@
}
}
}
-   QUnit.expect( n );
+   return n;
+};
 
-   for ( msg in cases ) {
-   if ( cases[msg].head !== undefined || cases[msg].body !== 
undefined ) {
-   html = 'head' + ( cases[msg].head || '' ) + 
'/headbody' + cases[msg].body + '/body';
-   model = ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( html ) );
-   ve.dm.example.preprocessAnnotations( cases[msg].data, 
model.getStore() );
-   assert.deepEqualWithDomElements( model.getFullData(), 
cases[msg].data, msg + ': data' );
-   assert.deepEqual( model.getInnerWhitespace(), 
cases[msg].innerWhitespace || new Array( 2 ), msg + ': inner whitespace' );
-   // check storeItems have been added to store
-   if ( cases[msg].storeItems ) {
-   for ( i = 0, length = 
cases[msg].storeItems.length; i  length; i++ ) {
-   hash = cases[msg].storeItems[i].hash || 
OO.getHash( cases[msg].storeItems[i].value );
-   assert.deepEqualWithDomElements(
-   model.getStore().value( 
model.getStore().indexOfHash( hash ) ) || {},
-   cases[msg].storeItems[i].value,
-   msg + ': store item ' + i + ' 
found'
-   );
-   }
+ve.test.utils.runGetModelFromDomTest = function ( assert, caseItem ) {
+   var msg, model, i, length, hash, html;
+
+   if ( caseItem.head !== undefined || caseItem.body !== undefined ) {
+   html = 'head' + ( caseItem.head || '' ) + '/headbody' + 
caseItem.body + '/body';
+   model = ve.dm.converter.getModelFromDom( 
ve.createDocumentFromHtml( html ) );
+   ve.dm.example.preprocessAnnotations( caseItem.data, 
model.getStore() );
+   assert.deepEqualWithDomElements( model.getFullData(), 
caseItem.data, msg + ': data' );
+   assert.deepEqual( model.getInnerWhitespace(), 
caseItem.innerWhitespace || new Array( 2 ), msg + ': inner whitespace' );
+   // check storeItems have been added to store
+   if ( caseItem.storeItems ) {
+   for ( i = 0, length = caseItem.storeItems.length; i  
length; i++ ) {
+   hash = caseItem.storeItems[i].hash || 
OO.getHash( 

[MediaWiki-commits] [Gerrit] Follow redirects. - change (mediawiki...bundler)

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

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


Change subject: Follow redirects.
..

Follow redirects.

Added new --no-follow CLI option to disable this, if desired.

Change-Id: I72ea48e3c7f8f8be31afdd2cab6e60479eda12cf
---
M bin/mw-ocg-bundler
M lib/index.js
M lib/parsoid.js
3 files changed, 57 insertions(+), 27 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler
 refs/changes/82/107382/1

diff --git a/bin/mw-ocg-bundler b/bin/mw-ocg-bundler
index de3ffb2..ffba6f9 100755
--- a/bin/mw-ocg-bundler
+++ b/bin/mw-ocg-bundler
@@ -34,6 +34,9 @@
// compatibility
.option('--no-compat',
'Omit redundant data used for backward-compatibility')
+   // follow redirects? disable if front-end is known to give good titles.
+   .option('--no-follow',
+   'Don\'t follow article title redirects')
.option('-v, --verbose',
'Print verbose progress information')
.option('-D, --debug',
@@ -88,7 +91,8 @@
output: program.directory || program.output,
verbose: !!program.verbose,
debug: !!program.debug,
-   compat: !!program.compat,
+   compat: !!program.compat, // pediapress compatibility
+   follow: !!program.follow, // follow redirects
parsoid: program.api,
toc: program.toc,
size: program.size
diff --git a/lib/index.js b/lib/index.js
index a8c8627..3aa6e7d 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,6 +20,8 @@
 // with the pediapress bundler (at the cost of poorer support for
 // interwiki collections)
 var IMAGEDB_COMPAT = false;
+// limit the total number of redirects we are willing to follow
+var MAX_REDIRECTS = 5;
 
 module.exports = {
version: require('../package.json').version
@@ -90,6 +92,7 @@
var parsoidDb = new Db(path.join(options.output, parsoid.db));
var htmlDb = options.compat ?
new Db(path.join(options.output, html.db)) : null;
+   var max_redirects = options.follow ? MAX_REDIRECTS : 0;
 
var tasks = [];
// a promise to parse a single item (from parsoid  php)
@@ -98,29 +101,30 @@
// note that item revision is not a unique key in a 
multiwiki
// collection. so we prefix it by the wiki index in 
that case.
var key = item.wiki ? (item.wiki+'|') : '';
-   return parsoid.fetch(item.wiki, item.title, 
item.revision, status)
-   .then(function(result) {
-   var revid = result.getRevisionId();
-   if (!revid) { throw new Error(No 
revision ID); }
-   item.revision = '' + revid;
-   sourceMap.set(revid, result);
-   
result.getImages().forEach(function(img) {
-   // xxx this stores metadata for 
all images in memory.
-   // for very large bundles, 
store in temp db?
-   imageMap.set(img.resource, img);
-   });
-   key += item.revision;
-   return parsoidDb.put(key, result.text);
-   }).then(function() {
-   return options.compat ? 
html.fetch(item.wiki, item.title, item.revision, status) : null;
-   }).then(function(result) {
-   return options.compat ? htmlDb.put(key, 
result) : null;
-   }).then(function() {
-   status.report(null, util.format(
-   '%s:%s [complete]',
-   
metabook.wikis[item.wiki].prefix, item.title
-   ));
+   return parsoid.fetch(
+   item.wiki, item.title, item.revision, 
max_redirects, status
+   ).then(function(result) {
+   var revid = result.getRevisionId();
+   if (!revid) { throw new Error(No revision 
ID); }
+   item.revision = '' + revid;
+   sourceMap.set(revid, result);
+   result.getImages().forEach(function(img) {
+   // xxx this stores metadata for all 
images in memory.
+   

[MediaWiki-commits] [Gerrit] Handle invalid keys in Lua-to-PHP calls for LuaStandalone - change (mediawiki...Scribunto)

2014-01-14 Thread Anomie (Code Review)
Anomie has uploaded a new change for review.

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


Change subject: Handle invalid keys in Lua-to-PHP calls for LuaStandalone
..

Handle invalid keys in Lua-to-PHP calls for LuaStandalone

PHP can't handle having arrays/objects or functions as keys in its
arrays, so make sure we don't try to pass them from Lua. Booleans aren't
really well-handled either, so let's disallow them too.

Also, add tests for proper stringification of floats and infinities when
those are used as keys.

Note this behavior change is needed to match the change in LuaSandbox
for fixing bug 54527, but isn't itself a security issue.

Change-Id: I1e2951bbe8cb78358650ad377bf7119fcac4485d
---
M engines/LuaStandalone/MWServer.lua
M tests/engines/LuaStandalone/StandaloneTest.php
M tests/engines/LuaStandalone/StandaloneTests.lua
3 files changed, 40 insertions(+), 5 deletions(-)


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

diff --git a/engines/LuaStandalone/MWServer.lua 
b/engines/LuaStandalone/MWServer.lua
index adb95a8..d5d77ea 100644
--- a/engines/LuaStandalone/MWServer.lua
+++ b/engines/LuaStandalone/MWServer.lua
@@ -439,14 +439,17 @@
end
done[var] = true
local buf = { '' }
-   local tmpString
local numElements = 0
for key, value in pairs(var) do
-   if (isInteger(key)) then
-   buf[#buf + 1] = 'i:' .. key .. ';'
+   local t = type( key )
+   if t == 'number' or t == 'string' then
+   if (isInteger(key)) then
+   buf[#buf + 1] = 'i:' .. key .. 
';'
+   else
+   buf[#buf + 1] = 
recursiveEncode( tostring( key ), level + 1 )
+   end
else
-   tmpString = tostring( key )
-   buf[#buf + 1] = recursiveEncode( 
tostring( key ), level + 1 )
+   error(Cannot use  .. type( key ) ..  
as an array key when passing data from Lua to PHP);
end
buf[#buf + 1] = recursiveEncode( value, level + 
1 )
numElements = numElements + 1
diff --git a/tests/engines/LuaStandalone/StandaloneTest.php 
b/tests/engines/LuaStandalone/StandaloneTest.php
index 6e0f114..d9e52af 100644
--- a/tests/engines/LuaStandalone/StandaloneTest.php
+++ b/tests/engines/LuaStandalone/StandaloneTest.php
@@ -7,6 +7,18 @@
return self::makeSuite( $className, 'LuaStandalone' );
}
 
+   public function setUp() {
+   parent::setUp();
+
+   $interpreter = $this-getEngine()-getInterpreter();
+   $func = $interpreter-wrapPhpFunction( function ( $v ) {
+   return array( preg_replace( '/\s+/', ' ', trim( 
var_export( $v, 1 ) ) ) );
+   } );
+   $interpreter-callFunction(
+   $interpreter-loadString( 'mw.var_export = ...', 
'fortest' ), $func
+   );
+   }
+
function getTestModules() {
return parent::getTestModules() + array(
'StandaloneTests' = __DIR__ . '/StandaloneTests.lua',
diff --git a/tests/engines/LuaStandalone/StandaloneTests.lua 
b/tests/engines/LuaStandalone/StandaloneTests.lua
index 716a7f7..27cc019 100644
--- a/tests/engines/LuaStandalone/StandaloneTests.lua
+++ b/tests/engines/LuaStandalone/StandaloneTests.lua
@@ -25,4 +25,24 @@
{ name = 'getfenv on a C function', func = getfenv1,
  expect = { nil },
},
+   { name = 'Invalid array key (table)', func = mw.var_export,
+ args = { { [{}] = 1 } },
+ expect = 'Cannot use table as an array key when passing data from Lua 
to PHP',
+   },
+   { name = 'Invalid array key (boolean)', func = mw.var_export,
+ args = { { [true] = 1 } },
+ expect = 'Cannot use boolean as an array key when passing data from 
Lua to PHP',
+   },
+   { name = 'Invalid array key (function)', func = mw.var_export,
+ args = { { [tostring] = 1 } },
+ expect = 'Cannot use function as an array key when passing data from 
Lua to PHP',
+   },
+   { name = 'Unusual array key (float)', func = mw.var_export,
+ args = { { [1.5] = 1 } },
+ expect = { array ( '1.5' = 1, ) }
+   },
+   { name = 'Unusual array key (inf)', func = mw.var_export,
+ args = { { [math.huge] = 1 } },
+ expect = { array ( 'inf' = 1, ) }
+   },
 

[MediaWiki-commits] [Gerrit] Return timestamp from index rather than database - change (mediawiki...CirrusSearch)

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

Change subject: Return timestamp from index rather than database
..


Return timestamp from index rather than database

This gives us a really quick way to the last revision that made it into
Cirrus.

Fun fact: the only reason we now load the latest revision of all results
is to check if there is one in the \SearchResult-isMissingRevision.  I
wonder if we can improve page load times by skipping even that somehow

Bug: 60004

Change-Id: I2c8917167ce4e49ba820661eedcc610d636ce67d
---
M includes/Result.php
M includes/ResultsType.php
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/includes/Result.php b/includes/Result.php
index f7ebbd6..5dca44b 100644
--- a/includes/Result.php
+++ b/includes/Result.php
@@ -1,6 +1,7 @@
 ?php
 
 namespace CirrusSearch;
+use \MWTimestamp;
 use \SearchResult;
 use \Title;
 
@@ -39,6 +40,7 @@
private $wordCount;
private $byteSize;
private $score;
+   private $timestamp;
 
/**
 * Build the result.
@@ -54,6 +56,7 @@
// TODO remove ternary once text.word_count is available 
everywhere
$this-wordCount = isset( $data['text.word_count'] ) ? 
$data['text.word_count'] : $result-text_words;
$this-byteSize = $result-text_bytes;
+   $this-timestamp = new MWTimestamp( $result-timestamp );
$highlights = $result-getHighlights();
// TODO remove when Elasticsearch issue 3757 is fixed
$highlights = $this-swapInPlainHighlighting( $highlights, 
'redirect.title' );
@@ -211,4 +214,8 @@
public function getScore() {
return $this-score;
}
+
+   public function getTimestamp() {
+   return $this-timestamp-getTimestamp( TS_MW );
+   }
 }
\ No newline at end of file
diff --git a/includes/ResultsType.php b/includes/ResultsType.php
index 392b45a..76bfe3c 100644
--- a/includes/ResultsType.php
+++ b/includes/ResultsType.php
@@ -60,7 +60,8 @@
 class FullTextResultsType implements ResultsType {
public function getFields() {
// TODO remove text_words once text.word_count is available 
everywhere
-   return array( 'id', 'title', 'namespace', 'redirect', 
'text_bytes', 'text.word_count', 'text_words' );
+   return array( 'id', 'title', 'namespace', 'redirect', 
'timestamp',
+   'text_bytes', 'text.word_count', 'text_words' );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2c8917167ce4e49ba820661eedcc610d636ce67d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Clicking on the chevron should open/close the details - change (mediawiki...MultimediaViewer)

2014-01-14 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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


Change subject: Clicking on the chevron should open/close the details
..

Clicking on the chevron should open/close the details

Change-Id: Ica8c5ae8c8f34374e946246878f3c8609d263a12
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/80
---
M resources/ext.multimediaViewer/ext.multimediaViewer.css
M resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
2 files changed, 7 insertions(+), 11 deletions(-)


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

diff --git a/resources/ext.multimediaViewer/ext.multimediaViewer.css 
b/resources/ext.multimediaViewer/ext.multimediaViewer.css
index b1e3eb4..5c95554 100644
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.css
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.css
@@ -335,7 +335,7 @@
 .mw-mlb-drag-affordance {
width: 100%;
height: 18px;
-   cursor: move;
+   cursor: pointer;
 }
 
 .mw-mlb-drag-icon {
diff --git 
a/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js 
b/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
index 7e6cd6b..302b5c3 100644
--- a/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
+++ b/resources/ext.multimediaViewer/ext.multimediaViewer.lightboxinterface.js
@@ -489,17 +489,13 @@
};
 
LIP.toggleMetadata = function () {
-   var off = this.$controlBar.offset(),
-   scroll = this.$main.scrollTop();
-   if ( scroll  0 ) {
-   this.$main.animate( {
-   scrollTop: 0
+   var $html = $( 'html' ),
+   scrollTopWhenOpen = $( '.mlb-post-image' ).height() - 
$( '.mlb-controls' ).height(),
+   scrollTopTarget = $html.scrollTop()  0 ? 0 : 
scrollTopWhenOpen;
+
+   $html.animate( {
+   scrollTop: scrollTopTarget
}, 400 );
-   } else {
-   this.$main.animate( {
-   scrollTop: off.top - 82
-   }, 400 );
-   }
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica8c5ae8c8f34374e946246878f3c8609d263a12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improve accent position for Vietnamese. - change (mediawiki...latex_renderer)

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

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


Change subject: Improve accent position for Vietnamese.
..

Improve accent position for Vietnamese.

See example 42 in the fontspec documentation.

Change-Id: I65d3cfeb14d083b2504a7fc844b6392e100750e4
---
M lib/index.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/85/107385/1

diff --git a/lib/index.js b/lib/index.js
index b967a4d..cf5a845 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -41,6 +41,8 @@
 
 // fonts for specific languages
 var LANGUAGE_FONTS = {
+   // this is just to tweak the accent position
+   'vietnamese': { name: 'Linux Libertine O', opts: 'Language=Vietnamese' 
},
// from fonts-nafees
'urdu': { name: 'Nafees', opts: FAKESTYLES },
// from fonts-arphic-uming, fonts-arphic-ukai, fonts-droid

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65d3cfeb14d083b2504a7fc844b6392e100750e4
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update multiwiki test case to include korean text. - change (mediawiki...latex_renderer)

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

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


Change subject: Update multiwiki test case to include korean text.
..

Update multiwiki test case to include korean text.

The original pull didn't follow redirects, so the korean article was empty.

Change-Id: I35bf7a9f7b1b995694e4e603a7270e85c93be165
---
M samples/multiwiki.zip
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/86/107386/1

diff --git a/samples/multiwiki.zip b/samples/multiwiki.zip
index c79e990..e73c1a6 100644
--- a/samples/multiwiki.zip
+++ b/samples/multiwiki.zip
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35bf7a9f7b1b995694e4e603a7270e85c93be165
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adding parameters to set root database (mysql) user and pass - change (operations...cdh4)

2014-01-14 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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


Change subject: Adding parameters to set root database (mysql) user and pass
..

Adding parameters to set root database (mysql) user and pass

This allows for metastore classes with non-default root username and passwords
to still automatically create the metastore database and hive user

Change-Id: I5015ce6c85da65a028a54581e938b645c5b39200
---
M manifests/hive.pp
M manifests/hive/defaults.pp
M manifests/hive/metastore/mysql.pp
M templates/hive/hive-site.xml.erb
4 files changed, 30 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cdh4 
refs/changes/87/107387/1

diff --git a/manifests/hive.pp b/manifests/hive.pp
index 71a0554..c3739f8 100644
--- a/manifests/hive.pp
+++ b/manifests/hive.pp
@@ -20,6 +20,11 @@
 #  Default: 
org.apache.derby.jdbc.EmbeddedDriver
 # $jdbc_protocol - Metastore JDBC protocol.  Default: mysql
 #
+# $db_root_username  - username for metastore database creation 
commands. Default: undef
+# $db_root_password  - password for metastore database creation 
commands.
+#  Only set these if your root user cannot 
issue database
+#  commands without a different username and 
password.
+#  Default: undef
 # $exec_parallel_thread_number   - Number of jobs at most can be executed in 
parallel.
 #  Set this to 0 to disable parallel execution.
 # $optimize_skewjoin - Enable or disable skew join optimization.
@@ -52,6 +57,9 @@
 $jdbc_driver = $cdh4::hive::defaults::jdbc_driver,
 $jdbc_protocol   = $cdh4::hive::defaults::jdbc_protocol,
 
+$db_root_username= $cdh4::hive::defaults::db_root_username,
+$db_root_password= $cdh4::hive::defaults::db_root_password,
+
 $exec_parallel_thread_number = 
$cdh4::hive::defaults::exec_parallel_thread_number,
 $optimize_skewjoin   = $cdh4::hive::defaults::optimize_skewjoin,
 $skewjoin_key= $cdh4::hive::defaults::skewjoin_key,
diff --git a/manifests/hive/defaults.pp b/manifests/hive/defaults.pp
index a9de251..c7ef13e 100644
--- a/manifests/hive/defaults.pp
+++ b/manifests/hive/defaults.pp
@@ -12,6 +12,9 @@
 $jdbc_username   = 'hive'
 $jdbc_password   = 'hive'
 
+$db_root_username= undef
+$db_root_password= undef
+
 $exec_parallel_thread_number = 8  # set this to 0 to disable 
hive.exec.parallel
 $optimize_skewjoin   = false
 $skewjoin_key= 1
diff --git a/manifests/hive/metastore/mysql.pp 
b/manifests/hive/metastore/mysql.pp
index 2ce0e69..0e379cc 100644
--- a/manifests/hive/metastore/mysql.pp
+++ b/manifests/hive/metastore/mysql.pp
@@ -36,22 +36,33 @@
 $db_user = $cdh4::hive::jdbc_username
 $db_pass = $cdh4::hive::jdbc_password
 
+# Only use -u or -p flag to mysql commands if
+# root username or root password are set.
+$username_option = $cdh4::hive::db_root_username ? {
+undef   = '',
+default = -u'${cdh4::hive::db_root_username}',
+}
+$password_option = $cdh4::hive::db_root_password ? {
+undef   = '',
+default = -p'${cdh4::hive::db_root_password}',
+}
+
 # hive is going to need an hive database and user.
 exec { 'hive_mysql_create_database':
-command = /usr/bin/mysql -e \
+command = /usr/bin/mysql ${username_option} ${password_option} -e \
 CREATE DATABASE ${db_name}; USE ${db_name};
 SOURCE 
/usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-${schema_version}.mysql.sql;\,
-unless  = /usr/bin/mysql -e 'SHOW DATABASES' | /bin/grep -q 
${db_name},
+unless  = /usr/bin/mysql ${username_option} ${password_option} -e 
'SHOW DATABASES' | /bin/grep -q ${db_name},
 user= 'root',
 }
 exec { 'hive_mysql_create_user':
-command = /usr/bin/mysql -e \
+command = /usr/bin/mysql ${username_option} ${password_option}  -e \
 CREATE USER '${db_user}'@'localhost' IDENTIFIED BY '${db_pass}';
 CREATE USER '${db_user}'@'127.0.0.1' IDENTIFIED BY '${db_pass}';
 GRANT ALL PRIVILEGES ON ${db_name}.* TO '${db_user}'@'localhost' WITH GRANT 
OPTION;
 GRANT ALL PRIVILEGES ON ${db_name}.* TO '${db_user}'@'127.0.0.1' WITH GRANT 
OPTION;
 FLUSH PRIVILEGES;\,
-unless  = /usr/bin/mysql -e \SHOW GRANTS FOR 
'${db_user}'@'127.0.0.1'\ | grep -q \TO '${db_user}'\,
+unless  = /usr/bin/mysql ${username_option} ${password_option} -e 
\SHOW GRANTS FOR '${db_user}'@'127.0.0.1'\ | grep -q \TO '${db_user}'\,
 user= 'root',
 }
 }
\ No newline at end of file
diff --git a/templates/hive/hive-site.xml.erb 

[MediaWiki-commits] [Gerrit] Move user page deletion code to the special page - change (mediawiki...Translate)

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

Change subject: Move user page deletion code to the special page
..


Move user page deletion code to the special page

It is only used for tests, so it should be near the testing functions.

Change-Id: I72d6325fe11683b64916ff527fc8738961a28a0a
---
M specials/SpecialManageTranslatorSandbox.php
M utils/TranslateSandbox.php
2 files changed, 26 insertions(+), 11 deletions(-)

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



diff --git a/specials/SpecialManageTranslatorSandbox.php 
b/specials/SpecialManageTranslatorSandbox.php
index 931025d..bf28e4d 100644
--- a/specials/SpecialManageTranslatorSandbox.php
+++ b/specials/SpecialManageTranslatorSandbox.php
@@ -38,6 +38,27 @@
}
 
/**
+* Deletes a user page if it exists.
+* This is needed especially when deleting sandbox users
+* that were created as part of the integration tests.
+* @param User $user
+*/
+   protected function deleteUserPage( $user ) {
+   $userpage = WikiPage::factory( $user-getUserPage() );
+   if ( $userpage-exists() ) {
+   $dummyError = '';
+   $userpage-doDeleteArticleReal(
+   wfMessage( 'tsb-delete-userpage-summary' 
)-inContentLanguage()-text(),
+   false,
+   0,
+   true,
+   $dummyError,
+   $this-getUser()
+   );
+   }
+   }
+
+   /**
 * Add users to the sandbox or delete them to facilitate browsers tests.
 * Use with caution!
 */
@@ -66,6 +87,7 @@
 
// Get rid of users, even if promoted 
during tests
$userToDelete = User::newFromName( 
$name, false );
+   $this-deleteUserPage( $userToDelete );
TranslateSandbox::deleteUser( 
$userToDelete, 'force' );
 
$user = TranslateSandbox::addUser( 
$name, $n...@blackhole.io, 'porkkana' );
@@ -101,7 +123,10 @@
}
 
// Another account for testing a translator to multiple 
languages
-   TranslateSandbox::deleteUser( User::newFromName( 
'Kissa', false ), 'force' );
+   $oldPolyglotUser = User::newFromName( 'Kissa', false );
+   $this-deleteUserPage( $oldPolyglotUser );
+   TranslateSandbox::deleteUser( $oldPolyglotUser, 'force' 
);
+
$polyglotUser = TranslateSandbox::addUser( 'Kissa', 
'ki...@blackhole.io', 'porkkana' );
$polyglotUser-setOption(
'translate-sandbox',
diff --git a/utils/TranslateSandbox.php b/utils/TranslateSandbox.php
index 3663bc7..e598561 100644
--- a/utils/TranslateSandbox.php
+++ b/utils/TranslateSandbox.php
@@ -55,16 +55,6 @@
throw new MWException( Not a sandboxed user );
}
 
-   // Delete the user page.
-   // This is needed especially when deleting sandbox users
-   // that were created as part of the integration tests.
-   $userpage = WikiPage::factory( $user-getUserPage() );
-   if ( $userpage-exists() ) {
-   $userpage-doDeleteArticleReal(
-   wfMessage( 'tsb-delete-userpage-summary' 
)-inContentLanguage()-text()
-   );
-   }
-
// Delete from database
$dbw = wfGetDB( DB_MASTER );
$dbw-delete( 'user', array( 'user_id' = $uid ), __METHOD__ );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72d6325fe11683b64916ff527fc8738961a28a0a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
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 redirects. - change (mediawiki...bundler)

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

Change subject: Follow redirects.
..


Follow redirects.

Added new --no-follow CLI option to disable this, if desired.

Change-Id: I72ea48e3c7f8f8be31afdd2cab6e60479eda12cf
---
M bin/mw-ocg-bundler
M lib/index.js
M lib/parsoid.js
3 files changed, 57 insertions(+), 27 deletions(-)

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



diff --git a/bin/mw-ocg-bundler b/bin/mw-ocg-bundler
index de3ffb2..ffba6f9 100755
--- a/bin/mw-ocg-bundler
+++ b/bin/mw-ocg-bundler
@@ -34,6 +34,9 @@
// compatibility
.option('--no-compat',
'Omit redundant data used for backward-compatibility')
+   // follow redirects? disable if front-end is known to give good titles.
+   .option('--no-follow',
+   'Don\'t follow article title redirects')
.option('-v, --verbose',
'Print verbose progress information')
.option('-D, --debug',
@@ -88,7 +91,8 @@
output: program.directory || program.output,
verbose: !!program.verbose,
debug: !!program.debug,
-   compat: !!program.compat,
+   compat: !!program.compat, // pediapress compatibility
+   follow: !!program.follow, // follow redirects
parsoid: program.api,
toc: program.toc,
size: program.size
diff --git a/lib/index.js b/lib/index.js
index a8c8627..3aa6e7d 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,6 +20,8 @@
 // with the pediapress bundler (at the cost of poorer support for
 // interwiki collections)
 var IMAGEDB_COMPAT = false;
+// limit the total number of redirects we are willing to follow
+var MAX_REDIRECTS = 5;
 
 module.exports = {
version: require('../package.json').version
@@ -90,6 +92,7 @@
var parsoidDb = new Db(path.join(options.output, parsoid.db));
var htmlDb = options.compat ?
new Db(path.join(options.output, html.db)) : null;
+   var max_redirects = options.follow ? MAX_REDIRECTS : 0;
 
var tasks = [];
// a promise to parse a single item (from parsoid  php)
@@ -98,29 +101,30 @@
// note that item revision is not a unique key in a 
multiwiki
// collection. so we prefix it by the wiki index in 
that case.
var key = item.wiki ? (item.wiki+'|') : '';
-   return parsoid.fetch(item.wiki, item.title, 
item.revision, status)
-   .then(function(result) {
-   var revid = result.getRevisionId();
-   if (!revid) { throw new Error(No 
revision ID); }
-   item.revision = '' + revid;
-   sourceMap.set(revid, result);
-   
result.getImages().forEach(function(img) {
-   // xxx this stores metadata for 
all images in memory.
-   // for very large bundles, 
store in temp db?
-   imageMap.set(img.resource, img);
-   });
-   key += item.revision;
-   return parsoidDb.put(key, result.text);
-   }).then(function() {
-   return options.compat ? 
html.fetch(item.wiki, item.title, item.revision, status) : null;
-   }).then(function(result) {
-   return options.compat ? htmlDb.put(key, 
result) : null;
-   }).then(function() {
-   status.report(null, util.format(
-   '%s:%s [complete]',
-   
metabook.wikis[item.wiki].prefix, item.title
-   ));
+   return parsoid.fetch(
+   item.wiki, item.title, item.revision, 
max_redirects, status
+   ).then(function(result) {
+   var revid = result.getRevisionId();
+   if (!revid) { throw new Error(No revision 
ID); }
+   item.revision = '' + revid;
+   sourceMap.set(revid, result);
+   result.getImages().forEach(function(img) {
+   // xxx this stores metadata for all 
images in memory.
+   // for very large bundles, store in 
temp db?
+

[MediaWiki-commits] [Gerrit] Adding parameters to set root database (mysql) user and pass - change (operations...cdh4)

2014-01-14 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Adding parameters to set root database (mysql) user and pass
..


Adding parameters to set root database (mysql) user and pass

This allows for metastore classes with non-default root username and passwords
to still automatically create the metastore database and hive user

Change-Id: I5015ce6c85da65a028a54581e938b645c5b39200
---
M manifests/hive.pp
M manifests/hive/defaults.pp
M manifests/hive/metastore/mysql.pp
M templates/hive/hive-site.xml.erb
4 files changed, 30 insertions(+), 8 deletions(-)

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



diff --git a/manifests/hive.pp b/manifests/hive.pp
index 71a0554..c3739f8 100644
--- a/manifests/hive.pp
+++ b/manifests/hive.pp
@@ -20,6 +20,11 @@
 #  Default: 
org.apache.derby.jdbc.EmbeddedDriver
 # $jdbc_protocol - Metastore JDBC protocol.  Default: mysql
 #
+# $db_root_username  - username for metastore database creation 
commands. Default: undef
+# $db_root_password  - password for metastore database creation 
commands.
+#  Only set these if your root user cannot 
issue database
+#  commands without a different username and 
password.
+#  Default: undef
 # $exec_parallel_thread_number   - Number of jobs at most can be executed in 
parallel.
 #  Set this to 0 to disable parallel execution.
 # $optimize_skewjoin - Enable or disable skew join optimization.
@@ -52,6 +57,9 @@
 $jdbc_driver = $cdh4::hive::defaults::jdbc_driver,
 $jdbc_protocol   = $cdh4::hive::defaults::jdbc_protocol,
 
+$db_root_username= $cdh4::hive::defaults::db_root_username,
+$db_root_password= $cdh4::hive::defaults::db_root_password,
+
 $exec_parallel_thread_number = 
$cdh4::hive::defaults::exec_parallel_thread_number,
 $optimize_skewjoin   = $cdh4::hive::defaults::optimize_skewjoin,
 $skewjoin_key= $cdh4::hive::defaults::skewjoin_key,
diff --git a/manifests/hive/defaults.pp b/manifests/hive/defaults.pp
index a9de251..c7ef13e 100644
--- a/manifests/hive/defaults.pp
+++ b/manifests/hive/defaults.pp
@@ -12,6 +12,9 @@
 $jdbc_username   = 'hive'
 $jdbc_password   = 'hive'
 
+$db_root_username= undef
+$db_root_password= undef
+
 $exec_parallel_thread_number = 8  # set this to 0 to disable 
hive.exec.parallel
 $optimize_skewjoin   = false
 $skewjoin_key= 1
diff --git a/manifests/hive/metastore/mysql.pp 
b/manifests/hive/metastore/mysql.pp
index 2ce0e69..0e379cc 100644
--- a/manifests/hive/metastore/mysql.pp
+++ b/manifests/hive/metastore/mysql.pp
@@ -36,22 +36,33 @@
 $db_user = $cdh4::hive::jdbc_username
 $db_pass = $cdh4::hive::jdbc_password
 
+# Only use -u or -p flag to mysql commands if
+# root username or root password are set.
+$username_option = $cdh4::hive::db_root_username ? {
+undef   = '',
+default = -u'${cdh4::hive::db_root_username}',
+}
+$password_option = $cdh4::hive::db_root_password ? {
+undef   = '',
+default = -p'${cdh4::hive::db_root_password}',
+}
+
 # hive is going to need an hive database and user.
 exec { 'hive_mysql_create_database':
-command = /usr/bin/mysql -e \
+command = /usr/bin/mysql ${username_option} ${password_option} -e \
 CREATE DATABASE ${db_name}; USE ${db_name};
 SOURCE 
/usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-${schema_version}.mysql.sql;\,
-unless  = /usr/bin/mysql -e 'SHOW DATABASES' | /bin/grep -q 
${db_name},
+unless  = /usr/bin/mysql ${username_option} ${password_option} -e 
'SHOW DATABASES' | /bin/grep -q ${db_name},
 user= 'root',
 }
 exec { 'hive_mysql_create_user':
-command = /usr/bin/mysql -e \
+command = /usr/bin/mysql ${username_option} ${password_option}  -e \
 CREATE USER '${db_user}'@'localhost' IDENTIFIED BY '${db_pass}';
 CREATE USER '${db_user}'@'127.0.0.1' IDENTIFIED BY '${db_pass}';
 GRANT ALL PRIVILEGES ON ${db_name}.* TO '${db_user}'@'localhost' WITH GRANT 
OPTION;
 GRANT ALL PRIVILEGES ON ${db_name}.* TO '${db_user}'@'127.0.0.1' WITH GRANT 
OPTION;
 FLUSH PRIVILEGES;\,
-unless  = /usr/bin/mysql -e \SHOW GRANTS FOR 
'${db_user}'@'127.0.0.1'\ | grep -q \TO '${db_user}'\,
+unless  = /usr/bin/mysql ${username_option} ${password_option} -e 
\SHOW GRANTS FOR '${db_user}'@'127.0.0.1'\ | grep -q \TO '${db_user}'\,
 user= 'root',
 }
 }
\ No newline at end of file
diff --git a/templates/hive/hive-site.xml.erb b/templates/hive/hive-site.xml.erb
index ac797e1..8cc5be8 100644

[MediaWiki-commits] [Gerrit] Adding Czech Wikipedia to Wikipedia library in Wikidata sources - change (pywikibot/compat)

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

Change subject: Adding Czech Wikipedia to Wikipedia library in Wikidata sources
..


Adding Czech Wikipedia to Wikipedia library in Wikidata sources

Change-Id: I6e3ed96a3cbe1cc65e3b9b2ff9f9d814150e82ec
---
M harvest_template.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/harvest_template.py b/harvest_template.py
index ebbf5eb..8cb29d4 100644
--- a/harvest_template.py
+++ b/harvest_template.py
@@ -67,6 +67,7 @@
 'be':  'Q877583',
 'uk':  'Q199698',
 'tr':  'Q58255',
+'cs':  'Q191168',
 }  # TODO: Should be moved to a central wikidata library
 
 if lang in source_values:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e3ed96a3cbe1cc65e3b9b2ff9f9d814150e82ec
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Escape more bad syntax - change (mediawiki...CirrusSearch)

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

Change subject: Escape more bad syntax
..


Escape more bad syntax

Change-Id: I85002767e52558d1021f2c96e5c9e8414a61aed5
---
M includes/Searcher.php
M tests/browser/features/full_text.feature
2 files changed, 35 insertions(+), 9 deletions(-)

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



diff --git a/includes/Searcher.php b/includes/Searcher.php
index 9311410..4dd90a6 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -847,15 +847,22 @@
 */
public static function fixupWholeQueryString( $string ) {
wfProfileIn( __METHOD__ );
+   // Be careful when editing this method because the ordering of 
the replacements matters.
+
+
+   // Escape ~ that don't follow a term or a quote and isn't 
already escaped
+   $string = preg_replace_callback( '/(?![\w])~/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+
// Turn bad fuzzy searches into searches that contain a ~
-   $string = preg_replace_callback( 
'/(?leading[^\s])~(?trailing\S+)/', function ( $matches ) {
+   $string = preg_replace_callback( 
'/(?leading\w)~(?trailing\S+)/', function ( $matches ) {
if ( preg_match( 
'/^(?:0|(?:0?\.[0-9]+)|(?:1(?:\.0)?))$/', $matches[ 'trailing' ] ) ) {
-   wfDebugLog( 'CirrusSearch', Found fuzzy:   . 
$matches[ 'trailing' ] );
return $matches[ 0 ];
} else {
return $matches[ 'leading' ] . '\\~' . 
preg_replace( '/~/', '\~', $matches[ 'trailing' ] );
}
}, $string );
+
// Turn bad proximity searches into searches that contain a ~
$string = preg_replace_callback( '/~(?trailing\S*)/', 
function ( $matches ) {
if ( preg_match( '/[0-9]+/', $matches[ 'trailing' ] ) ) 
{
@@ -864,18 +871,29 @@
return '\\~' . $matches[ 'trailing' ];
}
}, $string );
+
// Escape +, -, and ! when not followed immediately by a term.
-   $string = preg_replace_callback( 
'/([\\+\\-\\!]+)([\\+\\-\\!\\~\s]|$)/', 
'CirrusSearch\Searcher::escapeBadSyntax', $string );
+   $string = preg_replace_callback( '/[+\-!]+(?!\w)/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+
+   // Escape || when not between terms
+   $string = preg_replace_callback( '/^\s*\|\|/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+   $string = preg_replace_callback( '/\|\|\s*$/',
+   'CirrusSearch\Searcher::escapeBadSyntax', $string );
+
// Lowercase AND and OR when not surrounded on both sides by a 
term.
// Lowercase NOT when it doesn't have a term after it.
-   $string = preg_replace_callback( '/(?:AND|OR|NOT)\s*$/', 
'CirrusSearch\Searcher::lowercaseMatched', $string );
-   $string = preg_replace_callback( '/^\s*(?:AND|OR)/', 
'CirrusSearch\Searcher::lowercaseMatched', $string );
+   $string = preg_replace_callback( '/^\s*(?:AND|OR)/',
+   'CirrusSearch\Searcher::lowercaseMatched', $string );
+   $string = preg_replace_callback( '/(?:AND|OR|NOT)\s*$/',
+   'CirrusSearch\Searcher::lowercaseMatched', $string );
wfProfileOut( __METHOD__ );
return $string;
}
 
private static function escapeBadSyntax( $matches ) {
-   return \\ . implode( \\, str_split( $matches[ 1 ] ) ) . 
$matches[ 2 ];
+   return \\ . implode( \\, str_split( $matches[ 0 ] ) );
}
 
private static function lowercaseMatched( $matches ) {
diff --git a/tests/browser/features/full_text.feature 
b/tests/browser/features/full_text.feature
index d6b92b9..eb5d01e 100644
--- a/tests/browser/features/full_text.feature
+++ b/tests/browser/features/full_text.feature
@@ -344,9 +344,9 @@
 Then Catapult is in the search results
 And Two Words is in the search results
   Examples:
-  |  query  |
-  | catapult OR África  |
-  | África \|\| catapult|
+  |  query |
+  | catapult OR África |
+  | África \|\| catapult   |
   | catapult OR África   |
   | catapult \|\| África |
   | África OR catapult   |
@@ -383,6 +383,14 @@
   | ++catapultcatapult |
   | :~!$$=!~\!{} catapult |
   | catapult -_~^_~^_^^|
+  | catapult \|\|  |
+  | catapult ~/|
+  | \|\| catapult  |
+  | ~/ catapult|
+  | AND catapult   |
+  | --- AND catapult   |
+  | catapult \|\|---   |
+  | catapult 

[MediaWiki-commits] [Gerrit] code improvements using pyflakes - change (pywikibot/compat)

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

Change subject: code improvements using pyflakes
..


code improvements using pyflakes

Removing unused variables and several other stuffs

Change-Id: Id64b3172f25b8376e202a9bcf62d5ce4fcc8bb7e
---
M unusedfiles.py
M weblinkchecker.py
M welcome.py
3 files changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/unusedfiles.py b/unusedfiles.py
index 16b8c35..a502678 100644
--- a/unusedfiles.py
+++ b/unusedfiles.py
@@ -22,7 +22,7 @@
 
 import wikipedia as pywikibot
 import pagegenerators
-import sys
+import re
 
 comment = {
 'ar': u'صور للاستبعاد',
@@ -83,8 +83,6 @@
 for arg in pywikibot.handleArgs():
 if arg == '-always':
 always = True
-if arg == '-start':
-start = True
 
 mysite = pywikibot.getSite()
 # If anything needs to be prepared, you can do it here
@@ -100,7 +98,7 @@
 pywikibot.output(u\n\n \03{lightpurple}%s\03{default} 
  % page.title())
 if except_text_translated not in page.getImagePageHtml() and \
-   'http://' not in page.get():
+not re.search(https?\:\/\/, page.get()):
 pywikibot.output(u'\n' + page.title())
 if template_image in page.get():
 pywikibot.output(u%s done already
diff --git a/weblinkchecker.py b/weblinkchecker.py
index 1eaa96b..2cd1e11 100644
--- a/weblinkchecker.py
+++ b/weblinkchecker.py
@@ -94,7 +94,6 @@
 #
 __version__ = '$Id$'
 
-import sys
 import re
 import codecs
 import pickle
@@ -254,7 +253,7 @@
 conn.request('HEAD', '/', None, self.header)
 self.response = conn.getresponse()
 
-self.readEncodingFromResponse(response)
+self.readEncodingFromResponse(self.response)
 except:
 pass
 if not self.serverEncoding:
diff --git a/welcome.py b/welcome.py
index c54ce8d..9c76207 100644
--- a/welcome.py
+++ b/welcome.py
@@ -192,7 +192,6 @@
 import pywikibot
 from pywikibot import i18n
 import config
-import query
 import userlib
 
 locale.setlocale(locale.LC_ALL, '')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id64b3172f25b8376e202a9bcf62d5ce4fcc8bb7e
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Mpaa mpaa.w...@gmail.com
Gerrit-Reviewer: Xqt i...@gno.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove log10 from boost in prefix search - change (mediawiki...CirrusSearch)

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

Change subject: Remove log10 from boost in prefix search
..


Remove log10 from boost in prefix search

Because nothing but number of incoming links effects the score removing
the log10 from boost sorts the results the same way while doing less work.

On itwiki this amounts for going from 200ms for a prefix search for a
to 60ms.  Even though these are cached most of the time this is worth it.

Change-Id: Ifc60f466f324161b2349aecbe1312aef7993d172
---
M includes/Searcher.php
1 file changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/includes/Searcher.php b/includes/Searcher.php
index 9311410..24448c9 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -115,10 +115,11 @@
 */
private $preferRecentHalfLife = 0;
/**
-* @var boolean should the query results boost pages with more incoming 
links. Defaults to true but some search
-* methods disable it.
+* @var string should the query results boost pages with more incoming 
links.  Default to empty stream meaning
+* don't boost.  Other values are 'linear' meaning boost score linearly 
with number of incoming links or 'log'
+* meaning boost score by log10(incoming_links + 2).
 */
-   private $boostForLinks = true;
+   private $boostLinks = '';
/**
 * @var array template name to boost multiplier for having a template.  
Defaults to none but initialized by
 * queries that use it to self::getDefaultBoostTemplates() if they need 
it.  That is too expensive to do by
@@ -165,7 +166,7 @@
$match = new \Elastica\Query\Match();
$match-setField( 'title.near_match', $search );
$this-filters[] = new \Elastica\Filter\Query( $match );
-   $this-boostForLinks = false;
+   $this-boostLinks = ''; // No boost
 
$this-description = lowercase title search for '$search';
$result = $this-search();
@@ -196,6 +197,7 @@
} else {
$this-filters[] = $this-buildPrefixFilter( $search );
}
+   $this-boostLinks = 'linear';
$this-boostTemplates = self::getDefaultBoostTemplates();
 
$this-description = prefix search for '$search';
@@ -292,6 +294,7 @@
if ( $boostTemplates === null ) {
$boostTemplates = self::getDefaultBoostTemplates();
}
+   $this-boostLinks = 'log';
$this-boostTemplates = $boostTemplates;
wfProfileOut( __METHOD__ . '-boost-template' );
 
@@ -893,10 +896,19 @@
$useFunctionScore = false;
 
// Customize score by boosting based on incoming links count
-   if ( $this-boostForLinks ) {
+   if ( $this-boostLinks ) {
$incomingLinks = (doc['incoming_links'].empty ? 0 : 
doc['incoming_links'].value);
$incomingRedirectLinks = 
(doc['incoming_redirect_links'].empty ? 0 : 
doc['incoming_redirect_links'].value);
-   $scoreBoostMvel = log10($incomingLinks + 
$incomingRedirectLinks + 2);
+   $scoreBoostMvel = $incomingLinks + 
$incomingRedirectLinks;
+   switch ( $this-boostLinks ) {
+   case 'linear':
+   break;  // scoreBoostMvel already correct
+   case 'log':
+   $scoreBostMvel = log10($scoreBoostMvel + 2);
+   break;
+   default:
+   wfLogWarning( Invalid links boost type:  
$this-boostLinks );
+   }
$fuctionScore-addScriptScoreFunction( new 
\Elastica\Script( $scoreBoostMvel ) );
$useFunctionScore = true;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc60f466f324161b2349aecbe1312aef7993d172
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Start getting PhantomJS working for tests - change (mediawiki...CirrusSearch)

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

Change subject: Start getting PhantomJS working for tests
..


Start getting PhantomJS working for tests

PhantomJS is nice because it is headless so:
1.  It is just a tiny bit faster than Firefox
2.  It can be run in parallel no problem.
3.  It never steals focus so REUSE_BROWSER is no longer tempting.
4.  It can be run more easilly on Jenkins.

Change-Id: I17c5788eac4e9822dee910c6e6eb654ea60e50e0
---
M .gitignore
M tests/browser/Gemfile
M tests/browser/Gemfile.lock
M tests/browser/README
M tests/browser/config/cucumber.yml
M tests/browser/features/prefix.feature
M tests/browser/features/step_definitions/search_steps.rb
7 files changed, 25 insertions(+), 13 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index cfd765b..ec8d3d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@
 *~
 *.kate-swp
 .*.swp
-Elastica
+tests/browser/cucumber_failures.log
+tests/browser/.bundle
diff --git a/tests/browser/Gemfile b/tests/browser/Gemfile
index 42f3e17..e29c366 100644
--- a/tests/browser/Gemfile
+++ b/tests/browser/Gemfile
@@ -4,3 +4,4 @@
 source https://rubygems.org;
 
 gem mediawiki-selenium
+gem parallel_tests
diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock
index e6ba60a..1b3f83d 100644
--- a/tests/browser/Gemfile.lock
+++ b/tests/browser/Gemfile.lock
@@ -39,6 +39,9 @@
   watir-webdriver (= 0.6.4)
 page_navigation (0.9)
   data_magic (= 0.14)
+parallel (0.9.1)
+parallel_tests (0.16.6)
+  parallel
 rest-client (1.6.7)
   mime-types (= 1.16)
 rspec-expectations (2.14.4)
@@ -60,3 +63,4 @@
 
 DEPENDENCIES
   mediawiki-selenium
+  parallel_tests
diff --git a/tests/browser/README b/tests/browser/README
index 60b46e3..b94d7bb 100644
--- a/tests/browser/README
+++ b/tests/browser/README
@@ -120,6 +120,20 @@
 cause the browser to keep stealing your focus.
 
 
+PhantomJS and Parallel Tests
+
+We're starting to get things working on PhantomJS so we can run them in
+parallel and we don't have to worry about Firefox stealing out focus all the
+time.  You can install PhantomJS and then try it!
+ export BROWSER_LABEL=phantomjs
+ export -n REUSE_BROWSER
+ bundle exec cucumber features/prefix.feature
+Or in parallel:
+ export BROWSER_LABEL=phantomjs
+ export -n REUSE_BROWSER
+ bundle exec parallel_cucumber -n10 features
+
+
 Want to Contribute Some Tests?
 --
 Interested? Read more at [How to contribute]
diff --git a/tests/browser/config/cucumber.yml 
b/tests/browser/config/cucumber.yml
index 6374443..ad2f117 100644
--- a/tests/browser/config/cucumber.yml
+++ b/tests/browser/config/cucumber.yml
@@ -1,2 +1,3 @@
 ci: --format Cucumber::Formatter::Sauce --out reports/junit
 default: --format pretty
+parallel: --format progress --format ParallelTests::Cucumber::FailuresLogger 
--out cucumber_failures.log
diff --git a/tests/browser/features/prefix.feature 
b/tests/browser/features/prefix.feature
index 664b64c..ee54502 100644
--- a/tests/browser/features/prefix.feature
+++ b/tests/browser/features/prefix.feature
@@ -8,7 +8,7 @@
 Then suggestions should appear
 And first_result is the first suggestion
 And I should be offered to search for term
-When I hit enter in the search box
+When I click the search button
 Then I am on a page titled title
   Examples:
 | term   | first_result   | title  
|
diff --git a/tests/browser/features/step_definitions/search_steps.rb 
b/tests/browser/features/step_definitions/search_steps.rb
index 00d2c0c..04497ce 100644
--- a/tests/browser/features/step_definitions/search_steps.rb
+++ b/tests/browser/features/step_definitions/search_steps.rb
@@ -8,17 +8,8 @@
 When(/^I type (.+) into the search box$/) do |search_term|
   on(SearchPage).search_input = search_term
 end
-When(/^I click the Search button$/) do
-  on(RandomPage) do |page|
-if page.search_button? then
-  page.search_button
-else
-  page.simple_search_button
-end
-  end
-end
-When(/^I hit enter in the search box$/) do
-  on(SearchPage).search_input += \n
+When(/^I click the search button$/) do
+  on(SearchPage).search_button
 end
 When(/^I search for (.+)$/) do |text|
   #If I'm on the search page then I actually want to search in that box not the

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17c5788eac4e9822dee910c6e6eb654ea60e50e0
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] Fxiing syntax error in flickerripper - change (pywikibot/compat)

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

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


Change subject: Fxiing syntax error in flickerripper
..

Fxiing syntax error in flickerripper

I caused this (I think)

Change-Id: I946aa7fc8b325a375cc0cca31f40f7b99c51d683
---
M flickrripper.py
1 file changed, 4 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/88/107388/1

diff --git a/flickrripper.py b/flickrripper.py
index 7949544..352ba8a 100644
--- a/flickrripper.py
+++ b/flickrripper.py
@@ -404,9 +404,8 @@
 while not gotPhotos:
 try:
 for photo in flickr.groups_pools_getPhotos(
-group_id=group_id, user_id=user_id, tags=tags,
-per_page='100', page=i)
-.find('photos').getchildren():
+group_id=group_id, user_id=user_id, tags=tags,
+per_page='100', 
page=i).find('photos').getchildren():
 gotPhotos = True
 if photo.attrib['id'] == start_id:
 found_start_id = True
@@ -434,8 +433,7 @@
 while not gotPhotos:
 try:
 for photo in flickr.photosets_getPhotos(
-photoset_id=photoset_id, per_page='100', page=i)
-.find('photoset').getchildren():
+photoset_id=photoset_id, per_page='100', 
page=i).find('photoset').getchildren():
 gotPhotos = True
 if photo.attrib['id'] == start_id:
 found_start_id = True
@@ -463,8 +461,7 @@
 while not gotPhotos:
 try:
 for photo in flickr.people_getPublicPhotos(
-user_id=user_id, per_page='100', page=i)
-.find('photos').getchildren():
+user_id=user_id, per_page='100', 
page=i).find('photos').getchildren():
 gotPhotos = True
 if photo.attrib['id'] == start_id:
 found_start_id = True

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I946aa7fc8b325a375cc0cca31f40f7b99c51d683
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixing syntax error in flickerripper - change (pywikibot/compat)

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

Change subject: Fixing syntax error in flickerripper
..


Fixing syntax error in flickerripper

I caused this (I think)

Change-Id: I946aa7fc8b325a375cc0cca31f40f7b99c51d683
---
M flickrripper.py
1 file changed, 4 insertions(+), 7 deletions(-)

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



diff --git a/flickrripper.py b/flickrripper.py
index 7949544..352ba8a 100644
--- a/flickrripper.py
+++ b/flickrripper.py
@@ -404,9 +404,8 @@
 while not gotPhotos:
 try:
 for photo in flickr.groups_pools_getPhotos(
-group_id=group_id, user_id=user_id, tags=tags,
-per_page='100', page=i)
-.find('photos').getchildren():
+group_id=group_id, user_id=user_id, tags=tags,
+per_page='100', 
page=i).find('photos').getchildren():
 gotPhotos = True
 if photo.attrib['id'] == start_id:
 found_start_id = True
@@ -434,8 +433,7 @@
 while not gotPhotos:
 try:
 for photo in flickr.photosets_getPhotos(
-photoset_id=photoset_id, per_page='100', page=i)
-.find('photoset').getchildren():
+photoset_id=photoset_id, per_page='100', 
page=i).find('photoset').getchildren():
 gotPhotos = True
 if photo.attrib['id'] == start_id:
 found_start_id = True
@@ -463,8 +461,7 @@
 while not gotPhotos:
 try:
 for photo in flickr.people_getPublicPhotos(
-user_id=user_id, per_page='100', page=i)
-.find('photos').getchildren():
+user_id=user_id, per_page='100', 
page=i).find('photos').getchildren():
 gotPhotos = True
 if photo.attrib['id'] == start_id:
 found_start_id = True

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I946aa7fc8b325a375cc0cca31f40f7b99c51d683
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Test to try instantiating all objects from container - change (mediawiki...Flow)

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

Change subject: Test to try instantiating all objects from container
..


Test to try instantiating all objects from container

Change-Id: I5b5b82268c206089cd51ba1c5ae5c58dc2b1290d
---
A tests/ContainerTest.php
1 file changed, 17 insertions(+), 0 deletions(-)

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



diff --git a/tests/ContainerTest.php b/tests/ContainerTest.php
new file mode 100644
index 000..520b4c2
--- /dev/null
+++ b/tests/ContainerTest.php
@@ -0,0 +1,17 @@
+?php
+
+namespace Flow;
+
+class ContainerTest extends \MediaWikiTestCase {
+
+   public function testInstantiateAll() {
+   $this-setMwGlobals( 'wgTitle', \Title::newMainPage() );
+   $container = Container::getContainer();
+
+   foreach ( $container-keys() as $key ) {
+   $container[$key];
+   }
+   // All objects instantiated successfully
+   $this-assertTrue( true );
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b5b82268c206089cd51ba1c5ae5c58dc2b1290d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Call msg -text() or escaped() instead of parse() - change (mediawiki...Flow)

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

Change subject: Call msg -text() or escaped() instead of parse()
..


Call msg -text() or escaped() instead of parse()

Done for flow-paging-rev/fwd in getPagingLink() and
'flow-topic-participants' in printParticipants(), there are about 12
other invocations of parse() in Flow PHP.

Bug: 59644
Change-Id: Ibcc8220cdf30fdae8506c770cb51b2f0257b5a59
---
M includes/Templating.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/Templating.php b/includes/Templating.php
index c453780..58a1389 100644
--- a/includes/Templating.php
+++ b/includes/Templating.php
@@ -222,7 +222,7 @@
)
),
),
-   wfMessage( 'flow-paging-'.$direction )-parse()
+   wfMessage( 'flow-paging-'.$direction )-text()
);
 
$output = \Html::rawElement(
@@ -260,7 +260,7 @@
 * @param PostRevision $post
 * @param int[optional] $registered The identifier that was returned 
when
 * registering the callback via PostRevision::registerRecursive()
-* @return string
+* @return string Participant list (escaped HTML)
 */
public function printParticipants( PostRevision $post, $registered = 
null ) {
$participants = $post-getRecursiveResult( $registered );
@@ -277,7 +277,7 @@
$originalPoster ? $this-usernames-get( wfWikiId(), 
$originalPoster[0], $originalPoster[1] ) : '',
$mostRecentPoster ? $this-usernames-get( wfWikiId(), 
$mostRecentPoster[0], $mostRecentPoster[1] ) : '',
$secondMostRecentPoster ? $this-usernames-get( 
wfWikiId(), $secondMostRecentPoster[0], $secondMostRecentPoster[1] ) : ''
-   )-parse();
+   )-escaped();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcc8220cdf30fdae8506c770cb51b2f0257b5a59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage sp...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: Spage sp...@wikimedia.org
Gerrit-Reviewer: Werdna agarr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove unused messages - change (mediawiki...MediaWikiChat)

2014-01-14 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Remove unused messages
..


Remove unused messages

It looks like they are a copypaste rest.
At least some of the removed messages a duplicate of
https://translatewiki.net/wiki/Special:Translate/ext-wikiforum?filter=action=translate

If I am wrong and these messages are needed, please change the message key
to avoid duplicate message keys with the WikiForum extension

Change-Id: I2956bed83b62e380fcb5a90c011a4057bf10e6db
---
M MediaWikiChat.i18n.php
1 file changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/MediaWikiChat.i18n.php b/MediaWikiChat.i18n.php
index d2d1102..e28225b 100644
--- a/MediaWikiChat.i18n.php
+++ b/MediaWikiChat.i18n.php
@@ -70,14 +70,6 @@
 
'right-mediawikichat-chat' = 'Use Special:Chat',
'right-mediawikichat-modchat' = 'Block and kick (if enabled) users 
from Special:Chat',
-
-   'log-name-forum' = 'Forum log',
-   'log-description-forum' = 'Logs [[Special:WikiForum|WikiForum]] 
events',
-
-   'logentry-forum-add-category' = '$1 {{GENDER:$1|created}} a new 
category, $4',
-   'logentry-forum-add-forum' = '$1 {{GENDER:$1|created}} a new forum, 
$4',
-   'logentry-forum-add-thread' = '$1 {{GENDER:$1|created}} a new thread, 
$4',
-   'logentry-forum-add-reply' = '$1 {{GENDER:$1|replied}} on the thread 
$4',
 );
 
 /** Message documentation

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2956bed83b62e380fcb5a90c011a4057bf10e6db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Update documentation for db helper; improve handling of miss... - change (mediawiki...bundler)

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

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


Change subject: Update documentation for db helper; improve handling of missing 
keys.
..

Update documentation for db helper; improve handling of missing keys.

Change-Id: Iea1f9c24bc352cc4fae3154d3753254a9f7fd678
---
M lib/db.js
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler
 refs/changes/92/107392/1

diff --git a/lib/db.js b/lib/db.js
index 3e0668d..56b41aa 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -1,4 +1,4 @@
-// helpers to create key/value mappings in sqlite db
+// Helpers to create/read key/value mappings in sqlite db
 
 var sqlite3 = require('sqlite3');
 var when = require('when');
@@ -40,7 +40,7 @@
});
 };
 
-// Returns a promise for the value.
+// Returns a promise for the value associated with a given key.
 Db.prototype.get = function(key, nojson) {
return this.db.then(function(db) {
return P.call(
@@ -49,13 +49,14 @@
'' + key
);
}).then(function(row) {
-   var val = row.val;
-   return nojson ? val : JSON.parse(val);
+   var val = (row || {}).val;
+   return (val===undefined || nojson) ? val : JSON.parse(val);
});
 };
 
+// Call the given function `f` once for each row in the database.
 // Returns a promise which will be resolved (with the number of keys)
-// when the iteration is complete
+// when the iteration is complete.
 Db.prototype.forEach = function(f, nojson) {
var each = function(err, row) {
var val = nojson ? row.val : JSON.parse(row.val);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea1f9c24bc352cc4fae3154d3753254a9f7fd678
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improve internal documentation. - change (mediawiki...latex_renderer)

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

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


Change subject: Improve internal documentation.
..

Improve internal documentation.

Change-Id: Idff981db81ad4ba2aaa80e9dd3d45b872f9512cf
---
M lib/db.js
M lib/index.js
2 files changed, 136 insertions(+), 48 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
 refs/changes/93/107393/1

diff --git a/lib/db.js b/lib/db.js
index 3be467e..56b41aa 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -1,4 +1,4 @@
-// helpers to create key/value mappings in sqlite db
+// Helpers to create/read key/value mappings in sqlite db
 
 var sqlite3 = require('sqlite3');
 var when = require('when');
@@ -40,7 +40,7 @@
});
 };
 
-// Returns a promise for the value.
+// Returns a promise for the value associated with a given key.
 Db.prototype.get = function(key, nojson) {
return this.db.then(function(db) {
return P.call(
@@ -54,8 +54,9 @@
});
 };
 
+// Call the given function `f` once for each row in the database.
 // Returns a promise which will be resolved (with the number of keys)
-// when the iteration is complete
+// when the iteration is complete.
 Db.prototype.forEach = function(f, nojson) {
var each = function(err, row) {
var val = nojson ? row.val : JSON.parse(row.val);
diff --git a/lib/index.js b/lib/index.js
index cf5a845..6b30a65 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,3 +1,5 @@
+// Convert bundles to PDFs via LaTeX.
+// -
 require('es6-shim');
 
 var json = require('../package.json');
@@ -153,18 +155,27 @@
return str;
 };
 
-// helper
-var updateLTRfont = function(format, poly) {
-   if (poly.dir==='rtl'  SCRIPT_FONTS[poly.script]) {
-   format.writeDecorated(
-   '\\renewcommand{\\LTRfont}' +
-   '{\\LTR'+poly.script.toLowerCase()+'font}'
-   );
-   format.envBreak();
-   format.resetSOL();
-   }
-};
+// -
 
+/**
+ * The `Formatter` class tracks the details of LaTeX syntax, in particular
+ * what LaTeX calls 'paragraph mode', 'math mode', and 'LR mode'.  It ensures
+ * that we don't try to make a line break if we haven't started a paragraph,
+ * and that we don't try to break a line or paragraph if we're in LR mode
+ * (basically, that we're inside the {} of a command argument).
+ * It *also* implements the Unicode Bidirectional Algorithm (using the
+ * node-icu-bidi package) to explicitly tag LTR and RTL runs, and contains
+ * a few workarounds to prevent XeTeX's almost the Unicode bidi algorithm
+ * implementation from screwing with things. (See
+ * http://tug.org/pipermail/xetex/2013-December/024964.html and
+ * http://tug.org/pipermail/xetex/2014-January/025086.html for more detail.)
+ *
+ * In the future this class might also need to handle font switching based
+ * on code blocks, since the fonts used for many languages do not have
+ * great coverage.  I tried using the ucharclasses package for this, but
+ * it fought with polyglossia and slowed down LaTeX processing by a factor
+ * of 6x.
+ */
 var Formatter = function(stream, options) {
this.stream = stream;
this.options = options;
@@ -186,29 +197,38 @@
// should use when we compute the next set of runs.
this.paragraphDir = this.contextDir;
 };
+/**
+ * Used to finish up output; writes all buffered text to a stream and
+ * returns a promise which will be resolved when the write is complete.
+ */
 Formatter.prototype.flush = function() {
var deferred = when.defer();
this.envBreak();
console.assert(this.stack.length === 0); // all inline styles closed
-   this.stream.write('', 'utf8', function() {
-   deferred.resolve();
+   this.stream.write('', 'utf8', function(err) {
+   err ? deferred.reject(err) : deferred.resolve();
});
return deferred.promise;
 };
+// Internal: Write the given string directly to the output.
 Formatter.prototype._writeRaw = function(text) {
this.stream.write(text, 'utf8');
 };
+// This is the main workhorse of this class. It takes the queued strings
+// (in `this.buffer`) and decorations (in `this.decorations`), runs the
+// Unicode BiDi algorithm, and emits runs of TeX-escaped LTR/RTL text, with
+// the raw LaTeX commands ('decorations') interspersed appropriately.
 Formatter.prototype._writeRuns = function() {
var text = this.buffer.join('');
if (text.length === 0  this.decorations.length === 0) {
return; // nothing to do
}
this._addDecoration({ type: 'end' }); // sentinel
-   // get logical directionality runs in this text.
+   

[MediaWiki-commits] [Gerrit] localsettings.js.example: Fix whitespace (mixed tabs and spa... - change (mediawiki...parsoid)

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

Change subject: localsettings.js.example: Fix whitespace (mixed tabs and spaces)
..


localsettings.js.example: Fix whitespace (mixed tabs and spaces)

Also removed duplicate new line at EOF. Follows-up 3b4cc83b.

Change-Id: I665c3a11e8e8336bc9759242d5d8039a77c03ba6
---
M api/localsettings.js.example
1 file changed, 10 insertions(+), 12 deletions(-)

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



diff --git a/api/localsettings.js.example b/api/localsettings.js.example
index 4bfcb01..f8aeb15 100644
--- a/api/localsettings.js.example
+++ b/api/localsettings.js.example
@@ -8,18 +8,18 @@
 
 exports.setup = function( parsoidConfig ) {
// The URL of your MediaWiki API endpoint
-//
-// We pre-define wikipedias as 'enwiki', 'dewiki' etc. Similarly for
-// other projects: 'enwiktionary', 'enwikiquote', 'enwikibooks',
-// 'enwikivoyage' etc.
-//
-// Optionally, you can also pass in a proxy specific to this prefix
-// (overrides defaultAPIProxyURI), or null to disable proxying for
-// this end point.
+   //
+   // We pre-define wikipedias as 'enwiki', 'dewiki' etc. Similarly for
+   // other projects: 'enwiktionary', 'enwikiquote', 'enwikibooks',
+   // 'enwikivoyage' etc.
+   //
+   // Optionally, you can also pass in a proxy specific to this prefix
+   // (overrides defaultAPIProxyURI), or null to disable proxying for
+   // this end point.
parsoidConfig.setInterwiki( 'localhost', 'http://localhost/w/api.php' );
 
-// A default proxy to connect to the API endpoints. Default: undefined
-// (no proxying). Overridden by per-wiki proxy config in setInterwiki.
+   // A default proxy to connect to the API endpoints. Default: undefined
+   // (no proxying). Overridden by per-wiki proxy config in setInterwiki.
// parsoidConfig.defaultAPIProxyURI = 'http://proxy.example.org:8080';
 
// Enable debug mode (prints extra debugging messages)
@@ -34,5 +34,3 @@
// allow cross-domain requests to the API (default disallowed)
//parsoidConfig.allowCORS = '*';
 };
-
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I665c3a11e8e8336bc9759242d5d8039a77c03ba6
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
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 multiwiki test case to include korean text. - change (mediawiki...latex_renderer)

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

Change subject: Update multiwiki test case to include korean text.
..


Update multiwiki test case to include korean text.

The original pull didn't follow redirects, so the korean article was empty.

Change-Id: I35bf7a9f7b1b995694e4e603a7270e85c93be165
---
M samples/multiwiki.zip
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/samples/multiwiki.zip b/samples/multiwiki.zip
index c79e990..e73c1a6 100644
--- a/samples/multiwiki.zip
+++ b/samples/multiwiki.zip
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35bf7a9f7b1b995694e4e603a7270e85c93be165
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Improve accent position for Vietnamese. - change (mediawiki...latex_renderer)

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

Change subject: Improve accent position for Vietnamese.
..


Improve accent position for Vietnamese.

See example 42 in the fontspec documentation.

Change-Id: I65d3cfeb14d083b2504a7fc844b6392e100750e4
---
M lib/index.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/lib/index.js b/lib/index.js
index b967a4d..cf5a845 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -41,6 +41,8 @@
 
 // fonts for specific languages
 var LANGUAGE_FONTS = {
+   // this is just to tweak the accent position
+   'vietnamese': { name: 'Linux Libertine O', opts: 'Language=Vietnamese' 
},
// from fonts-nafees
'urdu': { name: 'Nafees', opts: FAKESTYLES },
// from fonts-arphic-uming, fonts-arphic-ukai, fonts-droid

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65d3cfeb14d083b2504a7fc844b6392e100750e4
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/latex_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] remove fundraising users from aluminium, they have migrated ... - change (operations/puppet)

2014-01-14 Thread Jgreen (Code Review)
Jgreen has uploaded a new change for review.

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


Change subject: remove fundraising users from aluminium, they have migrated to 
lutetium
..

remove fundraising users from aluminium, they have migrated to lutetium

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/107394/1

diff --git a/manifests/role/fundraising.pp b/manifests/role/fundraising.pp
index 32544d3..404ef4f 100644
--- a/manifests/role/fundraising.pp
+++ b/manifests/role/fundraising.pp
@@ -15,9 +15,9 @@
 
$gid = 500
include standard-noexim,
-   accounts::mhernandez,
-   accounts::zexley,
-   accounts::pcoombe,
+   #accounts::mhernandez, # migrated to lutetium
+   #accounts::zexley, # migrated to lutetium
+   #accounts::pcoombe, # migrated to lutetium
admins::fr-tech,
admins::roots,
backup::client,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17434eca38c040ea48d6929f5a0d260ba1be32ee
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] remove fundraising users from aluminium, they have migrated ... - change (operations/puppet)

2014-01-14 Thread Jgreen (Code Review)
Jgreen has submitted this change and it was merged.

Change subject: remove fundraising users from aluminium, they have migrated to 
lutetium
..


remove fundraising users from aluminium, they have migrated to lutetium

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

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



diff --git a/manifests/role/fundraising.pp b/manifests/role/fundraising.pp
index 32544d3..404ef4f 100644
--- a/manifests/role/fundraising.pp
+++ b/manifests/role/fundraising.pp
@@ -15,9 +15,9 @@
 
$gid = 500
include standard-noexim,
-   accounts::mhernandez,
-   accounts::zexley,
-   accounts::pcoombe,
+   #accounts::mhernandez, # migrated to lutetium
+   #accounts::zexley, # migrated to lutetium
+   #accounts::pcoombe, # migrated to lutetium
admins::fr-tech,
admins::roots,
backup::client,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17434eca38c040ea48d6929f5a0d260ba1be32ee
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Implement mw.wikibase.entity.renderClaims [WIP] - change (mediawiki...Wikibase)

2014-01-14 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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


Change subject: Implement mw.wikibase.entity.renderClaims [WIP]
..

Implement mw.wikibase.entity.renderClaims [WIP]

Change-Id: I6ccf58e6e750ed9cf0637730f02485c7f56779b7
---
M client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/scribunto/WikibaseLuaEntityBindings.php
M client/includes/scribunto/mw.wikibase.entity.lua
M 
client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
M client/tests/phpunit/includes/scribunto/WikibaseLuaEntityBindingsTest.php
5 files changed, 277 insertions(+), 5 deletions(-)


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

diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php 
b/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
index 9f5a6f2..061a570 100644
--- a/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
+++ b/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
@@ -1,5 +1,8 @@
 ?php
 
+use Wikibase\Client\WikibaseClient;
+use ValueFormatters\FormatterOptions;
+use Wikibase\Lib\SnakFormatter;
 use Wikibase\Client\Scribunto\WikibaseLuaEntityBindings;
 use Wikibase\Settings;
 
@@ -24,8 +27,25 @@
 * @since 0.5
 */
public function __construct( $engine ) {
+   // For the language we need $wgContLang, not parser target 
language or anything else.
+   // See Scribunto_LuaLanguageLibrary::getContLangCode().
+   global $wgContLang;
+
+   $wikibaseClient = WikibaseClient::getDefaultInstance();
+
+   $formatterOptions = new FormatterOptions( array( language = 
$wgContLang ) );
+
+   $snakFormatter = 
$wikibaseClient-getSnakFormatterFactory()-getSnakFormatter(
+   SnakFormatter::FORMAT_WIKI, $formatterOptions
+   );
+
$this-wbLibrary = new WikibaseLuaEntityBindings(
-   Settings::get( 'siteGlobalID' )
+   $snakFormatter,
+   $wikibaseClient-getEntityIdParser(),
+   $wikibaseClient-getStore()-getEntityLookup(),
+   $wikibaseClient-getEntityIdFormatter(),
+   Settings::get( 'siteGlobalID' ),
+   $wgContLang
);
 
parent::__construct( $engine );
@@ -39,6 +59,7 @@
public function register() {
$lib = array(
'getGlobalSiteId' = array( $this, 'getGlobalSiteId' ),
+   'renderClaimsByPropertyId' = array( $this, 
'renderClaimsByPropertyId' ),
);
 
return $this-getEngine()-registerInterface(
@@ -55,4 +76,21 @@
public function getGlobalSiteId() {
return $this-wbLibrary-getGlobalSiteId();
}
+
+   /**
+* Take a snak array from Lua and format it
+*
+* @since 0.5
+*
+* @param string $entityId
+* @param string $propertyId
+*
+* @return array
+*/
+   public function renderClaimsByPropertyId( $entityId, $propertyId ) {
+   $this-checkType( 'renderClaimsByPropertyId', 1, $entityId, 
'string' );
+   $this-checkType( 'renderClaimsByPropertyId', 2, $propertyId, 
'string' );
+   return $this-wbLibrary-renderClaimsByPropertyId( $entityId, 
$propertyId );
+   }
+
 }
diff --git a/client/includes/scribunto/WikibaseLuaEntityBindings.php 
b/client/includes/scribunto/WikibaseLuaEntityBindings.php
index 7647e1f..ea7da0e 100644
--- a/client/includes/scribunto/WikibaseLuaEntityBindings.php
+++ b/client/includes/scribunto/WikibaseLuaEntityBindings.php
@@ -2,6 +2,15 @@
 
 namespace Wikibase\Client\Scribunto;
 
+use Wikibase\DataModel\Entity\EntityIdParser;
+use Wikibase\Lib\SnakFormatter;
+use Wikibase\DataModel\Claim\Claims;
+use Wikibase\EntityLookup;
+use Wikibase\Entity;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\Lib\EntityIdFormatter;
+use Language;
+
 /**
  * Actual implementations of the functions to access Wikibase through the 
Scribunto extension
  *
@@ -10,16 +19,133 @@
  * @licence GNU GPL v2+
  * @author Marius Hoch  h...@online.de 
  */
+
 class WikibaseLuaEntityBindings {
+
+   /* @var EntityIdParser */
+   protected $entityIdParser;
+
+   /* @var EntityLookup */
+   protected $entityLookup;
+
+   /* @var EntityIdFormatter */
+   protected $entityIdFormatter;
+
+   /* @var Language */
+   protected $language;
 
/* @var string */
protected $siteId;
 
+   /* @var SnakFormatter */
+   protected $snakFormatter;
+
+   /* @var Entity[] */
+   private $entities = array();
+
/**
-* @param string $siteId
+* @param EntityIdParser 

[MediaWiki-commits] [Gerrit] Regression: fix notifications header in stable - change (mediawiki...MobileFrontend)

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

Change subject: Regression: fix notifications header in stable
..


Regression: fix notifications header in stable

Header in stable prints HTML:
  strongNotifications/strong spanundefined/span
This regression was caused by a regression fix in 6d199f6.
Fixing just in case new overlays in stable are not merged in time.

Change-Id: I13ad4becf2ec5a9795d65a689b6c99bf9e5f9e6d
---
M javascripts/modules/notifications/NotificationsOverlay.js
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/javascripts/modules/notifications/NotificationsOverlay.js 
b/javascripts/modules/notifications/NotificationsOverlay.js
index 6967178..c92e92a 100644
--- a/javascripts/modules/notifications/NotificationsOverlay.js
+++ b/javascripts/modules/notifications/NotificationsOverlay.js
@@ -10,6 +10,7 @@
content: M.template.get( 
'modules/notifications/NotificationsOverlay' )
},
defaults: {
+   heading: mw.msg( 'notifications' ),
archiveLink: mw.util.getUrl( 
'Special:Notifications' ),
archiveLinkMsg: mw.msg( 'echo-overlay-link' )
},
@@ -88,7 +89,9 @@
} );
},
preRender: function( options ) {
-   options.heading = 'strong' + mw.msg( 
'notifications' ) + '/strong span' + options.count + '/span';
+   if ( options.count ) {
+   options.heading = 'strong' + mw.msg( 
'notifications' ) + '/strong span' + options.count + '/span';
+   }
},
postRender: function( options ) {
this._super( options );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13ad4becf2ec5a9795d65a689b6c99bf9e5f9e6d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Expose ability to set an HTTP Connection Factory - change (apps...java-mwapi)

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

Change subject: Expose ability to set an HTTP Connection Factory
..


Expose ability to set an HTTP Connection Factory

Change-Id: I859ed2394f85d88f23416a81d8593b3fcb96
---
M src/main/java/org/mediawiki/api/json/Api.java
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/src/main/java/org/mediawiki/api/json/Api.java 
b/src/main/java/org/mediawiki/api/json/Api.java
index 9df2fed..06f1362 100644
--- a/src/main/java/org/mediawiki/api/json/Api.java
+++ b/src/main/java/org/mediawiki/api/json/Api.java
@@ -120,5 +120,15 @@
 }
 return new ApiResult(request);
 }
+
+/**
+ * Set the connection factory used to construct connections.
+ *
+ * @param factory The factory used to construct HTTP connections
+ */
+public static void setConnectionFactory(HttpRequest.ConnectionFactory 
factory) {
+HttpRequest.setConnectionFactory(factory);
+}
+
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I859ed2394f85d88f23416a81d8593b3fcb96
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/java-mwapi
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org

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


  1   2   3   4   >