[MediaWiki-commits] [Gerrit] Redirect bugzilla alias URLs to old-bugzilla - change (operations/puppet)

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

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

Change subject: Redirect bugzilla alias URLs to old-bugzilla
..

Redirect bugzilla alias URLs to old-bugzilla

It's the only meaningful target we're currently able to provide.
The regex is the minimum one needed to catch all 130 existing aliases:
https://old-bugzilla.wikimedia.org/buglist.cgi?columnlist=aliasf1=aliaso1=notregexpquery_format=advancedv1=^%24
Using [A-Za-z-], we'd capture 110/130.

Bug: T240
Change-Id: I7736ab3c3d796fa18942f249306dd34947ea1a96
---
M modules/phabricator/templates/redirect_config.json.erb
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/176898/1

diff --git a/modules/phabricator/templates/redirect_config.json.erb 
b/modules/phabricator/templates/redirect_config.json.erb
index ac4dcf6..744ddd4 100644
--- a/modules/phabricator/templates/redirect_config.json.erb
+++ b/modules/phabricator/templates/redirect_config.json.erb
@@ -26,6 +26,10 @@
   redirectUrl: https://old-bugzilla.wikimedia.org/attachment.cgi?$2;
 },
 {
+  pattern: 
(bugs|bugzilla).wikimedia.org/show_bug.cgi\\?id=([A-Za-z0-9.$\/_-]+)$,
+  redirectUrl: https://old-bugzilla.wikimedia.org/show_bug.cgi?id=$2;
+},
+{
   pattern: (bugs|bugzilla).wikimedia.org/[a-zA-Z_]+.cgi(\\?.*)$,
   redirectUrl: https://%= @phab_host %/
 },

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7736ab3c3d796fa18942f249306dd34947ea1a96
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] Allow HTTP traffic WMF OIT space - holmium (blog) - change (operations/puppet)

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

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

Change subject: Allow HTTP traffic WMF OIT space - holmium (blog)
..

Allow HTTP traffic WMF OIT space - holmium (blog)

Tilman needs to be able to have access to this.

RT: 8050
Change-Id: I69d69516f5eec0f85db24fe540be00409fdb4b1d
---
M manifests/site.pp
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/176899/1

diff --git a/manifests/site.pp b/manifests/site.pp
index e244189..b33c324 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1243,11 +1243,17 @@
 include role::backup::storage
 }
 
+# old blog server; currently left unpuppetized until it dies off
 node 'holmium.wikimedia.org' {
 
 include admin
 include base::firewall
 
+# allow HTTP access to WMF OIT
+ferm::rule { 'blog-http':
+rule = 'proto tcp dport (http https) saddr 198.73.209.0/24 ACCEPT;'
+}
+
 include standard
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69d69516f5eec0f85db24fe540be00409fdb4b1d
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] Allow HTTP traffic WMF OIT space - holmium (blog) - change (operations/puppet)

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

Change subject: Allow HTTP traffic WMF OIT space - holmium (blog)
..


Allow HTTP traffic WMF OIT space - holmium (blog)

Tilman needs to be able to have access to this.

RT: 8050
Change-Id: I69d69516f5eec0f85db24fe540be00409fdb4b1d
---
M manifests/site.pp
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index e244189..b33c324 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1243,11 +1243,17 @@
 include role::backup::storage
 }
 
+# old blog server; currently left unpuppetized until it dies off
 node 'holmium.wikimedia.org' {
 
 include admin
 include base::firewall
 
+# allow HTTP access to WMF OIT
+ferm::rule { 'blog-http':
+rule = 'proto tcp dport (http https) saddr 198.73.209.0/24 ACCEPT;'
+}
+
 include standard
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69d69516f5eec0f85db24fe540be00409fdb4b1d
Gerrit-PatchSet: 1
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] Refactor creation of text fields a bit - change (mediawiki...UploadWizard)

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

Change subject: Refactor creation of text fields a bit
..


Refactor creation of text fields a bit

Details fields are all pretty homogenous, so...may as well do it with a
function!

More to come.

Change-Id: Icd2bdd37da62963b7c42c2f4e885b32123d0a23e
Phabricator: T76388
---
M resources/mw.UploadWizardDetails.js
1 file changed, 36 insertions(+), 30 deletions(-)

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



diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index 653fc29..c099d33 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -56,7 +56,7 @@
//  
http://commons.wikimedia.org/wiki/MediaWiki:Filename-prefix-blacklist
//  XXX make sure they can't use ctrl characters or returns 
or any other bad stuff.
this.titleId = 'title' + this.upload.index;
-   this.titleInput = $( 'input type=text id=' + this.titleId + 
' name=' + this.titleId + ' class=mwe-title maxlength=250/' )
+   this.titleInput = this.makeTextInput( this.titleId, 'title', 
undefined, 250 )
.keyup( function () {
details.setCleanTitle( $( details.titleInput 
).val() );
} )
@@ -139,10 +139,7 @@
.addHint( 'mwe-upwiz-categories-hint', categoriesHinter 
);
categoriesId = 'categories' + this.upload.index;
$categoriesDiv.find( '.mwe-upwiz-details-input' )
-   .append( $( 'input type=text/' ).attr( {
-   id: categoriesId,
-   name: categoriesId
-   } ) );
+   .append( this.makeTextInput( categoriesId ) );
 
dateInputId = 'dateInput' + ( this.upload.index ).toString();
 
@@ -151,8 +148,7 @@
/* XXX must localize this by loading jquery.ui.datepicker-XX.js 
where XX is a language code */
/* jQuery.ui.datepicker also modifies first-day-of-week 
according to language, which is somewhat wrong. */
/* $.datepicker.setDefaults() for other settings */
-   this.dateInput =
-   $( 'input type=text id=' + dateInputId + ' name=' 
+ dateInputId + ' type=text class=mwe-date size=20/' );
+   this.dateInput = this.makeTextInput( dateInputId, 'date', 20 );
 
dateInputDiv = $( 'div 
class=mwe-upwiz-details-fieldname-input ui-helper-clearfix/div' )
.append(
@@ -182,22 +178,11 @@
headId = 'location-heading' + this.upload.index;
//var altId = location-altitude + _this.upload.index;
 
-   this.$latInput = $( 'input type=text id=' + latId + ' 
name=' + latId + ' class=mwe-loc-lat size=10/' );
-   this.$lonInput = $( 'input type=text id=' + lonId + ' 
name=' + lonId + ' class=mwe-loc-lon size=10/' );
-   this.$headingInput = $( 'input' )
-   .attr( 'type', 'text' )
-   .attr( 'id', headId )
-   .attr( 'name', headId )
-   .attr( 'size', '10' )
-   .addClass( 'mwe-loc-head' );
+   this.$latInput = this.makeTextInput( latId, 'loc-lat', 10, 
undefined, mw.UploadWizard.config.defaults.lat );
+   this.$lonInput = this.makeTextInput( lonId, 'loc-lon', 10, 
undefined, mw.UploadWizard.config.defaults.lon );
+   this.$headingInput = this.makeTextInput( headId, 'loc-head', 
10, undefined, mw.UploadWizard.config.defaults.heading );
 
-   //_this.altInput = $( 'input type=text id=' + altId + ' 
name=' + altId + ' class=mwe-loc-alt size=10/' );
-
-   // Do not prefill with 0
-   this.$latInput.val( mw.UploadWizard.config.defaults.lat );
-   this.$lonInput.val( mw.UploadWizard.config.defaults.lon );
-   this.$headingInput.val( mw.UploadWizard.config.defaults.heading 
);
-   //_this.altInput.val( mw.UploadWizard.config.defaultAlt );
+   //this.altInput = this.makeTextInput( altId, 'loc-alt', 10, 
undefined, mw.UploadWizard.config.defaults.alt );
 
latDiv = $( 'div class=mwe-location-lat/div' )
.append( $( 'div 
class=mwe-location-lat-label/div' ).text( mw.message( 
'mwe-upwiz-location-lat' ).text() ) )
@@ -277,14 +262,8 @@
} );
}
} else {
-   $fieldInput = $( 'input type=text' 
).attr( {
-   id: fieldInputId,
-   name: 

[MediaWiki-commits] [Gerrit] Move all configuration variables together - change (mediawiki...ContentTranslation)

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

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

Change subject: Move all configuration variables together
..

Move all configuration variables together

Change-Id: If94d286a12dcd69021f3499549203b5c0f3b6212
---
M ContentTranslation.php
1 file changed, 26 insertions(+), 18 deletions(-)


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

diff --git a/ContentTranslation.php b/ContentTranslation.php
index 63e11c5..3c095a0 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -44,24 +44,6 @@
 
 $GLOBALS['wgMessagesDirs']['ContentTranslation'] = $dir/i18n;
 
-// Content translation server URL, deprecated, use 
$wgContentTranslationSiteTemplates
-$GLOBALS['wgContentTranslationServerURL'] = null;
-$GLOBALS['wgContentTranslationExperimentalFeatures'] = false;
-$GLOBALS['wgContentTranslationParsoid'] = array(
-   'url' = 'http://parsoid.wmflabs.org/',
-   'timeout' = 100 * 1000, // Parsoid timeout in milliseconds
-   'prefix' = 'enwiki',
-);
-
-// Content translaton database to provide dashboard and other features.
-// Provide the database name as the value.
-// See sql/contenttranslation.sql for scripts to create this database.
-$GLOBALS['wgContentTranslationDatabase'] = null;
-
-// If the content translation database is located in a different cluster,
-// specify the name of the cluster.
-$GLOBALS['wgContentTranslationCluster'] = false;
-
 $GLOBALS['wgExtensionMessagesFiles']['ContentTranslationAlias'] =
$dir/ContentTranslation.alias.php;
 
@@ -106,6 +88,32 @@
 };
 
 // Globals for this extension
+
+/**
+ * Content translation server URL
+ * @deprecated, use $wgContentTranslationSiteTemplates
+ */
+$GLOBALS['wgContentTranslationServerURL'] = null;
+$GLOBALS['wgContentTranslationExperimentalFeatures'] = false;
+$GLOBALS['wgContentTranslationParsoid'] = array(
+   'url' = 'http://parsoid.wmflabs.org/',
+   'timeout' = 100 * 1000, // Parsoid timeout in milliseconds
+   'prefix' = 'enwiki',
+);
+
+/**
+ * Content translaton database to provide dashboard and other features.
+ * Provide the database name as the value.
+ * @see sql/contenttranslation.sql for scripts to create this database.
+ */
+$GLOBALS['wgContentTranslationDatabase'] = null;
+
+/**
+ * If the content translation database is located in a different cluster,
+ * specify the name of the cluster.
+ */
+$GLOBALS['wgContentTranslationCluster'] = false;
+
 /**
  * Whether to use EventLogging.
  * The EventLogging extension must be installed if this option is enabled.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If94d286a12dcd69021f3499549203b5c0f3b6212
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: 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] Move all configuration variables together - change (mediawiki...ContentTranslation)

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

Change subject: Move all configuration variables together
..


Move all configuration variables together

Change-Id: If94d286a12dcd69021f3499549203b5c0f3b6212
---
M ContentTranslation.php
1 file changed, 26 insertions(+), 18 deletions(-)

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



diff --git a/ContentTranslation.php b/ContentTranslation.php
index 63e11c5..3c095a0 100644
--- a/ContentTranslation.php
+++ b/ContentTranslation.php
@@ -44,24 +44,6 @@
 
 $GLOBALS['wgMessagesDirs']['ContentTranslation'] = $dir/i18n;
 
-// Content translation server URL, deprecated, use 
$wgContentTranslationSiteTemplates
-$GLOBALS['wgContentTranslationServerURL'] = null;
-$GLOBALS['wgContentTranslationExperimentalFeatures'] = false;
-$GLOBALS['wgContentTranslationParsoid'] = array(
-   'url' = 'http://parsoid.wmflabs.org/',
-   'timeout' = 100 * 1000, // Parsoid timeout in milliseconds
-   'prefix' = 'enwiki',
-);
-
-// Content translaton database to provide dashboard and other features.
-// Provide the database name as the value.
-// See sql/contenttranslation.sql for scripts to create this database.
-$GLOBALS['wgContentTranslationDatabase'] = null;
-
-// If the content translation database is located in a different cluster,
-// specify the name of the cluster.
-$GLOBALS['wgContentTranslationCluster'] = false;
-
 $GLOBALS['wgExtensionMessagesFiles']['ContentTranslationAlias'] =
$dir/ContentTranslation.alias.php;
 
@@ -106,6 +88,32 @@
 };
 
 // Globals for this extension
+
+/**
+ * Content translation server URL
+ * @deprecated, use $wgContentTranslationSiteTemplates
+ */
+$GLOBALS['wgContentTranslationServerURL'] = null;
+$GLOBALS['wgContentTranslationExperimentalFeatures'] = false;
+$GLOBALS['wgContentTranslationParsoid'] = array(
+   'url' = 'http://parsoid.wmflabs.org/',
+   'timeout' = 100 * 1000, // Parsoid timeout in milliseconds
+   'prefix' = 'enwiki',
+);
+
+/**
+ * Content translaton database to provide dashboard and other features.
+ * Provide the database name as the value.
+ * @see sql/contenttranslation.sql for scripts to create this database.
+ */
+$GLOBALS['wgContentTranslationDatabase'] = null;
+
+/**
+ * If the content translation database is located in a different cluster,
+ * specify the name of the cluster.
+ */
+$GLOBALS['wgContentTranslationCluster'] = false;
+
 /**
  * Whether to use EventLogging.
  * The EventLogging extension must be installed if this option is enabled.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If94d286a12dcd69021f3499549203b5c0f3b6212
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@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] Warnings: Show warning on translation title change - change (mediawiki...ContentTranslation)

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

Change subject: Warnings: Show warning on translation title change
..


Warnings: Show warning on translation title change

* Adds hook and listener to check for existing title on translation title change

Change-Id: Id237c1e487558c68d089e7b34a90e338eadaa82c
---
M hooks.md
M modules/header/ext.cx.header.js
M modules/translation/ext.cx.translation.js
3 files changed, 15 insertions(+), 2 deletions(-)

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



diff --git a/hooks.md b/hooks.md
index 02b5a8e..e2d2e84 100644
--- a/hooks.md
+++ b/hooks.md
@@ -108,4 +108,8 @@
 
 ##  mw.cx.translation.placeholders.ready
 
-Fired after every section in the translation column has been filled with a 
placeholder.
\ No newline at end of file
+Fired after every section in the translation column has been filled with a 
placeholder.
+
+##  mw.cx.translation.title.change
+
+Fired when the title for the translation is changed. Check for existing title 
listens for this.
diff --git a/modules/header/ext.cx.header.js b/modules/header/ext.cx.header.js
index d22576f..a3ce082 100644
--- a/modules/header/ext.cx.header.js
+++ b/modules/header/ext.cx.header.js
@@ -46,7 +46,6 @@
this.$publishButton.show().prop( 'disabled', 
weights.any === 0 );
}
 
-
};
 
/**
@@ -154,6 +153,7 @@
mw.hook( 'mw.cx.success' ).add( $.proxy( this.showSuccess, this 
) );
mw.hook( 'mw.cx.error.anonuser' ).add( $.proxy( 
this.showLoginMessage, this ) );
mw.hook( 'mw.cx.translation.ready' ).add( $.proxy( 
this.checkTargetTitle, this ) );
+   mw.hook( 'mw.cx.translation.title.change' ).add( $.proxy( 
this.checkTargetTitle, this ) );
};
 
/**
diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index e0426e7..46dcf74 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -152,6 +152,15 @@
 
// Capture translation selection on keyup and mouseup
this.$container.on( 'keyup mouseup', saveCursorPosition );
+
+   this.$title.on( 'blur', function () {
+   var title = cxTranslation.$title.text();
+
+   if ( title !== mw.cx.targetTitle ) {
+   mw.cx.targetTitle = cxTranslation.$title.text();
+   mw.hook( 'mw.cx.translation.title.change' 
).fire();
+   }
+   } );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id237c1e487558c68d089e7b34a90e338eadaa82c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Jsahleen jsahl...@wikimedia.org
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] Fix inconsistencies in attribution text * use the same text ... - change (mediawiki...MultimediaViewer)

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

Change subject: Fix inconsistencies in attribution text * use the same text for 
plain and HTML format * use the same text whether or not a deed URL is set
..


Fix inconsistencies in attribution text
* use the same text for plain and HTML format
* use the same text whether or not a deed URL is set

Bug: T76030
Change-Id: Iea53766b2e2031206d707838551bd82dba29e8c4
---
M resources/mmv/mmv.EmbedFileFormatter.js
M resources/mmv/model/mmv.model.License.js
M tests/qunit/mmv/mmv.EmbedFileFormatter.test.js
3 files changed, 53 insertions(+), 5 deletions(-)

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



diff --git a/resources/mmv/mmv.EmbedFileFormatter.js 
b/resources/mmv/mmv.EmbedFileFormatter.js
index e815d79..49a0ddb 100644
--- a/resources/mmv/mmv.EmbedFileFormatter.js
+++ b/resources/mmv/mmv.EmbedFileFormatter.js
@@ -127,7 +127,7 @@
}
if ( info.imageInfo.license ) {
creditParams[0] += 'l';
-   creditParams.push( this.htmlUtils.htmlToText( 
info.imageInfo.license.longName || '' ) );
+   creditParams.push( this.htmlUtils.htmlToText( 
info.imageInfo.license.getShortName() ) );
}
 
creditParams[0] += 's';
diff --git a/resources/mmv/model/mmv.model.License.js 
b/resources/mmv/model/mmv.model.License.js
index df04b47..1c007d4 100644
--- a/resources/mmv/model/mmv.model.License.js
+++ b/resources/mmv/model/mmv.model.License.js
@@ -122,15 +122,17 @@
 * @return {string}
 */
LP.getShortLink = function () {
+   var shortName = this.getShortName();
+
if ( this.deedUrl ) {
return this.htmlUtils.jqueryToHtml(
$( 'a' ).prop( {
href: this.deedUrl,
-   title: this.longName
-   } ).text( this.getShortName() )
+   title: this.longName || shortName
+   } ).text( shortName )
);
} else {
-   return this.shortName;
+   return shortName;
}
};
 
diff --git a/tests/qunit/mmv/mmv.EmbedFileFormatter.test.js 
b/tests/qunit/mmv/mmv.EmbedFileFormatter.test.js
index c73f57f..10d6aca 100644
--- a/tests/qunit/mmv/mmv.EmbedFileFormatter.test.js
+++ b/tests/qunit/mmv/mmv.EmbedFileFormatter.test.js
@@ -212,12 +212,58 @@
getNameText: function () { return 
'Image Title'; }
},
license: {
+   getShortName: function () { return 
'DWTFYWPL'; },
longName: 'Do What the Fuck You Want 
Public License',
isFree: this.sandbox.stub().returns( 
true )
}
}
} );
 
-   assert.strictEqual( txt, 'Image Title by Author - Source. 
Licensed under Do What the Fuck You Want Public License via Localcommons - 
qx', 'License message works' );
+   assert.strictEqual( txt, 'Image Title by Author - Source. 
Licensed under DWTFYWPL via Localcommons - qx', 'License message works' );
+   } );
+
+   QUnit.test( 'getCreditHtml():', 2, function ( assert ) {
+   var html, formatter = new mw.mmv.EmbedFileFormatter();
+
+   this.sandbox.stub( formatter, 'getLinkUrl' ).returns( 'qx' 
);
+
+   html = formatter.getCreditHtml( {
+   repoInfo: {
+   displayName: 'Localcommons',
+   getSiteLink: function () { return 'quux'; }
+   },
+
+   imageInfo: {
+   author: 'Author',
+   source: 'Source',
+   title: {
+   getNameText: function () { return 
'Image Title'; }
+   }
+   }
+   } );
+
+   assert.strictEqual( html, 'a href=qxImage Title/a 
by Author - Source. Via a href=quuxLocalcommons/a.', 'Sanity check' );
+
+   html = formatter.getCreditHtml( {
+   repoInfo: {
+   displayName: 'Localcommons',
+   getSiteLink: function () { return 'quux'; }
+   },
+
+   imageInfo: {
+   author: 'Author',
+   source: 'Source',
+   title: {
+   

[MediaWiki-commits] [Gerrit] firewall: move allow NTP rule to base restrict - change (operations/puppet)

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

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

Change subject: firewall: move allow NTP rule to base  restrict
..

firewall: move allow NTP rule to base  restrict

The otherwise generic ferm module had an allow ntp rule, as
introduced by commit 4e9f095. That's pretty ugly, so move it to
role::ntp instead, where it belongs.

While at it, there is no reason to have NTP open on the firewall on
every host. Stateful tracking of the outgoing connection should be
enough for clients, so move the stanza only under the server portion of
the role configuration.

Change-Id: I37d7443d3a5acb7cb0c591e77555fefd6f1a510e
---
M manifests/role/ntp.pp
M modules/ferm/manifests/init.pp
2 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/176901/1

diff --git a/manifests/role/ntp.pp b/manifests/role/ntp.pp
index 0d93cee..0144a08 100644
--- a/manifests/role/ntp.pp
+++ b/manifests/role/ntp.pp
@@ -101,6 +101,11 @@
 query_acl = $neon_acl,
 }
 
+ferm::service { 'ntp':
+proto = 'udp',
+port  = 'ntp',
+}
+
 monitoring::service { 'ntp peers':
 description   = 'NTP peers',
 check_command = 'check_ntp_peer!0.1!0.5';
diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp
index d8b4259..75b4450 100644
--- a/modules/ferm/manifests/init.pp
+++ b/modules/ferm/manifests/init.pp
@@ -53,10 +53,4 @@
 # the rules are virtual resources for cases where they are defined in a
 # class but the host doesn't have the ferm class included
 File | tag == 'ferm' |
-
-#allow udp dpt 123
-
-ferm::rule { 'allow_ntp':
-rule = 'proto udp dport 123 ACCEPT;'
-}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37d7443d3a5acb7cb0c591e77555fefd6f1a510e
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] firewall: move allow NTP rule to role::ntp - change (operations/puppet)

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

Change subject: firewall: move allow NTP rule to role::ntp
..


firewall: move allow NTP rule to role::ntp

The otherwise generic ferm module had an allow ntp rule, as
introduced by commit 4e9f095. That's pretty ugly, so move it to
role::ntp instead, where it belongs.

While at it, there is no reason to have NTP open on the firewall on
every host. Stateful tracking of the outgoing connection should be
enough for clients, so move the stanza only under the server portion of
the role configuration.

Change-Id: I37d7443d3a5acb7cb0c591e77555fefd6f1a510e
---
M manifests/role/ntp.pp
M modules/ferm/manifests/init.pp
2 files changed, 5 insertions(+), 6 deletions(-)

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



diff --git a/manifests/role/ntp.pp b/manifests/role/ntp.pp
index 0d93cee..0144a08 100644
--- a/manifests/role/ntp.pp
+++ b/manifests/role/ntp.pp
@@ -101,6 +101,11 @@
 query_acl = $neon_acl,
 }
 
+ferm::service { 'ntp':
+proto = 'udp',
+port  = 'ntp',
+}
+
 monitoring::service { 'ntp peers':
 description   = 'NTP peers',
 check_command = 'check_ntp_peer!0.1!0.5';
diff --git a/modules/ferm/manifests/init.pp b/modules/ferm/manifests/init.pp
index d8b4259..75b4450 100644
--- a/modules/ferm/manifests/init.pp
+++ b/modules/ferm/manifests/init.pp
@@ -53,10 +53,4 @@
 # the rules are virtual resources for cases where they are defined in a
 # class but the host doesn't have the ferm class included
 File | tag == 'ferm' |
-
-#allow udp dpt 123
-
-ferm::rule { 'allow_ntp':
-rule = 'proto udp dport 123 ACCEPT;'
-}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I37d7443d3a5acb7cb0c591e77555fefd6f1a510e
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] mediawiki: convert hhvm appservers to be part of the common ... - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: mediawiki: convert hhvm appservers to be part of the common pool
..


mediawiki: convert hhvm appservers to be part of the common pool

Change-Id: I253d02302825d54823e7be57096e0cd1eca0f2e8
---
D hieradata/mainrole/appserver_hhvm.yaml
M hieradata/regex.yaml
M manifests/role/mediawiki.pp
3 files changed, 3 insertions(+), 21 deletions(-)

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



diff --git a/hieradata/mainrole/appserver_hhvm.yaml 
b/hieradata/mainrole/appserver_hhvm.yaml
deleted file mode 100644
index 62c4e1f..000
--- a/hieradata/mainrole/appserver_hhvm.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-cluster: appserver_hhvm
-role::mediawiki::webserver::pool: hhvm_appservers
-role::mediawiki::webserver::additional_pool: hhvm_api
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 0fa309f..6b73349 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -1,11 +1,5 @@
-# mw1017-1018 are hhvm apaches (trusty)
-hhvm_appservers:
-  __regex: !ruby/regexp /^mw101[7-8]\.eqiad\.wmnet$/
-  mainrole: appserver_hhvm
-  admin::groups:
-- deployment
 
-# mw1019-mw1113 are are apaches
+# mw1017-mw1113 are are apaches
 appservers_1:
   __regex: !ruby/regexp /^mw1(019|0[2-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/
   mainrole: appserver
diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index cb77e15..8b13b54 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -40,7 +40,7 @@
 }
 }
 
-class role::mediawiki::webserver( $pool, $workers_limit = undef, 
$additional_pool = undef ) {
+class role::mediawiki::webserver( $pool, $workers_limit = undef) {
 include ::role::mediawiki::common
 include ::apache::monitoring
 include ::lvs::configuration
@@ -50,16 +50,7 @@
 workers_limit = $workers_limit,
 }
 
-# Horrible, temporarily hack for hhvm - which is sharing servers for api 
and normal
-# appservers; this will go away soon
-if $additional_pool != undef {
-$ips = [
-$lvs::configuration::lvs_service_ips[$::realm][$pool][$::site],
-
$lvs::configuration::lvs_service_ips[$::realm][$additional_pool][$::site]
-]
-} else {
-$ips = $lvs::configuration::lvs_service_ips[$::realm][$pool][$::site]
-}
+$ips = $lvs::configuration::lvs_service_ips[$::realm][$pool][$::site]
 
 class { 'lvs::realserver':
 realserver_ips = $ips,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I253d02302825d54823e7be57096e0cd1eca0f2e8
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@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] lvs: remove the HHVM specialized pools - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: lvs: remove the HHVM specialized pools
..


lvs: remove the HHVM specialized pools

Change-Id: I831a105ef4f01b1e7857f1ad97e9e252e9617abe
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/lvs.pp
M modules/lvs/manifests/configuration.pp
2 files changed, 0 insertions(+), 42 deletions(-)

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



diff --git a/manifests/role/lvs.pp b/manifests/role/lvs.pp
index 13a2cdc..0c6192a 100644
--- a/manifests/role/lvs.pp
+++ b/manifests/role/lvs.pp
@@ -36,9 +36,7 @@
 ],
 /^(lvs100[36])$/ = [
 $sip['apaches'][$::site],
-$sip['hhvm_appservers'][$::site],
 $sip['api'][$::site],
-$sip['hhvm_api'][$::site],
 $sip['rendering'][$::site],
 $sip['search_pool1'][$::site],
 $sip['search_pool2'][$::site],
diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index e6e9dee..5a824d2 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -124,17 +124,11 @@
 'apaches' = {
 'eqiad' = 10.2.2.1,
 },
-'hhvm_appservers' = {
-'eqiad' = 10.2.2.2,
-},
 'rendering' = {
 'eqiad' = 10.2.2.21,
 },
 'api' = {
 'eqiad' = 10.2.2.22,
-},
-'hhvm_api' = {
-'eqiad' = 10.2.2.3,
 },
 'search_pool1' = {
 'eqiad' = 10.2.2.11,
@@ -199,10 +193,6 @@
 'text' = {
 },
 'apaches' = {
-},
-'hhvm_appservers' = {
-},
-'hhvm_apaches' = {
 },
 'rendering' = {
 },
@@ -547,21 +537,6 @@
 'RunCommand' = $runcommand_monitor_options
 },
 },
-hhvm_appservers = {
-'description' = Main MediaWiki application server cluster 
(HHVM), hhvm-appservers.svc.eqiad.wmnet,
-'class' = low-traffic,
-'sites' = [ eqiad ],
-'ip' = $service_ips['hhvm_appservers'][$::site],
-'bgp' = yes,
-'depool-threshold' = .3,
-'monitors' = {
-'ProxyFetch' = {
-'url' = [ 'http://en.wikipedia.org/wiki/Main_Page' ],
-},
-'IdleConnection' = $idleconnection_monitor_options,
-'RunCommand' = $runcommand_monitor_options
-},
-},
 rendering = {
 'description' = MediaWiki thumbnail rendering cluster, 
rendering.svc.eqiad.wmnet,
 'class' = low-traffic,
@@ -588,21 +563,6 @@
 'ProxyFetch' = {
 'url' = [ 'http://en.wikipedia.org/w/api.php' ],
 },
-'IdleConnection' = $idleconnection_monitor_options,
-'RunCommand' = $runcommand_monitor_options
-},
-},
-hhvm_api = {
-'description' = MediaWiki API cluster (HHVM), 
hhvm-api.svc.eqiad.wmnet,
-'class' = low-traffic,
-'sites' = [ eqiad ],
-'ip' = $service_ips['hhvm_api'][$::site],
-'bgp' = yes,
-'depool-threshold' = .6,
-'monitors' = {
-'ProxyFetch' = {
-'url' = [ 'http://en.wikipedia.org/w/api.php' ],
-},
 'IdleConnection' = $idleconnection_monitor_options,
 'RunCommand' = $runcommand_monitor_options
 },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I831a105ef4f01b1e7857f1ad97e9e252e9617abe
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@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] HAT: remove last references to the HHVM pools - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: HAT: remove last references to the HHVM pools
..


HAT: remove last references to the HHVM pools

Change-Id: I4bce03efea538cc2495529781a34b6c716f4a57d
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
M manifests/role/cache.pp
M modules/lvs/manifests/configuration.pp
M modules/torrus/tests/cdn.pp
3 files changed, 0 insertions(+), 32 deletions(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index 7e29ca7..58bad22 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -308,9 +308,7 @@
 $backends = {
 'production' = {
 'appservers'= 
$lvs::configuration::lvs_service_ips['production']['apaches'],
-'hhvm_appservers'   = 
$lvs::configuration::lvs_service_ips['production']['hhvm_appservers'],
 'api'   = 
$lvs::configuration::lvs_service_ips['production']['api'],
-'hhvm_api'  = 
$lvs::configuration::lvs_service_ips['production']['hhvm_api'],
 'rendering' = 
$lvs::configuration::lvs_service_ips['production']['rendering'],
 'bits' = {
 'eqiad' = 
flatten([$lvs::configuration::lvs_service_ips['production']['bits']['eqiad']['bitslb']]),
@@ -330,19 +328,9 @@
 '10.68.17.208', # deployment-mediawiki02
 ],
 },
-'hhvm_appservers' = {
-'eqiad' = [
-'10.68.17.208', # deployment-mediawiki02
-],
-},
 'api' = {
 'eqiad' = [
 '10.68.17.96',  # deployment-mediawiki01
-'10.68.17.208', # deployment-mediawiki02
-],
-},
-'hhvm_api' = {
-'eqiad' = [
 '10.68.17.208', # deployment-mediawiki02
 ],
 },
@@ -736,9 +724,7 @@
 $varnish_be_directors = {
 1 = {
 'backend'   = 
$role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary],
-'hhvm_appservers'   = 
$role::cache::configuration::backends[$::realm]['hhvm_appservers'][$::mw_primary],
 'api'   = 
$role::cache::configuration::backends[$::realm]['api'][$::mw_primary],
-'hhvm_api'  = 
$role::cache::configuration::backends[$::realm]['hhvm_api'][$::mw_primary],
 'rendering' = 
$role::cache::configuration::backends[$::realm]['rendering'][$::mw_primary],
 'test_wikipedia'= 
$role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary],
 },
@@ -1084,7 +1070,6 @@
 1 = {
 'backend' = 
$::role::cache::configuration::backends[$::realm]['bits_appservers'][$::mw_primary],
 'test_wikipedia' = 
$::role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary],
-'hhvm_appservers'   = 
$role::cache::configuration::backends[$::realm]['hhvm_appservers'][$::mw_primary],
 },
 2 = {
 'backend' = 
sort(flatten(values($role::cache::configuration::backends[$::realm]['bits'])))
@@ -1192,9 +1177,6 @@
 'backend'   = 
$role::cache::configuration::backends[$::realm]['appservers'][$::mw_primary],
 'api'   = 
$role::cache::configuration::backends[$::realm]['api'][$::mw_primary],
 'test_wikipedia'= 
$role::cache::configuration::backends[$::realm]['test_appservers'][$::mw_primary],
-'hhvm_appservers'   = 
$role::cache::configuration::backends[$::realm]['hhvm_appservers'][$::mw_primary],
-'hhvm_api'  = 
$role::cache::configuration::backends[$::realm]['hhvm_api'][$::mw_primary],
-
 },
 2 = {
 'eqiad' = 
$role::cache::configuration::active_nodes[$::realm]['mobile']['eqiad'],
diff --git a/modules/lvs/manifests/configuration.pp 
b/modules/lvs/manifests/configuration.pp
index 5a824d2..f54a8e5 100644
--- a/modules/lvs/manifests/configuration.pp
+++ b/modules/lvs/manifests/configuration.pp
@@ -198,8 +198,6 @@
 },
 'api' = {
 },
-'hhvm_api' = {
-},
 'bits' = {
 },
 'search_pool1' = {},
diff --git a/modules/torrus/tests/cdn.pp b/modules/torrus/tests/cdn.pp
index 186bb22..0d89a1d 100644
--- a/modules/torrus/tests/cdn.pp
+++ b/modules/torrus/tests/cdn.pp
@@ -144,9 +144,7 @@
 $backends = {
 'production' = {
 

[MediaWiki-commits] [Gerrit] Remove unused imports from Client - change (mediawiki...Wikibase)

2014-12-02 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Remove unused imports from Client
..

Remove unused imports from Client

Some are not reported by PHPStorm, I found them with a regex.

Change-Id: I6cd2db1d31ace633568573f66caafa0a30aefe84
---
M client/WikibaseClient.hooks.php
M client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
M client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
M client/includes/hooks/ParserAfterParseHookHandler.php
M client/includes/hooks/SidebarHookHandlers.php
M client/includes/hooks/UpdateRepoHookHandlers.php
M client/includes/scribunto/WikibaseLuaEntityBindings.php
M client/tests/phpunit/includes/Usage/Sql/SqlUsageTrackerTest.php
M client/tests/phpunit/includes/Usage/Sql/UsageTableUpdaterTest.php
M client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php
M client/tests/phpunit/includes/UsageUpdaterTest.php
M client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php
M client/tests/phpunit/includes/store/TitleFactoryTest.php
14 files changed, 0 insertions(+), 20 deletions(-)


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

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 5cc19e5..ad9078e 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -5,7 +5,6 @@
 use Action;
 use BaseTemplate;
 use ChangesList;
-use Content;
 use FormOptions;
 use IContextSource;
 use Message;
@@ -35,12 +34,9 @@
 use Wikibase\Client\RecentChanges\ExternalChangeFactory;
 use Wikibase\Client\RecentChanges\RecentChangesFilterOptions;
 use Wikibase\Client\RepoItemLinkGenerator;
-use Wikibase\Client\UpdateRepo\UpdateRepoOnDelete;
-use Wikibase\Client\UpdateRepo\UpdateRepoOnMove;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\SiteLink;
-use WikiPage;
 
 /**
  * File defining the hook handlers for the Wikibase Client extension.
diff --git a/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php 
b/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
index c318089..e893a62 100644
--- a/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
+++ b/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
@@ -6,8 +6,6 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\Snak;
-use Wikibase\DataModel\Statement\BestStatementsFinder;
-use Wikibase\DataModel\Statement\Statement;
 use Wikibase\DataModel\StatementListProvider;
 use Wikibase\Lib\Store\EntityLookup;
 
diff --git a/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php 
b/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
index d2eca0f..e344065 100644
--- a/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
+++ b/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
@@ -4,7 +4,6 @@
 
 use DatabaseUpdater;
 use Wikibase\Client\WikibaseClient;
-use Wikibase\DataModel\Entity\EntityIdParser;
 
 /**
  * Schema updater for SqlUsageTracker
diff --git a/client/includes/hooks/ParserAfterParseHookHandler.php 
b/client/includes/hooks/ParserAfterParseHookHandler.php
index 81ad94e..c27bc49 100644
--- a/client/includes/hooks/ParserAfterParseHookHandler.php
+++ b/client/includes/hooks/ParserAfterParseHookHandler.php
@@ -10,8 +10,6 @@
 use Wikibase\InterwikiSorter;
 use Wikibase\LangLinkHandler;
 use Wikibase\NamespaceChecker;
-use Wikibase\NoLangLinkHandler;
-use Wikibase\SettingsArray;
 
 /**
  * @since 0.5.
diff --git a/client/includes/hooks/SidebarHookHandlers.php 
b/client/includes/hooks/SidebarHookHandlers.php
index a703555..4e7910e 100644
--- a/client/includes/hooks/SidebarHookHandlers.php
+++ b/client/includes/hooks/SidebarHookHandlers.php
@@ -10,7 +10,6 @@
 use Wikibase\Client\WikibaseClient;
 use Wikibase\NamespaceChecker;
 use Wikibase\NoLangLinkHandler;
-use Wikibase\SettingsArray;
 
 /**
  * ParserOutput related hook handlers.
diff --git a/client/includes/hooks/UpdateRepoHookHandlers.php 
b/client/includes/hooks/UpdateRepoHookHandlers.php
index a1b2180..45566a2 100644
--- a/client/includes/hooks/UpdateRepoHookHandlers.php
+++ b/client/includes/hooks/UpdateRepoHookHandlers.php
@@ -10,7 +10,6 @@
 use ManualLogEntry;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\NamespaceChecker;
-use Wikibase\SettingsArray;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use Wikibase\Client\UpdateRepo\UpdateRepo;
 use Wikibase\Client\UpdateRepo\UpdateRepoOnDelete;
diff --git a/client/includes/scribunto/WikibaseLuaEntityBindings.php 
b/client/includes/scribunto/WikibaseLuaEntityBindings.php
index d0e343d..e908c16 100644
--- a/client/includes/scribunto/WikibaseLuaEntityBindings.php
+++ b/client/includes/scribunto/WikibaseLuaEntityBindings.php
@@ -12,7 

[MediaWiki-commits] [Gerrit] Make all of Content Translation a beta feature - change (mediawiki...ContentTranslation)

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

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

Change subject: Make all of Content Translation a beta feature
..

Make all of Content Translation a beta feature

The existing beta feature for entry point has been absorbed into
a new beta feature that also covers the visibility of the special
pages. Using a combination of SpecialPage::isListed and check in
Special::execute to have the special page act as if they do not
exist for users for whom the feature is not enabled.

Added a global for the beta feature use, so that developers can
turn it off for example. As before, if BetaFeatures extensions
does not exist, acts as if the global was false.

Removed old beta feature images and added new ones.

Bug: T76175
Change-Id: Iff4ff583fe434ef7f15bc7af53e093ce1490a95c
---
M ContentTranslation.hooks.php
M ContentTranslation.php
M i18n/en.json
M i18n/qqq.json
A images/cx-icon-ltr.svg
A images/cx-icon-rtl.svg
D modules/entrypoint/images/translate-redlink-ltr.svg
D modules/entrypoint/images/translate-redlink-rtl.svg
M specials/SpecialContentTranslation.php
M specials/SpecialContentTranslationStats.php
10 files changed, 76 insertions(+), 30 deletions(-)


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

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 513b5ca..c707aaf 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -10,8 +10,27 @@
 
 class ContentTranslationHooks {
/**
-* @param OutputPage $out
-* @param Skin $skin
+* Utility function that checks whether CX is enabled for a given user.
+* Currently it checks that if CX is a beta feature, whether the user 
has
+* enabled it. Otherwise it is always enabled.
+*
+* @param User $user
+* @return Boolean
+*/
+   public static function isEnabledForUser( User $user ) {
+   global $wgContentTranslationAsBetaFeature;
+
+   if ( !$wgContentTranslationAsBetaFeature ) {
+   return true;
+   }
+
+   return
+   class_exists( 'BetaFeatures' ) 
+   BetaFeatures::isFeatureEnabled( $user, 'cx' );
+   }
+
+
+   /**
 * Hook: BeforePageDisplay
 */
public static function addModules( OutputPage $out, Skin $skin ) {
@@ -20,22 +39,6 @@
$title = $out-getTitle();
$user = $out-getUser();
 
-   $redlinkFeatureEnabled = class_exists( 'BetaFeatures' ) 
-   BetaFeatures::isFeatureEnabled( $user, 
'red-interlanguage-link' );
-
-   if ( $user-isLoggedIn() ) {
-   if ( $redlinkFeatureEnabled 
-   $title-inNamespace( NS_MAIN ) 
-   $out-getLanguage()-getCode() !== 
$title-getPageLanguage()-getCode()
-   ) {
-   $out-addModules( 'ext.cx.redlink' );
-   }
-
-   if ( class_exists( 'GuidedTourHooks' ) ) {
-   $out-addModules( 'ext.guidedTour' );
-   }
-   }
-
// If EventLogging integration is enabled, load the schema 
module
// and the event logging functions module
if ( $wgContentTranslationEventLogging ) {
@@ -43,6 +46,23 @@
'schema.ContentTranslation',
'ext.cx.eventlogging',
) );
+   }
+
+   // CX is currently restricted to only logged in users
+   if ( $user-isLoggedIn() ) {
+   return;
+   }
+
+   if (
+   self::isEnabledForUser( $user ) 
+   $title-inNamespace( NS_MAIN ) 
+   $out-getLanguage()-getCode() !== 
$title-getPageLanguage()-getCode()
+   ) {
+   $out-addModules( 'ext.cx.redlink' );
+   }
+
+   if ( class_exists( 'GuidedTourHooks' ) ) {
+   $out-addModules( 'ext.guidedTour' );
}
}
 
@@ -54,14 +74,14 @@
public static function getPreferences( User $user, array $prefs ) {
global $wgExtensionAssetsPath;
 
-   $imageDir = 
$wgExtensionAssetsPath/ContentTranslation/modules/entrypoint/images;
+   $imageDir = $wgExtensionAssetsPath/ContentTranslation/images;
 
-   $prefs['red-interlanguage-link'] = array(
-   'label-message' = 
'cx-red-interlanguage-link-preference',
-   'desc-message' = 
'cx-red-interlanguage-link-preference-beta-desc',
+   $prefs['cx'] = array(
+  

[MediaWiki-commits] [Gerrit] HAT: move the last servers out of the HHVM pool - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: HAT: move the last servers out of the HHVM pool
..

HAT: move the last servers out of the HHVM pool

Change-Id: Ib100b2b5ab0d2e5cd29e85dcec44bf17435c9d68
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
D hieradata/hosts/mw1163.yaml
M hieradata/regex.yaml
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/07/176907/1

diff --git a/hieradata/hosts/mw1163.yaml b/hieradata/hosts/mw1163.yaml
deleted file mode 100644
index e30aca3..000
--- a/hieradata/hosts/mw1163.yaml
+++ /dev/null
@@ -1 +0,0 @@
-mainrole: appserver_hhvm
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 6b73349..8a4d6a6 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -1,7 +1,7 @@
 
 # mw1017-mw1113 are are apaches
 appservers_1:
-  __regex: !ruby/regexp /^mw1(019|0[2-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^mw1(01[7-9]|0[2-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/
   mainrole: appserver
   admin::groups:
 - deployment

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib100b2b5ab0d2e5cd29e85dcec44bf17435c9d68
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] HAT: move the last servers out of the HHVM pool - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: HAT: move the last servers out of the HHVM pool
..


HAT: move the last servers out of the HHVM pool

Change-Id: Ib100b2b5ab0d2e5cd29e85dcec44bf17435c9d68
Signed-off-by: Giuseppe Lavagetto glavage...@wikimedia.org
---
D hieradata/hosts/mw1163.yaml
M hieradata/regex.yaml
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/hieradata/hosts/mw1163.yaml b/hieradata/hosts/mw1163.yaml
deleted file mode 100644
index e30aca3..000
--- a/hieradata/hosts/mw1163.yaml
+++ /dev/null
@@ -1 +0,0 @@
-mainrole: appserver_hhvm
diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 6b73349..8a4d6a6 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -1,7 +1,7 @@
 
 # mw1017-mw1113 are are apaches
 appservers_1:
-  __regex: !ruby/regexp /^mw1(019|0[2-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/
+  __regex: !ruby/regexp 
/^mw1(01[7-9]|0[2-9][0-9]|10[0-9]|11[0-3])\.eqiad\.wmnet$/
   mainrole: appserver
   admin::groups:
 - deployment

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib100b2b5ab0d2e5cd29e85dcec44bf17435c9d68
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@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 the need of .html in article.getProcessedHtml - change (mediawiki...Popups)

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

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

Change subject: Remove the need of .html in article.getProcessedHtml
..

Remove the need of .html in article.getProcessedHtml

Instead of replacing all instances of the title in the extract -

  '$1b$2/b$3'

We now put symbolic strings there which we use to split the string
and then make an array of text and b elements that get appended
to $contentbox.

Bug: T76378
Change-Id: I0bbff84532f63cac67af1bf889c328ec6ff2
---
M resources/ext.popups.renderer.article.js
M tests/qunit/ext.popups.renderer.article.test.js
2 files changed, 46 insertions(+), 23 deletions(-)


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

diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index bf54b81..c117f0f 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -99,8 +99,8 @@
$contentbox = $( 'a' )
.attr( 'href', href )
.addClass( 'mwe-popups-extract' )
-   .html(
-   article.getProcessedHtml( page.extract, 
page.title )
+   .append(
+   article.getProcessedElements( 
page.extract, page.title )
),
thumbnail = page.thumbnail,
tall = thumbnail  thumbnail.height  thumbnail.width,
@@ -140,25 +140,41 @@
};
 
/**
-* Returns HTML extract after removing parentheses and making the title 
in
-* the extract bold.
+* Returns an array of elements to be appended after removing 
parentheses
+* and making the title in the extract bold.
 *
-* @method getProcessedHtml
+* @method getProcessedElements
 * @param {String} extract
 * @param {String} title
-* @return {String}
+* @return {Array} of elements to appended
 */
-   article.getProcessedHtml = function ( extract, title ) {
+   article.getProcessedElements = function ( extract, title ) {
extract = mw.html.escape( extract );
title = mw.html.escape( title );
title = title.replace( /([.?*+^$[\]\\(){}|-])/g, '\\$1' ); // 
Escape RegExp elements
-   var regExp = new RegExp( '(^|\\s)(' + title + ')(\\s|$)', 'ig' 
);
-   // Make title bold in the extract text
-   extract = extract.replace( regExp, '$1b$2/b$3' );
+   var elements = [], regExp = new RegExp( '(^|\\s)(' + title + 
')(\\s|$)', 'ig' );
+
// Remove text in parentheses along with the parentheses
extract = article.removeParensFromText( extract );
extract = extract.replace(/\s+/g, ' '); // Remove extra white 
spaces
-   return extract;
+
+   // Make title bold in the extract text
+   // As the extract is html escaped there can be no such string 
in it
+   // Also, the title is escaped of RegExp elements thus can't 
have *
+   extract = extract.replace( regExp, '$1snip*$2snip$3' );
+   extract = extract.split( 'snip' );
+
+   for ( var i = 0; i  extract.length; i++ ) {
+   var el, ex = extract[i];
+   if ( ex[0] === * ) {
+   el = $( 'b/b' ).text( ex.substring( 1 ) );
+   } else {
+   el = ex;
+   }
+   elements.push( el );
+   }
+
+   return elements;
};
 
/**
diff --git a/tests/qunit/ext.popups.renderer.article.test.js 
b/tests/qunit/ext.popups.renderer.article.test.js
index 0aef5b9..5b80db4 100644
--- a/tests/qunit/ext.popups.renderer.article.test.js
+++ b/tests/qunit/ext.popups.renderer.article.test.js
@@ -1,49 +1,56 @@
 ( function ( $, mw ) {
 
QUnit.module( 'ext.popups' );
-   QUnit.test( 'render.article.getProcessedHtml', function ( assert ) {
+   QUnit.test( 'render.article.getProcessedElements', function ( assert ) {
QUnit.expect( 7 );
 
-   function test ( extract, title, expected ) {
-   assert.equal(
-   mw.popups.render.article.getProcessedHtml( 
extract, title ),
-   expected
+   function test ( extract, title, expected, msg ) {
+   var $div = $( 'div' ).append(
+   mw.popups.render.article.getProcessedElements( 
extract, title )
);
+   assert.equal( $div.html(), expected, msg );
   

[MediaWiki-commits] [Gerrit] base: Make atop log retention configurable - change (operations/puppet)

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

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

Change subject: base: Make atop log retention configurable
..

base: Make atop log retention configurable

- Reduce default number of days atop logs are kept for to 7
- Make it possible to configure number of days logs are kept for
  via hiera

Bug: T71605
Change-Id: Ic55dbce56267c167792e8ffc14f4f61ca0e39f0d
---
M modules/base/manifests/standard-packages.pp
A modules/base/templates/atop.logrotate.erb
2 files changed, 34 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/176909/1

diff --git a/modules/base/manifests/standard-packages.pp 
b/modules/base/manifests/standard-packages.pp
index 088023f..ffea11a 100644
--- a/modules/base/manifests/standard-packages.pp
+++ b/modules/base/manifests/standard-packages.pp
@@ -1,4 +1,15 @@
-class base::standard-packages {
+# == Class: base::standard-packages
+#
+# Sets up standard packages that might be useful on all hosts.
+#
+# === Parameters
+#
+# [*atop_keeplogs_days*]
+#   Number of days to keep atop logs for.
+#
+class base::standard-packages(
+$atop_logrotate_days = 7,
+){
 
 if ubuntu_version('= trusty') {
 package { [ linux-tools-${::kernelrelease}, 'linux-tools-generic' ]:
@@ -51,5 +62,10 @@
 package { [ 'mlocate', 'os-prober' ]:
 ensure = absent,
 }
+
+file { '/etc/logrotate.d/atop':
+require = Package['atop'],
+content = template('base/atop.logrotate.erb'),
+}
 }
 }
diff --git a/modules/base/templates/atop.logrotate.erb 
b/modules/base/templates/atop.logrotate.erb
new file mode 100644
index 000..3f9eb90
--- /dev/null
+++ b/modules/base/templates/atop.logrotate.erb
@@ -0,0 +1,17 @@
+# atop logrotate configuration file
+
+/var/log/atop.log {
+rotate %= @atop_logrotate_days %
+daily
+nocompress
+nocreate
+missingok
+prerotate
+if pidof atop 21  /dev/null; then
+invoke-rc.d --quiet atop stop 21  /dev/null
+fi
+endscript
+postrotate
+invoke-rc.d --quiet atop start 21  /dev/null
+endscript
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic55dbce56267c167792e8ffc14f4f61ca0e39f0d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Drop unused code from SpecialEntityDataTest - change (mediawiki...Wikibase)

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

Change subject: Drop unused code from SpecialEntityDataTest
..


Drop unused code from SpecialEntityDataTest

If all tests succeed this can not be wrong, right?

This is split from I04767f2 to make it easier to review.

Change-Id: I1a6db4290f361e5c202a63031c6d3946c96be961
---
M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
1 file changed, 4 insertions(+), 30 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php 
b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
index c43d7bf..0a1e5c0 100644
--- a/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
+++ b/repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
@@ -11,7 +11,6 @@
 use Title;
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\Item;
 use Wikibase\EntityFactory;
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Serializers\SerializerFactory;
@@ -19,7 +18,6 @@
 use Wikibase\Repo\LinkedData\EntityDataSerializationService;
 use Wikibase\Repo\LinkedData\EntityDataUriManager;
 use Wikibase\Repo\Specials\SpecialEntityData;
-use Wikibase\Repo\WikibaseRepo;
 
 /**
  * @covers Wikibase\Repo\Specials\SpecialEntityData
@@ -40,28 +38,6 @@
const URI_BASE = 'http://acme.test/';
const URI_DATA = 'http://data.acme.test/';
 
-   protected function saveItem( Item $item ) {
-   //TODO: Same as in EntityDataRequestHandlerTest. Factor out.
-
-   $store = WikibaseRepo::getDefaultInstance()-getEntityStore();
-   $store-saveEntity( $item, testing, $GLOBALS['wgUser'], 
EDIT_NEW );
-   }
-
-   public function getTestItem() {
-   //TODO: Same as in EntityDataRequestHandlerTest. Factor out.
-
-   $prefix = get_class( $this ) . '/';
-   static $item;
-
-   if ( $item === null ) {
-   $item = Item::newEmpty();
-   $item-setLabel( 'en', $prefix . 'Raarrr' );
-   $this-saveItem( $item );
-   }
-
-   return $item;
-   }
-
protected function newSpecialPage() {
$page = new SpecialEntityData();
 
@@ -73,10 +49,8 @@
return $page;
}
 
-   protected function newRequestHandler() {
-   $mockRepo = EntityDataTestProvider::getMockRepository();
-
-   $entityRevisionLookup = $mockRepo;
+   private function newRequestHandler() {
+   $mockRepository = EntityDataTestProvider::getMockRepository();
 
$titleLookup = $this-getMock( 
'Wikibase\Lib\Store\EntityTitleLookup' );
$titleLookup-expects( $this-any() )
@@ -102,7 +76,7 @@
$serializationService = new EntityDataSerializationService(
self::URI_BASE,
self::URI_DATA,
-   $mockRepo,
+   $mockRepository,
$titleLookup,
$serializerFactory,
new SiteList()
@@ -130,7 +104,7 @@
$uriManager,
$titleLookup,
$idParser,
-   $entityRevisionLookup,
+   $mockRepository,
$serializationService,
$defaultFormat,
$maxAge,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a6db4290f361e5c202a63031c6d3946c96be961
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.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] Fix for bug T74667 - change (pywikibot/compat)

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

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

Change subject: Fix for bug T74667
..

Fix for bug T74667

Change-Id: I828d412cd50a6d5c15ef45610400c3a6f1c6a384
---
M wikipedia.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/10/176910/1

diff --git a/wikipedia.py b/wikipedia.py
index 868688d..021afad 100644
--- a/wikipedia.py
+++ b/wikipedia.py
@@ -8561,7 +8561,8 @@
 'list':   'allpages',
 'aplimit': config.special_page_limit,
 'apnamespace': namespace,
-'apfrom':  start
+'apfrom':  start,
+'rawcontinue': ''
 }
 
 if not includeredirects:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I828d412cd50a6d5c15ef45610400c3a6f1c6a384
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Malafaya malaf...@clix.pt

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


[MediaWiki-commits] [Gerrit] shinken: Unify shinken::hosts and shinken::services - change (operations/puppet)

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

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

Change subject: shinken: Unify shinken::hosts and shinken::services
..

shinken: Unify shinken::hosts and shinken::services

Change-Id: I8511a08aa183474f24a1f5005c44678c5449de73
---
M manifests/role/labsshinken.pp
M modules/beta/manifests/monitoring/shinken.pp
M modules/shinken/files/shinken.cfg
R modules/shinken/manifests/config.pp
D modules/shinken/manifests/hosts.pp
M modules/shinken/manifests/init.pp
6 files changed, 10 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/176911/1

diff --git a/manifests/role/labsshinken.pp b/manifests/role/labsshinken.pp
index dbbb876..3e240e2 100644
--- a/manifests/role/labsshinken.pp
+++ b/manifests/role/labsshinken.pp
@@ -14,10 +14,10 @@
 }
 
 # Basic labs instance  infrastructure monitoring
-shinken::services { 'basic-infra-checks':
+shinken::config { 'basic-infra-checks':
 source = 'puppet:///modules/shinken/labs/basic-infra-checks.cfg',
 }
-shinken::services { 'basic-instance-checks':
+shinken::config { 'basic-instance-checks':
 source = 'puppet:///modules/shinken/labs/basic-instance-checks.cfg',
 }
 
diff --git a/modules/beta/manifests/monitoring/shinken.pp 
b/modules/beta/manifests/monitoring/shinken.pp
index d4be750..497b2ea 100644
--- a/modules/beta/manifests/monitoring/shinken.pp
+++ b/modules/beta/manifests/monitoring/shinken.pp
@@ -1,7 +1,7 @@
 # = Class: beta::monitoring::shinken
 # Sets up shinken monitoring for betacluster
 class beta::monitoring::shinken {
-shinken::hosts { 'betacluster-hosts':
+shinken::config { 'betacluster-hosts':
 source = 'puppet:///modules/beta/shinken/hosts.cfg',
 }
-}
\ No newline at end of file
+}
diff --git a/modules/shinken/files/shinken.cfg 
b/modules/shinken/files/shinken.cfg
index 475e320..c40a72a 100644
--- a/modules/shinken/files/shinken.cfg
+++ b/modules/shinken/files/shinken.cfg
@@ -52,7 +52,7 @@
 
 # Generated config files
 cfg_dir=generated/
-cfg_dir=services/
+cfg_dir=customconfig/
 
 # Now groups
 #cfg_file=servicegroups.cfg
diff --git a/modules/shinken/manifests/services.pp 
b/modules/shinken/manifests/config.pp
similarity index 65%
rename from modules/shinken/manifests/services.pp
rename to modules/shinken/manifests/config.pp
index 958d850..6d3174d 100644
--- a/modules/shinken/manifests/services.pp
+++ b/modules/shinken/manifests/config.pp
@@ -1,12 +1,12 @@
-# = Define: shinken::services
-# Setup a shinken services definition file
-define shinken::services(
+# = Define: shinken::config
+# Setup a shinken definition file
+define shinken::config(
 $ensure  = present,
 $source  = undef,
 ) {
 include shinken
 
-file { /etc/shinken/services/$title.cfg:
+file { /etc/shinken/customconfig/$title.cfg:
 ensure  = $ensure,
 source  = $source,
 owner   = 'shinken',
diff --git a/modules/shinken/manifests/hosts.pp 
b/modules/shinken/manifests/hosts.pp
deleted file mode 100644
index 9ae4997..000
--- a/modules/shinken/manifests/hosts.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-# = Define: shinken::hosts
-# Setup a shinken hosts definition file
-# FIXME: Autogenerate hosts definitions later on
-define shinken::hosts(
-$ensure  = present,
-$source  = undef,
-) {
-file { /etc/shinken/hosts/$title.cfg:
-ensure  = $ensure,
-source  = $source,
-owner   = 'shinken',
-group   = 'shinken',
-notify  = Service['shinken'],
-require = Package['shinken']
-}
-}
diff --git a/modules/shinken/manifests/init.pp 
b/modules/shinken/manifests/init.pp
index 3340736..a04731a 100644
--- a/modules/shinken/manifests/init.pp
+++ b/modules/shinken/manifests/init.pp
@@ -55,7 +55,7 @@
 require = Package['shinken'],
 }
 
-file { '/etc/shinken/services':
+file { '/etc/shinken/customconfig':
 ensure  = directory,
 owner   = 'shinken',
 group   = 'shinken',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8511a08aa183474f24a1f5005c44678c5449de73
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
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] Enable JPG thumbnail chaining on Commons - change (operations/mediawiki-config)

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

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

Change subject: Enable JPG thumbnail chaining on Commons
..

Enable JPG thumbnail chaining on Commons

Bug: T69525
Change-Id: Idf3049e3c2d70e92076d3fe32aedb5821514f281
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7deeef1..1c14207 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14364,7 +14364,6 @@
 // Thumbnail chaining
 'wgThumbnailBuckets' = array(
'default' = array( 128, 256, 512, 1024, 2048, 4096 ),
-   'commonswiki' = array(),
 ),
 
 'wgThumbnailMinimumBucketDistance' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf3049e3c2d70e92076d3fe32aedb5821514f281
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Make EntityPerPageBuilderTest fields/methods private - change (mediawiki...Wikibase)

2014-12-02 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Make EntityPerPageBuilderTest fields/methods private
..

Make EntityPerPageBuilderTest fields/methods private

This is split from I04767f2 to make it easier to review.

Change-Id: I752c3e3b9c7c7417ec4d0fc4e19e3235def7c20f
---
M repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
1 file changed, 25 insertions(+), 13 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php 
b/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
index 183e516..e93b408 100644
--- a/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
+++ b/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
@@ -30,17 +30,17 @@
/**
 * @var EntityPerPage
 */
-   protected $entityPerPageTable;
+   private $entityPerPageTable;
 
/**
 * @var array[]
 */
-   protected $entityPerPageRows;
+   private $entityPerPageRows;
 
/**
 * @var WikibaseRepo
 */
-   protected $wikibaseRepo;
+   private $wikibaseRepo;
 
protected function setUp() {
parent::setUp();
@@ -61,7 +61,7 @@
/**
 * @return User
 */
-   protected function getUser() {
+   private function getUser() {
$user = User::newFromName( 'zombie1' );
 
if ( $user-getId() === 0 ) {
@@ -71,7 +71,7 @@
return $user;
}
 
-   protected function clearTables() {
+   private function clearTables() {
$dbw = wfGetDB( DB_MASTER );
 
$dbw-delete( 'page', array( 1 ) );
@@ -82,12 +82,18 @@
}
}
 
+   /**
+* @return bool
+*/
private function itemSupportsRedirect() {
$handler = ContentHandler::getForModelID( 
CONTENT_MODEL_WIKIBASE_ITEM );
return $handler-supportsRedirects();
}
 
-   protected function addItems() {
+   /**
+* @return Item[]
+*/
+   private function addItems() {
$user = $this-getUser();
 
$labels = array( 'New York City', 'Tokyo', 'Jakarta', 'Nairobi',
@@ -125,16 +131,19 @@
return $items;
}
 
-   protected function partialClearEntityPerPageTable( $pageId ) {
+   /**
+* @param int $pageId
+*/
+   private function partialClearEntityPerPageTable( $pageId ) {
$dbw = wfGetDB( DB_MASTER );
$dbw-delete( 'wb_entity_per_page', array( 'epp_page_id  ' . 
$pageId ) );
}
 
/**
-* @return int
 * @throws RuntimeException
+* @return int
 */
-   protected function getPageIdForPartialClear() {
+   private function getPageIdForPartialClear() {
$dbw = wfGetDB( DB_MASTER );
$pageRow = $dbw-select(
'page',
@@ -158,7 +167,7 @@
/**
 * @return int
 */
-   protected function countPages() {
+   private function countPages() {
$dbw = wfGetDB( DB_MASTER );
$pages = $dbw-select( 'page', array( 'page_id' ), array(), 
__METHOD__ );
 
@@ -168,7 +177,7 @@
/**
 * @return int
 */
-   protected function countEntityPerPageRows() {
+   private function countEntityPerPageRows() {
$dbw = wfGetDB( DB_MASTER );
$eppRows = $dbw-selectField( 'wb_entity_per_page', 'count(*)', 
array(), __METHOD__ );
 
@@ -176,9 +185,9 @@
}
 
/**
-* @return array
+* @return array[]
 */
-   protected function getEntityPerPageData() {
+   private function getEntityPerPageData() {
$dbw = wfGetDB( DB_MASTER );
$rows = $dbw-select(
'wb_entity_per_page',
@@ -235,6 +244,9 @@
$this-assertRows( $this-entityPerPageRows );
}
 
+   /**
+* @param array[] $expectedRows
+*/
private function assertRows( $expectedRows ) {
$dbw = wfGetDB( DB_MASTER );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I752c3e3b9c7c7417ec4d0fc4e19e3235def7c20f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Put the bin file in the /usr/bin instead of /usr/ircecho/bin - change (operations...ircecho)

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

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

Change subject: Put the bin file in the /usr/bin instead of /usr/ircecho/bin
..

Put the bin file in the /usr/bin instead of /usr/ircecho/bin

- Also remove unused /lib dir
- Fix init script to take into account new install location
- Bump version number

Bug: T76208
Change-Id: I911048c233a043edbff7b645ab2912eb7bc9b8ad
---
M debian/changelog
D debian/dirs
M debian/install
M debian/ircecho.init
4 files changed, 8 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/ircecho 
refs/changes/14/176914/1

diff --git a/debian/changelog b/debian/changelog
index 03cfdf8..cf4e26e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ircecho (1.4-2) unstable; urgency=low
+
+  * Simplify file layout and directory structure.
+
+ -- Yuvi Pandayuvipa...@gmail.org  Tue, 02 Dec 2014 16:30:00 +0530
+
 ircecho (1.4-1) precise-wikimedia; urgency=low
 
   * Build for precise
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index 81a2807..000
--- a/debian/dirs
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/ircecho
-usr/ircecho/bin
-usr/ircecho/lib
diff --git a/debian/install b/debian/install
index fba62f7..26cd9f5 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1 @@
-ircecho /usr/ircecho/bin
+ircecho /usr/bin/ircecho
diff --git a/debian/ircecho.init b/debian/ircecho.init
index 901d87b..689c59b 100644
--- a/debian/ircecho.init
+++ b/debian/ircecho.init
@@ -15,7 +15,7 @@
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC=Input to IRC echoer
-DAEMON=/usr/ircecho/bin/ircecho
+DAEMON=/usr/bin/ircecho
 USER=nobody
 SCRIPTNAME=/etc/init.d/ircecho
 NAME=ircecho

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I911048c233a043edbff7b645ab2912eb7bc9b8ad
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/ircecho
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] Avoid getDefaultInstance method name in tests - change (mediawiki...Wikibase)

2014-12-02 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Avoid getDefaultInstance method name in tests
..

Avoid getDefaultInstance method name in tests

This is split from I04767f2 to make it easier to review.

Change-Id: I712432649c38e5e8cc3148e5c12001b1cf33c6ed
---
M client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
M client/tests/phpunit/includes/WikibaseClientTest.php
M repo/tests/phpunit/includes/WikibaseRepoTest.php
4 files changed, 102 insertions(+), 100 deletions(-)


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

diff --git 
a/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php 
b/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
index b8dbc26..1a4ef8d 100644
--- a/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
+++ b/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
@@ -20,14 +20,14 @@
  */
 class PropertyIdResolverTest extends \PHPUnit_Framework_TestCase {
 
-   private function getDefaultInstance() {
-   $repo = $this-newMockRepository();
-   $propertyLabelResolver = new MockPropertyLabelResolver( 'en', 
$repo );
+   private function getPropertyIdResolver() {
+   $mockRepository = $this-getMockRepository();
+   $propertyLabelResolver = new MockPropertyLabelResolver( 'en', 
$mockRepository );
 
return new PropertyIdResolver( $propertyLabelResolver );
}
 
-   private function newMockRepository() {
+   private function getMockRepository() {
$propertyId = new PropertyId( 'P1337' );
 
$property = Property::newFromType( 'string' );
@@ -43,8 +43,8 @@
/**
 * @dataProvider resolvePropertyIdProvider
 */
-   public function testResolvePropertyId( $expected, $propertyLabelOrId ) {
-   $propertyIdResolver = $this-getDefaultInstance();
+   public function testResolvePropertyId( PropertyId $expected, 
$propertyLabelOrId ) {
+   $propertyIdResolver = $this-getPropertyIdResolver();
 
$propertyId = $propertyIdResolver-resolvePropertyId( 
$propertyLabelOrId, 'en' );
$this-assertEquals( $expected, $propertyId );
@@ -63,7 +63,7 @@
 * @dataProvider 
resolvePropertyIdWithInvalidInput_throwsExceptionProvider
 */
public function testResolvePropertyIdWithInvalidInput_throwsException( 
$propertyIdOrLabel ) {
-   $propertyIdResolver = $this-getDefaultInstance();
+   $propertyIdResolver = $this-getPropertyIdResolver();
 
$this-setExpectedException( 
'Wikibase\Lib\PropertyLabelNotResolvedException' );
 
diff --git 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
index 65ddf59..108a822 100644
--- 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
@@ -11,6 +11,7 @@
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\DataModel\Statement\Statement;
+use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Test\MockRepository;
 
 /**
@@ -26,16 +27,19 @@
  */
 class SnaksFinderTest extends \PHPUnit_Framework_TestCase {
 
-   private function getDefaultInstance() {
-   $repo = $this-newMockRepository();
+   private function getSnaksFinder() {
+   $entityLookup = $this-getEntityLookup();
 
-   return new SnaksFinder( $repo );
+   return new SnaksFinder( $entityLookup );
}
 
-   private function newMockRepository() {
+   /**
+* @return EntityLookup
+*/
+   private function getEntityLookup() {
$propertyId = new PropertyId( 'P1337' );
 
-   $entityLookup = new MockRepository();
+   $mockRepository = new MockRepository();
 
$statement1 = new Statement( new Claim( new PropertyValueSnak(
$propertyId,
@@ -67,19 +71,19 @@
$property-setId( $propertyId );
$property-getFingerprint()-setLabel( 'en', 'a kitten!' );
 
-   $entityLookup-putEntity( $item );
-   $entityLookup-putEntity( $property );
+   $mockRepository-putEntity( $item );
+   $mockRepository-putEntity( $property );
 
-   return $entityLookup;
+   return $mockRepository;
}
 
/**
 * @dataProvider findSnaksProvider
 */
-   public function testFindSnaks( $expected, 

[MediaWiki-commits] [Gerrit] Remove unused import in EntityContentFactory - change (mediawiki...Wikibase)

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

Change subject: Remove unused import in EntityContentFactory
..


Remove unused import in EntityContentFactory

Change-Id: I6de8c360cc8039cc8b29330ec8df67ab4b9dd98e
---
M repo/includes/content/EntityContentFactory.php
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/content/EntityContentFactory.php 
b/repo/includes/content/EntityContentFactory.php
index aecb559..a58a557 100644
--- a/repo/includes/content/EntityContentFactory.php
+++ b/repo/includes/content/EntityContentFactory.php
@@ -8,7 +8,6 @@
 use Revision;
 use Status;
 use Title;
-use TitleValue;
 use User;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6de8c360cc8039cc8b29330ec8df67ab4b9dd98e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Indent editor in TalkSectionAddOverlay - change (mediawiki...MobileFrontend)

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

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

Change subject: Indent editor in TalkSectionAddOverlay
..

Indent editor in TalkSectionAddOverlay

Wrap editor in panel and move padding for wikitexteditor from Overlay
to EditorOverlay (it is specific to it).

Bug: T74969
Change-Id: Ie721c6e39d0cf8d1082f2420c6d68d1e88b08c3b
---
M less/Overlay.less
M less/modules/editor/editor.less
M templates/modules/talk/talkSectionAdd.hogan
3 files changed, 7 insertions(+), 2 deletions(-)


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

diff --git a/less/Overlay.less b/less/Overlay.less
index 7aa07ea..b67a418 100644
--- a/less/Overlay.less
+++ b/less/Overlay.less
@@ -116,7 +116,6 @@
 
.wikitext-editor {
min-height: 50%;
-   padding: 10px @contentMargin;
line-height: 1.5;
border: none;
}
diff --git a/less/modules/editor/editor.less b/less/modules/editor/editor.less
index 7c8a918..5d1962f 100644
--- a/less/modules/editor/editor.less
+++ b/less/modules/editor/editor.less
@@ -18,6 +18,10 @@
display: none;
}
 
+   .wikitext-editor {
+   padding: 10px @contentMargin;
+   }
+
.summary-request {
font-size: 1.4em;
font-weight: bold;
diff --git a/templates/modules/talk/talkSectionAdd.hogan 
b/templates/modules/talk/talkSectionAdd.hogan
index dbaaad9..472f538 100644
--- a/templates/modules/talk/talkSectionAdd.hogan
+++ b/templates/modules/talk/talkSectionAdd.hogan
@@ -4,4 +4,6 @@
 div class=panel
input type=text class=summary 
placeholder={{topicTitlePlaceHolder}}
 /div
-textarea class=wikitext-editor cols=40 rows=10 
placeholder={{topicContentPlaceHolder}}/textarea
+div class=panel
+   textarea class=wikitext-editor cols=40 rows=10 
placeholder={{topicContentPlaceHolder}}/textarea
+/div

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie721c6e39d0cf8d1082f2420c6d68d1e88b08c3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de

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


[MediaWiki-commits] [Gerrit] Hygiene: Update MobileWebClickTracking to cover alpha links - change (mediawiki...MobileFrontend)

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

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

Change subject: Hygiene: Update MobileWebClickTracking to cover alpha links
..

Hygiene: Update MobileWebClickTracking to cover alpha links

Bug: T75159
Change-Id: Iae25dd2f80bf1a4ec506a446dd866cc801f96d2a
---
M javascripts/loggingSchemas/init.js
1 file changed, 17 insertions(+), 9 deletions(-)


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

diff --git a/javascripts/loggingSchemas/init.js 
b/javascripts/loggingSchemas/init.js
index a1c3eef..67949c4 100644
--- a/javascripts/loggingSchemas/init.js
+++ b/javascripts/loggingSchemas/init.js
@@ -6,29 +6,37 @@
var $profileLink = $( '#mw-mf-last-modified a' )
.filter( function () {
return $( this ).children().length === 0;
-   } );
+   } ),
+   $classSuffix;
 
$( '#mw-mf-main-menu-button' ).on( 'click', function () {
MobileWebClickTracking.log( 'hamburger' );
} );
 
+   // FIXME: Remove when mw-ui-icon is in stable
+   if ( !M.isAlphaGroupMember() ) {
+   $classSuffix = '.';
+   } else {
+   $classSuffix = '.mw-ui-';
+   }
+
MobileWebClickTracking.hijackLink( '.icon-home',
'hamburger-home' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-random',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-random',
'hamburger-random' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-nearby',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-nearby',
'hamburger-nearby' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-watchlist',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-watchlist',
'hamburger-watchlist' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-settings',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-settings',
'hamburger-settings' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-uploads',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-uploads',
'hamburger-uploads' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-profile',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-profile',
'hamburger-profile' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-anon',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-anon',
'hamburger-login' );
-   MobileWebClickTracking.hijackLink( '#mw-mf-page-left 
.icon-secondary-logout',
+   MobileWebClickTracking.hijackLink( '#mw-mf-page-left ' + 
$classSuffix + 'icon-secondary-logout',
'hamburger-logout' );
MobileWebClickTracking.hijackLink( $( '#mw-mf-last-modified a 
span' ).parent(),
'lastmodified-history' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae25dd2f80bf1a4ec506a446dd866cc801f96d2a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow florian.schmidt.wel...@t-online.de

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


[MediaWiki-commits] [Gerrit] Optimise non-js experience for Opera Mini - change (mediawiki...MobileFrontend)

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

Change subject: Optimise non-js experience for Opera Mini
..


Optimise non-js experience for Opera Mini

Optimise for usability/readability not design.
It's more important that search icon and input appear on same line

Change-Id: Ib50a6809fdfa6740fba8ad57f6d6f11820347124
---
M less/ui.less
1 file changed, 13 insertions(+), 3 deletions(-)

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



diff --git a/less/ui.less b/less/ui.less
index db402e1..bad94eb 100644
--- a/less/ui.less
+++ b/less/ui.less
@@ -124,9 +124,19 @@
 /* Search */
 
 .client-nojs {
-   .header .search {
-   margin-right: -36px;
-   padding-right: 36px;
+   .header {
+   .search,
+   .fulltext-search {
+   display: block;
+   float: left;
+   }
+
+   .search {
+   // Assume the smallest possible screen size.
+   // We want people to be able to search we don't care if 
it looks pretty.
+   width: 80px;
+   margin-right: 8px;
+   }
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib50a6809fdfa6740fba8ad57f6d6f11820347124
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: Awjrichards aricha...@wikimedia.org
Gerrit-Reviewer: Jhernandez jhernan...@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] Add missing urd (Urdu) and hin (Hindi) mapping - change (mediawiki...cxserver)

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

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

Change subject: Add missing urd (Urdu) and hin (Hindi) mapping
..

Add missing urd (Urdu) and hin (Hindi) mapping

Change-Id: Id7b89b3e6d1943691a806b6e33db128a5478f3b5
---
M mt/Apertium.languagenames.json
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/18/176918/1

diff --git a/mt/Apertium.languagenames.json b/mt/Apertium.languagenames.json
index 945d63d..199f8cb 100644
--- a/mt/Apertium.languagenames.json
+++ b/mt/Apertium.languagenames.json
@@ -15,6 +15,7 @@
eu: eus,
fr: fra,
gl: glg,
+   hi: hin,
hr: hbs_HR,
id: ind,
is: isl,
@@ -34,5 +35,6 @@
sl: slv,
sr: hbs_SR,
sv: swe,
-   tt: tat
-}
\ No newline at end of file
+   tt: tat,
+   ur: urd
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7b89b3e6d1943691a806b6e33db128a5478f3b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
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] Add missing urd (Urdu) and hin (Hindi) mapping - change (mediawiki...cxserver)

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

Change subject: Add missing urd (Urdu) and hin (Hindi) mapping
..


Add missing urd (Urdu) and hin (Hindi) mapping

Change-Id: Id7b89b3e6d1943691a806b6e33db128a5478f3b5
---
M mt/Apertium.languagenames.json
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/mt/Apertium.languagenames.json b/mt/Apertium.languagenames.json
index 945d63d..199f8cb 100644
--- a/mt/Apertium.languagenames.json
+++ b/mt/Apertium.languagenames.json
@@ -15,6 +15,7 @@
eu: eus,
fr: fra,
gl: glg,
+   hi: hin,
hr: hbs_HR,
id: ind,
is: isl,
@@ -34,5 +35,6 @@
sl: slv,
sr: hbs_SR,
sv: swe,
-   tt: tat
-}
\ No newline at end of file
+   tt: tat,
+   ur: urd
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7b89b3e6d1943691a806b6e33db128a5478f3b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: 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] Better accommodate long text in view switching button group ... - change (mediawiki...Translate)

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

Change subject: Better accommodate long text in view switching button group in 
Special:Translate
..


Better accommodate long text in view switching button group in Special:Translate

Bug: T49044
Change-Id: Idf4fef2a023eb540726519c40c48196f0b8c5554
---
M resources/css/ext.translate.messagetable.css
1 file changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/resources/css/ext.translate.messagetable.css 
b/resources/css/ext.translate.messagetable.css
index 07ec579..5da964d 100644
--- a/resources/css/ext.translate.messagetable.css
+++ b/resources/css/ext.translate.messagetable.css
@@ -183,11 +183,8 @@
 }
 
 .tux-action-bar {
-   margin: 0 !important;
background-color: #F0F0F0;
color: #252525;
-   height: 50px;
-   line-height: 50px;
-webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
transition: width 250ms;
@@ -206,14 +203,13 @@
 }
 
 .tux-action-bar .toggle.button {
-   height: 40px;
+   min-height: 40px;
font-size: 14px;
vertical-align: middle;
border-radius: 0;
text-shadow: none;
-   margin: 0;
+   margin: 5px 0;
text-indent: 0;
-   padding: 0 6px;
 }
 
 .tux-action-bar .tux-view-switcher {
@@ -316,7 +312,7 @@
 }
 
 .tux-message-filter-result .button {
-   height: 30px;
+   float: right;
padding: 5px;
margin: 5px 0;
font-size: 15px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf4fef2a023eb540726519c40c48196f0b8c5554
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Nemo bis federicol...@tiscali.it
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] Add requestFromPubMedID, requestJSON - change (mediawiki...citoid)

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

Change subject: Add requestFromPubMedID, requestJSON
..


Add requestFromPubMedID, requestJSON

requestFromPubMedID can take a PMID, PMCID, mauscript ID or a versioned 
identifier. It
finds the underlying DOI with PMC's API[1] and requests citation metadata by 
passing
that to requestFromDOI.

requestJSON is a helper function that fetches and parses a remote JSON endpoint.

[1]: http://www.ncbi.nlm.nih.gov/pmc/tools/id-converter-api/

Bug: T1197
Change-Id: I1852f9820d9a0e1af0f30003d84846b435095e16
---
M lib/requests.js
1 file changed, 77 insertions(+), 18 deletions(-)

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



diff --git a/lib/requests.js b/lib/requests.js
index dfde7d2..f3dc099 100644
--- a/lib/requests.js
+++ b/lib/requests.js
@@ -12,11 +12,12 @@
 var scrape = require('./scrape.js').scrape;
 var zoteroRequest = require('./zotero.js').zoteroRequest;
 var util = require('util');
+var request = require('request');
 
 /**
- * runner function to use for a url
- * @param  {[type]}   requestedURL want metadata from this url
- * @param  {[type]}   opts zoteroRequest options object
+ * Request citation metadata from a URL
+ * @param  {String}   requestedURL URL metadata is being requested about
+ * @param  {Object}   opts zoteroRequest options object
  * @param  {Function} callback callback (error, statusCode, body)
  */
 
@@ -30,7 +31,7 @@
scrape(requestedURL, function(error, body){
callback (error, 200, body);
});
-   } else if ( response ) {
+   } else if (response) {
//501 indicates no translator available
//this is common- can indicate shortened url
//or a website not specified in the translators
@@ -47,29 +48,25 @@
if (response  !error 
 response.statusCode == 200){

log.info(Successfully retrieved and translated body from Zotero);
callback(null, 
200, body);
-   }
-   else {
+   } else {
log.info(No 
Zotero response available; falling back on native scraper.);

scrape(requestedURL, function(error, body){

callback(error, 200, body);
});
}
});
-   }
-   else {
+   } else {
log.info(No redirect detected; 
falling back on native scraper.);
scrape(requestedURL, 
function(error, body){
callback(error, 200, 
body);
});
}
});
-   }
-
-   else if (response.statusCode == 200){
+   } else if (response.statusCode == 200){
log.info(Successfully retrieved and translated 
body from Zotero);
callback (null, 200, body);
-   }
-   else { //other response codes such as 500, 300
+   } else {
+   //other response codes such as 500, 300
log.info(Falling back on native scraper.);
scrape(requestedURL, function(error, body){
callback (error, 200, body);
@@ -85,9 +82,9 @@
 };
 
 /**
- * runner function to use for a DOI
- * @param  {[type]}   requestedDOI want metadata from this DOI
- * @param  {[type]}   opts zoteroRequest options object
+ * Request citation metadata from a DOI
+ * @param  {String}   requestedDOI DOI pointing to URL metadata is being 
requested about
+ * @param  {Object}   opts zoteroRequest options object
  * @param  {Function} callback callback (error, statusCode, body)
  */
 
@@ -96,6 +93,63 @@
//TODO: optimise this (can skip some steps in requestFromURL)
requestFromURL(doiLink, opts, function(error, responseCode, body){
callback(error, responseCode, 

[MediaWiki-commits] [Gerrit] Change Basic image type to Inline - change (mediawiki...VisualEditor)

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

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

Change subject: Change Basic image type to Inline
..

Change Basic image type to Inline

Bug: T76460
Change-Id: Iee1be319a629d646888b6cbfd6818179c59f553a
---
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index be430b3..92e3624 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -92,7 +92,7 @@
visualeditor-dialog-media-type-border: Border,
visualeditor-dialog-media-type-frame: Frame,
visualeditor-dialog-media-type-frameless: Frameless,
-   visualeditor-dialog-media-type-none: Basic,
+   visualeditor-dialog-media-type-none: Inline,
visualeditor-dialog-media-type-section: Image type,
visualeditor-dialog-media-type-thumb: Thumbnail,
visualeditor-dialog-meta-advancedsettings-label: Advanced settings,
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 608b202..e3b2c8e 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -101,7 +101,7 @@
visualeditor-dialog-media-type-border: Label for the image type 
option for bordered image.\n{{Identical|Border}},
visualeditor-dialog-media-type-frame: Label for the image type 
option for framed image.\n{{Identical|Frame}},
visualeditor-dialog-media-type-frameless: Label for the image type 
option for frameless.,
-   visualeditor-dialog-media-type-none: Label for the image type option 
for basic image.\n{{Identical|Basic}},
+   visualeditor-dialog-media-type-none: Label for the image type option 
for inline image.,
visualeditor-dialog-media-type-section: Label for the image type 
sub-section.\n\nFollowed by the following buttons:\n* 
{{msg-mw|Visualeditor-dialog-media-type-thumb}}\n* 
{{msg-mw|Visualeditor-dialog-media-type-frame}}\n* 
{{msg-mw|Visualeditor-dialog-media-type-frameless}}\n* 
{{msg-mw|Visualeditor-dialog-media-type-border}},
visualeditor-dialog-media-type-thumb: Label for the image type 
option for thumbnail.\n{{Identical|Thumbnail}},
visualeditor-dialog-meta-advancedsettings-label: Title for the 
advanced settings dialog section.\n{{Identical|Advanced settings}},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee1be319a629d646888b6cbfd6818179c59f553a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] Put the bin file in the /usr/bin instead of /usr/ircecho/bin - change (operations...ircecho)

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

Change subject: Put the bin file in the /usr/bin instead of /usr/ircecho/bin
..


Put the bin file in the /usr/bin instead of /usr/ircecho/bin

- Also remove unused /lib dir
- Fix init script to take into account new install location
- Bump version number

Bug: T76208
Change-Id: I911048c233a043edbff7b645ab2912eb7bc9b8ad
---
M debian/changelog
D debian/dirs
M debian/install
M debian/ircecho.init
4 files changed, 8 insertions(+), 5 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  Filippo Giunchedi: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/debian/changelog b/debian/changelog
index 03cfdf8..2377a6c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ircecho (1.4.1) trusty-wikimedia; urgency=low
+
+  * Simplify file layout and directory structure
+
+ -- Yuvi Panda yuvipa...@gmail.org  Tue, 02 Dec 2014 16:30:00 +0530
+
 ircecho (1.4-1) precise-wikimedia; urgency=low
 
   * Build for precise
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index 81a2807..000
--- a/debian/dirs
+++ /dev/null
@@ -1,3 +0,0 @@
-usr/ircecho
-usr/ircecho/bin
-usr/ircecho/lib
diff --git a/debian/install b/debian/install
index fba62f7..a368f3b 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1 @@
-ircecho /usr/ircecho/bin
+ircecho /usr/bin
diff --git a/debian/ircecho.init b/debian/ircecho.init
index 901d87b..689c59b 100644
--- a/debian/ircecho.init
+++ b/debian/ircecho.init
@@ -15,7 +15,7 @@
 
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC=Input to IRC echoer
-DAEMON=/usr/ircecho/bin/ircecho
+DAEMON=/usr/bin/ircecho
 USER=nobody
 SCRIPTNAME=/etc/init.d/ircecho
 NAME=ircecho

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I911048c233a043edbff7b645ab2912eb7bc9b8ad
Gerrit-PatchSet: 5
Gerrit-Project: operations/debs/ircecho
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@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] (bug 75578) Explicitly generate absolute timestamp - change (mediawiki...Flow)

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

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

Change subject: (bug 75578) Explicitly generate absolute timestamp
..

(bug 75578) Explicitly generate absolute timestamp

The uuidTimestamp and timestamp helpers have optional arguments
`timeAgoOnly` that when specified to true, only returns the relative
timestamp.

However when used as helper in handlerbar template, an additional
options argument is passed implicitly to the helper, conflicting with
the optional timeAgoOnly argument.

See http://handlebarsjs.com/block_helpers.html#hash-arguments

Bug: 75578
Change-Id: Ica594ad7e59db48f4b759649c7eba0e6e5743bee
---
M handlebars/compiled/flow_block_topic.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
M handlebars/compiled/flow_block_topic_moderate_topic.handlebars.php
M handlebars/compiled/flow_block_topiclist.handlebars.php
M handlebars/compiled/flow_post.handlebars.php
M handlebars/flow_post_meta_actions.handlebars
M handlebars/flow_topic_titlebar_content.handlebars
7 files changed, 16 insertions(+), 17 deletions(-)


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

diff --git a/handlebars/compiled/flow_block_topic.handlebars.php 
b/handlebars/compiled/flow_block_topic.handlebars.php
index 9c7540d..d0733ed 100644
--- a/handlebars/compiled/flow_block_topic.handlebars.php
+++ b/handlebars/compiled/flow_block_topic.handlebars.php
@@ -64,9 +64,9 @@
'.LCRun3::ch($cx, 'l10n', 
Array(Array('flow-topic-comments',((isset($in['reply_count'])  is_array($in)) 
? $in['reply_count'] : null)),Array()), 'encq').' bull;
 
'.((LCRun3::ifvar($cx, ((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null))) ? '
-   '.LCRun3::ch($cx, 'timestamp', 
Array(Array(((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null)),Array()), 'encq').'
+   '.LCRun3::ch($cx, 'timestamp', 
Array(Array(((isset($in['last_updated'])  is_array($in)) ? 
$in['last_updated'] : null),false),Array()), 'encq').'
' : '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null),false),Array()), 'encq').'
').'
 /div
 '.((LCRun3::ifvar($cx, ((isset($in['isModerated'])  is_array($in)) ? 
$in['isModerated'] : null))) ? '
@@ -88,7 +88,6 @@
   class=mw-ui-anchor mw-ui-constructive '.((!LCRun3::ifvar($cx, 
((isset($in['isWatched'])  is_array($in)) ? $in['isWatched'] : null))) ? 
'mw-ui-quiet' : '').'
   '.((LCRun3::ifvar($cx, ((isset($in['isWatched'])  is_array($in)) ? 
$in['isWatched'] : null))) ? 'flow-watch-link-unwatch' : 
'flow-watch-link-watch').'
   data-flow-api-handler=watchItem
-  data-flow-api-handler=watchTopic
   data-flow-api-target= .flow-topic-watchlist
   
data-flow-api-method=POST'.htmlentities((string)((isset($in['null'])  
is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'span 
class=wikiglyph 
wikiglyph-star/span'.htmlentities((string)((isset($in['null'])  
is_array($in)) ? $in['null'] : null), ENT_QUOTES, 
'UTF-8').''.htmlentities((string)((isset($in['null'])  is_array($in)) ? 
$in['null'] : null), ENT_QUOTES, 'UTF-8').'span class=wikiglyph 
wikiglyph-unstar/span'.htmlentities((string)((isset($in['null'])  
is_array($in)) ? $in['null'] : null), ENT_QUOTES, 'UTF-8').'/a
 /div
@@ -304,4 +303,4 @@
 /div
 ';
 }
-?
+?
\ No newline at end of file
diff --git a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php 
b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
index 36bb397..aa0b447 100644
--- a/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
+++ b/handlebars/compiled/flow_block_topic_moderate_post.handlebars.php
@@ -106,7 +106,7 @@
 
span class=flow-post-timestamp
'.((LCRun3::ifvar($cx, ((isset($in['isOriginalContent'])  
is_array($in)) ? $in['isOriginalContent'] : null))) ? '
-   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null)),Array()), 'encq').'
+   '.LCRun3::ch($cx, 'uuidTimestamp', 
Array(Array(((isset($in['postId'])  is_array($in)) ? $in['postId'] : 
null),false),Array()), 'encq').'
' : '
span
'.LCRun3::hbch($cx, 'ifCond', 
Array(Array(((isset($in['creator']['name'])  is_array($in['creator'])) ? 
$in['creator']['name'] : null),'===',((isset($in['lastEditUser']['name'])  
is_array($in['lastEditUser'])) ? $in['lastEditUser']['name'] : null)),Array()), 
$in, function($cx, $in) {return '
@@ -115,7 +115,7 @@

[MediaWiki-commits] [Gerrit] Add missing PMIDs by looking up DOI - change (mediawiki...citoid)

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

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

Change subject: Add missing PMIDs by looking up DOI
..

Add missing PMIDs by looking up DOI

If the PMID is missing but the DOI is present, use the DOI to lookup
the PMID and PMCID with PubMed's API. The requestJSON function is
reused.

Corrects testJSON input file in lib/zotero.js

Assorted code styling improvements

Bug: T1088
Change-Id: If174e13c124eb2c0f0e3582175167b5757c6912d
---
M lib/requests.js
M lib/zotero.js
2 files changed, 48 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/citoid 
refs/changes/21/176921/1

diff --git a/lib/requests.js b/lib/requests.js
index f3dc099..e60c0b3 100644
--- a/lib/requests.js
+++ b/lib/requests.js
@@ -108,8 +108,7 @@
 requestJSON(pubMedLink, function(error, obj){
if(error){
callback(error, null, null);
-   }
-   else if(obj.status !== 'ok'){
+   } else if(obj.status !== 'ok') {
log.error(PubMed returned unrecognized status code:  
+ obj.status);
callback(PubMed returned unrecognized status, 200, 
null);
} else {
@@ -173,5 +172,6 @@
 module.exports = {
requestFromURL: requestFromURL,
requestFromDOI: requestFromDOI,
-   requestFromPubMedID: requestFromPubMedID
+   requestFromPubMedID: requestFromPubMedID,
+   requestJSON: requestJSON
 };
diff --git a/lib/zotero.js b/lib/zotero.js
index f383ce4..09cc82a 100644
--- a/lib/zotero.js
+++ b/lib/zotero.js
@@ -7,6 +7,7 @@
 
 var request = require('request');
 var async = require('async');
+var requestJSON = require('./requests.js').requestJSON;
 
 /**
  * Requests to Zotero server
@@ -14,7 +15,7 @@
  * @param  {Object}   opts options for request
  * @param  {Function} callback callback(error, response, body)
  */
-var zoteroRequest  = function(requestedURL, opts, callback){
+var zoteroRequest = function(requestedURL, opts, callback){
var options = {
url: opts.zoteroURL,
method: 'POST',
@@ -31,8 +32,7 @@
callback(error, response, modifiedBody);
});
});
-   }
-   else {
+   } else {
callback(error, response, body);
}
 
@@ -111,8 +111,7 @@
creatorFieldName = 
zotCreators[z].creatorType;
if (creatorTypeCount[creatorFieldName]){

creatorTypeCount[creatorFieldName] += 1;
-   }
-   else {
+   } else {

creatorTypeCount[creatorFieldName] = 1;
}
//Appends number to name, i.e. author 
- author1
@@ -163,20 +162,47 @@
callback(null, citation);
 };
 
+/**
+ * Add PMID field from extra fields or DOI lookup
+ * @param  {Object}   citation citation object to add PMID
+ * @param  {Function} callback callback (error, citation)
+ */
+
 var addPMID = function(citation, callback){
-   //get pmid out of extra fields
-   if (citation.extra){
+   if (citation.extra) {
+   //get pmid from extra fields
var extraFields = citation.extra.split('\n');
-   for (var f in extraFields){
+   for (var f in extraFields) {
//could add them all, but let's not do this in case of 
conflicting fields
var keyValue = extraFields[f].split(': ');
-   if (keyValue[0] === 'PMID'){
+   if (keyValue[0] === 'PMID') {
citation[keyValue[0]] = keyValue[1].trim();
}
}
}
-   //TODO: if no pmid available from zotero output, get one from doi using 
api: http://www.ncbi.nlm.nih.gov/pmc/tools/id-converter-api/
-   callback(null, citation);
+   
+   if (!citation.PMID  citation.DOI) {
+   //if pmid is not found, lookup the pmid using the ZOI
+   var escapedDOI = encodeURIComponent(citation.DOI);
+   var doiLookupLink = 
'http://www.ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/?tool=citoidemail=citoid@mediawikiformat=jsonids='+escapedDOI;
+
+   requestJSON(doiLookupLink, function (error, object){
+   if (!error) {
+   if (object.status === 'ok'  
object.records.length  0){
+   if (object.records[0].pmid) {
+   

[MediaWiki-commits] [Gerrit] Enabled colorpicker plugin - change (mediawiki...BlueSpiceExtensions)

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

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

Change subject: Enabled colorpicker plugin
..

Enabled colorpicker plugin

This enables a visual colorpicker in TinyMCE dialogues.

Change-Id: Iea596772a7daee51b801d334080f9bc40ba411cd
---
A Checklist/tests/phpunit/ChecklistTest.php
M VisualEditor/VisualEditor.class.php
2 files changed, 69 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/22/176922/1

diff --git a/Checklist/tests/phpunit/ChecklistTest.php 
b/Checklist/tests/phpunit/ChecklistTest.php
new file mode 100644
index 000..d672057
--- /dev/null
+++ b/Checklist/tests/phpunit/ChecklistTest.php
@@ -0,0 +1,67 @@
+?php
+/**
+ * @group Checklist
+ * @group BlueSpiceExtensions
+ * @covers Checklist
+ */
+class ChecklistTest extends MediaWikiTestCase {
+   protected function setUp() {
+   parent::setUp();
+   $this-extension = new Checklist();
+   }
+
+   protected function tearDown() {
+   unset( $this-extension );
+   parent::tearDown();
+  }
+
+   public function testPregReplaceNth() {
+   // Input test data
+   $sContent = 'bs:checklist value=test /bs:checklist 
value=test /bs:checklist value=test /';
+
+   // Test call of method
+   $res = Checklist::preg_replace_nth(/(bs:checklist 
)([^]*?)/, $1.'value=new '.$2, $sContent, 2);
+
+   // Make sure result is ok
+   $this-assertTrue(
+   $res == 'bs:checklist value=test 
/bs:checklist value=new1 /bs:checklist value=test /',
+   replacement of 2nd element failed
+   );
+   }
+
+   public function testOnVisualEditorConfig() {
+   $aConfigStandard = array(
+   toolbar1 = array(
+   test,
+   unlink,
+   test1
+   ),
+   contextmenu = bsContextMenuMarker
+   );
+   $aConfigOverwrite = array();
+   $aLoaderUsingDeps = array();
+
+   $this-extension-onVisualEditorConfig( $aConfigStandard, 
$aConfigOverwrite, $aLoaderUsingDeps );
+
+   $this-assertTrue(
+   $aConfigStandard[toolbar1][2] == bscheckbox,
+   Checkbox item not inserted in toobar
+   );
+   $this-assertTrue(
+   $aConfigStandard[contextmenu] == 
bsContextMenuMarker bsChecklist,
+   Checkbox menu item not inserted in contextmenu
+   );
+   $this-assertTrue(
+   in_array('ext.bluespice.checklist', 
$aLoaderUsingDeps),
+   Checkbox ext module is not loaded
+   );
+   }
+
+   public function testAjaxGetItemStoreData() {
+   $res = Checklist::ajaxGetItemStoreData();
+   $this-assertTrue(
+   $res == [],
+   ItemStoreData is not empty
+   );
+   }
+}
\ No newline at end of file
diff --git a/VisualEditor/VisualEditor.class.php 
b/VisualEditor/VisualEditor.class.php
index 25aec9b..b6876a1 100644
--- a/VisualEditor/VisualEditor.class.php
+++ b/VisualEditor/VisualEditor.class.php
@@ -68,7 +68,8 @@
//link //Needed for unlink
//autoresize,
charmap,
-   noneditable
+   noneditable,
+   colorpicker
),
'external_plugins' = array(
'bswikicode'  = 
'../tiny_mce_plugins/bswikicode/plugin.js',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea596772a7daee51b801d334080f9bc40ba411cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser gla...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] Add the license agreement text to new translation entry points - change (mediawiki...ContentTranslation)

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

Change subject: Add the license agreement text to new translation entry points
..


Add the license agreement text to new translation entry points

Bug: T76178
Change-Id: I17f9fa8023cf7738d5b24905c0df272cf967a731
---
M Resources.php
M i18n/en.json
M i18n/qqq.json
M modules/entrypoint/ext.cx.entrypoint.js
M modules/entrypoint/styles/ext.cx.entrypoint.less
M modules/source/ext.cx.source.selector.js
M modules/source/styles/ext.cx.source.selector.less
7 files changed, 41 insertions(+), 9 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 368cc5e..a345a2c 100644
--- a/Resources.php
+++ b/Resources.php
@@ -157,6 +157,7 @@
'cx-sourceselector-dialog-error-page-exists',
'cx-sourceselector-dialog-error-title-in-use',
'cx-sourceselector-dialog-error-no-source-article',
+   'cx-license-agreement',
),
 ) + $resourcePaths;
 
@@ -472,6 +473,7 @@
'cx-entrypoint-dialog-title-in',
'cx-entrypoint-dialog-button-create-from-scratch',
'cx-entrypoint-dialog-button-translate-from',
+   'cx-license-agreement',
),
'dependencies' = array(
'ext.cx.sitemapper',
diff --git a/i18n/en.json b/i18n/en.json
index 144b466..09e684e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -10,6 +10,7 @@
},
cx: Translate page,
cx-javascript: This tool does not work without JavaScript.,
+   cx-license-agreement: By clicking the \$1\ button, you agree to 
the [//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and you 
irrevocably agree to release your contributions with the translation tool under 
the 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License
 CC BY-SA 3.0 License] and the 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL] with the understanding that a hyperlink or URL sufficient for CC BY-SA 
3.0 attribution.,
cx-error-server-connection: Error: Could not connect to the server.,
cx-desc: A tool that allows editors to translate pages from one 
language to another with the help of machine translation and other translation 
tools,
cx-header-progressbar-text: $1% translated,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 2fcfe39..eefe513 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -14,6 +14,7 @@
},
cx: {{doc-special|ContentTranslation}},
cx-javascript: Error message shown when JavaScript is not enabled in 
the browser.,
+   cx-license-agreement: License agreement for the contributions using 
Content Translation tool. This is legal text and be careful. You may point the 
license URLs to a Wikipedia page in your language if it exists. Parameters:\n* 
$1 - Label of the button that starts the translation tool.,
cx-error-server-connection: Error message shown when connection to 
the content translation server has failed.,
cx-desc: 
{{desc|name=ContentTranslation|url=http://www.mediawiki.org/wiki/Extension:ContentTranslation}};,
cx-header-progressbar-text: Text to be shown with the progress bar 
in [[Special:ContentTranslation]]. $1 is the percent of translation 
progress.\n{{Identical|Translated}},
diff --git a/modules/entrypoint/ext.cx.entrypoint.js 
b/modules/entrypoint/ext.cx.entrypoint.js
index 46f0a86..62588df 100644
--- a/modules/entrypoint/ext.cx.entrypoint.js
+++ b/modules/entrypoint/ext.cx.entrypoint.js
@@ -148,7 +148,7 @@
 */
CXEntryPoint.prototype.renderDialog = function () {
var $actions, $titleBoxBlock,
-   $heading, $titleLabel,
+   $heading, $titleLabel, $license, translateButtonLabel,
targetAutonym = $.uls.data.getAutonym( 
this.options.targetLanguage ),
currentTitle = mw.config.get( 'wgTitle' );
 
@@ -185,18 +185,23 @@
.addClass( 'mw-ui-button 
cx-entrypoint-dialog-button-create-from-scratch' )
.text( mw.msg( 
'cx-entrypoint-dialog-button-create-from-scratch' ) );
 
+   translateButtonLabel = mw.msg(
+   'cx-entrypoint-dialog-button-translate-from',
+   $.uls.data.getAutonym( mw.config.get( 
'wgContentLanguage' ) )
+   );
this.$actionTranslate = $( 'button' )
.addClass( 'mw-ui-button 
cx-entrypoint-dialog-button-translate-from' )
-   .text( mw.msg(
-   'cx-entrypoint-dialog-button-translate-from',
-   $.uls.data.getAutonym( mw.config.get( 
'wgContentLanguage' ) )
-   ) );
+   .text( 

[MediaWiki-commits] [Gerrit] Add support for safer query wrapper - change (mediawiki...CirrusSearch)

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

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

Change subject: Add support for safer query wrapper
..

Add support for safer query wrapper

The safer query wrapper analyzes the queries it wraps and degrades them
if they would take too long to run.  We want that if we can get it.

DEPLOYMENT: You have to turn this on with a setting _and_ you'll need
I9560105c31d429df24d1323740acba9b8e9a  from the elasticsearch plugin
to be released and deployed.

Change-Id: I7c4fa048a04f1c98fa20e46805f166486ec260d3
---
M CirrusSearch.php
M includes/Search/ResultsType.php
M includes/Searcher.php
M tests/browser/features/full_text.feature
M tests/browser/features/step_definitions/page_steps.rb
M tests/jenkins/Jenkins.php
6 files changed, 54 insertions(+), 17 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 0d17ef0..5577a1f 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -88,16 +88,21 @@
 // means don't use it at all.
 $wgCirrusSearchWikimediaExtraPlugin = array();
 // Here is an example to enable faster regex matching:
-// $wgCirrusSearchWikimediaExtraPlugin = array(
-// 'regex' = array( 'build', 'use', 'max_inspect' = 1 ),
-// );
+// $wgCirrusSearchWikimediaExtraPlugin[ 'regex' ] =
+// array( 'build', 'use', 'max_inspect' = 1 );
 // The 'build' value instructs Cirrus to build the index required to speed up
 // regex queries.  The 'use' value instructs Cirrus to use it to power regular
 // expression queries.  If 'use' is added before the index is rebuilt with
 // 'build' in the array then regex will fail to find anything.  The value of
 // the 'max_inspect' key is the maximum number of pages to recheck the regex
-// against.  It defaults to 1 which seems like a reasonable compromize
-// to keep regexes fast while still producing good results.
+// against.  Its optional and defaults to 1 which seems like a reasonable
+// compromize to keep regexes fast while still producing good results.
+// This example enables the safer query's phrase processing:
+// $wgCirrusSearchWikimediaExtraPlugin[ 'safer' ] = array(
+// 'phrase' = array(
+// 'max_terms_in_all_queries' = 128,
+// )
+// );
 
 // Should CirrusSearch try to support regular expressions with insource:?
 // These can be really expensive, but mostly ok, especially if you have the
diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php
index 05ef506..9859ba0 100644
--- a/includes/Search/ResultsType.php
+++ b/includes/Search/ResultsType.php
@@ -385,8 +385,8 @@
}
$queryStrings = array();
foreach ( $highlightSource as $part ) {
-   if ( isset( $part[ 'query_string' ] ) ) {
-   $queryStrings[] = $part[ 'query_string' ];
+   if ( isset( $part[ 'query' ] ) ) {
+   $queryStrings[] = $part[ 'query' ];
}
}
if ( count( $queryStrings ) ) {
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 59a690f..9da8ca1 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -575,9 +575,10 @@

$query-setAllowLeadingWildcard( false );
$query-setFuzzyPrefixLength( 2 
);
$query-setRewrite( 
'top_terms_128' );
+   $query = 
$searcher-wrapInSaferIfPossible( $query, false );
$filterDestination[] = new 
\Elastica\Filter\Query( $query );
if ( $key === 'insource' ) {
-   $highlightSource[] = 
array( 'query_string' = $query );
+   $highlightSource[] = 
array( 'query' = $query );
}
$searchContainedSyntax = true;
return $keepText ? $value  : 
'';
@@ -687,7 +688,7 @@
$this-buildFullTextSearchFields( 1, 
'.plain', false ),
$this-buildFullTextSearchFields( 
$wgCirrusSearchStemmedWeight, '', false ) );
list( $nonAllQueryString, /*_*/ ) = 
$escaper-fixupWholeQueryString( implode( ' ', $nonAllQuery ) );
-   $this-highlightQuery = 
$this-buildSearchTextQueryForFields( $nonAllFields, $nonAllQueryString, 1 );
+   $this-highlightQuery = 
$this-buildSearchTextQueryForFields( $nonAllFields, 

[MediaWiki-commits] [Gerrit] Initial Debian packaging for apertium-urd-hin - change (operations...apertium-urd-hin)

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

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

Change subject: Initial Debian packaging for apertium-urd-hin
..

Initial Debian packaging for apertium-urd-hin

Bug: T76318
Change-Id: I37666c4fab4b5511ef7535c07ac2f7ec51ce8b99
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/rules
A debian/source/format
7 files changed, 122 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/debs/contenttranslation/apertium-urd-hin
 refs/changes/24/176924/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..23fd8c5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,12 @@
+apertium-urd-hin (0.1.0+svn~57870-1) trusty; urgency=low
+
+  * Initial release based on Tino Didriksen's work.
+
+ -- Kartik Mistry kar...@debian.org  Tue, 02 Dec 2014 19:33:09 +0530
+
+apertium-urd-hin (0.1.0~r57554-1) experimental; urgency=low
+
+  * Initial release
+  * No tarball release, so taking directly from svn
+
+ -- Tino Didriksen m...@tinodidriksen.com  Mon, 13 Oct 2014 07:17:28 +
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..9e099ad
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,35 @@
+Source: apertium-urd-hin
+Section: science
+Priority: optional
+Maintainer: Debian Science Team 
debian-science-maintain...@lists.alioth.debian.org
+Uploaders: Tino Didriksen m...@tinodidriksen.com,
+   Kartik Mistry kar...@debian.org
+Build-Depends: apertium (= 3.3),
+   apertium-hin,
+   apertium-lex-tools,
+   apertium-urd,
+   autotools-dev,
+   cg3,
+   debhelper (= 8.0),
+   dh-autoreconf,
+   gawk,
+   libapertium3-3.3-dev,
+   locales,
+   pkg-config (= 0.21)
+Standards-Version: 3.9.6
+Homepage: http://apertium.org/
+Vcs-Git: git://anonscm.debian.org/debian-science/packages/apertium-urd-hin.git
+Vcs-Browser: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-urd-hin.git
+
+Package: apertium-urd-hin
+Architecture: all
+Depends: apertium (= 3.3),
+ apertium-lex-tools,
+ cg3,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Provides: apertium-hin-urd
+Conflicts: apertium-hin-urd
+Description: Apertium translation data for the Urdu-Hindi pair
+ Data package providing Apertium language resources for translating
+ between the Urdu and Hindi languages.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..9ae1148
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,44 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://apertium.org/
+
+Files: *
+Copyright: 2010-2014, Francis M. Tyers fty...@prompsit.com
+2010, Eknath Venkataramani blah-sphe...@users.sourceforge.net
+2012, Jim O'Regan jore...@gmail.com
+2012, San_ sanam...@users.sourceforge.net
+2014, Kevin Brubeck Unhammer unham...@fsfe.org
+2014, Sudarsh Rathi sud1...@users.sourceforge.net
+License: GPL-3
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 3 of the License
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in /usr/share/common-licenses/GPL-3.
+
+Files: debian/*
+Copyright: 2014, Apertium Project Management Committee 
apertium-...@dlsi.ua.es
+License: GPL-3+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 3 can be found in /usr/share/common-licenses/GPL-3.

[MediaWiki-commits] [Gerrit] Make EntityPerPageBuilderTest fields/methods private - change (mediawiki...Wikibase)

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

Change subject: Make EntityPerPageBuilderTest fields/methods private
..


Make EntityPerPageBuilderTest fields/methods private

This is split from I04767f2 to make it easier to review.

Change-Id: I752c3e3b9c7c7417ec4d0fc4e19e3235def7c20f
---
M repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
1 file changed, 25 insertions(+), 13 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php 
b/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
index 183e516..e93b408 100644
--- a/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
+++ b/repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
@@ -30,17 +30,17 @@
/**
 * @var EntityPerPage
 */
-   protected $entityPerPageTable;
+   private $entityPerPageTable;
 
/**
 * @var array[]
 */
-   protected $entityPerPageRows;
+   private $entityPerPageRows;
 
/**
 * @var WikibaseRepo
 */
-   protected $wikibaseRepo;
+   private $wikibaseRepo;
 
protected function setUp() {
parent::setUp();
@@ -61,7 +61,7 @@
/**
 * @return User
 */
-   protected function getUser() {
+   private function getUser() {
$user = User::newFromName( 'zombie1' );
 
if ( $user-getId() === 0 ) {
@@ -71,7 +71,7 @@
return $user;
}
 
-   protected function clearTables() {
+   private function clearTables() {
$dbw = wfGetDB( DB_MASTER );
 
$dbw-delete( 'page', array( 1 ) );
@@ -82,12 +82,18 @@
}
}
 
+   /**
+* @return bool
+*/
private function itemSupportsRedirect() {
$handler = ContentHandler::getForModelID( 
CONTENT_MODEL_WIKIBASE_ITEM );
return $handler-supportsRedirects();
}
 
-   protected function addItems() {
+   /**
+* @return Item[]
+*/
+   private function addItems() {
$user = $this-getUser();
 
$labels = array( 'New York City', 'Tokyo', 'Jakarta', 'Nairobi',
@@ -125,16 +131,19 @@
return $items;
}
 
-   protected function partialClearEntityPerPageTable( $pageId ) {
+   /**
+* @param int $pageId
+*/
+   private function partialClearEntityPerPageTable( $pageId ) {
$dbw = wfGetDB( DB_MASTER );
$dbw-delete( 'wb_entity_per_page', array( 'epp_page_id  ' . 
$pageId ) );
}
 
/**
-* @return int
 * @throws RuntimeException
+* @return int
 */
-   protected function getPageIdForPartialClear() {
+   private function getPageIdForPartialClear() {
$dbw = wfGetDB( DB_MASTER );
$pageRow = $dbw-select(
'page',
@@ -158,7 +167,7 @@
/**
 * @return int
 */
-   protected function countPages() {
+   private function countPages() {
$dbw = wfGetDB( DB_MASTER );
$pages = $dbw-select( 'page', array( 'page_id' ), array(), 
__METHOD__ );
 
@@ -168,7 +177,7 @@
/**
 * @return int
 */
-   protected function countEntityPerPageRows() {
+   private function countEntityPerPageRows() {
$dbw = wfGetDB( DB_MASTER );
$eppRows = $dbw-selectField( 'wb_entity_per_page', 'count(*)', 
array(), __METHOD__ );
 
@@ -176,9 +185,9 @@
}
 
/**
-* @return array
+* @return array[]
 */
-   protected function getEntityPerPageData() {
+   private function getEntityPerPageData() {
$dbw = wfGetDB( DB_MASTER );
$rows = $dbw-select(
'wb_entity_per_page',
@@ -235,6 +244,9 @@
$this-assertRows( $this-entityPerPageRows );
}
 
+   /**
+* @param array[] $expectedRows
+*/
private function assertRows( $expectedRows ) {
$dbw = wfGetDB( DB_MASTER );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I752c3e3b9c7c7417ec4d0fc4e19e3235def7c20f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot 


[MediaWiki-commits] [Gerrit] Avoid getDefaultInstance method name in tests - change (mediawiki...Wikibase)

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

Change subject: Avoid getDefaultInstance method name in tests
..


Avoid getDefaultInstance method name in tests

This is split from I04767f2 to make it easier to review.

Change-Id: I712432649c38e5e8cc3148e5c12001b1cf33c6ed
---
M client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
M client/tests/phpunit/includes/WikibaseClientTest.php
M repo/tests/phpunit/includes/WikibaseRepoTest.php
4 files changed, 102 insertions(+), 100 deletions(-)

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



diff --git 
a/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php 
b/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
index b8dbc26..1a4ef8d 100644
--- a/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
+++ b/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
@@ -20,14 +20,14 @@
  */
 class PropertyIdResolverTest extends \PHPUnit_Framework_TestCase {
 
-   private function getDefaultInstance() {
-   $repo = $this-newMockRepository();
-   $propertyLabelResolver = new MockPropertyLabelResolver( 'en', 
$repo );
+   private function getPropertyIdResolver() {
+   $mockRepository = $this-getMockRepository();
+   $propertyLabelResolver = new MockPropertyLabelResolver( 'en', 
$mockRepository );
 
return new PropertyIdResolver( $propertyLabelResolver );
}
 
-   private function newMockRepository() {
+   private function getMockRepository() {
$propertyId = new PropertyId( 'P1337' );
 
$property = Property::newFromType( 'string' );
@@ -43,8 +43,8 @@
/**
 * @dataProvider resolvePropertyIdProvider
 */
-   public function testResolvePropertyId( $expected, $propertyLabelOrId ) {
-   $propertyIdResolver = $this-getDefaultInstance();
+   public function testResolvePropertyId( PropertyId $expected, 
$propertyLabelOrId ) {
+   $propertyIdResolver = $this-getPropertyIdResolver();
 
$propertyId = $propertyIdResolver-resolvePropertyId( 
$propertyLabelOrId, 'en' );
$this-assertEquals( $expected, $propertyId );
@@ -63,7 +63,7 @@
 * @dataProvider 
resolvePropertyIdWithInvalidInput_throwsExceptionProvider
 */
public function testResolvePropertyIdWithInvalidInput_throwsException( 
$propertyIdOrLabel ) {
-   $propertyIdResolver = $this-getDefaultInstance();
+   $propertyIdResolver = $this-getPropertyIdResolver();
 
$this-setExpectedException( 
'Wikibase\Lib\PropertyLabelNotResolvedException' );
 
diff --git 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
index 65ddf59..108a822 100644
--- 
a/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
@@ -11,6 +11,7 @@
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\DataModel\Statement\Statement;
+use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Test\MockRepository;
 
 /**
@@ -26,16 +27,19 @@
  */
 class SnaksFinderTest extends \PHPUnit_Framework_TestCase {
 
-   private function getDefaultInstance() {
-   $repo = $this-newMockRepository();
+   private function getSnaksFinder() {
+   $entityLookup = $this-getEntityLookup();
 
-   return new SnaksFinder( $repo );
+   return new SnaksFinder( $entityLookup );
}
 
-   private function newMockRepository() {
+   /**
+* @return EntityLookup
+*/
+   private function getEntityLookup() {
$propertyId = new PropertyId( 'P1337' );
 
-   $entityLookup = new MockRepository();
+   $mockRepository = new MockRepository();
 
$statement1 = new Statement( new Claim( new PropertyValueSnak(
$propertyId,
@@ -67,19 +71,19 @@
$property-setId( $propertyId );
$property-getFingerprint()-setLabel( 'en', 'a kitten!' );
 
-   $entityLookup-putEntity( $item );
-   $entityLookup-putEntity( $property );
+   $mockRepository-putEntity( $item );
+   $mockRepository-putEntity( $property );
 
-   return $entityLookup;
+   return $mockRepository;
}
 
/**
 * @dataProvider findSnaksProvider
 */
-   public function testFindSnaks( $expected, ItemId $itemId, 
$propertyLabelOrId ) {
-   

[MediaWiki-commits] [Gerrit] Bumped version number to 1.2. - change (mediawiki...HierarchyBuilder)

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

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

Change subject: Bumped version number to 1.2.
..

Bumped version number to 1.2.

Change-Id: I344ae76814585ce89fed8541528d55625d0a665b

Updated styling of selectFromHierarchy so that selected rows are now italic and 
green.

Change-Id: Ie42385134bc9e30d17473820a6b520e2cb3cd91d

Cleaned up extrenious comments.

Change-Id: Ib545ca4edfbef495800fd2ca611ed2dbbc8b7f9b

Implemented height and width restrictions for selectFromHierarchy form input 
type.

Change-Id: Ib5411e151d7c0baee5872c7cd78380db81ee07a9
---
M HierarchyBuilder.php
M HierarchySelectFormInput.php
A selectFromHierarchy.css
M selectFromHierarchy.js
4 files changed, 79 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HierarchyBuilder 
refs/changes/25/176925/1

diff --git a/HierarchyBuilder.php b/HierarchyBuilder.php
index 2838fef..06e483f 100644
--- a/HierarchyBuilder.php
+++ b/HierarchyBuilder.php
@@ -46,7 +46,7 @@
 $wgExtensionCredits['parserhook'][] = array (
'path' = __FILE__,
'name' = 'HierarchyBuilder',
-   'version' = '1.1',
+   'version' = '1.2',
'author' = array(
'[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]',
'[https://www.mediawiki.org/wiki/User:Kevin.ji Kevin Ji]'
@@ -98,6 +98,7 @@
'localBasePath' = __DIR__,
'remoteExtPath' = 'HierarchyBuilder',
'scripts' = 'selectFromHierarchy.js',
+   'styles' = 'selectFromHierarchy.css',  
'dependencies' = array(
'ext.HierarchyBuilder.jstree',
'ext.semanticforms.main'
@@ -222,6 +223,7 @@
$hierarchyPropertyName );
 
// format the parent for return according to the optional arg
+   $output = '';
if ( $parent != '' ) {
if ( $template != '' ) {
$intro = $introTemplate != '' ? 
{{{$introTemplate}}}\n : '';
diff --git a/HierarchySelectFormInput.php b/HierarchySelectFormInput.php
index 5f1429a..7b839ee 100644
--- a/HierarchySelectFormInput.php
+++ b/HierarchySelectFormInput.php
@@ -73,6 +73,18 @@
$displaynameproperty = '';
}
 
+   if ( array_key_exists( 'width', $this-mOtherArgs ) ) {
+   $this-mWidth = $this-mOtherArgs['width'];
+   } else {
+   $this-mWidth = '';
+   }
+
+   if ( array_key_exists( 'height', $this-mOtherArgs ) ) {
+   $this-mHeight = $this-mOtherArgs['height'];
+   } else {
+   $this-mHeight = '';
+   }
+
$hierarchy = HierarchyBuilder::getPropertyFromPage( 
$this-mPageName,
$this-mPropertyName );
$hierarchy = HierarchyBuilder::updateHierarchyWithDisplayNames( 
$hierarchy,
@@ -89,7 +101,9 @@
'selectedItems' = $selectedItems,
'isDisabled' = $this-mIsDisabled,
'isMandatory' = array_key_exists( 'mandatory', 
$this-mOtherArgs ),
-   'collapsed' = $this-mCollapsed == 'true' ? true : 
false
+   'collapsed' = $this-mCollapsed == 'true' ? true : 
false,
+   'width' = $this-mWidth,
+   'height' = $this-mHeight
);
 
return json_encode( $jsattribs );
diff --git a/selectFromHierarchy.css b/selectFromHierarchy.css
new file mode 100644
index 000..8080a05
--- /dev/null
+++ b/selectFromHierarchy.css
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2014 The MITRE Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+li  a.selectedHierarchyRow {
+font-style: italic;
+color: 

[MediaWiki-commits] [Gerrit] Clean up MockRepository, SiteLinkLookup and related - change (mediawiki...Wikibase)

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

Change subject: Clean up MockRepository, SiteLinkLookup and related
..


Clean up MockRepository, SiteLinkLookup and related

I found this in my stashes. It's possible that I submitted this twice.
If you find an other patch that touches the same files then please
merge *this* first. I will rebase the other later.

Change-Id: Id0c53b3e9e61ae00cbc674b9f8dbc4f82a3017f6
---
M lib/includes/store/EntityInfoBuilderFactory.php
M lib/includes/store/GenericEntityInfoBuilder.php
M lib/includes/store/SiteLinkLookup.php
M lib/includes/store/sql/SiteLinkTable.php
M lib/includes/store/sql/SqlEntityInfoBuilderFactory.php
M lib/tests/phpunit/MockRepository.php
6 files changed, 253 insertions(+), 304 deletions(-)

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



diff --git a/lib/includes/store/EntityInfoBuilderFactory.php 
b/lib/includes/store/EntityInfoBuilderFactory.php
index 56b41b5..6ce254c 100644
--- a/lib/includes/store/EntityInfoBuilderFactory.php
+++ b/lib/includes/store/EntityInfoBuilderFactory.php
@@ -20,9 +20,10 @@
 * Returns a new EntityInfoBuilder for gathering information about the
 * Entities specified by the given IDs.
 *
-* @param EntityId[] $ids
+* @param EntityId[] $entityIds
 *
 * @return EntityInfoBuilder
 */
-   public function newEntityInfoBuilder( array $ids );
+   public function newEntityInfoBuilder( array $entityIds );
+
 }
diff --git a/lib/includes/store/GenericEntityInfoBuilder.php 
b/lib/includes/store/GenericEntityInfoBuilder.php
index 9c74b47..5a32b29 100644
--- a/lib/includes/store/GenericEntityInfoBuilder.php
+++ b/lib/includes/store/GenericEntityInfoBuilder.php
@@ -56,26 +56,29 @@
private $redirects = null;
 
/**
-* @param EntityId[] $ids
-* @param EntityIdParser $idParser
+* @param EntityId[] $entityIds
+* @param EntityIdParser $entityIdParser
 * @param EntityRevisionLookup $entityRevisionLookup
 */
-   public function __construct( array $ids, EntityIdParser $idParser, 
EntityRevisionLookup $entityRevisionLookup ) {
-   $this-idParser = $idParser;
+   public function __construct(
+   array $entityIds,
+   EntityIdParser $entityIdParser,
+   EntityRevisionLookup $entityRevisionLookup
+   ) {
+   $this-setEntityIds( $entityIds );
+   $this-idParser = $entityIdParser;
$this-entityRevisionLookup = $entityRevisionLookup;
-
-   $this-setEntityIds( $ids );
}
 
/**
-* @param EntityId[] $ids
+* @param EntityId[] $entityIds
 */
-   private function setEntityIds( $ids ) {
+   private function setEntityIds( array $entityIds ) {
$this-entityInfo = array();
 
-   foreach ( $ids as $id ) {
-   $key = $id-getSerialization();
-   $type = $id-getEntityType();
+   foreach ( $entityIds as $entityId ) {
+   $key = $entityId-getSerialization();
+   $type = $entityId-getEntityType();
 
$this-entityInfo[$key] = array(
'id' = $key,
diff --git a/lib/includes/store/SiteLinkLookup.php 
b/lib/includes/store/SiteLinkLookup.php
index 9af6623..1e4a42b 100644
--- a/lib/includes/store/SiteLinkLookup.php
+++ b/lib/includes/store/SiteLinkLookup.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lib\Store;
 
+use DatabaseBase;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\SiteLink;
@@ -21,22 +22,22 @@
 * currently in the store. The array is empty if there are no such 
conflicts.
 *
 * The items in the return array are arrays with the following elements:
-* - integer itemId
+* - int itemId Numeric (unprefixed) item id
 * - string siteId
 * - string sitePage
 *
 * @since 0.1
 *
 * @param Item  $item
-* @param \DatabaseBase|null $db The database object to use (optional).
+* @param DatabaseBase|null $db The database object to use (optional).
 *If conflict checking is performed as part of a save operation,
 *this should be used to provide the master DB connection that 
will
 *also be used for saving. This will preserve transactional 
integrity
 *and avoid race conditions.
 *
-* @return array of array
+* @return array[]
 */
-   public function getConflictsForItem( Item $item, \DatabaseBase $db = 
null );
+   public function getConflictsForItem( Item $item, DatabaseBase $db = 
null );
 
/**
 * Returns the id of the item that is equivalent 

[MediaWiki-commits] [Gerrit] Remove extra quotes in string resource - change (apps...wikipedia)

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

Change subject: Remove extra quotes in string resource
..


Remove extra quotes in string resource

Change-Id: Ib0531dcbb4eca98dc78a2007aa6bdc4f614dd809
---
M wikipedia/res/values/strings.xml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index a92963f..0e15c6a 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -82,7 +82,7 @@
 string name=dialog_message_edit_failedEdit failed!/string
 string name=dialog_message_edit_failed_retryRetry/string
 string name=dialog_message_edit_failed_cancelCancel/string
-string name=dialog_message_leaving_editYour changes have not been 
saved yet. Are you sure you want to leave this page?/string
+string name=dialog_message_leaving_editYour changes have not been 
saved yet. Are you sure you want to leave this page?/string
 string name=dialog_message_leaving_edit_leaveLeave/string
 string name=dialog_message_leaving_edit_stayStay/string
 string name=menu_show_tocTable of Contents/string

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0531dcbb4eca98dc78a2007aa6bdc4f614dd809
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Dbrant dbr...@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] Don't use Html methods in LinkBeginHookHandler - change (mediawiki...Wikibase)

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

Change subject: Don't use Html methods in LinkBeginHookHandler
..


Don't use Html methods in LinkBeginHookHandler

these are unnecessary here, add a bit of overhead
and make html rendering somewhat slower.

the message params (user input) still get escaped.

Change-Id: I972031c3109203c0401f69d845063f5c984e7f0c
---
M repo/includes/Hook/LinkBeginHookHandler.php
1 file changed, 8 insertions(+), 10 deletions(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/Hook/LinkBeginHookHandler.php 
b/repo/includes/Hook/LinkBeginHookHandler.php
index 48dab3f..dcde7bc 100644
--- a/repo/includes/Hook/LinkBeginHookHandler.php
+++ b/repo/includes/Hook/LinkBeginHookHandler.php
@@ -203,27 +203,25 @@
/** @var Language $labelLang */
list( $labelText, $labelLang ) = $this-extractTextAndLanguage( 
$labelData );
 
-   $idHtml = Html::openElement( 'span', array( 'class' = 
'wb-itemlink-id' ) )
+   $idHtml = 'span class=wb-itemlink-id'
. wfMessage(
'wikibase-itemlink-id-wrapper',
$title-getText()
)-inContentLanguage()-escaped()
-   . Html::closeElement( 'span' );
+   . '/span';
 
-   $labelHtml = Html::openElement( 'span', array(
-   'class' = 'wb-itemlink-label',
-   'lang' = $labelLang-getHtmlCode(),
-   'dir' = $labelLang-getDir()
-   ) )
+   $labelHtml = 'span class=wb-itemlink-label'
+   . ' lang=' . htmlspecialchars( 
$labelLang-getHtmlCode() ) . ''
+   . ' dir=' . htmlspecialchars( 
$labelLang-getDir() ) . ''
. htmlspecialchars( $labelText )
-   . Html::closeElement( 'span' );
+   . '/span';
 
-   return Html::openElement( 'span', array( 'class' = 
'wb-itemlink' ) )
+   return 'span class=wb-itemlink'
. wfMessage( 'wikibase-itemlink' )-rawParams(
$labelHtml,
$idHtml
)-inContentLanguage()-escaped()
-   . Html::closeElement( 'span' );
+   . '/span';
}
 
private function getTitleAttribute( Title $title, $labelData, 
$descriptionData ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I972031c3109203c0401f69d845063f5c984e7f0c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Thiemo Mättig (WMDE) thiemo.maet...@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] Disable kafaktee on analytics1003 (at least tempoarily) - change (operations/puppet)

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

Change subject: Disable kafaktee on analytics1003 (at least tempoarily)
..


Disable kafaktee on analytics1003 (at least tempoarily)

analytics1003 has been having kernel hiccups that causes it to halt:

149325] BUG: unable to handle kernel NULL pointer dereference at 
01be

Change-Id: Iaa9f634d52bc1093cf7c23692558410398480f99
---
M manifests/site.pp
1 file changed, 11 insertions(+), 6 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index b33c324..171afbc 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -99,12 +99,17 @@
 include standard
 
 include role::analytics
-include role::analytics::kafkatee::webrequest::mobile
-include role::analytics::kafkatee::webrequest::edits
-include role::analytics::kafkatee::webrequest::5xx
-include role::analytics::kafkatee::webrequest::api
-include role::analytics::kafkatee::webrequest::glam_nara
-include role::analytics::kafkatee::webrequest::webstatscollector
+
+# Disabling these for now.
+# analytics1003 is acting up since the Trusty upgrade. I halts with:
+#   BUG: unable to handle kernel NULL pointer dereference at 
01be
+#
+# include role::analytics::kafkatee::webrequest::mobile
+# include role::analytics::kafkatee::webrequest::edits
+# include role::analytics::kafkatee::webrequest::5xx
+# include role::analytics::kafkatee::webrequest::api
+# include role::analytics::kafkatee::webrequest::glam_nara
+# include role::analytics::kafkatee::webrequest::webstatscollector
 }
 
 # analytics1009 used to be the standby NameNode,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa9f634d52bc1093cf7c23692558410398480f99
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata o...@wikimedia.org
Gerrit-Reviewer: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Pre-fill fields in image dialog when image code is selected ... - change (mediawiki...WikiEditor)

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

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

Change subject: Pre-fill fields in image dialog when image code is selected in 
editor
..

Pre-fill fields in image dialog when image code is selected in editor

This commit adds a function to parse image syntax selected in the
editor and uses the parsed data to automatically fill the fields
of the WikiEditor image dialog. Surrounding whitespace in the
selected wikitext is now included in the result. This causes an
issue with the ownline option in line 840, which appends an extra
line regardless of the post text.

Bug: T40829
Change-Id: Ib117a2e6350400f9298d4892a00981ac41f3dbbf
---
M modules/jquery.wikiEditor.dialogs.config.js
1 file changed, 77 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/27/176927/1

diff --git a/modules/jquery.wikiEditor.dialogs.config.js 
b/modules/jquery.wikiEditor.dialogs.config.js
index 8cd50a0..328c2db 100644
--- a/modules/jquery.wikiEditor.dialogs.config.js
+++ b/modules/jquery.wikiEditor.dialogs.config.js
@@ -797,8 +797,8 @@
width: 590,
buttons: {

'wikieditor-toolbar-tool-file-insert': function () {
-   var fileName, caption, 
fileFloat, fileFormat, fileSize, fileTitle,
-   options, 
fileUse,
+   var fileName, caption, 
fileFloat, fileFormat, fileSize, whitespace,
+   fileTitle, 
options, fileUse,
hasPxRgx = 
/.+px$/,
magicWordsI18N 
= mw.config.get( 'wgWikiEditorMagicWords' );
fileName = $( 
'#wikieditor-toolbar-file-target' ).val();
@@ -806,6 +806,7 @@
fileFloat = $( 
'#wikieditor-toolbar-file-float' ).val();
fileFormat = $( 
'#wikieditor-toolbar-file-format' ).val();
fileSize = $( 
'#wikieditor-toolbar-file-size' ).val();
+   whitespace = $( 
'#wikieditor-toolbar-file-dialog' ).data( 'whitespace' );
// Append px to end to 
size if not already contains it
if ( fileSize !== ''  
!hasPxRgx.test( fileSize ) ) {
fileSize += 
'px';
@@ -833,9 +834,9 @@
{
type: 
'replace',

options: {
-   
pre: '[[',
+   
pre: whitespace[0] + '[[',

peri: fileUse,
-   
post: ']]',
+   
post: ']]' + whitespace[1],

ownline: true
}
},
@@ -856,7 +857,79 @@
}
},
open: function () {
+   // Pre-fill the text fields 
based on the current selection
+   var context = $( this ).data( 
'context' );
+   // Restore and immediately save 
selection state, needed for inserting stuff later
+   
context.fn.restoreCursorAndScrollTop();
+   
context.fn.saveCursorAndScrollTop();
+   var selection = 
context.$textarea.textSelection( 'getSelection' );
+   // Set focus
$( 
'#wikieditor-toolbar-file-target' ).focus();
+   $( 
'#wikieditor-toolbar-file-dialog' ).data( 

[MediaWiki-commits] [Gerrit] Remove unused imports from Client - change (mediawiki...Wikibase)

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

Change subject: Remove unused imports from Client
..


Remove unused imports from Client

Some are not reported by PHPStorm, I found them with a regex.

Change-Id: I6cd2db1d31ace633568573f66caafa0a30aefe84
---
M client/WikibaseClient.hooks.php
M client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
M client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
M client/includes/hooks/ParserAfterParseHookHandler.php
M client/includes/hooks/SidebarHookHandlers.php
M client/includes/hooks/UpdateRepoHookHandlers.php
M client/includes/scribunto/WikibaseLuaEntityBindings.php
M client/tests/phpunit/includes/Usage/Sql/SqlUsageTrackerTest.php
M client/tests/phpunit/includes/Usage/Sql/UsageTableUpdaterTest.php
M client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php
M client/tests/phpunit/includes/UsageUpdaterTest.php
M client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php
M client/tests/phpunit/includes/store/TitleFactoryTest.php
14 files changed, 0 insertions(+), 20 deletions(-)

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



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 5cc19e5..ad9078e 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -5,7 +5,6 @@
 use Action;
 use BaseTemplate;
 use ChangesList;
-use Content;
 use FormOptions;
 use IContextSource;
 use Message;
@@ -35,12 +34,9 @@
 use Wikibase\Client\RecentChanges\ExternalChangeFactory;
 use Wikibase\Client\RecentChanges\RecentChangesFilterOptions;
 use Wikibase\Client\RepoItemLinkGenerator;
-use Wikibase\Client\UpdateRepo\UpdateRepoOnDelete;
-use Wikibase\Client\UpdateRepo\UpdateRepoOnMove;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\SiteLink;
-use WikiPage;
 
 /**
  * File defining the hook handlers for the Wikibase Client extension.
diff --git a/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php 
b/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
index c318089..e893a62 100644
--- a/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
+++ b/client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
@@ -6,8 +6,6 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\Snak;
-use Wikibase\DataModel\Statement\BestStatementsFinder;
-use Wikibase\DataModel\Statement\Statement;
 use Wikibase\DataModel\StatementListProvider;
 use Wikibase\Lib\Store\EntityLookup;
 
diff --git a/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php 
b/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
index d2eca0f..e344065 100644
--- a/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
+++ b/client/includes/Usage/Sql/SqlUsageTrackerSchemaUpdate.php
@@ -4,7 +4,6 @@
 
 use DatabaseUpdater;
 use Wikibase\Client\WikibaseClient;
-use Wikibase\DataModel\Entity\EntityIdParser;
 
 /**
  * Schema updater for SqlUsageTracker
diff --git a/client/includes/hooks/ParserAfterParseHookHandler.php 
b/client/includes/hooks/ParserAfterParseHookHandler.php
index 81ad94e..c27bc49 100644
--- a/client/includes/hooks/ParserAfterParseHookHandler.php
+++ b/client/includes/hooks/ParserAfterParseHookHandler.php
@@ -10,8 +10,6 @@
 use Wikibase\InterwikiSorter;
 use Wikibase\LangLinkHandler;
 use Wikibase\NamespaceChecker;
-use Wikibase\NoLangLinkHandler;
-use Wikibase\SettingsArray;
 
 /**
  * @since 0.5.
diff --git a/client/includes/hooks/SidebarHookHandlers.php 
b/client/includes/hooks/SidebarHookHandlers.php
index a703555..4e7910e 100644
--- a/client/includes/hooks/SidebarHookHandlers.php
+++ b/client/includes/hooks/SidebarHookHandlers.php
@@ -10,7 +10,6 @@
 use Wikibase\Client\WikibaseClient;
 use Wikibase\NamespaceChecker;
 use Wikibase\NoLangLinkHandler;
-use Wikibase\SettingsArray;
 
 /**
  * ParserOutput related hook handlers.
diff --git a/client/includes/hooks/UpdateRepoHookHandlers.php 
b/client/includes/hooks/UpdateRepoHookHandlers.php
index a1b2180..45566a2 100644
--- a/client/includes/hooks/UpdateRepoHookHandlers.php
+++ b/client/includes/hooks/UpdateRepoHookHandlers.php
@@ -10,7 +10,6 @@
 use ManualLogEntry;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\NamespaceChecker;
-use Wikibase\SettingsArray;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use Wikibase\Client\UpdateRepo\UpdateRepo;
 use Wikibase\Client\UpdateRepo\UpdateRepoOnDelete;
diff --git a/client/includes/scribunto/WikibaseLuaEntityBindings.php 
b/client/includes/scribunto/WikibaseLuaEntityBindings.php
index d0e343d..e908c16 100644
--- a/client/includes/scribunto/WikibaseLuaEntityBindings.php
+++ b/client/includes/scribunto/WikibaseLuaEntityBindings.php
@@ -12,7 +12,6 @@
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use 

[MediaWiki-commits] [Gerrit] Remove unused imports from Lib - change (mediawiki...Wikibase)

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

Change subject: Remove unused imports from Lib
..


Remove unused imports from Lib

Some are not reported by PHPStorm, I found them with a regex.

Change-Id: I0fb8866935c073339b150ac45b27934d0fd94c17
---
M lib/includes/formatters/EntityIdHtmlLinkFormatter.php
M lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
M lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php
3 files changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/lib/includes/formatters/EntityIdHtmlLinkFormatter.php 
b/lib/includes/formatters/EntityIdHtmlLinkFormatter.php
index 0b655c7..5378374 100644
--- a/lib/includes/formatters/EntityIdHtmlLinkFormatter.php
+++ b/lib/includes/formatters/EntityIdHtmlLinkFormatter.php
@@ -4,7 +4,6 @@
 
 use Html;
 use OutOfBoundsException;
-use Title;
 use ValueFormatters\FormatterOptions;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\Lib\Store\EntityTitleLookup;
diff --git a/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php 
b/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
index b31e20e..7b0c837 100644
--- a/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
+++ b/lib/tests/phpunit/formatters/WikibaseSnakFormatterBuildersTest.php
@@ -12,7 +12,6 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Snak\PropertyNoValueSnak;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
-use Wikibase\EntityFactory;
 use Wikibase\Lib\OutputFormatSnakFormatterFactory;
 use Wikibase\Lib\SnakFormatter;
 use Wikibase\Lib\WikibaseSnakFormatterBuilders;
diff --git a/lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php 
b/lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php
index 3ebf15e..0813730 100644
--- a/lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php
+++ b/lib/tests/phpunit/serializers/DispatchingEntitySerializerTest.php
@@ -7,7 +7,6 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\Property;
 use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\DataModel\SiteLink;
 use Wikibase\Lib\Serializers\ItemSerializer;
 use Wikibase\Lib\Serializers\SerializerFactory;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fb8866935c073339b150ac45b27934d0fd94c17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@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] Move adjustDrawableToTheme call to onCreateOptionsMenu - change (apps...wikipedia)

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

Change subject: Move adjustDrawableToTheme call to onCreateOptionsMenu
..


Move adjustDrawableToTheme call to onCreateOptionsMenu

Saves a call when tapping on the overflow menu, and is
more consistent with the rest of the adjustDrawableToTheme calls.

Change-Id: I4aa6c8934b07093f1acc54f325af562b3b8e06d7
---
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Dbrant: Looks good to me, approved



diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
index 103fb45..892d0b3 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java
@@ -146,6 +146,7 @@
 return;
 }
 inflater.inflate(R.menu.menu_page_actions, menu);
+fragment.onCreateOptionsMenu(menu, inflater);
 }
 
 @Override
diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
index b0cbb4d..e6449c1 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
@@ -48,6 +48,7 @@
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.Menu;
+import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
@@ -566,9 +567,11 @@
 }
 }
 
-public void onPrepareOptionsMenu(Menu menu) {
+public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
 app.adjustDrawableToTheme(menu.findItem(R.id.menu_toc).getIcon());
+}
 
+public void onPrepareOptionsMenu(Menu menu) {
 switch (state) {
 case PageViewFragmentInternal.STATE_NO_FETCH:
 case PageViewFragmentInternal.STATE_INITIAL_FETCH:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4aa6c8934b07093f1acc54f325af562b3b8e06d7
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND bsitzm...@wikimedia.org
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org
Gerrit-Reviewer: Dbrant dbr...@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] Empty prefix search searches everything - change (mediawiki...CirrusSearch)

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

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

Change subject: Empty prefix search searches everything
..

Empty prefix search searches everything

Before this empty prefix searches would search for only pages with empty
titles which was totally weird and wrong wrong wrong.  Now it searches
for all pages in the namespace and sorts them based on weighting.  That
is what lsearchd used to do I believe.

Fixes T76350.

Change-Id: I36763d13c04ad2f2cd9e796aa699ac1a8ab4515f
---
M includes/Hooks.php
M includes/Searcher.php
M tests/browser/features/prefix_search.feature
M tests/browser/features/step_definitions/search_steps.rb
4 files changed, 49 insertions(+), 21 deletions(-)


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

diff --git a/includes/Hooks.php b/includes/Hooks.php
index e6f0f68..d6dd49a 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -6,6 +6,7 @@
 use \BetaFeatures;
 use \CirrusSearch;
 use \CirrusSearch\Search\FancyTitleResultsType;
+use \CirrusSearch\Search\TitleResultsType;
 use \DeferredUpdates;
 use \JobQueueGroup;
 use \LinksUpdate;
@@ -389,12 +390,21 @@
public static function prefixSearch( $namespaces, $search, $limit, 
$results ) {
$user = RequestContext::getMain()-getUser();
$searcher = new Searcher( 0, $limit, $namespaces, $user );
-   $searcher-setResultsType( new FancyTitleResultsType( 'prefix' 
) );
+   if ( $search ) {
+   $searcher-setResultsType( new FancyTitleResultsType( 
'prefix' ) );
+   } else {
+   // Empty searches always find the title.
+   $searcher-setResultsType( new TitleResultsType() );
+   }
$status = $searcher-prefixSearch( $search );
// There is no way to send errors or warnings back to the 
caller here so we have to make do with
// only sending results back if there are results and relying 
on the logging done at the status
// constrution site to log errors.
if ( $status-isOK() ) {
+   if ( !$search ) {
+   // No need to unpack the simple title matches 
from non-fancy TitleResultsType
+   return $status-getValue();
+   }
$results = array();
foreach ( $status-getValue() as $match ) {
if ( isset( $match[ 'titleMatch' ] ) ) {
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 59a690f..d5411d5 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -284,25 +284,29 @@
 
self::checkTitleSearchRequestLength( $search );
 
-   if ( $wgCirrusSearchPrefixSearchStartsWithAnyWord ) {
-   $match = new \Elastica\Query\Match();
-   $match-setField( 'title.word_prefix', array(
-   'query' = $search,
-   'analyzer' = 'plain',
-   'operator' = 'and',
-   ) );
-   $this-filters[] = new \Elastica\Filter\Query( $match );
+   if ( $search ) {
+   if ( $wgCirrusSearchPrefixSearchStartsWithAnyWord ) {
+   $match = new \Elastica\Query\Match();
+   $match-setField( 'title.word_prefix', array(
+   'query' = $search,
+   'analyzer' = 'plain',
+   'operator' = 'and',
+   ) );
+   $this-filters[] = new \Elastica\Filter\Query( 
$match );
+   } else {
+   // Elasticsearch seems to have trouble 
extracting the proper terms to highlight
+   // from the default query we make so we feed it 
exactly the right query to highlight.
+   $this-query = new \Elastica\Query\MultiMatch();
+   $this-query-setQuery( $search );
+   $this-query-setFields( array(
+   'title.prefix^' . 
$wgCirrusSearchPrefixWeights[ 'title' ],
+   'redirect.title.prefix^' . 
$wgCirrusSearchPrefixWeights[ 'redirect' ],
+   'title.prefix_asciifolding^' . 
$wgCirrusSearchPrefixWeights[ 'title_asciifolding' ],
+   'redirect.title.prefix_asciifolding^' . 
$wgCirrusSearchPrefixWeights[ 'redirect_asciifolding' ],
+   ) );
+   }
} else {
-

[MediaWiki-commits] [Gerrit] Enable Wikidata data transclusion for commons - change (operations/mediawiki-config)

2014-12-02 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Enable Wikidata data transclusion for commons
..

Enable Wikidata data transclusion for commons

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7deeef1..498dde8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13786,7 +13786,6 @@
 'wmgWikibaseEnableData' = array(
'default' = true,
'wikinews' = false,
-   'commonswiki' = false,
 ),
 
 'wmgUseWikibaseRepo' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbb3a38d09e6e7710536a66ccd6a4337a6d10b6f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de

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


[MediaWiki-commits] [Gerrit] Fix claimit -exists functionality - change (pywikibot/core)

2014-12-02 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Fix claimit -exists functionality
..

Fix claimit -exists functionality

The implementation of -exists meant options 's' and 'q' were not
operative, as it did not set any sources or qualifiers on the claim
to be added, yet it test the missing sources and qualifiers against
those already on the item.  As a consequence, 's' and 'q' would only
prevent a new claim being added when the item had no sources or
qualifiers respectively, as then both sides of the equality test
would be empty and therefore equivalent.

Also, the utility method which did the comparison did not understand
the structure of Claim.sources, and did not test equality correctly.

This change slightly re-interprets the meaning of 's' and 'q',
so that 's' means 'allow adding claims even if another claim on the
same property has the same source' and 'q' means 'allow adding claims
even if the property has a claim with a qualifier.'

Bug: T69284
Change-Id: I4c1c0b8b786ceb116497b192b8167cf8f63dc30b
---
M scripts/claimit.py
1 file changed, 98 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/30/176930/1

diff --git a/scripts/claimit.py b/scripts/claimit.py
index 96471c2..8457554 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -35,7 +35,7 @@
 
 Suppose the claim you want to add has the same property as an existing claim
 and the -exists:p argument is used. Now, claimit.py will not add the claim
-if it has the same target, sources, and/or qualifiers as the existing claim.
+if it has the same target, source, and/or the existing claim has qualifiers.
 To override this behavior, add 't' (target), 's' (sources), or 'q' (qualifiers)
 to the 'exists' argument.
 
@@ -57,14 +57,24 @@
 __version__ = '$Id$'
 #
 
+import copy
+import sys
+
 import pywikibot
+
 from pywikibot import pagegenerators, WikidataBot
+
+if sys.version_info[0]  2:
+unicode = str
 
 # This is required for the text that is shown when you run this script
 # with the parameter -help or without parameters.
 docuReplacements = {
 'params;': pagegenerators.parameterHelp,
 }
+
+EXISTS_HELP_MSG = (Append '%s' to the -exists: argument 
+   to override this behavior.)
 
 
 class ClaimRobot(WikidataBot):
@@ -93,60 +103,96 @@
 Treat each page.
 self.current_page = page
 
-if item:
-for claim in self.claims:
-skip = False
-# If claim with same property already exists...
-if claim.getID() in item.claims:
-if self.exists_arg is None or 'p' not in self.exists_arg:
-pywikibot.log('Skipping %s because claim with same 
property already exists' % (claim.getID(),))
-pywikibot.log('Use the -exists:p option to override 
this behavior')
-skip = True
-else:
-existing_claims = item.claims[claim.getID()]  # 
Existing claims on page of same property
-for existing in existing_claims:
-skip = True  # Default value
-# If some attribute of the claim being added 
matches some attribute in an existing claim
-# of the same property, skip the claim, unless the 
'exists' argument overrides it.
-if claim.getTarget() == existing.getTarget() and 
't' not in self.exists_arg:
-pywikibot.log('Skipping %s because claim with 
same target already exists' % (claim.getID(),))
-pywikibot.log('Append \'t\' to the -exists 
argument to override this behavior')
-break
-if listsEqual(claim.getSources(), 
existing.getSources()) and 's' not in self.exists_arg:
-pywikibot.log('Skipping %s because claim with 
same sources already exists' % (claim.getID(),))
-pywikibot.log('Append \'s\' to the -exists 
argument to override this behavior')
-break
-if listsEqual(claim.qualifiers, 
existing.qualifiers) and 'q' not in self.exists_arg:
-pywikibot.log('Skipping %s because claim with 
same qualifiers already exists' % (claim.getID(),))
-pywikibot.log('Append \'q\' to the -exists 
argument to override this behavior')
-break
-skip = False
-if not skip:
-pywikibot.output('Adding %s -- %s'
- % (claim.getID(), claim.getTarget()))
-item.addClaim(claim)
-# A generator 

[MediaWiki-commits] [Gerrit] Create new pool counter for prefix searches - change (operations/mediawiki-config)

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

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

Change subject: Create new pool counter for prefix searches
..

Create new pool counter for prefix searches

Change-Id: I58a56f7ecbecfa5962e77ef88cb5c5abdbe6fafb
---
M wmf-config/PoolCounterSettings-eqiad.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/PoolCounterSettings-eqiad.php 
b/wmf-config/PoolCounterSettings-eqiad.php
index d439247..e3a8934 100644
--- a/wmf-config/PoolCounterSettings-eqiad.php
+++ b/wmf-config/PoolCounterSettings-eqiad.php
@@ -31,6 +31,13 @@
'workers' = 432,
'maxqueue' = 600,
),
+   // Super common and mostly fast
+   'CirrusSearch-Prefix' = array(
+   'class' = 'PoolCounter_Client',
+   'timeout' = 15,
+   'workers' = 432,
+   'maxqueue' = 600,
+   ),
// Regex searches are much heavier then regular searches so we limit the
// concurrent number.
'CirrusSearch-Regex' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58a56f7ecbecfa5962e77ef88cb5c5abdbe6fafb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Lower full text search queue - change (operations/mediawiki-config)

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

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

Change subject: Lower full text search queue
..

Lower full text search queue

Now that prefix searches are on another queue we don't need to have such
a long queue for full text searches.  Probably.

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


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

diff --git a/wmf-config/PoolCounterSettings-eqiad.php 
b/wmf-config/PoolCounterSettings-eqiad.php
index e3a8934..feed68c 100644
--- a/wmf-config/PoolCounterSettings-eqiad.php
+++ b/wmf-config/PoolCounterSettings-eqiad.php
@@ -29,7 +29,7 @@
'class' = 'PoolCounter_Client',
'timeout' = 15,
'workers' = 432,
-   'maxqueue' = 600,
+   'maxqueue' = 400,
),
// Super common and mostly fast
'CirrusSearch-Prefix' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f398d6f51c1ec7cc1e945449fe8ca75f2bde326
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Introduce DataType for refs to Properties. - change (mediawiki...Wikibase)

2014-12-02 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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

Change subject: Introduce DataType for refs to Properties.
..

Introduce DataType for refs to Properties.

DataType for references to Properties.
Intended for use in constraints defined as statements
on properties.

Bug: T75302
Change-Id: I3e844f30eab145cee7a0a014a817cf306629b7a0
---
M lib/config/WikibaseLib.default.php
M lib/i18n/en.json
M lib/i18n/qqq.json
M lib/includes/Validators/EntityExistsValidator.php
M lib/includes/WikibaseDataTypeBuilders.php
5 files changed, 50 insertions(+), 19 deletions(-)


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

diff --git a/lib/config/WikibaseLib.default.php 
b/lib/config/WikibaseLib.default.php
index 1e68026..9234333 100644
--- a/lib/config/WikibaseLib.default.php
+++ b/lib/config/WikibaseLib.default.php
@@ -97,6 +97,7 @@
'time',
'url',
'wikibase-item',
+   'wikibase-property',
),
 
// URL schemes allowed for URL values. See UrlSchemeValidators for a 
full list.
diff --git a/lib/i18n/en.json b/lib/i18n/en.json
index 126f31a..9b2a825 100644
--- a/lib/i18n/en.json
+++ b/lib/i18n/en.json
@@ -66,6 +66,7 @@
wikibase-validator-unknown-unit: Unknown unit: $1,
wikibase-validator-not-allowed: Illegal value: $1,
datatypes-type-wikibase-item: Item,
+   datatypes-type-wikibase-property: Property,
datatypes-type-commonsMedia: Commons media file,
version-wikibase: Wikibase,
wikibase-time-precision-Gannum: $1 billion years CE,
diff --git a/lib/i18n/qqq.json b/lib/i18n/qqq.json
index e26526a..070d7a7 100644
--- a/lib/i18n/qqq.json
+++ b/lib/i18n/qqq.json
@@ -75,6 +75,7 @@
wikibase-validator-unknown-unit: Input validation error when the 
value has an unknown unit.\n\nParameters:\n* $1 - the unknown 
unit\n{{Related|Wikibase-validator}},
wikibase-validator-not-allowed: Input validation error when the 
given value is not found in the known list of allowed values.\n\nParameters:\n* 
$1 - the illegal value\n{{Related|Wikibase-validator}},
datatypes-type-wikibase-item: The name of a data type for items in 
Wikibase.\n{{Identical|Item}},
+   datatypes-type-wikibase-property: The name of a data type for 
properties in Wikibase.\n{{Identical|Property}},
datatypes-type-commonsMedia: The name of a data type for media files 
on Wikimedia Commons (proper name, capitalised in English; first letter 
capitalised anyway in this message and relatives).,
version-wikibase: Name of the Wikibase extension collection, used on 
[[Special:Version]],
wikibase-time-precision-Gannum: !!DO NOT TRANSLATE!! Used to present 
a point in time with the precession of 1 billion of 
years\n{{Related|Wikibase-time-precision}},
diff --git a/lib/includes/Validators/EntityExistsValidator.php 
b/lib/includes/Validators/EntityExistsValidator.php
index 03a9fb2..0a6e7f4 100644
--- a/lib/includes/Validators/EntityExistsValidator.php
+++ b/lib/includes/Validators/EntityExistsValidator.php
@@ -19,9 +19,14 @@
 class EntityExistsValidator implements ValueValidator {
 
private $entityLookup;
+   /**
+* @var null
+*/
+   private $entityType;
 
-   public function __construct( EntityLookup $entityLookup ) {
+   public function __construct( EntityLookup $entityLookup, $entityType = 
null ) {
$this-entityLookup = $entityLookup;
+   $this-entityType = $entityType;
}
 
/**
@@ -41,6 +46,10 @@
throw new InvalidArgumentException( Expected an 
EntityId object );
}
 
+   if ( $this-entityType !== null  $value-getEntityType() !== 
$this-entityType ) {
+   throw new InvalidArgumentException( Expected type  . 
$this-entityType );
+   }
+
if ( !$this-entityLookup-hasEntity( $value ) ) {
return Result::newError( array(
//XXX: we are passing an EntityId as a message 
parameter here - make sure to turn it into a string later!
diff --git a/lib/includes/WikibaseDataTypeBuilders.php 
b/lib/includes/WikibaseDataTypeBuilders.php
index 3e84ccc..b3414f1 100644
--- a/lib/includes/WikibaseDataTypeBuilders.php
+++ b/lib/includes/WikibaseDataTypeBuilders.php
@@ -6,6 +6,8 @@
 use DataValues\TimeValue;
 use ValueValidators\ValueValidator;
 use Wikibase\DataModel\Entity\EntityIdParser;
+use Wikibase\DataModel\Entity\Item;
+use Wikibase\DataModel\Entity\Property;
 use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Utils;
 use Wikibase\Validators\CompositeValidator;
@@ -73,26 +75,28 @@
 
/**
 * Data types to data value types mapping:
-* commonsMedia = string (camel case, FIXME maybe?)
-

[MediaWiki-commits] [Gerrit] ULS for source and target selectors - change (mediawiki...ContentTranslation)

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

Change subject: ULS for source and target selectors
..


ULS for source and target selectors

ULS sizing will be done in another patch.

Bug: T76196
Change-Id: I435a4c039a538c4391c4c9d19ea117e441c43d93
---
M Resources.php
M modules/source/ext.cx.source.selector.js
M modules/source/styles/ext.cx.source.selector.less
3 files changed, 138 insertions(+), 74 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index a345a2c..87f1323 100644
--- a/Resources.php
+++ b/Resources.php
@@ -143,7 +143,7 @@
'ext.cx.sitemapper',
'jquery.suggestions',
'jquery.throttle-debounce',
-   'jquery.uls.data',
+   'ext.uls.mediawiki',
),
'messages' = array(
'cx-sourceselector-dialog-new-translation',
diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index d13bada..1b71fc5 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -35,6 +35,22 @@
}
 
/**
+* Return an object of languages indexed by language code.
+* @param {array} languages An array of language codes.
+* return {object} Autonyms indexed by language code.
+*/
+   function getAutonyms( languages ) {
+   var i,
+   autonyms = {};
+
+   for ( i = 0; i  languages.length; i++ ) {
+   autonyms[ languages[ i ] ] = $.uls.data.getAutonym( 
languages[ i ] );
+   }
+
+   return autonyms;
+   }
+
+   /**
 * Initialize the plugin.
 */
CXSourceSelector.prototype.init = function () {
@@ -88,40 +104,62 @@
};
 
/**
+* Check whether a language is available as a target language
+* for the currently selected source language.
+* @param {array} language A language code.
+* return {boolean} true if the language is available.
+*/
+   CXSourceSelector.prototype.isValidTarget = function ( language ) {
+   return ( $.inArray(
+   language,
+   this.languagePairs[ this.getSourceLanguage() ]
+   )  -1 );
+   };
+
+   /**
+* Get the current source language code.
+* return {string} Language code. Empty string if not set.
+*/
+   CXSourceSelector.prototype.getSourceLanguage = function () {
+   return this.$sourceLanguage.prop( 'lang' );
+   };
+
+   /**
+* Get the current target language code.
+* return {string} Language code. Empty string if not set.
+*/
+   CXSourceSelector.prototype.getTargetLanguage = function () {
+   return this.$targetLanguage.prop( 'lang' );
+   };
+
+   /**
 * Fill the target language dropdown with target languages that have
 * language tools compatible with the source language.
 */
CXSourceSelector.prototype.fillTargetLanguages = function () {
-   var index, targetLanguage, $option,
-   sourceLanguage = this.$sourceLanguage.val(),
-   enabledOptions = [],
-   disabledOptions = [];
+   var cxSourceSelector = this,
+   targetUlsClass = 'cx-sourceselector-uls-target';
 
-   this.$targetLanguage.empty();
-   for ( index in this.targetLanguages ) {
-   targetLanguage = this.targetLanguages[ index ];
+   // Delete the old target ULS
+   $( '.' + targetUlsClass ).remove();
+   this.$targetLanguage.data( 'uls', null );
 
-   // Skip the same language
-   if ( targetLanguage === sourceLanguage ) {
-   continue;
-   }
-
-   $option = $( 'option' )
-   .attr( 'value', targetLanguage )
-   .text( $.uls.data.getAutonym( targetLanguage ) 
);
-
-   if ( $.inArray( targetLanguage, this.languagePairs[ 
sourceLanguage ] )  -1 ) {
-   enabledOptions.push( $option );
-   } else {
-   // Disable the option, but show it so the user 
will
-   // know that this language is is in the system
-   $option.attr( 'disabled', true );
-   disabledOptions.push( $option );
-   }
-   }
-
-   // Show the enabled languages first
-   this.$targetLanguage.append( enabledOptions, disabledOptions );
+   // 

[MediaWiki-commits] [Gerrit] Allow some Claim methdods to be performed locally - change (pywikibot/core)

2014-12-02 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Allow some Claim methdods to be performed locally
..

Allow some Claim methdods to be performed locally

ItemPage.editEntity can be used to submit multiple changes
to the repository at once.  To do this, the ItemPage in memory
is altered, and editEntity determines the difference between the
in memory copy and the server record.

Most of the ItemPage methods that related to Claims submit the
change immediately, which prevents these methods being used to
batch up a set of changes to the ItemPage before being submitted
to the repository together.

This change only allows ItemPage.addClaim and Claim.addSources and
Claim.addQualifier to be used to alter the in memory copy.

Change-Id: Id41ff0c6c30a64ab4add1a93a7f497e142900eca
---
M pywikibot/page.py
1 file changed, 28 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/34/176934/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 8df644f..de24a73 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -3364,7 +3364,7 @@
 data = {'sitelinks': data}
 self.editEntity(data, **kwargs)
 
-def addClaim(self, claim, bot=True, **kwargs):
+def addClaim(self, claim, bot=True, save=True, **kwargs):
 
 Add a claim to the item.
 
@@ -3372,8 +3372,18 @@
 @type claim: Claim
 @param bot: Whether to flag as bot (if possible)
 @type bot: bool
+@param save: If attached to an item, update the item on the server
+@param save: bool
 
-self.repo.addClaim(self, claim, bot=bot, **kwargs)
+if save:
+self.repo.addClaim(self, claim, bot=bot, **kwargs)
+else:
+# Add the claim, which repo.addClaim also does
+if claim.getID() in self.claims:
+self.claims[claim.getID()].append(claim)
+else:
+self.claims[claim.getID()] = [claim]
+
 claim.on_item = self
 
 def removeClaims(self, claims, **kwargs):
@@ -3793,18 +3803,23 @@
 
 self.addSources([claim], **kwargs)
 
-def addSources(self, claims, **kwargs):
+def addSources(self, claims, save=True, **kwargs):
 
 Add the claims as one source.
 
-@param claims: the claims to add
+@param claims: the source claims to add
 @type claims: list of pywikibot.Claim
+@param save: If attached to an item, update the item on the server
+@param save: bool
 
-data = self.repo.editSource(self, claims, new=True, **kwargs)
+if self.on_item and save:
+data = self.repo.editSource(self, claims, new=True, **kwargs)
+self.on_item.lastrevid = data['pageinfo']['lastrevid']
+for claim in claims:
+claim.hash = data['reference']['hash']
+
 source = collections.defaultdict(list)
 for claim in claims:
-claim.hash = data['reference']['hash']
-self.on_item.lastrevid = data['pageinfo']['lastrevid']
 source[claim.getID()].append(claim)
 self.sources.append(source)
 
@@ -3830,15 +3845,18 @@
 source_dict[source.getID()].append(source)
 self.sources.remove(source_dict)
 
-def addQualifier(self, qualifier, **kwargs):
+def addQualifier(self, qualifier, save=True, **kwargs):
 Add the given qualifier.
 
 @param qualifier: the qualifier to add
 @type qualifier: Claim
+@param save: If attached to an item, update the item on the server
+@param save: bool
 
-data = self.repo.editQualifier(self, qualifier, **kwargs)
 qualifier.isQualifier = True
-self.on_item.lastrevid = data['pageinfo']['lastrevid']
+if self.on_item and save:
+data = self.repo.editQualifier(self, qualifier, **kwargs)
+self.on_item.lastrevid = data['pageinfo']['lastrevid']
 if qualifier.getID() in self.qualifiers:
 self.qualifiers[qualifier.getID()].append(qualifier)
 else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id41ff0c6c30a64ab4add1a93a7f497e142900eca
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg jay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Bumped version number to 1.2. - change (mediawiki...HierarchyBuilder)

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

Change subject: Bumped version number to 1.2.
..


Bumped version number to 1.2.

Change-Id: I344ae76814585ce89fed8541528d55625d0a665b

Updated styling of selectFromHierarchy so that selected rows are now italic and 
green.

Change-Id: Ie42385134bc9e30d17473820a6b520e2cb3cd91d

Cleaned up extrenious comments.

Change-Id: Ib545ca4edfbef495800fd2ca611ed2dbbc8b7f9b

Implemented height and width restrictions for selectFromHierarchy form input 
type.

Change-Id: Ib5411e151d7c0baee5872c7cd78380db81ee07a9
---
M HierarchyBuilder.php
M HierarchySelectFormInput.php
A selectFromHierarchy.css
M selectFromHierarchy.js
4 files changed, 79 insertions(+), 5 deletions(-)

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



diff --git a/HierarchyBuilder.php b/HierarchyBuilder.php
index 2838fef..06e483f 100644
--- a/HierarchyBuilder.php
+++ b/HierarchyBuilder.php
@@ -46,7 +46,7 @@
 $wgExtensionCredits['parserhook'][] = array (
'path' = __FILE__,
'name' = 'HierarchyBuilder',
-   'version' = '1.1',
+   'version' = '1.2',
'author' = array(
'[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]',
'[https://www.mediawiki.org/wiki/User:Kevin.ji Kevin Ji]'
@@ -98,6 +98,7 @@
'localBasePath' = __DIR__,
'remoteExtPath' = 'HierarchyBuilder',
'scripts' = 'selectFromHierarchy.js',
+   'styles' = 'selectFromHierarchy.css',  
'dependencies' = array(
'ext.HierarchyBuilder.jstree',
'ext.semanticforms.main'
@@ -222,6 +223,7 @@
$hierarchyPropertyName );
 
// format the parent for return according to the optional arg
+   $output = '';
if ( $parent != '' ) {
if ( $template != '' ) {
$intro = $introTemplate != '' ? 
{{{$introTemplate}}}\n : '';
diff --git a/HierarchySelectFormInput.php b/HierarchySelectFormInput.php
index 5f1429a..7b839ee 100644
--- a/HierarchySelectFormInput.php
+++ b/HierarchySelectFormInput.php
@@ -73,6 +73,18 @@
$displaynameproperty = '';
}
 
+   if ( array_key_exists( 'width', $this-mOtherArgs ) ) {
+   $this-mWidth = $this-mOtherArgs['width'];
+   } else {
+   $this-mWidth = '';
+   }
+
+   if ( array_key_exists( 'height', $this-mOtherArgs ) ) {
+   $this-mHeight = $this-mOtherArgs['height'];
+   } else {
+   $this-mHeight = '';
+   }
+
$hierarchy = HierarchyBuilder::getPropertyFromPage( 
$this-mPageName,
$this-mPropertyName );
$hierarchy = HierarchyBuilder::updateHierarchyWithDisplayNames( 
$hierarchy,
@@ -89,7 +101,9 @@
'selectedItems' = $selectedItems,
'isDisabled' = $this-mIsDisabled,
'isMandatory' = array_key_exists( 'mandatory', 
$this-mOtherArgs ),
-   'collapsed' = $this-mCollapsed == 'true' ? true : 
false
+   'collapsed' = $this-mCollapsed == 'true' ? true : 
false,
+   'width' = $this-mWidth,
+   'height' = $this-mHeight
);
 
return json_encode( $jsattribs );
diff --git a/selectFromHierarchy.css b/selectFromHierarchy.css
new file mode 100644
index 000..8080a05
--- /dev/null
+++ b/selectFromHierarchy.css
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2014 The MITRE Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the Software),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+li  a.selectedHierarchyRow {
+font-style: italic;
+color: green;
+}
+
+li  a.unselectedHierarchyRow {
+   font-style: normal;
+  

[MediaWiki-commits] [Gerrit] Remove unused imports from Repo - change (mediawiki...Wikibase)

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

Change subject: Remove unused imports from Repo
..


Remove unused imports from Repo

Some are not reported by PHPStorm, I found them with a regex.

Change-Id: Ia1cd608ab7bac79585f21a1cd15c0476ad97f3b2
---
M repo/includes/ChangeOp/ChangeOpClaimRemove.php
M repo/includes/Diff/DiffOpValueFormatter.php
M repo/includes/EntityParserOutputGenerator.php
M repo/includes/EntityParserOutputGeneratorFactory.php
M repo/includes/EntitySearchTextGenerator.php
M repo/includes/ParserOutputJsConfigBuilder.php
M repo/includes/View/ClaimsView.php
M repo/includes/View/TermBoxView.php
M repo/includes/WikibaseRepo.php
M repo/includes/api/EditEntity.php
M repo/includes/content/EntityContent.php
M repo/includes/content/EntityContentFactory.php
M repo/includes/content/EntityHandler.php
M repo/includes/content/PropertyContent.php
M repo/includes/rdf/RdfBuilder.php
M repo/tests/phpunit/includes/Diff/DiffViewTest.php
M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M repo/tests/phpunit/includes/EntityParserOutputGeneratorFactoryTest.php
M repo/tests/phpunit/includes/ItemSearchTextGeneratorTest.php
M 
repo/tests/phpunit/includes/Localizer/ChangeOpValidationExceptionLocalizerTest.php
M repo/tests/phpunit/includes/ParserOutputJsConfigBuilderTest.php
M repo/tests/phpunit/includes/Validators/SiteLinkUniquenessValidatorTest.php
M repo/tests/phpunit/includes/View/ClaimsViewTest.php
M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php
M repo/tests/phpunit/includes/View/ItemViewTest.php
M repo/tests/phpunit/includes/actions/EditEntityActionTest.php
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/ClaimModificationHelperTest.php
M repo/tests/phpunit/includes/content/ItemHandlerTest.php
M repo/tests/phpunit/includes/store/sql/TermSqlIndexTest.php
30 files changed, 0 insertions(+), 50 deletions(-)

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



diff --git a/repo/includes/ChangeOp/ChangeOpClaimRemove.php 
b/repo/includes/ChangeOp/ChangeOpClaimRemove.php
index ddc2d53..0e6c727 100644
--- a/repo/includes/ChangeOp/ChangeOpClaimRemove.php
+++ b/repo/includes/ChangeOp/ChangeOpClaimRemove.php
@@ -8,7 +8,6 @@
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\Property;
-use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Snak\Snak;
 use Wikibase\DataModel\Statement\StatementList;
 use Wikibase\Summary;
diff --git a/repo/includes/Diff/DiffOpValueFormatter.php 
b/repo/includes/Diff/DiffOpValueFormatter.php
index 1bfb0c2..3435cdc 100644
--- a/repo/includes/Diff/DiffOpValueFormatter.php
+++ b/repo/includes/Diff/DiffOpValueFormatter.php
@@ -2,7 +2,6 @@
 
 namespace Wikibase\Repo\Diff;
 
-use Diff;
 use Html;
 
 /**
diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 6da3f13..6c26b0b 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -3,8 +3,6 @@
 namespace Wikibase;
 
 use ParserOutput;
-use ValueFormatters\FormatterOptions;
-use ValueFormatters\ValueFormatter;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\SiteLinkList;
diff --git a/repo/includes/EntityParserOutputGeneratorFactory.php 
b/repo/includes/EntityParserOutputGeneratorFactory.php
index 1a69a6b..7139012 100644
--- a/repo/includes/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/EntityParserOutputGeneratorFactory.php
@@ -2,22 +2,15 @@
 
 namespace Wikibase;
 
-use InvalidArgumentException;
 use ParserOptions;
-use ParserOutput;
 use RequestContext;
-use User;
 use ValueFormatters\ValueFormatter;
 use Wikibase\DataModel\Entity\Entity;
-use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdParser;
-use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\Serializers\SerializationOptions;
 use Wikibase\Lib\Store\EntityInfoBuilderFactory;
-use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Repo\View\EntityViewFactory;
-use Wikibase\Repo\WikibaseRepo;
 
 /**
  * @since 0.5
diff --git a/repo/includes/EntitySearchTextGenerator.php 
b/repo/includes/EntitySearchTextGenerator.php
index bb63137..5ffce2f 100644
--- a/repo/includes/EntitySearchTextGenerator.php
+++ b/repo/includes/EntitySearchTextGenerator.php
@@ -3,7 +3,6 @@
 namespace Wikibase\Repo;
 
 use Wikibase\DataModel\Entity\EntityDocument;
-use Wikibase\DataModel\Term\AliasGroup;
 use Wikibase\DataModel\Term\AliasGroupList;
 use Wikibase\DataModel\Term\Fingerprint;
 use Wikibase\DataModel\Term\FingerprintProvider;
diff --git a/repo/includes/ParserOutputJsConfigBuilder.php 
b/repo/includes/ParserOutputJsConfigBuilder.php
index f48f6ad..bc5d378 100644
--- a/repo/includes/ParserOutputJsConfigBuilder.php
+++ 

[MediaWiki-commits] [Gerrit] Update ContactPage messages based on feedback from end user. - change (mediawiki...WikimediaMessages)

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

Change subject: Update ContactPage messages based on feedback from end user.
..


Update ContactPage messages based on feedback from end user.

Change-Id: I711c18e5ed029b4aa4330e1bf3980c7ace6751ea
---
M i18n/contactpage/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/i18n/contactpage/en.json b/i18n/contactpage/en.json
index c2fc5d0..6e89c7b 100644
--- a/i18n/contactpage/en.json
+++ b/i18n/contactpage/en.json
@@ -4,7 +4,7 @@
 Reedy
 ]
 },
-contactpage-title-requestlicense: Trademark reuse contact form,
+contactpage-title-requestlicense: Request a license form,
 contactpage-pagetext-requestlicense: Please use the form below to 
contact us about using a Wikimedia trademark.,
 contactpage-subject-requestlicense: Request to use a Wikimedia 
trademark,
 contactpage-license-request-username: Username *,
@@ -39,7 +39,7 @@
 contactpage-wikimedia-trademark-wikiversity: Wikiversity,
 contactpage-wikimedia-trademark-wiktionary: Wiktionary,
 contactpage-wikimedia-trademark-wikivoyage: Wikivoyage,
-contactpage-title-licenseabuse: Copyright abuse contact form,
+contactpage-title-licenseabuse: Report abuse form,
 contactpage-pagetext-licenseabuse: Please use the form below to contact 
us about someone you suspect is abuse or misusing a Wikimedia trademark.,
 contactpage-subject-licenseabuse: Wikimedia trademark abuse 
notification,
 contactpage-license-abuse-description: Describe the abuse,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I711c18e5ed029b4aa4330e1bf3980c7ace6751ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Deskana dga...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
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 JPG thumbnail chaining on Commons - change (operations/mediawiki-config)

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

Change subject: Enable JPG thumbnail chaining on Commons
..


Enable JPG thumbnail chaining on Commons

Bug: T69525
Change-Id: Idf3049e3c2d70e92076d3fe32aedb5821514f281
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7deeef1..1c14207 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14364,7 +14364,6 @@
 // Thumbnail chaining
 'wgThumbnailBuckets' = array(
'default' = array( 128, 256, 512, 1024, 2048, 4096 ),
-   'commonswiki' = array(),
 ),
 
 'wgThumbnailMinimumBucketDistance' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf3049e3c2d70e92076d3fe32aedb5821514f281
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: Filippo Giunchedi fgiunch...@wikimedia.org
Gerrit-Reviewer: Manybubbles never...@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] added hook for additional actions, added notifications - change (mediawiki...BlueSpiceExtensions)

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

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

Change subject: added hook for additional actions, added notifications
..

added hook for additional actions, added notifications

Change-Id: I830d3059794aac439cfaad5be165efc5185ed6f3
---
M ResponsibleEditors/ResponsibleEditors.class.php
1 file changed, 30 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/35/176935/1

diff --git a/ResponsibleEditors/ResponsibleEditors.class.php 
b/ResponsibleEditors/ResponsibleEditors.class.php
index 01b46b1..17155cf 100644
--- a/ResponsibleEditors/ResponsibleEditors.class.php
+++ b/ResponsibleEditors/ResponsibleEditors.class.php
@@ -878,7 +878,8 @@
$sUserName= BsExtensionManager::getExtension( 
'ResponsibleEditors' )-mCore-getUserDisplayName( $oUser );
$sArticleName = $aTitles[0]-getText();
$sArticleLink = $aTitles[0]-getFullURL();
-
+   $sSubject = ;
+   $sMessage = ;
switch( $sAction ) {
case 'change':
$sSubject = wfMessage(
@@ -921,14 +922,35 @@
)-plain();
break;
default:
-   wfDebugLog(
-   
'BS::ResponsibleEditors::notifyResponsibleEditors',
-   'Action '.$sAction.' is unknown. No 
mails sent.'
-   );
-   return;
+   
wfRunHooks(BsResponsibleEditorsnotifyResponsibleEditorUnknownAction, 
array($aResponsibleEditors, $oUser, $aTitles[0], $sAction, $sSubject, 
$sMessage));
+   if ($sSubject ==  || $sMessage == ){
+   wfDebugLog(
+   
'BS::ResponsibleEditors::notifyResponsibleEditors',
+   'Action '.$sAction.' is 
unknown. No mails sent.'
+   );
+   return;
+   }
}
-
-   BsMailer::getInstance('MW')-send($aResponsibleEditors, 
$sSubject, $sMessage);
+   if (class_exists('Notifications')){
+   foreach ($aResponsibleEditors as $oReUser){
+   if ($sAction == change)
+   $sAction = edit;
+   EchoEvent::create( array(
+   'type' = 'bs-' . $sAction,
+   'title' = $aTitles[0],
+   'agent' = $oUser,
+   'extra' = array(
+   'summary'   =  
,
+   'titlelink' =  
true,
+   'difflink'  =  
array( 'diffparams' = array() ),
+   'agentlink' = true,
+   'responsible-editor-id' 
= $oReUser-getId()
+   ),
+   ) );
+   }
+   }
+   else
+   BsMailer::getInstance('MW')-send($aResponsibleEditors, 
$sSubject, $sMessage);
}
 
public static function getResponsibleEditorsPortletData( $iCount, 
$iUserId ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I830d3059794aac439cfaad5be165efc5185ed6f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_22
Gerrit-Owner: Tweichart weich...@hallowelt.biz

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


[MediaWiki-commits] [Gerrit] HAT: remove the last references to the hhvm pool - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: HAT: remove the last references to the hhvm pool
..

HAT: remove the last references to the hhvm pool

Also, remove a couple of ganglia aggregators

Change-Id: I4c638f791d61a7730fd96f6b00f9b669df458525
---
M manifests/ganglia.pp
M manifests/role/ganglia.pp
M manifests/role/mediawiki.pp
M manifests/site.pp
4 files changed, 1 insertion(+), 7 deletions(-)


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

diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index 349ee78..1701b3c 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -84,9 +84,6 @@
 'api_appserver' =  {
 'name'  = 'API application servers',
 'ip_oct'= '13' },
-'appserver_hhvm' = {
-'name'   = 'HHVM Appservers',
-'ip_oct' = '14'},
 'pdf'   =  {
 'name'  = 'PDF servers',
 'ip_oct'= '15' },
@@ -303,7 +300,6 @@
 'Image scalers eqiad'= 'mw1153.eqiad.wmnet 
mw1154.eqiad.wmnet',
 'API application servers eqiad'  = 'mw1114.eqiad.wmnet 
mw1115.eqiad.wmnet',
 'Application servers eqaid'  = 'mw1054.eqiad.wmnet 
mw1055.eqiad.wmnet',
-'HHVM Appservers eqiad'  = 'mw1017.eqiad.wmnet 
mw1018.eqiad.wmnet',
 'Jobrunners eqiad'   = 'mw1001.eqiad.wmnet 
mw1002.eqiad.wmnet',
 'MySQL'  = 'db1050.eqiad.wmnet',
 'PDF servers eqiad'  = 'ocg1001.eqiad.wmnet',
diff --git a/manifests/role/ganglia.pp b/manifests/role/ganglia.pp
index 449ad22..211db46 100644
--- a/manifests/role/ganglia.pp
+++ b/manifests/role/ganglia.pp
@@ -7,7 +7,6 @@
 'Image scalers eqiad'= 'mw1153.eqiad.wmnet 
mw1154.eqiad.wmnet',
 'API application servers eqiad'  = 'mw1114.eqiad.wmnet 
mw1115.eqiad.wmnet',
 'Application servers eqaid'  = 'mw1054.eqiad.wmnet 
mw1055.eqiad.wmnet',
-'HHVM Appservers eqiad'  = 'mw1017.eqiad.wmnet 
mw1018.eqiad.wmnet',
 'Jobrunners eqiad'   = 'mw1001.eqiad.wmnet 
mw1002.eqiad.wmnet',
 'MySQL'  = 'db1050.eqiad.wmnet',
 'PDF servers eqiad'  = 'ocg1001.eqiad.wmnet',
diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 8b13b54..5e6cb51 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -1,4 +1,3 @@
-@monitoring::group { 'appserver_hhvm_eqiad': description = 'eqiad 
application servers (HHVM)' }
 @monitoring::group { 'appserver_eqiad': description = 'eqiad application 
servers' }
 @monitoring::group { 'api_appserver_eqiad': description = 'eqiad API 
application servers' }
 @monitoring::group { 'imagescaler_eqiad':   description = 'eqiad image 
scalers' }
diff --git a/manifests/site.pp b/manifests/site.pp
index b33c324..5a3c552 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1966,7 +1966,7 @@
 
 class {'::admin': groups = ['deployment']}
 
-if $::hostname =~ /^mw10(1[78]|5[45])$/ {
+if $::hostname =~ /^mw10(5[45])$/ {
 $ganglia_aggregator = true
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c638f791d61a7730fd96f6b00f9b669df458525
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Added initial Debian packaging - change (operations...apertium-br-fr)

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

Change subject: Added initial Debian packaging
..


Added initial Debian packaging

Bug: T76318
Change-Id: If0c86068889fd096c1428d08275dbb2b2c7d8d24
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/docs
A debian/rules
A debian/source/format
7 files changed, 118 insertions(+), 0 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..8c9d3d3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,13 @@
+apertium-br-fr (0.5.0+svn~57870-1) trusty; urgency=low
+
+  * Initial release based on Tino Didriksen's work.
+
+ -- Kartik Mistry kar...@debian.org  Tue, 02 Dec 2014 10:43:01 +0530
+
+apertium-br-fr (0.5.0~r36358-1) unstable; urgency=low
+
+  * Initial release
+  * Significant changes in svn since tarball, so mixing new build scripts with
+old data files
+
+ -- Tino Didriksen m...@tinodidriksen.com  Mon, 13 Oct 2014 07:17:28 +
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..9d96a02
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,29 @@
+Source: apertium-br-fr
+Section: science
+Priority: optional
+Maintainer: Debian Science Team 
debian-science-maintain...@lists.alioth.debian.org
+Uploaders: Tino Didriksen m...@tinodidriksen.com,
+   Kartik Mistry kar...@debian.org
+Build-Depends: apertium (= 3.3),
+   autotools-dev,
+   cg3,
+   debhelper (= 9),
+   dh-autoreconf,
+   gawk,
+   libapertium3-3.3-dev,
+   locales,
+   pkg-config (= 0.21)
+Standards-Version: 3.9.6
+Homepage: http://apertium.org/
+Vcs-Git: git://anonscm.debian.org/debian-science/packages/apertium-br-fr.git
+Vcs-Browser: 
https://anonscm.debian.org/cgit/debian-science/packages/apertium-br-fr.git
+
+Package: apertium-br-fr
+Architecture: all
+Depends: apertium (= 3.3), cg3, ${misc:Depends}, ${shlibs:Depends}
+Provides: apertium-fr-br
+Conflicts: apertium-fr-br
+Description: Apertium linguistic data to translate between Breton and French
+ This is a linguistic package for the Apertium shallow-transfer
+ machine translation system. The package can be used to translate
+ between Breton and French.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..60dc927
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,45 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: http://apertium.org/
+
+Files: *
+Copyright: 2008-2011, Francis Tyers fty...@prompsit.com
+   2009-2011, Fulup Jakez fulup.ja...@ofis-bzh.org
+   2009, Gwenvael Jekel jequ...@yahoo.fr
+License: GPL-2
+
+Files: autogen.sh
+Copyright: 2002, Daniel Elstner  daniel.elst...@gmx.net
+License: GPL-2
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 2 of the License
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in /usr/share/common-licenses/GPL-2.
+
+Files: debian/*
+Copyright: 2014, Apertium Project Management Committee 
apertium-...@dlsi.ua.es
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see http://www.gnu.org/licenses/.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in /usr/share/common-licenses/GPL-2.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 000..6f12db5
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+AUTHORS
+README
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..11004df
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,27 @@

[MediaWiki-commits] [Gerrit] Fix mathoid.svc LVS check - change (operations/puppet)

2014-12-02 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: Fix mathoid.svc LVS check
..

Fix mathoid.svc LVS check

Seems like it became aligned with citoid at the URL it requires. So
using the same workaround

Change-Id: I6e4db31fc959e6bef59a3130d99bd9ee868563b3
---
M modules/lvs/manifests/monitor.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/lvs/manifests/monitor.pp b/modules/lvs/manifests/monitor.pp
index 0145af4..c7528e8 100644
--- a/modules/lvs/manifests/monitor.pp
+++ b/modules/lvs/manifests/monitor.pp
@@ -15,7 +15,7 @@
 lvs::monitor_service_http { parsoid.svc.eqiad.wmnet: ip_address = 
10.2.2.28, check_command = check_http_on_port!8000, contact_group = 
admins,parsoid }
 lvs::monitor_service_http { search.svc.eqiad.wmnet: ip_address = 
10.2.2.30, check_command = check_http_on_port!9200, contact_group = 
admins }
 lvs::monitor_service_http { 'ocg.svc.eqiad.wmnet': ip_address = 
$ip['ocg']['eqiad'], check_command = 
check_http_lvs_on_port!ocg.svc.eqiad.wmnet!8000!/?command=health }
-lvs::monitor_service_http { 'mathoid.svc.eqiad.wmnet': ip_address = 
$ip['mathoid']['eqiad'], check_command = 
check_http_lvs_on_port!mathoid.svc.eqiad.wmnet!10042 }
+lvs::monitor_service_http { 'mathoid.svc.eqiad.wmnet': ip_address = 
$ip['mathoid']['eqiad'], check_command = 
check_http_lvs_on_port!mathoid.svc.eqiad.wmnet!10042!/ }
 lvs::monitor_service_http { 'citoid.svc.eqiad.wmnet': ip_address = 
$ip['citoid']['eqiad'], check_command = 
check_http_lvs_on_port!citoid.svc.eqiad.wmnet!1970!/ }
 
 lvs::monitor_service_custom { search-pool1.svc.eqiad.wmnet: ip_address 
= 10.2.2.11, port = 8123, description = LVS Lucene, check_command = 
check_lucene }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e4db31fc959e6bef59a3130d99bd9ee868563b3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add yuvipanda to icinga lists for ops people - change (operations/puppet)

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

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

Change subject: Add yuvipanda to icinga lists for ops people
..

Add yuvipanda to icinga lists for ops people

Change-Id: I0fcdd43ead4d7d18927edcd0833a9b045a37a2cf
---
M modules/icinga/files/cgi.cfg
M modules/icinga/files/contactgroups.cfg
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/176940/1

diff --git a/modules/icinga/files/cgi.cfg b/modules/icinga/files/cgi.cfg
index eaacb7c..3028275 100644
--- a/modules/icinga/files/cgi.cfg
+++ b/modules/icinga/files/cgi.cfg
@@ -131,7 +131,7 @@
 # not use authorization.  You may use an asterisk (*) to
 # authorize any user who has authenticated to the web server.
 
-authorized_for_system_information=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
+authorized_for_system_information=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 # CONFIGURATION INFORMATION ACCESS
@@ -142,7 +142,7 @@
 # an asterisk (*) to authorize any user who has authenticated
 # to the web server.
 
-authorized_for_configuration_information=tim starling,robh,mark 
bergsma,domas,ryan lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon 
Liambotis,katie horn,pgehres,catrope,alexandros 
kosiaris,springle,ori.livneh,gage,andrew bogott,ottomata,rush,Giuseppe 
Lavagetto,Filippo Giunchedi,bblack,manybubbles,Coren
+authorized_for_configuration_information=tim starling,robh,mark 
bergsma,domas,ryan lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon 
Liambotis,katie horn,pgehres,catrope,alexandros 
kosiaris,springle,ori.livneh,gage,andrew bogott,ottomata,rush,Giuseppe 
Lavagetto,Filippo Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 
@@ -155,7 +155,7 @@
 # You may use an asterisk (*) to authorize any user who has
 # authenticated to the web server.
 
-authorized_for_system_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
+authorized_for_system_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 # GLOBAL HOST/SERVICE VIEW ACCESS
@@ -181,8 +181,8 @@
 # authorization).  You may use an asterisk (*) to authorize any
 # user who has authenticated to the web server.
 
-authorized_for_all_service_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
-authorized_for_all_host_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
+authorized_for_all_service_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
+authorized_for_all_host_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 
diff --git a/modules/icinga/files/contactgroups.cfg 
b/modules/icinga/files/contactgroups.cfg
index 69cc32e..bc1dde6 100644
--- a/modules/icinga/files/contactgroups.cfg
+++ b/modules/icinga/files/contactgroups.cfg
@@ -6,7 +6,7 @@
 
 define contactgroup {
 contactgroup_name   sms
-members 
akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,fgiunchedi,gage,jgreen,mark,mpelletier,otto,rkattouw,robh,springle,tstarling,rush,glavagetto
+members 
akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,fgiunchedi,gage,jgreen,mark,mpelletier,otto,rkattouw,robh,springle,tstarling,rush,glavagetto,yuvipanda
 }
 
 define 

[MediaWiki-commits] [Gerrit] HAT: remove the last references to the hhvm pool - change (operations/puppet)

2014-12-02 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: HAT: remove the last references to the hhvm pool
..


HAT: remove the last references to the hhvm pool

Also, remove a couple of ganglia aggregators

Change-Id: I4c638f791d61a7730fd96f6b00f9b669df458525
---
M manifests/ganglia.pp
M manifests/role/ganglia.pp
M manifests/role/mediawiki.pp
M manifests/site.pp
4 files changed, 1 insertion(+), 7 deletions(-)

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



diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index 349ee78..1701b3c 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -84,9 +84,6 @@
 'api_appserver' =  {
 'name'  = 'API application servers',
 'ip_oct'= '13' },
-'appserver_hhvm' = {
-'name'   = 'HHVM Appservers',
-'ip_oct' = '14'},
 'pdf'   =  {
 'name'  = 'PDF servers',
 'ip_oct'= '15' },
@@ -303,7 +300,6 @@
 'Image scalers eqiad'= 'mw1153.eqiad.wmnet 
mw1154.eqiad.wmnet',
 'API application servers eqiad'  = 'mw1114.eqiad.wmnet 
mw1115.eqiad.wmnet',
 'Application servers eqaid'  = 'mw1054.eqiad.wmnet 
mw1055.eqiad.wmnet',
-'HHVM Appservers eqiad'  = 'mw1017.eqiad.wmnet 
mw1018.eqiad.wmnet',
 'Jobrunners eqiad'   = 'mw1001.eqiad.wmnet 
mw1002.eqiad.wmnet',
 'MySQL'  = 'db1050.eqiad.wmnet',
 'PDF servers eqiad'  = 'ocg1001.eqiad.wmnet',
diff --git a/manifests/role/ganglia.pp b/manifests/role/ganglia.pp
index 449ad22..211db46 100644
--- a/manifests/role/ganglia.pp
+++ b/manifests/role/ganglia.pp
@@ -7,7 +7,6 @@
 'Image scalers eqiad'= 'mw1153.eqiad.wmnet 
mw1154.eqiad.wmnet',
 'API application servers eqiad'  = 'mw1114.eqiad.wmnet 
mw1115.eqiad.wmnet',
 'Application servers eqaid'  = 'mw1054.eqiad.wmnet 
mw1055.eqiad.wmnet',
-'HHVM Appservers eqiad'  = 'mw1017.eqiad.wmnet 
mw1018.eqiad.wmnet',
 'Jobrunners eqiad'   = 'mw1001.eqiad.wmnet 
mw1002.eqiad.wmnet',
 'MySQL'  = 'db1050.eqiad.wmnet',
 'PDF servers eqiad'  = 'ocg1001.eqiad.wmnet',
diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 8b13b54..5e6cb51 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -1,4 +1,3 @@
-@monitoring::group { 'appserver_hhvm_eqiad': description = 'eqiad 
application servers (HHVM)' }
 @monitoring::group { 'appserver_eqiad': description = 'eqiad application 
servers' }
 @monitoring::group { 'api_appserver_eqiad': description = 'eqiad API 
application servers' }
 @monitoring::group { 'imagescaler_eqiad':   description = 'eqiad image 
scalers' }
diff --git a/manifests/site.pp b/manifests/site.pp
index 171afbc..37c356a 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1971,7 +1971,7 @@
 
 class {'::admin': groups = ['deployment']}
 
-if $::hostname =~ /^mw10(1[78]|5[45])$/ {
+if $::hostname =~ /^mw10(5[45])$/ {
 $ganglia_aggregator = true
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c638f791d61a7730fd96f6b00f9b669df458525
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@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] Pull prefix searches into their own pool counter - change (mediawiki...CirrusSearch)

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

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

Change subject: Pull prefix searches into their own pool counter
..

Pull prefix searches into their own pool counter

This will make sure that spikes in full text search don't hurt prefix search
and spikes in prefix search don't hurt full text search.

Change-Id: Ief6b715681783508ddf9723d512201eaf4691299
---
M README
M includes/Searcher.php
2 files changed, 29 insertions(+), 4 deletions(-)


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

diff --git a/README b/README
index cd2a3ce..4986715 100644
--- a/README
+++ b/README
@@ -109,12 +109,30 @@
 LocalSettings.php like so:
  require_once( $IP/extensions/PoolCounter/PoolCounterClient.php);
  $wgPoolCounterConf = array(
-   'CirrusSearch-Search' = array(  // Configuration for all searches
+   'CirrusSearch-Search' = array(  // Configuration for non-prefix 
non-regex searches
'class' = 'PoolCounter_Client',
'timeout' = 30,
+   'workers' = 25,
+   'maxqueue' = 10,
+   ),
+   'CirrusSearch-Prefix' = array(  // Configuration for prefix searches
+   'class' = 'PoolCounter_Client',
+   'timeout' = 10,
'workers' = 50,
'maxqueue' = 10,
-   )
+   ),
+   'CirrusSearch-Regex' = array(  // Configuration for regex searches
+   'class' = 'PoolCounter_Client',
+   'timeout' = 30,
+   'workers' = 10,
+   'maxqueue' = 0,
+   ),
+   'CirrusSearch-NamespaceLookup' = array(  // Configuration for funky 
namespace lookups
+   'class' = 'PoolCounter_Client',
+   'timeout' = 10,
+   'workers' = 20,
+   'maxqueue' = 20,
+   ),
  );
 
 
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 59a690f..8b65363 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -1055,11 +1055,18 @@
$queryOptions[ 'search_type' ] = 'dfs_query_then_fetch';
}
 
-   if ( $type === 'regex' ) {
+   switch( $type ) {
+   case 'regex':
$poolCounterType = 'CirrusSearch-Regex';
$queryOptions[ 'timeout' ] = 
$wgCirrusSearchSearchShardTimeout[ 'regex' ];
Connection::setTimeout( 
$wgCirrusSearchClientSideSearchTimeout[ 'regex' ] );
-   } else {
+   break;
+   case 'prefix':
+   $poolCounterType = 'CirrusSearch-Prefix';
+   $queryOptions[ 'timeout' ] = 
$wgCirrusSearchSearchShardTimeout[ 'default' ];
+   Connection::setTimeout( 
$wgCirrusSearchClientSideSearchTimeout[ 'default' ] );
+   break;
+   default:
$poolCounterType = 'CirrusSearch-Search';
$queryOptions[ 'timeout' ] = 
$wgCirrusSearchSearchShardTimeout[ 'default' ];
Connection::setTimeout( 
$wgCirrusSearchClientSideSearchTimeout[ 'default' ] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief6b715681783508ddf9723d512201eaf4691299
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] Add yuvipanda to icinga lists for ops people - change (operations/puppet)

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

Change subject: Add yuvipanda to icinga lists for ops people
..


Add yuvipanda to icinga lists for ops people

Change-Id: I0fcdd43ead4d7d18927edcd0833a9b045a37a2cf
---
M modules/icinga/files/cgi.cfg
M modules/icinga/files/contactgroups.cfg
2 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/modules/icinga/files/cgi.cfg b/modules/icinga/files/cgi.cfg
index eaacb7c..3028275 100644
--- a/modules/icinga/files/cgi.cfg
+++ b/modules/icinga/files/cgi.cfg
@@ -131,7 +131,7 @@
 # not use authorization.  You may use an asterisk (*) to
 # authorize any user who has authenticated to the web server.
 
-authorized_for_system_information=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
+authorized_for_system_information=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 # CONFIGURATION INFORMATION ACCESS
@@ -142,7 +142,7 @@
 # an asterisk (*) to authorize any user who has authenticated
 # to the web server.
 
-authorized_for_configuration_information=tim starling,robh,mark 
bergsma,domas,ryan lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon 
Liambotis,katie horn,pgehres,catrope,alexandros 
kosiaris,springle,ori.livneh,gage,andrew bogott,ottomata,rush,Giuseppe 
Lavagetto,Filippo Giunchedi,bblack,manybubbles,Coren
+authorized_for_configuration_information=tim starling,robh,mark 
bergsma,domas,ryan lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon 
Liambotis,katie horn,pgehres,catrope,alexandros 
kosiaris,springle,ori.livneh,gage,andrew bogott,ottomata,rush,Giuseppe 
Lavagetto,Filippo Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 
@@ -155,7 +155,7 @@
 # You may use an asterisk (*) to authorize any user who has
 # authenticated to the web server.
 
-authorized_for_system_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
+authorized_for_system_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 # GLOBAL HOST/SERVICE VIEW ACCESS
@@ -181,8 +181,8 @@
 # authorization).  You may use an asterisk (*) to authorize any
 # user who has authenticated to the web server.
 
-authorized_for_all_service_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
-authorized_for_all_host_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren
+authorized_for_all_service_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
+authorized_for_all_host_commands=tim starling,robh,mark bergsma,domas,ryan 
lane,arielglenn,cmjohnson,dzahn,jgreen,Faidon Liambotis,katie 
horn,pgehres,catrope,alexandros kosiaris,springle,ori.livneh,gage,andrew 
bogott,ottomata,rush,Giuseppe Lavagetto,Filippo 
Giunchedi,bblack,manybubbles,Coren,yuvipanda
 
 
 
diff --git a/modules/icinga/files/contactgroups.cfg 
b/modules/icinga/files/contactgroups.cfg
index 69cc32e..bc1dde6 100644
--- a/modules/icinga/files/contactgroups.cfg
+++ b/modules/icinga/files/contactgroups.cfg
@@ -6,7 +6,7 @@
 
 define contactgroup {
 contactgroup_name   sms
-members 
akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,fgiunchedi,gage,jgreen,mark,mpelletier,otto,rkattouw,robh,springle,tstarling,rush,glavagetto
+members 
akosiaris,ariel,bblack,cmjohnson,dzahn,faidon,fgiunchedi,gage,jgreen,mark,mpelletier,otto,rkattouw,robh,springle,tstarling,rush,glavagetto,yuvipanda
 }
 
 

[MediaWiki-commits] [Gerrit] QA: alphabetize common_article_steps.rb - change (mediawiki...MobileFrontend)

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

Change subject: QA: alphabetize common_article_steps.rb
..


QA: alphabetize common_article_steps.rb

No change to function or text

Change-Id: Id7c91373ea6172dfba5a3f62caf42abd627c8aab
---
M tests/browser/features/step_definitions/common_article_steps.rb
1 file changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/tests/browser/features/step_definitions/common_article_steps.rb 
b/tests/browser/features/step_definitions/common_article_steps.rb
index 69612ef..ec0f7ff 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -49,8 +49,16 @@
   expect(on(ArticlePage).toast_element.when_present.class_name).to match 
error
 end
 
-Then /^the watch star should be selected$/ do
-  expect(on(ArticlePage).watch_link_element.parent.class_name).to match 
watched
+Then /^I should see a drawer with message (.+)$/ do |text|
+  expect(on(ArticlePage).drawer_element.when_present.text).to match text
+end
+
+Then(/^I should see the error box message (.+)$/) do |error_message|
+  expect(on(ArticlePage).error_message).to match (error_message)
+end
+
+Then(/^I should see the watch star$/) do
+  expect(on(ArticlePage).watch_link_element).to be_visible
 end
 
 Then(/^the text of the first heading should be (.*)$/) do |title|
@@ -62,18 +70,10 @@
   end
 end
 
+Then /^the watch star should be selected$/ do
+  expect(on(ArticlePage).watch_link_element.parent.class_name).to match 
watched
+end
+
 Then /^the watch star should not be selected$/ do
   expect(on(ArticlePage).watch_link_element).to be_visible
-end
-
-Then /^I should see a drawer with message (.+)$/ do |text|
-  expect(on(ArticlePage).drawer_element.when_present.text).to match text
-end
-
-Then(/^I should see the watch star$/) do
-  expect(on(ArticlePage).watch_link_element).to be_visible
-end
-
-Then(/^I should see the error box message (.+)$/) do |error_message|
-  expect(on(ArticlePage).error_message).to match (error_message)
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7c91373ea6172dfba5a3f62caf42abd627c8aab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@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] QA: alphabetize common_article_steps.rb - change (mediawiki...MobileFrontend)

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

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

Change subject: QA: alphabetize common_article_steps.rb
..

QA: alphabetize common_article_steps.rb

No change to function or text

Change-Id: Id7c91373ea6172dfba5a3f62caf42abd627c8aab
---
M tests/browser/features/step_definitions/common_article_steps.rb
1 file changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/common_article_steps.rb 
b/tests/browser/features/step_definitions/common_article_steps.rb
index 69612ef..ec0f7ff 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -49,8 +49,16 @@
   expect(on(ArticlePage).toast_element.when_present.class_name).to match 
error
 end
 
-Then /^the watch star should be selected$/ do
-  expect(on(ArticlePage).watch_link_element.parent.class_name).to match 
watched
+Then /^I should see a drawer with message (.+)$/ do |text|
+  expect(on(ArticlePage).drawer_element.when_present.text).to match text
+end
+
+Then(/^I should see the error box message (.+)$/) do |error_message|
+  expect(on(ArticlePage).error_message).to match (error_message)
+end
+
+Then(/^I should see the watch star$/) do
+  expect(on(ArticlePage).watch_link_element).to be_visible
 end
 
 Then(/^the text of the first heading should be (.*)$/) do |title|
@@ -62,18 +70,10 @@
   end
 end
 
+Then /^the watch star should be selected$/ do
+  expect(on(ArticlePage).watch_link_element.parent.class_name).to match 
watched
+end
+
 Then /^the watch star should not be selected$/ do
   expect(on(ArticlePage).watch_link_element).to be_visible
-end
-
-Then /^I should see a drawer with message (.+)$/ do |text|
-  expect(on(ArticlePage).drawer_element.when_present.text).to match text
-end
-
-Then(/^I should see the watch star$/) do
-  expect(on(ArticlePage).watch_link_element).to be_visible
-end
-
-Then(/^I should see the error box message (.+)$/) do |error_message|
-  expect(on(ArticlePage).error_message).to match (error_message)
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7c91373ea6172dfba5a3f62caf42abd627c8aab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ResourceLoader: jquery.cookie changed to mediawiki.cookie - change (mediawiki/core)

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

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

Change subject: ResourceLoader: jquery.cookie changed to mediawiki.cookie
..

ResourceLoader: jquery.cookie changed to mediawiki.cookie

Change-Id: I4a9bad8de46f521ca1e63ca17a2fe27f1b9817d4
---
M resources/Resources.php
1 file changed, 11 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/176937/1

diff --git a/resources/Resources.php b/resources/Resources.php
index f2c3227..0581002 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -206,11 +206,17 @@
'styles' = 'resources/src/jquery/jquery.confirmable.css',
'dependencies' = 'mediawiki.jqueryMsg',
),
-   // Use mediawiki.cookie in new code, rather than jquery.cookie.
'jquery.cookie' = array(
'scripts' = 'resources/lib/jquery/jquery.cookie.js',
'targets' = array( 'desktop', 'mobile' ),
),
+'mediawiki.cookie' = array(
+'scripts' = 'resources/src/mediawiki/mediawiki.cookie.js',
+'dependencies' = array(
+'jquery.cookie',
+),
+'targets' = array( 'desktop', 'mobile' ),
+),
'jquery.expandableField' = array(
'scripts' = 'resources/src/jquery/jquery.expandableField.js',
),
@@ -965,7 +971,7 @@
'mediawiki.toc' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.toc.js',
'dependencies' = array(
-   'jquery.cookie',
+   'mediawiki.cookie',
),
'messages' = array( 'showtoc', 'hidetoc' ),
'targets' = array( 'desktop', 'mobile' ),
@@ -978,7 +984,7 @@
'mediawiki.user' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.user.js',
'dependencies' = array(
-   'jquery.cookie',
+   'mediawiki.cookie',
'mediawiki.api',
'user.options',
'user.tokens',
@@ -1000,13 +1006,6 @@
'mediawiki.notify',
),
'position' = 'top', // For $wgPreloadJavaScriptMwUtil
-   'targets' = array( 'desktop', 'mobile' ),
-   ),
-   'mediawiki.cookie' = array(
-   'scripts' = 'resources/src/mediawiki/mediawiki.cookie.js',
-   'dependencies' = array(
-   'jquery.cookie',
-   ),
'targets' = array( 'desktop', 'mobile' ),
),
'mediawiki.toolbar' = array(
@@ -1037,7 +1036,7 @@
'styles' = 
'resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css',
'dependencies' = array(
'jquery.makeCollapsible',
-   'jquery.cookie',
+   'mediawiki.cookie',
'mediawiki.icon',
),
),
@@ -1306,7 +1305,7 @@
'scripts' = 
'resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js',
'dependencies' = array(
'jquery.makeCollapsible',
-   'jquery.cookie',
+   'mediawiki.cookie',
),
),
'mediawiki.special.changeslist.enhanced' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a9bad8de46f521ca1e63ca17a2fe27f1b9817d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yamelnychuk yaroslavmelnuc...@gmail.com

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


[MediaWiki-commits] [Gerrit] [WIP] Make references collapsible (and collapse by default) - change (apps...wikipedia)

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

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

Change subject: [WIP] Make references collapsible (and collapse by default)
..

[WIP] Make references collapsible (and collapse by default)

- Uses the same logic and styling as collapsing of infoboxes.

Change-Id: I4d779aded8804398ea4134fad8cc90ce28b06849
---
M wikipedia/assets/bundle.js
M wikipedia/res/values-qq/strings.xml
M wikipedia/res/values/strings.xml
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
M www/js/sections.js
M www/js/transforms.js
6 files changed, 89 insertions(+), 0 deletions(-)


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

diff --git a/wikipedia/assets/bundle.js b/wikipedia/assets/bundle.js
index 68544a1..3c44e7a 100644
--- a/wikipedia/assets/bundle.js
+++ b/wikipedia/assets/bundle.js
@@ -454,6 +454,7 @@
 window.string_table_infobox = payload.string_table_infobox;
 window.string_table_other = payload.string_table_other;
 window.string_table_close = payload.string_table_close;
+window.string_expand_refs = payload.string_expand_refs;
 window.pageTitle = payload.title;
 window.isMainPage = payload.isMainPage;
 
@@ -520,6 +521,7 @@
 content = transformer.transform( section, content );
 content = transformer.transform( hideTables, content );
 content = transformer.transform( hideIPA, content );
+content = transformer.transform( hideRefs, content );
 
 return [ heading, content ];
 }
@@ -815,6 +817,47 @@
 return content;
 } );
 
+transformer.register( hideRefs, function( content ) {
+var refLists = content.querySelectorAll( div.reflist );
+for (var i = 0; i  refLists.length; i++) {
+var caption = strong + window.string_expand_refs + /strong;
+
+//create the container div that will contain both the original table
+//and the collapsed version.
+var containerDiv = document.createElement( 'div' );
+containerDiv.className = 'app_table_container';
+refLists[i].parentNode.insertBefore(containerDiv, refLists[i]);
+refLists[i].parentNode.removeChild(refLists[i]);
+
+//create the collapsed div
+var collapsedDiv = document.createElement( 'div' );
+collapsedDiv.classList.add('app_table_collapsed_container');
+collapsedDiv.classList.add('app_table_collapsed_open');
+collapsedDiv.innerHTML = caption;
+
+//create the bottom collapsed div
+var bottomDiv = document.createElement( 'div' );
+bottomDiv.classList.add('app_table_collapsed_bottom');
+bottomDiv.classList.add('app_table_collapse_icon');
+bottomDiv.innerHTML = window.string_table_close;
+
+//add our stuff to the container
+containerDiv.appendChild(collapsedDiv);
+containerDiv.appendChild(refLists[i]);
+containerDiv.appendChild(bottomDiv);
+
+//set initial visibility
+refLists[i].style.display = 'none';
+collapsedDiv.style.display = 'block';
+bottomDiv.style.display = 'none';
+
+//assign click handler to the collapsed divs
+collapsedDiv.onclick = tableCollapseClickHandler;
+bottomDiv.onclick = tableCollapseClickHandler;
+}
+return content;
+} );
+
 /*
 OnClick handler function for IPA spans.
 */
diff --git a/wikipedia/res/values-qq/strings.xml 
b/wikipedia/res/values-qq/strings.xml
index 8a89e5c..1cf285c 100644
--- a/wikipedia/res/values-qq/strings.xml
+++ b/wikipedia/res/values-qq/strings.xml
@@ -357,4 +357,5 @@
 Preceded by {{msg-wm|Wikipedia-android-strings-alpha update notification 
title}}./string
   string name=dialog_close_descriptionButton description for the close 
image button. The text is mainly for screen readers.
 {{Identical|Close}}/string
+  string name=expand_refsTitle for a button that, when clicked, will 
expand the list of references at the bottom of a page./string
 /resources
diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index 0e15c6a..88c6728 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -276,4 +276,5 @@
 string name=alpha_update_notification_titleNew alpha update 
available/string
 string name=alpha_update_notification_textTap to download/string
 string name=dialog_close_descriptionClose/string
+string name=expand_refsExpand to view references/string
 /resources
diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
index e6449c1..8080382 100644
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
@@ -205,6 +205,7 @@
 leadSectionPayload.put(string_table_infobox, 
getString(R.string.table_infobox));

[MediaWiki-commits] [Gerrit] Add example of mounting a local directory under web root - change (mediawiki/vagrant)

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

Change subject: Add example of mounting a local directory under web root
..


Add example of mounting a local directory under web root

Bug: T69572
Change-Id: I3928954f03c726bc569d2274454454ab93960843
---
M support/Vagrantfile-extra.rb
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/support/Vagrantfile-extra.rb b/support/Vagrantfile-extra.rb
index 275cf85..9fbb268 100644
--- a/support/Vagrantfile-extra.rb
+++ b/support/Vagrantfile-extra.rb
@@ -36,4 +36,10 @@
 # Sequel Pro) to manage the database server running on the VM.
 # config.vm.network :forwarded_port,
 #guest: 3306, host: 3306, id: 'mysql'
+
+# Mount an additional local directory under the default vhost root in the
+# VM so that it can be accessed at http://127.0.0.1:8080/extra/.
+# The relative path in this example will be resolved relative to the
+# location of the main Vagrantfile for your Mediawiki-Vagarant install.
+# config.vm.synced_folder '../extra', '/var/www/extra'
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3928954f03c726bc569d2274454454ab93960843
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: BryanDavis bda...@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 schema versions - change (analytics/multimedia)

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

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

Change subject: Update schema versions
..

Update schema versions

Bug: T76453
Change-Id: I87808b764870b159ba8d31e002f05bf701ffc4c6
---
M actions/template.sql
M duration/template.sql
2 files changed, 22 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/multimedia 
refs/changes/44/176944/1

diff --git a/actions/template.sql b/actions/template.sql
index 820726b..1d80fc4 100644
--- a/actions/template.sql
+++ b/actions/template.sql
@@ -58,7 +58,8 @@
SUM(CASE WHEN event_action = 'options-open' THEN event_samplingFactor 
ELSE 0 END) AS 'options-open',
SUM(CASE WHEN event_action = 'options-close' THEN event_samplingFactor 
ELSE 0 END) AS 'options-close',
SUM(CASE WHEN event_action = 'disable-about-link' THEN 
event_samplingFactor ELSE 0 END) AS 'disable-about-link',
-   SUM(CASE WHEN event_action = 'enable-about-link' THEN 
event_samplingFactor ELSE 0 END) AS 'enable-about-link'
+   SUM(CASE WHEN event_action = 'enable-about-link' THEN 
event_samplingFactor ELSE 0 END) AS 'enable-about-link',
+   SUM(CASE WHEN event_action = 'image-unview' THEN event_samplingFactor 
ELSE 0 END) AS 'image-unview'
 
FROM (
SELECT timestamp, event_action, 1 AS event_samplingFactor FROM 
MediaViewer_7670440
@@ -85,6 +86,9 @@
SELECT timestamp, event_action, event_samplingFactor FROM 
MediaViewer_10308479
WHERE %wiki% timestamp  TIMESTAMP(CURDATE()) AND 
timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY))
UNION ALL
+   SELECT timestamp, event_action, event_samplingFactor FROM 
MediaViewer_10536413
+   WHERE %wiki% timestamp  TIMESTAMP(CURDATE()) AND 
timestamp = TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 30 DAY))
+   UNION ALL
SELECT timestamp, (CASE WHEN event_value = 0 THEN 
'pref-optout-loggedin' ELSE 'pref-optin-loggedin' END) AS event_action, 1 AS 
event_samplingFactor FROM PrefUpdate_5563398
WHERE event_property = 'multimediaviewer-enable' AND 
timestamp  TIMESTAMP(CURDATE()) AND timestamp = TIMESTAMP(DATE_SUB(CURDATE(), 
INTERVAL 30 DAY))
) AS MediaViewerUnioned
diff --git a/duration/template.sql b/duration/template.sql
index e63f7cf..5cc6c59 100644
--- a/duration/template.sql
+++ b/duration/template.sql
@@ -54,8 +54,23 @@
 SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_duration ORDER BY 
event_duration SEPARATOR ','), ',', 95/100*COUNT(*)+1), ',', -1) AS 
mediaviewer_95,
 SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(event_duration ORDER BY 
event_duration SEPARATOR ','), ',', 99/100*COUNT(*)+1), ',', -1) AS 
mediaviewer_99,
 SUM(event_samplingFactor) AS mediaviewer_population_size
-FROM
-MultimediaViewerDuration_8572641
+FROM (
+SELECT wiki, timestamp, event_type, event_duration, 
event_samplingFactor FROM MultimediaViewerDuration_8572641
+WHERE
+%wiki%
+event_duration IS NOT NULL
+AND event_type = 'click-to-first-image'
+AND timestamp  TIMESTAMP(CURDATE())
+AND timestamp  TIMESTAMP(CURDATE() - INTERVAL 90 DAY)
+UNION ALL
+SELECT wiki, timestamp, event_type, event_duration, 
event_samplingFactor FROM MultimediaViewerDuration_10427980
+WHERE
+%wiki%
+event_duration IS NOT NULL
+AND event_type = 'click-to-first-image'
+AND timestamp  TIMESTAMP(CURDATE())
+AND timestamp  TIMESTAMP(CURDATE() - INTERVAL 90 DAY)
+) AS MultimediaViewerDuration_Unioned
 WHERE
 %wiki%
 event_duration IS NOT NULL

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87808b764870b159ba8d31e002f05bf701ffc4c6
Gerrit-PatchSet: 1
Gerrit-Project: analytics/multimedia
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] Enable WikiGrok A/B test using wgMFEnableWikiGrok - change (mediawiki...MobileFrontend)

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

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

Change subject: Enable WikiGrok A/B test using wgMFEnableWikiGrok
..

Enable WikiGrok A/B test using wgMFEnableWikiGrok

* Sunset wgMFWikiGrokAbTest{Start,End}Date configuration variables
* Still use WikiGrokAbTest#isEnabled to determine if the A/B test is
  enabled

Change-Id: I3ec0190a34c1ae70e6becee904abdebde80ee038
---
M javascripts/modules/wikigrok/WikiGrokAbTest.js
M tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
2 files changed, 9 insertions(+), 37 deletions(-)


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

diff --git a/javascripts/modules/wikigrok/WikiGrokAbTest.js 
b/javascripts/modules/wikigrok/WikiGrokAbTest.js
index 0461149..486bba4 100644
--- a/javascripts/modules/wikigrok/WikiGrokAbTest.js
+++ b/javascripts/modules/wikigrok/WikiGrokAbTest.js
@@ -13,15 +13,10 @@
/**
 * Initialises a new instance of the WikiGrokAbTest 
class.
 *
-* @param {Number} startDate The date the test starts, 
specified as a Unix
-*  timestamp
-* @param {Number} endDate The date that the test ends, 
specified as a Unix
-*  timestamp
+* @param {Boolean} isEnabled Whether or not the A/B 
test is enabled
 */
-   initialize: function ( startDate, endDate ) {
-   var now = new Date().getTime() / 1000;
-
-   this.isEnabled = startDate  endDate  ( 
startDate = now  now = endDate );
+   initialize: function ( isEnabled ) {
+   this.isEnabled = isEnabled;
},
 
/**
@@ -45,15 +40,7 @@
 * @return {WikiGrokAbTest}
 */
WikiGrokAbTest.newFromMwConfig = function () {
-   var config = mw.config.get( [
-   'wgMFWikiGrokAbTestStartDate',
-   'wgMFWikiGrokAbTestEndDate'
-   ] );
-
-   return new WikiGrokAbTest(
-   config.wgMFWikiGrokAbTestStartDate,
-   config.wgMFWikiGrokAbTestEndDate
-   );
+   return new WikiGrokAbTest( mw.config.get( 'wgMFEnabledWikiGrok' 
) );
};
 
M.define( 'WikiGrokAbTest', WikiGrokAbTest );
diff --git a/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js 
b/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
index 5946e7e..be5ec0a 100644
--- a/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
+++ b/tests/qunit/modules/wikigrok/test_WikiGrokAbTest.js
@@ -2,28 +2,13 @@
 
var WikiGrokAbTest = M.require( 'WikiGrokAbTest' ),
wikiGrokUser = M.require( 'wikiGrokUser' ),
-   now = new Date().getTime() / 1000,
-   enabledTest = new WikiGrokAbTest( now - 86400, now + 86400 );
+   enabledTest = new WikiGrokAbTest( true );
 
-   QUnit.module( 'MobileFrontend: modules/wikigrok/WikiGrokAbTest', {
-   } );
+   QUnit.module( 'MobileFrontend: modules/wikigrok/WikiGrokAbTest' );
 
-   QUnit.test( 'isEnabled returns false when the experiment isn\'t 
enabled', 2, function ( assert ) {
-   var dataProvider = [
-   [now + 86400, now + 86401], // startDate is in 
the future
-   [now - 86400, now - 86401], // endDate in the 
past
-   ],
-   test;
-
-   $.each( dataProvider, function ( i, data ) {
-   test = new WikiGrokAbTest( data[0], data[1] );
-
-   assert.strictEqual( test.isEnabled, false );
-   } );
-   } );
-
-   QUnit.test( 'isEnabled returns true when the test is active', 1, 
function ( assert ) {
-   assert.strictEqual( enabledTest.isEnabled, true );
+   QUnit.test( 'isEnabled simply exposes the isEnabled constructor 
parameter', 2, function ( assert ) {
+   assert.strictEqual( new WikiGrokAbTest( false ).isEnabled, 
false );
+   assert.strictEqual( new WikiGrokAbTest( true ).isEnabled, true 
);
} );
 
QUnit.test( 'getVersion()', 62, function ( assert ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ec0190a34c1ae70e6becee904abdebde80ee038
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx g...@samsmith.io

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] Add example of mounting a local directory under web root - change (mediawiki/vagrant)

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

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

Change subject: Add example of mounting a local directory under web root
..

Add example of mounting a local directory under web root

Bug: T69572
Change-Id: I3928954f03c726bc569d2274454454ab93960843
---
M support/Vagrantfile-extra.rb
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/43/176943/1

diff --git a/support/Vagrantfile-extra.rb b/support/Vagrantfile-extra.rb
index 275cf85..9fbb268 100644
--- a/support/Vagrantfile-extra.rb
+++ b/support/Vagrantfile-extra.rb
@@ -36,4 +36,10 @@
 # Sequel Pro) to manage the database server running on the VM.
 # config.vm.network :forwarded_port,
 #guest: 3306, host: 3306, id: 'mysql'
+
+# Mount an additional local directory under the default vhost root in the
+# VM so that it can be accessed at http://127.0.0.1:8080/extra/.
+# The relative path in this example will be resolved relative to the
+# location of the main Vagrantfile for your Mediawiki-Vagarant install.
+# config.vm.synced_folder '../extra', '/var/www/extra'
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3928954f03c726bc569d2274454454ab93960843
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis bda...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use $separator at the start of entries in recent changes. - change (mediawiki...Flow)

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

Change subject: Use $separator at the start of entries in recent changes.
..


Use $separator at the start of entries in recent changes.

This patches modifies Flow to use $separator at the start of entries in recent
changes, which makes entries generated by Flow more consistent with those not
created by Flow.

Bug: T76170
Change-Id: I0662dee9bc7af7c357dd6da6a11caa8380eb0a6f
---
M includes/Formatter/RecentChanges.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Formatter/RecentChanges.php 
b/includes/Formatter/RecentChanges.php
index 4e4e704..3cf4f00 100644
--- a/includes/Formatter/RecentChanges.php
+++ b/includes/Formatter/RecentChanges.php
@@ -58,7 +58,7 @@
$description = $this-formatDescription( $data, $ctx );
 
return $this-formatAnchorsAsPipeList( $links, $ctx ) .
-   ' ' .
+   $separator .
$this-getTitleLink( $data, $row, $ctx ) .
$ctx-msg( 'semicolon-separator' )-escaped() .
' ' .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0662dee9bc7af7c357dd6da6a11caa8380eb0a6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Deskana dga...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: SG shah...@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] Move validateAllAlias code into separate class - change (mediawiki...CirrusSearch)

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

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

Change subject: Move validateAllAlias code into separate class
..

Move validateAllAlias code into separate class

This has a minor change in functionality:

It contains code from removeOldIndeciesIfRequired already, while that's
also still in the maintenance script. Goal is for validateSpecificAlias
to also move into a Validator class, that extends from this new
Validator class.
In maintenance script, both (AllAlias  SpecificAlias) were run, and
stuff in $this-removeIndecies was cleaned up after both were run. If
we move both into separate objects, the $this-removeIndecies alternative
will be run twice, right after each has run.

Change-Id: Idbbd403b8190ae832a6b15734adb25b71d43b534
---
M CirrusSearch.php
A includes/Maintenance/Validators/IndexAliasValidator.php
M maintenance/updateOneSearchIndexConfig.php
3 files changed, 139 insertions(+), 37 deletions(-)


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

diff --git a/CirrusSearch.php b/CirrusSearch.php
index 55a81ae..e81cb43 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -584,6 +584,7 @@
 
$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\ReplicaRangeValidator'] 
= $maintenanceDir . '/Validators/ReplicaRangeValidator.php';
 $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\AnalyzersValidator'] = 
$maintenanceDir . '/Validators/AnalyzersValidator.php';
 $wgAutoloadClasses['CirrusSearch\Maintenance\Validators\MappingValidator'] = 
$maintenanceDir . '/Validators/MappingValidator.php';
+$wgAutoloadClasses['CirrusSearch\Maintenance\Validators\IndexAliasValidator'] 
= $maintenanceDir . '/Validators/IndexAliasValidator.php';
 $wgAutoloadClasses['CirrusSearch\Maintenance\UpdateVersionIndex'] = __DIR__ . 
'/maintenance/updateVersionIndex.php';
 $wgAutoloadClasses['CirrusSearch\NearMatchPicker'] = $includes . 
'NearMatchPicker.php';
 $wgAutoloadClasses['CirrusSearch\OtherIndexes'] = $includes . 
'OtherIndexes.php';
diff --git a/includes/Maintenance/Validators/IndexAliasValidator.php 
b/includes/Maintenance/Validators/IndexAliasValidator.php
new file mode 100644
index 000..9e9604a
--- /dev/null
+++ b/includes/Maintenance/Validators/IndexAliasValidator.php
@@ -0,0 +1,131 @@
+?php
+
+namespace CirrusSearch\Maintenance\Validators;
+
+use CirrusSearch\Maintenance\Maintenance;
+use Elastica\Client;
+use RawMessage;
+use Status;
+
+class IndexAliasValidator extends Validator {
+   /**
+* @var Client
+*/
+   protected $client;
+
+   /**
+* @var string
+*/
+   protected $aliasName;
+
+   /**
+* @var string
+*/
+   protected $specificIndexName;
+
+   /**
+* @var bool
+*/
+   private $startOver;
+
+   /**
+* @var array
+*/
+   protected $create = array();
+
+   /**
+* @var array
+*/
+   protected $remove = array();
+
+   /**
+* @param Client $client
+* @param string $aliasName
+* @param string $specificIndexName
+* @param bool $startOver
+* @param Maintenance $out
+*/
+   public function __construct( Client $client, $aliasName, 
$specificIndexName, $startOver, Maintenance $out = null ) {
+   parent::__construct( $out );
+
+   $this-client = $client;
+   $this-aliasName = $aliasName;
+   $this-specificIndexName = $specificIndexName;
+   $this-startOver = $startOver;
+   }
+
+   /**
+* @return Status
+*/
+   public function validate() {
+   // arrays of aliases to be added/removed
+   $add = $remove = array();
+
+   $this-outputIndented( \tValidating $this-aliasName alias... 
);
+   $status = $this-client-getStatus();
+   if ( $status-indexExists( $this-aliasName ) ) {
+   $this-output( is an index... );
+   if ( $this-startOver ) {
+   $this-client-getIndex( $this-aliasName 
)-delete();
+   $this-output( index removed... );
+
+   $add[] = $this-specificIndexName;
+   } else {
+   $this-output( cannot correct!\n );
+   return Status::newFatal( new RawMessage(
+   There is currently an index with the 
name of the alias.  Rerun this\n .
+   script with --startOver and it'll 
remove the index and continue.\n ) );
+   }
+   } else {
+   foreach ( $status-getIndicesWithAlias( 
$this-aliasName ) as $index ) {
+   if ( $index-getName() === 

[MediaWiki-commits] [Gerrit] Remove AU State label and newline email - change (mediawiki...DonationInterface)

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

Change subject: Remove AU State label and newline email
..


Remove AU State label and newline email

Change-Id: I7d3b0f5c4d61d889a889bff263784046dd5b0962
---
M globalcollect_gateway/forms/html/_personal-information/AU.html
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/globalcollect_gateway/forms/html/_personal-information/AU.html 
b/globalcollect_gateway/forms/html/_personal-information/AU.html
index 48eb32b..81aef38 100644
--- a/globalcollect_gateway/forms/html/_personal-information/AU.html
+++ b/globalcollect_gateway/forms/html/_personal-information/AU.html
@@ -16,7 +16,6 @@
 /tr
 tr
td colspan=2 style=white-space: nowrap;
-   labelState:/label
select id=state name=state class=au value=@state 
option value= disabled selectedState/option
option value=ACTACT/option
@@ -28,6 +27,10 @@
option value=VICVIC/option
option value=WAWA/option
/select
+   /td
+/tr
+tr
+   td
input class=fullwidth name=emailAdd value=@emailAdd 
type=text title=%donate_interface-donor-email% 
placeholder=%donate_interface-donor-email% id=emailAdd
/td
 /tr

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d3b0f5c4d61d889a889bff263784046dd5b0962
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ssmith ssm...@wikimedia.org
Gerrit-Reviewer: Awight awi...@wikimedia.org
Gerrit-Reviewer: Ejegg eeggles...@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] Use prepend-autoloader: false - change (mediawiki/vendor)

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

Change subject: Use prepend-autoloader: false
..


Use prepend-autoloader: false

Composer's autoloader is slow, taking about 63µs per class, whereas
MediaWiki's is fast, taking about 7µs per class. This adds up to an
overhead of about 13% of CPU time on short requests such as API calls.
On those same short requests, MediaWiki's autoloader finds most of the
classes. So it makes sense to run it first, before the two Composer
autoloaders. So change the config so that composer passes
$prepend=false to spl_autoload_register().

Also change composer version from some random version to some other
random version, per the usual convention.

Change-Id: I451234d16d494fbfd62a4c955d8ca7020baaf5a0
---
M composer.json
M composer/ClassLoader.php
M composer/autoload_real.php
3 files changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index bbbe8f6..26931f2 100644
--- a/composer.json
+++ b/composer.json
@@ -23,6 +23,7 @@
config: {
autoloader-suffix: _mediawiki_vendor,
preferred-install: dist,
-   vendor-dir: .
+   vendor-dir: .,
+   prepend-autoloader: false
}
 }
diff --git a/composer/ClassLoader.php b/composer/ClassLoader.php
index 4433649..4a56396 100644
--- a/composer/ClassLoader.php
+++ b/composer/ClassLoader.php
@@ -56,7 +56,10 @@
 
 public function getPrefixes()
 {
-return call_user_func_array('array_merge', $this-prefixesPsr0);
+if (!empty($this-prefixesPsr0)) {
+return call_user_func_array('array_merge', $this-prefixesPsr0);
+}
+return array();
 }
 
 public function getPrefixesPsr4()
diff --git a/composer/autoload_real.php b/composer/autoload_real.php
index a339aa3..ad07dbd 100644
--- a/composer/autoload_real.php
+++ b/composer/autoload_real.php
@@ -19,7 +19,7 @@
 return self::$loader;
 }
 
-spl_autoload_register(array('ComposerAutoloaderInit_mediawiki_vendor', 
'loadClassLoader'), true, true);
+spl_autoload_register(array('ComposerAutoloaderInit_mediawiki_vendor', 
'loadClassLoader'), true, false);
 self::$loader = $loader = new \Composer\Autoload\ClassLoader();
 
spl_autoload_unregister(array('ComposerAutoloaderInit_mediawiki_vendor', 
'loadClassLoader'));
 
@@ -38,7 +38,7 @@
 $loader-addClassMap($classMap);
 }
 
-$loader-register(true);
+$loader-register(false);
 
 return $loader;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I451234d16d494fbfd62a4c955d8ca7020baaf5a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Chad ch...@wikimedia.org
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Tim Starling tstarl...@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] QA: remove a FIXME by moving the step to the proper file - change (mediawiki...MobileFrontend)

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

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

Change subject: QA: remove a FIXME by moving the step to the proper file
..

QA: remove a FIXME by moving the step to the proper file

No change to function or text either

Change-Id: Ic28e0c758b479dc21c4a29a10586647a29335383
---
M tests/browser/features/step_definitions/common_article_steps.rb
M tests/browser/features/step_definitions/pageactions_steps.rb
2 files changed, 4 insertions(+), 8 deletions(-)


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

diff --git a/tests/browser/features/step_definitions/common_article_steps.rb 
b/tests/browser/features/step_definitions/common_article_steps.rb
index ec0f7ff..d114d83 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -9,14 +9,6 @@
   end
 end
 
-# FIXME: Consolidate with code in editor_steps.rb
-# Confusingly we have 2 touch areas when it comes to the edit button
-# This is one is needed to triggers the edit CTA and is needed for 
pageactions.feature
-# The one in editor_steps.rb triggers the actual editor
-Given(/^I click the edit icon holder$/) do
-  on(ArticlePage).edit_button_holder_element.when_present.click
-end
-
 Given(/^I click the escape button$/) do
   on(ArticlePage).escape_button_element.when_present.click
 end
diff --git a/tests/browser/features/step_definitions/pageactions_steps.rb 
b/tests/browser/features/step_definitions/pageactions_steps.rb
index 1fe3ecb..7fb6a6a 100644
--- a/tests/browser/features/step_definitions/pageactions_steps.rb
+++ b/tests/browser/features/step_definitions/pageactions_steps.rb
@@ -1,3 +1,7 @@
+Given(/^I click the edit icon holder$/) do
+  on(ArticlePage).edit_button_holder_element.when_present.click
+end
+
 Then(/^there is not an upload an image to this page button$/) do
   on(ArticlePage).upload_button_element.should_not exist
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic28e0c758b479dc21c4a29a10586647a29335383
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ResourceLoader: jquery.cookie changed to mediawiki.cookie - change (mediawiki/core)

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

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

Change subject: ResourceLoader: jquery.cookie changed to mediawiki.cookie
..

ResourceLoader: jquery.cookie changed to mediawiki.cookie

Change-Id: I4a9bad8de46f521ca1e63ca17a2fe27f1b9817d4

Whitespaces fixed

Change-Id: I835063f40f742a56f8d137cbaabc77e51c60a2a9
---
M resources/Resources.php
1 file changed, 11 insertions(+), 12 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index f2c3227..e55ae84 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -206,11 +206,17 @@
'styles' = 'resources/src/jquery/jquery.confirmable.css',
'dependencies' = 'mediawiki.jqueryMsg',
),
-   // Use mediawiki.cookie in new code, rather than jquery.cookie.
'jquery.cookie' = array(
'scripts' = 'resources/lib/jquery/jquery.cookie.js',
'targets' = array( 'desktop', 'mobile' ),
),
+   'mediawiki.cookie' = array(
+'scripts' = 'resources/src/mediawiki/mediawiki.cookie.js',
+'dependencies' = array(
+'jquery.cookie',
+),
+'targets' = array( 'desktop', 'mobile' ),
+),
'jquery.expandableField' = array(
'scripts' = 'resources/src/jquery/jquery.expandableField.js',
),
@@ -965,7 +971,7 @@
'mediawiki.toc' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.toc.js',
'dependencies' = array(
-   'jquery.cookie',
+   'mediawiki.cookie',
),
'messages' = array( 'showtoc', 'hidetoc' ),
'targets' = array( 'desktop', 'mobile' ),
@@ -978,7 +984,7 @@
'mediawiki.user' = array(
'scripts' = 'resources/src/mediawiki/mediawiki.user.js',
'dependencies' = array(
-   'jquery.cookie',
+   'mediawiki.cookie',
'mediawiki.api',
'user.options',
'user.tokens',
@@ -1000,13 +1006,6 @@
'mediawiki.notify',
),
'position' = 'top', // For $wgPreloadJavaScriptMwUtil
-   'targets' = array( 'desktop', 'mobile' ),
-   ),
-   'mediawiki.cookie' = array(
-   'scripts' = 'resources/src/mediawiki/mediawiki.cookie.js',
-   'dependencies' = array(
-   'jquery.cookie',
-   ),
'targets' = array( 'desktop', 'mobile' ),
),
'mediawiki.toolbar' = array(
@@ -1037,7 +1036,7 @@
'styles' = 
'resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.css',
'dependencies' = array(
'jquery.makeCollapsible',
-   'jquery.cookie',
+   'mediawiki.cookie',
'mediawiki.icon',
),
),
@@ -1306,7 +1305,7 @@
'scripts' = 
'resources/src/mediawiki.special/mediawiki.special.changeslist.legend.js',
'dependencies' = array(
'jquery.makeCollapsible',
-   'jquery.cookie',
+   'mediawiki.cookie',
),
),
'mediawiki.special.changeslist.enhanced' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I835063f40f742a56f8d137cbaabc77e51c60a2a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yamelnychuk yaroslavmelnuc...@gmail.com

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


[MediaWiki-commits] [Gerrit] QA: remove a FIXME by moving the step to the proper file - change (mediawiki...MobileFrontend)

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

Change subject: QA: remove a FIXME by moving the step to the proper file
..


QA: remove a FIXME by moving the step to the proper file

No change to function or text either

Change-Id: Ic28e0c758b479dc21c4a29a10586647a29335383
---
M tests/browser/features/step_definitions/common_article_steps.rb
M tests/browser/features/step_definitions/pageactions_steps.rb
2 files changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/tests/browser/features/step_definitions/common_article_steps.rb 
b/tests/browser/features/step_definitions/common_article_steps.rb
index ec0f7ff..d114d83 100644
--- a/tests/browser/features/step_definitions/common_article_steps.rb
+++ b/tests/browser/features/step_definitions/common_article_steps.rb
@@ -9,14 +9,6 @@
   end
 end
 
-# FIXME: Consolidate with code in editor_steps.rb
-# Confusingly we have 2 touch areas when it comes to the edit button
-# This is one is needed to triggers the edit CTA and is needed for 
pageactions.feature
-# The one in editor_steps.rb triggers the actual editor
-Given(/^I click the edit icon holder$/) do
-  on(ArticlePage).edit_button_holder_element.when_present.click
-end
-
 Given(/^I click the escape button$/) do
   on(ArticlePage).escape_button_element.when_present.click
 end
diff --git a/tests/browser/features/step_definitions/pageactions_steps.rb 
b/tests/browser/features/step_definitions/pageactions_steps.rb
index 1fe3ecb..7fb6a6a 100644
--- a/tests/browser/features/step_definitions/pageactions_steps.rb
+++ b/tests/browser/features/step_definitions/pageactions_steps.rb
@@ -1,3 +1,7 @@
+Given(/^I click the edit icon holder$/) do
+  on(ArticlePage).edit_button_holder_element.when_present.click
+end
+
 Then(/^there is not an upload an image to this page button$/) do
   on(ArticlePage).upload_button_element.should_not exist
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic28e0c758b479dc21c4a29a10586647a29335383
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@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] WIP: Infer extension name from typeOf if data-mw not present - change (mediawiki...parsoid)

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

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

Change subject: WIP: Infer extension name from typeOf if data-mw not present
..

WIP: Infer extension name from typeOf if data-mw not present

For bug T75121, this is just a proof of concept.

Change-Id: I3a65c28e570aafd99ed17598b1c1b709fd1a8003
---
M lib/mediawiki.WikitextSerializer.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/lib/mediawiki.WikitextSerializer.js 
b/lib/mediawiki.WikitextSerializer.js
index a9a1e46..408a72d 100644
--- a/lib/mediawiki.WikitextSerializer.js
+++ b/lib/mediawiki.WikitextSerializer.js
@@ -618,7 +618,12 @@
} else if 
(/(?:^|\s)mw:Param(?=$|\s)/.test(typeOf)) {
src = dp.src;
} else if 
(/(?:^|\s)mw:Extension\//.test(typeOf)) {
+   var extGivenName = 
typeOf.replace(/(?:^|\s)mw:Extension\/([^\s]+)/, $1);
dataMW = DU.getDataMw(node);
+   if (!dataMW.name  extGivenName) {
+   self.env.log(warn, no 
data-mw name for extension in: , node.outerHTML);
+   dataMW.name = extGivenName;
+   }
if (dataMW.name) {
src = 
state.serializer._buildExtensionWT(state, node, dataMW);
} else if (dp.src) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a65c28e570aafd99ed17598b1c1b709fd1a8003
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil marc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Only bind to keep-editing button once - change (mediawiki...Flow)

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

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

Change subject: Only bind to keep-editing button once
..

Only bind to keep-editing button once

Every time preview is launched, this will be executed.
Unless we bind only once, this results in multiple event
handlers registered should a user preview/keep-editing/
preview/... multiple times.

Change-Id: I21d4fe6c2c1d8358663d128afda4c7ac0502f962
---
M modules/engine/components/board/base/flow-board-api-events.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/engine/components/board/base/flow-board-api-events.js 
b/modules/engine/components/board/base/flow-board-api-events.js
index 7f71646..71439d1 100644
--- a/modules/engine/components/board/base/flow-board-api-events.js
+++ b/modules/engine/components/board/base/flow-board-api-events.js
@@ -667,7 +667,7 @@
$nodes: $previewContainer
} )
.text( 
flowBoard.constructor.static.TemplateEngine.l10n('flow-preview-return-edit-post')
 )
-   .click( function() {
+   .one( 'click', function() {
$cancelButton.show();
} );
};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21d4fe6c2c1d8358663d128afda4c7ac0502f962
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
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] Whitespaces fix - change (mediawiki/core)

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

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

Change subject: Whitespaces fix
..

Whitespaces fix

Change-Id: I223bf215c433c3b68b710b07cff901f7159718f5
---
M resources/Resources.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index e55ae84..c9ea00a 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -211,12 +211,12 @@
'targets' = array( 'desktop', 'mobile' ),
),
'mediawiki.cookie' = array(
-'scripts' = 'resources/src/mediawiki/mediawiki.cookie.js',
-'dependencies' = array(
-'jquery.cookie',
-),
-'targets' = array( 'desktop', 'mobile' ),
-),
+   'scripts' = 'resources/src/mediawiki/mediawiki.cookie.js',
+   'dependencies' = array(
+   'jquery.cookie',
+   ),
+   'targets' = array( 'desktop', 'mobile' ),
+   ),
'jquery.expandableField' = array(
'scripts' = 'resources/src/jquery/jquery.expandableField.js',
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I223bf215c433c3b68b710b07cff901f7159718f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Yamelnychuk yaroslavmelnuc...@gmail.com

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


[MediaWiki-commits] [Gerrit] [BREAKING CHANGE] Refactor for multiple surfaces - change (VisualEditor/VisualEditor)

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

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

Change subject: [BREAKING CHANGE] Refactor for multiple surfaces
..

[BREAKING CHANGE] Refactor for multiple surfaces

Replace target.surface with target.surfaces.

Bonus:
* Move debug bar setup to surface.
* Move import rules to config.

Change-Id: I5c2afe424a3cc4e9973af4a657553f1634c9a7e1
---
M src/init/sa/ve.init.sa.Target.js
M src/init/ve.init.Target.js
M src/ui/ve.ui.Surface.js
M src/ui/widgets/ve.ui.SurfaceWidget.js
4 files changed, 75 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/52/176952/1

diff --git a/src/init/sa/ve.init.sa.Target.js b/src/init/sa/ve.init.sa.Target.js
index 36d85b6..56c23c6 100644
--- a/src/init/sa/ve.init.sa.Target.js
+++ b/src/init/sa/ve.init.sa.Target.js
@@ -59,7 +59,7 @@
  * @fires surfaceReady
  */
 ve.init.sa.Target.prototype.setup = function ( dmDoc ) {
-   var target = this;
+   var surface, target = this;
 
if ( this.setupDone ) {
return;
@@ -67,13 +67,10 @@
 
// Properties
this.setupDone = true;
-   this.surface = this.createSurface( dmDoc, { excludeCommands: 
this.constructor.static.excludeCommands } );
-   this.$element.append( this.surface.$element );
+   surface = this.addSurface( dmDoc );
+   this.$element.append( surface.$element );
 
-   this.setupToolbar();
-   if ( ve.debug ) {
-   this.setupDebugBar();
-   }
+   this.setupToolbar( surface );
 
// Initialization
// The following classes can be used here:
@@ -84,12 +81,11 @@
this.toolbar.enableFloatable();
 
this.toolbar.initialize();
-   this.surface.setImportRules( this.constructor.static.importRules );
-   this.surface.initialize();
+   surface.initialize();
 
// HACK: On mobile place the context inside toolbar.$bar which floats
if ( this.surfaceType === 'mobile' ) {
-   this.toolbar.$bar.append( this.surface.context.$element );
+   this.toolbar.$bar.append( surface.context.$element );
}
 
// This must be emitted asynchronously because 
ve.init.Platform#initialize
@@ -105,6 +101,10 @@
  * @inheritdoc
  */
 ve.init.sa.Target.prototype.createSurface = function ( dmDoc, config ) {
+   config = ve.extendObject( {
+   excludeCommands: this.constructor.static.excludeCommands,
+   importRules: this.constructor.static.importRules
+   }, config );
return new this.surfaceClass( dmDoc, config );
 };
 
@@ -114,7 +114,7 @@
 ve.init.sa.Target.prototype.setupToolbar = function () {
ve.init.sa.Target.super.prototype.setupToolbar.call( this, { shadow: 
true, actions: true } );
 
-   var actions = new ve.ui.TargetToolbar( this, this.surface );
+   var actions = new ve.ui.TargetToolbar( this, this.getSurface() );
 
actions.setup( [
{ include: [ 'commandHelp' ] }
diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 009ab4e..a2344aa 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -16,18 +16,18 @@
  * @throws {Error} Container must be attached to the DOM
  */
 ve.init.Target = function VeInitTarget( $container ) {
-   // Mixin constructors
-   OO.EventEmitter.call( this );
-
if ( !$.contains( $container[0].ownerDocument, $container[0] ) ) {
throw new Error( 'Container must be attached to the DOM' );
}
 
+   // Mixin constructors
+   OO.EventEmitter.call( this );
+
// Properties
this.$element = $container;
+   this.surfaces = [];
this.surface = null;
this.toolbar = null;
-   this.debugBar = null;
 
// Initialization
this.$element.addClass( 've-init-target' );
@@ -44,9 +44,8 @@
  * Destroy the target
  */
 ve.init.Target.prototype.destroy = function () {
-   if ( this.surface ) {
-   this.surface.destroy();
-   this.surface = null;
+   while ( this.surfaces.length ) {
+   this.surfaces.pop().destroy();
}
if ( this.toolbar ) {
this.toolbar.destroy();
@@ -66,7 +65,7 @@
  *
  * By default the surface's document is not focused. If the target wants
  * the browsers' focus to be in the surface (ready for typing and cursoring)
- * call `this.surface.getView().focus()` in a handler for this event.
+ * call `surface.getView().focus()` in a handler for this event.
  *
  * @event surfaceReady
  */
@@ -179,11 +178,43 @@
  * @returns {ve.ui.Surface}
  */
 ve.init.Target.prototype.createSurface = function ( dmDoc, config ) {
+   config = ve.extendObject( {
+   excludeCommands: this.constructor.static.excludeCommands,
+   importRules: this.constructor.static.importRules
+   }, config );

[MediaWiki-commits] [Gerrit] Add support for safer query wrapper - change (mediawiki...CirrusSearch)

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

Change subject: Add support for safer query wrapper
..


Add support for safer query wrapper

The safer query wrapper analyzes the queries it wraps and degrades them
if they would take too long to run.  We want that if we can get it.

DEPLOYMENT: You have to turn this on with a setting _and_ you'll need
I9560105c31d429df24d1323740acba9b8e9a from the elasticsearch plugin
to be released and deployed before you turn it on.

Change-Id: I7c4fa048a04f1c98fa20e46805f166486ec260d3
---
M CirrusSearch.php
M includes/Search/ResultsType.php
M includes/Searcher.php
M tests/browser/features/full_text.feature
M tests/browser/features/step_definitions/page_steps.rb
M tests/jenkins/Jenkins.php
6 files changed, 54 insertions(+), 17 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 0d17ef0..5577a1f 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -88,16 +88,21 @@
 // means don't use it at all.
 $wgCirrusSearchWikimediaExtraPlugin = array();
 // Here is an example to enable faster regex matching:
-// $wgCirrusSearchWikimediaExtraPlugin = array(
-// 'regex' = array( 'build', 'use', 'max_inspect' = 1 ),
-// );
+// $wgCirrusSearchWikimediaExtraPlugin[ 'regex' ] =
+// array( 'build', 'use', 'max_inspect' = 1 );
 // The 'build' value instructs Cirrus to build the index required to speed up
 // regex queries.  The 'use' value instructs Cirrus to use it to power regular
 // expression queries.  If 'use' is added before the index is rebuilt with
 // 'build' in the array then regex will fail to find anything.  The value of
 // the 'max_inspect' key is the maximum number of pages to recheck the regex
-// against.  It defaults to 1 which seems like a reasonable compromize
-// to keep regexes fast while still producing good results.
+// against.  Its optional and defaults to 1 which seems like a reasonable
+// compromize to keep regexes fast while still producing good results.
+// This example enables the safer query's phrase processing:
+// $wgCirrusSearchWikimediaExtraPlugin[ 'safer' ] = array(
+// 'phrase' = array(
+// 'max_terms_in_all_queries' = 128,
+// )
+// );
 
 // Should CirrusSearch try to support regular expressions with insource:?
 // These can be really expensive, but mostly ok, especially if you have the
diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php
index 05ef506..9859ba0 100644
--- a/includes/Search/ResultsType.php
+++ b/includes/Search/ResultsType.php
@@ -385,8 +385,8 @@
}
$queryStrings = array();
foreach ( $highlightSource as $part ) {
-   if ( isset( $part[ 'query_string' ] ) ) {
-   $queryStrings[] = $part[ 'query_string' ];
+   if ( isset( $part[ 'query' ] ) ) {
+   $queryStrings[] = $part[ 'query' ];
}
}
if ( count( $queryStrings ) ) {
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 59a690f..9da8ca1 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -575,9 +575,10 @@

$query-setAllowLeadingWildcard( false );
$query-setFuzzyPrefixLength( 2 
);
$query-setRewrite( 
'top_terms_128' );
+   $query = 
$searcher-wrapInSaferIfPossible( $query, false );
$filterDestination[] = new 
\Elastica\Filter\Query( $query );
if ( $key === 'insource' ) {
-   $highlightSource[] = 
array( 'query_string' = $query );
+   $highlightSource[] = 
array( 'query' = $query );
}
$searchContainedSyntax = true;
return $keepText ? $value  : 
'';
@@ -687,7 +688,7 @@
$this-buildFullTextSearchFields( 1, 
'.plain', false ),
$this-buildFullTextSearchFields( 
$wgCirrusSearchStemmedWeight, '', false ) );
list( $nonAllQueryString, /*_*/ ) = 
$escaper-fixupWholeQueryString( implode( ' ', $nonAllQuery ) );
-   $this-highlightQuery = 
$this-buildSearchTextQueryForFields( $nonAllFields, $nonAllQueryString, 1 );
+   $this-highlightQuery = 
$this-buildSearchTextQueryForFields( $nonAllFields, $nonAllQueryString, 1, 
false );
} 

[MediaWiki-commits] [Gerrit] Hygiene: spelling error in comment and use statements - change (mediawiki...Flow)

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

Change subject: Hygiene: spelling error in comment and use statements
..


Hygiene: spelling error in comment and use statements

Remove unused use statement, add use statement referenced in
phpdoc.  Fix misspelling of summaries.

Change-Id: I0bf93e610dea4953fd4706c27c876dfbdd39edcb
---
M includes/Import/IConversionStrategy.php
M includes/Import/LiquidThreadsApi/ConversionStrategy.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/Import/IConversionStrategy.php 
b/includes/Import/IConversionStrategy.php
index 9aecf97..762aded 100644
--- a/includes/Import/IConversionStrategy.php
+++ b/includes/Import/IConversionStrategy.php
@@ -3,6 +3,7 @@
 namespace Flow\Import;
 
 use Flow\Exception\FlowException;
+use Flow\Import\Postprocessor\Postprocessor;
 use Title;
 use WikitextContent;
 
@@ -44,7 +45,7 @@
/**
 * Create an ImportSource implementation for the provided Title.
 * This provides a consistent interface to the headers, topics,
-* summarys and posts to be imported.
+* summaries and posts to be imported.
 *
 * @param Title $title The page to import from
 * @return IImportSource
diff --git a/includes/Import/LiquidThreadsApi/ConversionStrategy.php 
b/includes/Import/LiquidThreadsApi/ConversionStrategy.php
index d896e80..fce7da0 100644
--- a/includes/Import/LiquidThreadsApi/ConversionStrategy.php
+++ b/includes/Import/LiquidThreadsApi/ConversionStrategy.php
@@ -2,7 +2,6 @@
 
 namespace Flow\Import\LiquidThreadsApi;
 
-use ArrayIterator;
 use DatabaseBase;
 use DateTime;
 use DateTimeZone;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bf93e610dea4953fd4706c27c876dfbdd39edcb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: SG shah...@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] Upgrade phabricator plugins to force UTF-8 for conduit - change (operations...plugins)

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

Change subject: Upgrade phabricator plugins to force UTF-8 for conduit
..


Upgrade phabricator plugins to force UTF-8 for conduit

its-phabricator is built from 9edf90a182e43bfeea7ebbcb20d4a52b6213600d
(with its-hooks at 369c7d8a5a97ef8f074bd6c41d34e88b036f2d26)

its-phabricator-from-bugzilla is built from
  97c5f02d3ca6259488a763515251c5cc57a11a51
(with its-hooks at 3b8a1d4abaa6010faa0a18af8b7a00e68593f50c)

Bug: T75788
Change-Id: I85d284577eb5d2cae9c46114f32a6ceb5dafb13b
---
M its-phabricator-from-bugzilla.jar
M its-phabricator.jar
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/its-phabricator-from-bugzilla.jar 
b/its-phabricator-from-bugzilla.jar
index 20cba44..5eb5c39 100644
--- a/its-phabricator-from-bugzilla.jar
+++ b/its-phabricator-from-bugzilla.jar
Binary files differ
diff --git a/its-phabricator.jar b/its-phabricator.jar
index d310ac8..c1840e9 100644
--- a/its-phabricator.jar
+++ b/its-phabricator.jar
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85d284577eb5d2cae9c46114f32a6ceb5dafb13b
Gerrit-PatchSet: 1
Gerrit-Project: operations/gerrit/plugins
Gerrit-Branch: master
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Chad ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Empty prefix search searches everything - change (mediawiki...CirrusSearch)

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

Change subject: Empty prefix search searches everything
..


Empty prefix search searches everything

Before this empty prefix searches would search for only pages with empty
titles which was totally weird and wrong wrong wrong.  Now it searches
for all pages in the namespace and sorts them based on weighting.  That
is what lsearchd used to do I believe.

Fixes T76350.

Change-Id: I36763d13c04ad2f2cd9e796aa699ac1a8ab4515f
---
M includes/Hooks.php
M includes/Searcher.php
M tests/browser/features/prefix_search.feature
M tests/browser/features/step_definitions/search_steps.rb
4 files changed, 49 insertions(+), 21 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index e6f0f68..d6dd49a 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -6,6 +6,7 @@
 use \BetaFeatures;
 use \CirrusSearch;
 use \CirrusSearch\Search\FancyTitleResultsType;
+use \CirrusSearch\Search\TitleResultsType;
 use \DeferredUpdates;
 use \JobQueueGroup;
 use \LinksUpdate;
@@ -389,12 +390,21 @@
public static function prefixSearch( $namespaces, $search, $limit, 
$results ) {
$user = RequestContext::getMain()-getUser();
$searcher = new Searcher( 0, $limit, $namespaces, $user );
-   $searcher-setResultsType( new FancyTitleResultsType( 'prefix' 
) );
+   if ( $search ) {
+   $searcher-setResultsType( new FancyTitleResultsType( 
'prefix' ) );
+   } else {
+   // Empty searches always find the title.
+   $searcher-setResultsType( new TitleResultsType() );
+   }
$status = $searcher-prefixSearch( $search );
// There is no way to send errors or warnings back to the 
caller here so we have to make do with
// only sending results back if there are results and relying 
on the logging done at the status
// constrution site to log errors.
if ( $status-isOK() ) {
+   if ( !$search ) {
+   // No need to unpack the simple title matches 
from non-fancy TitleResultsType
+   return $status-getValue();
+   }
$results = array();
foreach ( $status-getValue() as $match ) {
if ( isset( $match[ 'titleMatch' ] ) ) {
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 59a690f..d5411d5 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -284,25 +284,29 @@
 
self::checkTitleSearchRequestLength( $search );
 
-   if ( $wgCirrusSearchPrefixSearchStartsWithAnyWord ) {
-   $match = new \Elastica\Query\Match();
-   $match-setField( 'title.word_prefix', array(
-   'query' = $search,
-   'analyzer' = 'plain',
-   'operator' = 'and',
-   ) );
-   $this-filters[] = new \Elastica\Filter\Query( $match );
+   if ( $search ) {
+   if ( $wgCirrusSearchPrefixSearchStartsWithAnyWord ) {
+   $match = new \Elastica\Query\Match();
+   $match-setField( 'title.word_prefix', array(
+   'query' = $search,
+   'analyzer' = 'plain',
+   'operator' = 'and',
+   ) );
+   $this-filters[] = new \Elastica\Filter\Query( 
$match );
+   } else {
+   // Elasticsearch seems to have trouble 
extracting the proper terms to highlight
+   // from the default query we make so we feed it 
exactly the right query to highlight.
+   $this-query = new \Elastica\Query\MultiMatch();
+   $this-query-setQuery( $search );
+   $this-query-setFields( array(
+   'title.prefix^' . 
$wgCirrusSearchPrefixWeights[ 'title' ],
+   'redirect.title.prefix^' . 
$wgCirrusSearchPrefixWeights[ 'redirect' ],
+   'title.prefix_asciifolding^' . 
$wgCirrusSearchPrefixWeights[ 'title_asciifolding' ],
+   'redirect.title.prefix_asciifolding^' . 
$wgCirrusSearchPrefixWeights[ 'redirect_asciifolding' ],
+   ) );
+   }
} else {
-   // Elasticsearch seems to have trouble extracting the 

[MediaWiki-commits] [Gerrit] Pull prefix searches into their own pool counter - change (mediawiki...CirrusSearch)

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

Change subject: Pull prefix searches into their own pool counter
..


Pull prefix searches into their own pool counter

This will make sure that spikes in full text search don't hurt prefix search
and spikes in prefix search don't hurt full text search.

Change-Id: Ief6b715681783508ddf9723d512201eaf4691299
---
M README
M includes/Searcher.php
2 files changed, 29 insertions(+), 4 deletions(-)

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



diff --git a/README b/README
index cd2a3ce..4986715 100644
--- a/README
+++ b/README
@@ -109,12 +109,30 @@
 LocalSettings.php like so:
  require_once( $IP/extensions/PoolCounter/PoolCounterClient.php);
  $wgPoolCounterConf = array(
-   'CirrusSearch-Search' = array(  // Configuration for all searches
+   'CirrusSearch-Search' = array(  // Configuration for non-prefix 
non-regex searches
'class' = 'PoolCounter_Client',
'timeout' = 30,
+   'workers' = 25,
+   'maxqueue' = 10,
+   ),
+   'CirrusSearch-Prefix' = array(  // Configuration for prefix searches
+   'class' = 'PoolCounter_Client',
+   'timeout' = 10,
'workers' = 50,
'maxqueue' = 10,
-   )
+   ),
+   'CirrusSearch-Regex' = array(  // Configuration for regex searches
+   'class' = 'PoolCounter_Client',
+   'timeout' = 30,
+   'workers' = 10,
+   'maxqueue' = 0,
+   ),
+   'CirrusSearch-NamespaceLookup' = array(  // Configuration for funky 
namespace lookups
+   'class' = 'PoolCounter_Client',
+   'timeout' = 10,
+   'workers' = 20,
+   'maxqueue' = 20,
+   ),
  );
 
 
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 59a690f..8b65363 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -1055,11 +1055,18 @@
$queryOptions[ 'search_type' ] = 'dfs_query_then_fetch';
}
 
-   if ( $type === 'regex' ) {
+   switch( $type ) {
+   case 'regex':
$poolCounterType = 'CirrusSearch-Regex';
$queryOptions[ 'timeout' ] = 
$wgCirrusSearchSearchShardTimeout[ 'regex' ];
Connection::setTimeout( 
$wgCirrusSearchClientSideSearchTimeout[ 'regex' ] );
-   } else {
+   break;
+   case 'prefix':
+   $poolCounterType = 'CirrusSearch-Prefix';
+   $queryOptions[ 'timeout' ] = 
$wgCirrusSearchSearchShardTimeout[ 'default' ];
+   Connection::setTimeout( 
$wgCirrusSearchClientSideSearchTimeout[ 'default' ] );
+   break;
+   default:
$poolCounterType = 'CirrusSearch-Search';
$queryOptions[ 'timeout' ] = 
$wgCirrusSearchSearchShardTimeout[ 'default' ];
Connection::setTimeout( 
$wgCirrusSearchClientSideSearchTimeout[ 'default' ] );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief6b715681783508ddf9723d512201eaf4691299
Gerrit-PatchSet: 1
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] Set optimize-autoloader: true in config - change (mediawiki/vendor)

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

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

Change subject: Set optimize-autoloader: true in config
..

Set optimize-autoloader: true in config

Bug: T76495
Change-Id: I3bfa00f2ef3452efc026edd8693f974da3113464
---
M README.md
M composer.json
M composer.lock
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/53/176953/1

diff --git a/README.md b/README.md
index e16b396..247d4df 100644
--- a/README.md
+++ b/README.md
@@ -19,8 +19,7 @@
 
 
 1. Edit the composer.json file
-2. Run `composer update --optimize-autoloader` to download files and update
-   the autoloader files.
+2. Run `composer update` to download files and update the autoloader files.
 3. Add and commit changes as a gerrit patch.
 4. Review and merge changes.
 
diff --git a/composer.json b/composer.json
index 26931f2..128036a 100644
--- a/composer.json
+++ b/composer.json
@@ -24,6 +24,7 @@
autoloader-suffix: _mediawiki_vendor,
preferred-install: dist,
vendor-dir: .,
-   prepend-autoloader: false
+   prepend-autoloader: false,
+   optimize-autoloader: true
}
 }
diff --git a/composer.lock b/composer.lock
index 54676e6..22bef23 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 Read more about it at 
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 This file is @generated automatically
 ],
-hash: 06bc33407a163624684ef89a9330f0d5,
+hash: 73f2abaaf2f7f451d2478fa2e3b483d1,
 packages: [
 {
 name: Plancake/EmailParser,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bfa00f2ef3452efc026edd8693f974da3113464
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use Cassandra's datacenter1 default - change (operations...cassandra)

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

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

Change subject: Use Cassandra's datacenter1 default
..

Use Cassandra's datacenter1 default

This is what Cassandra uses when rackproperties are not set. It is also what
RESTBase defaults to.

Change-Id: I1736c92856de7f0540870e8dd40b62eb66100b9d
---
M manifests/defaults.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/cassandra 
refs/changes/54/176954/1

diff --git a/manifests/defaults.pp b/manifests/defaults.pp
index 14e6f65..a707ce1 100644
--- a/manifests/defaults.pp
+++ b/manifests/defaults.pp
@@ -49,7 +49,7 @@
 undef   = [],
 default = $::cassandra_additional_jvm_opts,
 }
-$dc   = pick($::cassandra_dc,  
 'dc1')
+$dc   = pick($::cassandra_dc,  
 'datacenter1')
 $rack = pick($::cassandra_rack,
 'rack1')
 
 $yaml_template= pick($::cassandra_yaml_template,   
 ${module}/cassandra.yaml.erb)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1736c92856de7f0540870e8dd40b62eb66100b9d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/cassandra
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Refactor out trigger listening to allow target triggers - change (VisualEditor/VisualEditor)

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

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

Change subject: Refactor out trigger listening to allow target triggers
..

Refactor out trigger listening to allow target triggers

Change-Id: I10857cc66526ca77560cb1e8e78ff1c1a08f3736
---
M .docs/eg-iframe.html
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M src/init/sa/ve.init.sa.Target.js
M src/init/ve.init.Target.js
M src/ui/ve.ui.Surface.js
M src/ui/ve.ui.TargetToolbar.js
M src/ui/ve.ui.Toolbar.js
M src/ui/ve.ui.TriggerRegistry.js
A src/ve.TriggerListener.js
M tests/index.html
12 files changed, 146 insertions(+), 61 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/55/176955/1

diff --git a/.docs/eg-iframe.html b/.docs/eg-iframe.html
index c6170a1..ad3b866 100644
--- a/.docs/eg-iframe.html
+++ b/.docs/eg-iframe.html
@@ -106,6 +106,7 @@
!-- visualEditor.base.build --
script src=../src/ve.js/script
script src=../src/ve.utils.js/script
+   script src=../src/ve.TriggerListener.js/script
script src=../src/ve.track.js/script
script src=../src/init/ve.init.js/script
script src=../src/init/ve.init.Platform.js/script
diff --git a/build/modules.json b/build/modules.json
index 2edf6ca..e0a4b65 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -131,6 +131,7 @@
scripts: [
src/ve.js,
src/ve.utils.js,
+   src/ve.TriggerListener.js,
{ file: src/ve.debug.js, debug: true },
src/ve.track.js,
src/init/ve.init.js,
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 31e8a72..48b54ce 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -116,6 +116,7 @@
!-- visualEditor.base.build --
script src=../../src/ve.js/script
script src=../../src/ve.utils.js/script
+   script src=../../src/ve.TriggerListener.js/script
script src=../../src/ve.debug.js/script
script src=../../src/ve.track.js/script
script src=../../src/init/ve.init.js/script
diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index 501b96b..0de0d62 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -117,6 +117,7 @@
!-- visualEditor.base.build --
script src=../../src/ve.js/script
script src=../../src/ve.utils.js/script
+   script src=../../src/ve.TriggerListener.js/script
script src=../../src/ve.debug.js/script
script src=../../src/ve.track.js/script
script src=../../src/init/ve.init.js/script
diff --git a/src/init/sa/ve.init.sa.Target.js b/src/init/sa/ve.init.sa.Target.js
index 56c23c6..833b78b 100644
--- a/src/init/sa/ve.init.sa.Target.js
+++ b/src/init/sa/ve.init.sa.Target.js
@@ -64,8 +64,6 @@
if ( this.setupDone ) {
return;
}
-
-   // Properties
this.setupDone = true;
surface = this.addSurface( dmDoc );
this.$element.append( surface.$element );
diff --git a/src/init/ve.init.Target.js b/src/init/ve.init.Target.js
index 218e1c3..1f7e5ae 100644
--- a/src/init/ve.init.Target.js
+++ b/src/init/ve.init.Target.js
@@ -10,6 +10,7 @@
  * @class
  * @abstract
  * @mixins OO.EventEmitter
+ * @mixins ve.TriggerListener
  *
  * @constructor
  * @param {jQuery} $container Container to render target into, must be 
attached to the DOM
@@ -22,9 +23,11 @@
 
// Mixin constructors
OO.EventEmitter.call( this );
+   ve.TriggerListener.call( this, this.constructor.static.targetCommands );
 
// Properties
this.$element = $container;
+   this.elementDocument = this.$element[0].ownerDocument;
this.surfaces = [];
this.surface = null;
this.toolbar = null;
@@ -35,6 +38,9 @@
if ( ve.init.platform.constructor.static.isInternetExplorer() ) {
this.$element.addClass( 've-init-target-ie' );
}
+
+   // Events
+   $( this.elementDocument ).on( 'keydown', this.onDocumentKeyDown.bind( 
this ) );
 
// Register
ve.init.target = this;
@@ -73,6 +79,8 @@
 /* Inheritance */
 
 OO.mixinClass( ve.init.Target, OO.EventEmitter );
+
+OO.mixinClass( ve.init.Target, ve.TriggerListener );
 
 /* Static Properties */
 
@@ -144,6 +152,8 @@
}
 ];
 
+ve.init.Target.static.targetCommands = ['commandHelp'];
+
 ve.init.Target.static.excludeCommands = [];
 
 /**
@@ -170,6 +180,21 @@
 /* Methods */
 
 /**
+ * Handle key down events on the document
+ *
+ * @param {jQuery.Event} e Key down event
+ */
+ve.init.Target.prototype.onDocumentKeyDown = function ( e ) {
+   var command, trigger = new 

  1   2   3   4   5   >