[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: Fixed typeError when TBar buttons are removed by subclass

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

Change subject: Fixed typeError when TBar buttons are removed by subclass
..


Fixed typeError when TBar buttons are removed by subclass

Change-Id: I0a5b6023976da9d7e17361156382eb02e15042b7
---
M resources/bluespice.extjs/BS/CRUDGridPanel.js
1 file changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  Pwirth: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/bluespice.extjs/BS/CRUDGridPanel.js 
b/resources/bluespice.extjs/BS/CRUDGridPanel.js
index 2942a27..40bd6e8 100644
--- a/resources/bluespice.extjs/BS/CRUDGridPanel.js
+++ b/resources/bluespice.extjs/BS/CRUDGridPanel.js
@@ -193,12 +193,18 @@
},
 
onGrdMainRowClick: function( oSender, iRowIndex, oEvent ) {
-   this.btnEdit.enable();
-   this.btnRemove.enable();
+   if( this.btnEdit ) {
+   this.btnEdit.enable();
+   }
+   if( this.btnRemove ) {
+   this.btnRemove.enable();
+   }
 
var selectedRecords = 
this.grdMain.getSelectionModel().getSelection();
if( selectedRecords.length > 1 ) {
-   this.btnEdit.disable();
+   if( this.btnEdit ) {
+   this.btnEdit.disable();
+   }
}
},
onStrMainLoadBase: function() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a5b6023976da9d7e17361156382eb02e15042b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Gerharddiller85 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
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...BlueSpiceExtensions[master]: Remove several messages from extension.json

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

Change subject: Remove several messages from extension.json
..


Remove several messages from extension.json

removes

bs-permissionmanager-labeltpled-save

bs-dashboard-userportlet-article-description

bs-dashboard-userportlet-article-title

bs-formattinghelp-help-text

bs-insertfile-pagingtoolbarposition

bs-insertfile-success

bs-insertlink-applet-title

bs-insertmagic-btn-preview

bs-insertmagic-label-third

bs-insertmagic-type-redirect

18:32:08 19) ResourcesTest::testMissingMessages
18:32:08 Message 'bs-permissionmanager-labeltpled-save' required by 
'ext.bluespice.permissionManager' must exist
18:32:08 Failed asserting that false is true.

08:22:20 19) ResourcesTest::testMissingMessages
08:22:20 Message 'bs-dashboard-userportlet-article-description' required by 
'ext.bluespice.dashboards.userDashboard' must exist
08:22:20 Failed asserting that false is true.

08:25:50 19) ResourcesTest::testMissingMessages
08:25:50 Message 'bs-dashboard-userportlet-article-title' required by 
'ext.bluespi\ce.dashboards.userDashboard' must exist
08:25:50 Failed asserting that false is true.

08:28:21 19) ResourcesTest::testMissingMessages
08:28:21 Message 'bs-formattinghelp-help-text' required by 
'ext.bluespice.formattinghelp' must exist
08:28:21 Failed asserting that false is true.

08:30:57 19) ResourcesTest::testMissingMessages
08:30:57 Message 'bs-insertfile-pagingtoolbarposition' required by 
'ext.bluespice.insertFile' must exist
08:30:57 Failed asserting that false is true.

08:33:48 19) ResourcesTest::testMissingMessages
08:33:48 Message 'bs-insertfile-success' required by 'ext.bluespice.insertFile' 
must exist
08:33:48 Failed asserting that false is true.

08:37:44 19) ResourcesTest::testMissingMessages
08:37:44 Message 'bs-insertlink-applet-title' required by 
'ext.bluespice.insertlink' must exist
08:37:44 Failed asserting that false is true.

08:41:13 19) ResourcesTest::testMissingMessages
08:41:13 Message 'bs-insertmagic-btn-preview' required by 
'ext.bluespice.insertMagic' must exist
08:41:13 Failed asserting that false is true.

08:55:16 19) ResourcesTest::testMissingMessages
08:55:16 Message 'bs-insertmagic-label-third' required by 
'ext.bluespice.insertMagic' must exist
08:55:16 Failed asserting that false is true.

08:58:40 19) ResourcesTest::testMissingMessages
08:58:40 Message 'bs-insertmagic-type-redirect' required by 
'ext.bluespice.insertMagic' must exist
08:58:40 Failed asserting that false is true.

Change-Id: I7bb6c25c74527c9f88948274ec91d9ff87d978e6
---
M Dashboards/extension.json
M FormattingHelp/extension.json
M InsertFile/extension.json
M InsertLink/extension.json
M InsertMagic/extension.json
M PermissionManager/extension.json
6 files changed, 2 insertions(+), 12 deletions(-)

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



diff --git a/Dashboards/extension.json b/Dashboards/extension.json
index 09c9e3d..8494bd7 100644
--- a/Dashboards/extension.json
+++ b/Dashboards/extension.json
@@ -76,9 +76,7 @@
],
"messages": [
"bs-dashboard-userportlet-calendar-title",
-   "bs-dashboard-userportlet-calendar-description",
-   "bs-dashboard-userportlet-article-title",
-   "bs-dashboard-userportlet-article-description"
+   "bs-dashboard-userportlet-calendar-description"
]
},
"ext.bluespice.dashboards.adminDashboard": {
diff --git a/FormattingHelp/extension.json b/FormattingHelp/extension.json
index f388850..33d3348 100644
--- a/FormattingHelp/extension.json
+++ b/FormattingHelp/extension.json
@@ -28,8 +28,7 @@
"ext.bluespice.formattinghelp": {
"scripts": "bluespice.formattinghelp.js",
"messages": [
-   "bs-formattinghelp-formatting",
-   "bs-formattinghelp-help-text"
+   "bs-formattinghelp-formatting"
],
"dependencies": "mediawiki.action.edit"
},
diff --git a/InsertFile/extension.json b/InsertFile/extension.json
index 15fa359..76faee4 100644
--- a/InsertFile/extension.json
+++ b/InsertFile/extension.json
@@ -71,7 +71,6 @@
"bs-insertfile-warning",
"bs-insertfile-warningupload",
"bs-insertfile-allowedfiletypesare",
-   "bs-insertfile-success",
"bs-insertfile-error",
"bs-insertfile-errornofileextensiononupload",

"bs-insertfile-errornofileextensionondestination",
@@ -85,7 +84,6 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Fix path to sql

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

Change subject: Fix path to sql
..


Fix path to sql

RuntimeException from line 3053 of 
/srv/jenkins-workspace/workspace/mwext-testextension-hhvm-composer-non-voting/src/includes/libs/rdbms/database/Database.php:
 Could not open 
"/srv/jenkins-workspace/workspace/mwext-testextension-hhvm-composer-non-voting/src/extensions/BlueSpiceExtensions/ShoutBoxDSdb/mysql/ShoutBox.sql".

RuntimeException from line 3053 of 
/srv/jenkins-workspace/workspace/mwext-testextension-php55-composer-non-voting/src/includes/libs/rdbms/database/Database.php:
 Could not open 
"/srv/jenkins-workspace/workspace/mwext-testextension-php55-composer-non-voting/src/extensions/BlueSpiceExtensions/SaferEditDSdbDSmysqlDSSaferEdit.sql".

RuntimeException from line 3053 of 
/srv/jenkins-workspace/workspace/mwext-testextension-php55-composer-non-voting/src/includes/libs/rdbms/database/Database.php:
 Could not open 
"/srv/jenkins-workspace/workspace/mwext-testextension-php55-composer-non-voting/src/extensions/BlueSpiceExtensions/NamespaceManagerDSdbDSbs_namespacemanager_backup_page.sql".

RuntimeException from line 3053 of 
/srv/jenkins-workspace/workspace/mwext-testextension-php55-composer-non-voting/src/includes/libs/rdbms/database/Database.php:
 Could not open 
"/srv/jenkins-workspace/workspace/mwext-testextension-php55-composer-non-voting/src/extensions/BlueSpiceExtensions/PermissionManagerDSdbDSPermissionManager.sql".

Change-Id: I6ca92662c42e38bfd838b49c9bde1a26c8c5223b
---
M NamespaceManager/NamespaceManager.class.php
M PermissionManager/PermissionManager.class.php
M SaferEdit/SaferEdit.class.php
M ShoutBox/ShoutBox.class.php
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/NamespaceManager/NamespaceManager.class.php 
b/NamespaceManager/NamespaceManager.class.php
index 54ef2f2..e618ccb 100644
--- a/NamespaceManager/NamespaceManager.class.php
+++ b/NamespaceManager/NamespaceManager.class.php
@@ -103,7 +103,7 @@
*/
public static function onLoadExtensionSchemaUpdates( $updater ) {
global $wgExtPGNewFields, $wgDBtype;
-   $dir = __DIR__.DS.'db'.DS;
+   $dir = __DIR__ . '/' . 'db' . '/';
 
if ( $wgDBtype == 'oracle' ) {
$updater->addExtensionTable(
diff --git a/PermissionManager/PermissionManager.class.php 
b/PermissionManager/PermissionManager.class.php
index a774721..7ca6623 100644
--- a/PermissionManager/PermissionManager.class.php
+++ b/PermissionManager/PermissionManager.class.php
@@ -236,7 +236,7 @@
public static function getSchemaUpdates( $updater ) {
$updater->addExtensionTable(
'bs_permission_templates',
-   __DIR__ . DS . 'db' . DS . 
'PermissionManager.sql'
+   __DIR__ . '/' . 'db' . '/' . 
'PermissionManager.sql'
);
 
return true;
diff --git a/SaferEdit/SaferEdit.class.php b/SaferEdit/SaferEdit.class.php
index b47ab6d..31908db 100644
--- a/SaferEdit/SaferEdit.class.php
+++ b/SaferEdit/SaferEdit.class.php
@@ -83,7 +83,7 @@
 */
public static function getSchemaUpdates( $updater ) {
global $wgDBtype, $wgExtNewTables, $wgExtNewIndexes;
-   $sDir = __DIR__.DS.'db'.DS.$wgDBtype.DS;
+   $sDir = __DIR__ . '/' . 'db' . '/' . $wgDBtype . '/';
 
if( $wgDBtype == 'mysql') {
$wgExtNewTables[]  = array( 'bs_saferedit', $sDir . 
'SaferEdit.sql' );
diff --git a/ShoutBox/ShoutBox.class.php b/ShoutBox/ShoutBox.class.php
index 73f2951..e2c6ceb 100644
--- a/ShoutBox/ShoutBox.class.php
+++ b/ShoutBox/ShoutBox.class.php
@@ -93,7 +93,7 @@
 */
public static function getSchemaUpdates( $updater ) {
global $wgDBtype, $wgExtNewTables, $wgExtNewIndexes, 
$wgExtNewFields;
-   $sDir = __DIR__ . DS;
+   $sDir = __DIR__ . '/';
 
if ( $wgDBtype == 'mysql') {
$wgExtNewTables[] = array( 'bs_shoutbox', $sDir . 
'db/mysql/ShoutBox.sql' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ca92662c42e38bfd838b49c9bde1a26c8c5223b
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Refactor error extraction and move to api

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

Change subject: Refactor error extraction and move to api
..


Refactor error extraction and move to api

Bug: T147114
Bug: T144666
Change-Id: I0c58cdcee72b25c60ec02b68bf25f4029641af01
---
M i18n/en.json
M i18n/qqq.json
M wikibase/queryService/api/Sparql.js
M wikibase/queryService/ui/App.js
4 files changed, 89 insertions(+), 48 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index c9d68ba..078a21d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -48,5 +48,7 @@
 "wdqs-action-error-display": "Unable to display result",
 "wdqs-action-timeout": "Query timeout limit reached",
 "wdqs-action-malformed-query": "Query is malformed",
+"wdqs-action-server-error": "Server error",
+"wdqs-action-unknow-error": "Unknown error",
 "wdqs-result-map-layers-all": "All layers"
 }
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 6eeaf23..31299e7 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -50,5 +50,7 @@
"wdqs-action-error-display": "Label for progressbar",
"wdqs-action-timeout": "Label for progressbar",
"wdqs-action-malformed-query": "Label for progressbar",
+"wdqs-action-server-error": "Label for server error",
+   "wdqs-action-unknow-error": "Label for unknown error",
"wdqs-result-map-layers-all": "Label for all layers in layer control on 
map view"
 }
diff --git a/wikibase/queryService/api/Sparql.js 
b/wikibase/queryService/api/Sparql.js
index 4d688d6..98bf89f 100644
--- a/wikibase/queryService/api/Sparql.js
+++ b/wikibase/queryService/api/Sparql.js
@@ -7,6 +7,18 @@
 
var SPARQL_SERVICE_URI = 
'//query.wikidata.org/bigdata/namespace/wdq/sparql';
 
+   var ERROR_CODES = {
+   TIMEOUT: 10,
+   MALFORMED: 20,
+   SERVER: 30,
+   UNKNOWN: 100
+   };
+
+   var ERROR_MAP = {
+   'QueryTimeoutException: Query deadline is expired': 
ERROR_CODES.TIMEOUT,
+   'MalformedQueryException: ': ERROR_CODES.MALFORMED
+   };
+
/**
 * SPARQL API for the Wikibase query service
 *
@@ -24,6 +36,11 @@
}
 
/**
+* @property {Object}
+*/
+   SELF.prototype.ERROR_CODES = ERROR_CODES;
+
+   /**
 * @property {Number}
 * @private
 */
@@ -36,10 +53,10 @@
SELF.prototype._executionTime = null;
 
/**
-* @property {string}
+* @property {Object}
 * @private
 */
-   SELF.prototype._errorMessage = null;
+   SELF.prototype._error = null;
 
/**
 * @property {Number}
@@ -109,9 +126,7 @@
 * @return {jQuery.Promise} query
 */
SELF.prototype.query = function( query ) {
-   var self = this,
-   deferred = $.Deferred(),
-   settings = {
+   var self = this, deferred = $.Deferred(), settings = {
headers: {
Accept: 'application/sparql-results+json'
}
@@ -120,7 +135,7 @@
this._queryUri = this._serviceUri + '?query=' + 
encodeURIComponent( query );
 
this._executionTime = Date.now();
-   $.ajax( this._queryUri, settings ).done( function( data, 
textStatus, jqXHR ) {
+   $.ajax( this._queryUri, settings ).done( function( data, 
textStatus, request ) {
self._executionTime = Date.now() - self._executionTime;
 
if ( typeof data.boolean === 'boolean' ) {
@@ -131,11 +146,11 @@
self._rawData = data;
 
deferred.resolve();
-   } ).fail( function( jqXHR ) {
+   } ).fail( function( request ) {
self._executionTime = null;
self._rawData = null;
self._resultLength = null;
-   self._generateErrorMessage( jqXHR );
+   self._generateErrorMessage( request );
 
deferred.reject();
} );
@@ -146,18 +161,41 @@
/**
 * Get execution time in ms of the submitted query
 */
-   SELF.prototype._generateErrorMessage = function( jqXHR ) {
-   var message = 'ERROR: ';
+   SELF.prototype._generateErrorMessage = function( request, options, 
exception ) {
+   var error = {
+   code: null,
+   message: null,
+   debug: request.responseText
+   };
 
-   if ( jqXHR.status === 0 ) {
-   message += 'Could not contact server';
+   if ( request.status === 0 ) {
+   

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Follow up tests for SpecialEntityUsage

2016-10-12 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Follow up tests for SpecialEntityUsage
..

Follow up tests for SpecialEntityUsage

See Ib23a348 and I44647d

Change-Id: I5c4f9d4d559d71e0b51d48ce321e481ae0f05471
---
M client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
1 file changed, 87 insertions(+), 5 deletions(-)


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

diff --git a/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php 
b/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
index e3daa05..322734e 100644
--- a/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
+++ b/client/tests/phpunit/includes/Specials/SpecialEntityUsageTest.php
@@ -6,7 +6,9 @@
 use RequestContext;
 use SpecialPageFactory;
 use SpecialPageTestBase;
+use Title;
 use Wikibase\Client\Specials\SpecialEntityUsage;
+use WikiPage;
 
 /**
  * @covers Wikibase\Client\Specials\SpecialEntityUsage
@@ -21,19 +23,78 @@
  */
 class SpecialEntityUsageTest extends SpecialPageTestBase {
 
+
public function reallyDoQueryMock() {
$rows = [
(object)[
'value' => 11,
'namespace' => 0,
'title' => 'Tehran',
-   'aspects' => 'S|O|L.fa',
+   'aspects' => 'O|L.fa',
'eu_page_id' => 11,
'eu_entity_id' => 'Q3',
],
+   (object)[
+   'value' => 22,
+   'namespace' => 0,
+   'title' => 'Athena',
+   'aspects' => 'S',
+   'eu_page_id' => 22,
+   'eu_entity_id' => 'Q3',
+   ]
];
 
return new FakeResultWrapper( $rows );
+   }
+
+   public function addDBDataOnce() {
+   $db = wfGetDB( DB_MASTER );
+   $dump = [
+   'page' => [
+   [
+   'page_title' => 'Vienna',
+   'page_namespace' => 0,
+   'page_id' => 11,
+   ],
+   [
+   'page_title' => 'Berlin',
+   'page_namespace' => 0,
+   'page_id' => 22,
+   ],
+   ],
+   'wbc_entity_usage' => [
+   [
+   'eu_page_id' => 11,
+   'eu_entity_id' => 'Q3',
+   'eu_aspect' => 'S'
+   ],
+   [
+   'eu_page_id' => 11,
+   'eu_entity_id' => 'Q3',
+   'eu_aspect' => 'O'
+   ],
+   [
+   'eu_page_id' => 22,
+   'eu_entity_id' => 'Q3',
+   'eu_aspect' => 'L.de'
+   ],
+   ],
+   ];
+
+   foreach ( $dump as $table => $rows ) {
+   // Clean everything
+   $db->delete( $table, '*' );
+
+   foreach ( $rows as $row ) {
+   if ( $table === 'page' ) {
+   $title = Title::newFromText( 
$row['page_title'], $row['page_namespace'] );
+   $page = WikiPage::factory( $title );
+   $page->insertOn( $db, $row['page_id'] );
+   } else {
+   $db->insert( $table, $row );
+   }
+   }
+   }
}
 
/**
@@ -53,18 +114,28 @@
 
public function testExecuteWithValidParam() {
list( $result, ) = $this->executeSpecialPage( 'Q3' );
-   $aspects = [
-   wfMessage( 'wikibase-pageinfo-entity-usage-S' 
)->parse(),
+   $aspectsTehran = [
wfMessage( 'wikibase-pageinfo-entity-usage-O' 
)->parse(),
wfMessage( 'wikibase-pageinfo-entity-usage-L', 'fa' 
)->parse(),
];
-   $aspectList = 

[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Verify that CPU timings exists before they are used

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

Change subject: Verify that CPU timings exists before they are used
..


Verify that CPU timings exists before they are used

WebPageTest has changed the API or something is failing in WPT
because we don't get CPUTimesDoc anymore (CPU timings til
document complete). Verify that they exist before we use them
and report a bug for WPT.

Bug: T148002
Change-Id: I2b2dc17e0d0ad995bd74b7e1e3e80a6ce725ff5c
---
M lib/collectMetrics.js
1 file changed, 14 insertions(+), 10 deletions(-)

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



diff --git a/lib/collectMetrics.js b/lib/collectMetrics.js
index bf9ed42..2a46d72 100644
--- a/lib/collectMetrics.js
+++ b/lib/collectMetrics.js
@@ -61,16 +61,20 @@
 
 // you need to turn on timeline collecting and use Chrome for 
this to work
 if (argv.timeline) {
-var cpuTimes = 
cpuTime.sum(wptJson.data.median[view].cpuTimes);
-Object.keys(cpuTimes).forEach(function(time) {
-metricsToSend.cpuTimes[keyStart + 'cpuTimes.' + time] =
-cpuTimes[time];
-});
-var cpuTimesDoc = 
cpuTime.sum(wptJson.data.median[view].cpuTimesDoc);
-Object.keys(cpuTimesDoc).forEach(function(cpuTimeDoc) {
-metricsToSend.cpuTimes[keyStart + 'cpuTimesDoc.' + 
cpuTimeDoc] =
-cpuTimesDoc[cpuTimeDoc];
-});
+if (wptJson.data.median[view].cpuTimes) {
+var cpuTimes = 
cpuTime.sum(wptJson.data.median[view].cpuTimes);
+Object.keys(cpuTimes).forEach(function(time) {
+metricsToSend.cpuTimes[keyStart + 'cpuTimes.' + 
time] =
+cpuTimes[time];
+});
+}
+if (wptJson.data.median[view].cpuTimesDoc) {
+var cpuTimesDoc = 
cpuTime.sum(wptJson.data.median[view].cpuTimesDoc);
+Object.keys(cpuTimesDoc).forEach(function(cpuTimeDoc) {
+metricsToSend.cpuTimes[keyStart + 'cpuTimesDoc.' + 
cpuTimeDoc] =
+cpuTimesDoc[cpuTimeDoc];
+});
+}
 }
 
 if (wptJson.data.median[view].userTimes) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b2dc17e0d0ad995bd74b7e1e3e80a6ce725ff5c
Gerrit-PatchSet: 1
Gerrit-Project: performance/WebPageTest
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 
Gerrit-Reviewer: Phedenskog 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] performance/WebPageTest[master]: Verify that CPU timings exists before they are used

2016-10-12 Thread Phedenskog (Code Review)
Phedenskog has uploaded a new change for review.

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

Change subject: Verify that CPU timings exists before they are used
..

Verify that CPU timings exists before they are used

WebPageTest has changed the API or something is failing in WPT
because we don't get CPUTimesDoc anymore (CPU timings til
document complete). Verify that they exist before we use them
and report a bug for WPT.

Bug: T148002
Change-Id: I2b2dc17e0d0ad995bd74b7e1e3e80a6ce725ff5c
---
M lib/collectMetrics.js
1 file changed, 14 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/performance/WebPageTest 
refs/changes/22/315622/1

diff --git a/lib/collectMetrics.js b/lib/collectMetrics.js
index bf9ed42..2a46d72 100644
--- a/lib/collectMetrics.js
+++ b/lib/collectMetrics.js
@@ -61,16 +61,20 @@
 
 // you need to turn on timeline collecting and use Chrome for 
this to work
 if (argv.timeline) {
-var cpuTimes = 
cpuTime.sum(wptJson.data.median[view].cpuTimes);
-Object.keys(cpuTimes).forEach(function(time) {
-metricsToSend.cpuTimes[keyStart + 'cpuTimes.' + time] =
-cpuTimes[time];
-});
-var cpuTimesDoc = 
cpuTime.sum(wptJson.data.median[view].cpuTimesDoc);
-Object.keys(cpuTimesDoc).forEach(function(cpuTimeDoc) {
-metricsToSend.cpuTimes[keyStart + 'cpuTimesDoc.' + 
cpuTimeDoc] =
-cpuTimesDoc[cpuTimeDoc];
-});
+if (wptJson.data.median[view].cpuTimes) {
+var cpuTimes = 
cpuTime.sum(wptJson.data.median[view].cpuTimes);
+Object.keys(cpuTimes).forEach(function(time) {
+metricsToSend.cpuTimes[keyStart + 'cpuTimes.' + 
time] =
+cpuTimes[time];
+});
+}
+if (wptJson.data.median[view].cpuTimesDoc) {
+var cpuTimesDoc = 
cpuTime.sum(wptJson.data.median[view].cpuTimesDoc);
+Object.keys(cpuTimesDoc).forEach(function(cpuTimeDoc) {
+metricsToSend.cpuTimes[keyStart + 'cpuTimesDoc.' + 
cpuTimeDoc] =
+cpuTimesDoc[cpuTimeDoc];
+});
+}
 }
 
 if (wptJson.data.median[view].userTimes) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b2dc17e0d0ad995bd74b7e1e3e80a6ce725ff5c
Gerrit-PatchSet: 1
Gerrit-Project: performance/WebPageTest
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Convert CREDITS to single list of contributors

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

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

Change subject: Convert CREDITS to single list of contributors
..

Convert CREDITS to single list of contributors

Merge the "developers" and "patch contributors" lists into a single list
of "contributors".

Bug: T139300
Change-Id: I44a49b3e0231c767bc41cd8bf8d68e28944b5cce
---
M CREDITS
1 file changed, 93 insertions(+), 93 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/315621/1

diff --git a/CREDITS b/CREDITS
index dca597e..30ebc9e 100644
--- a/CREDITS
+++ b/CREDITS
@@ -6,157 +6,110 @@
 -->
 
 
-== Developers ==
-* Aaron Schulz
-* Alex Z.
-* Alexander Monk
-* Alexandre Emsenhuber
-* Andrew Garrett
-* Antoine Musso
-* Arthur Richards
-* Aryeh Gregor
-* Bartosz Dziewoński
-* Bertrand Grondin
-* Brad Jorsch
-* Brian Wolff
-* Brion Vibber
-* Bryan Davis
-* Bryan Tong Minh
-* Chad Horohoe
-* Charles Melbye
-* Chris Steipp
-* church of emacs
-* Daniel Friesen
-* Daniel Kinzler
-* Daniel Renfro
-* Danny B.
-* David McCabe
-* Derk-Jan Hartman
-* Domas Mituzas
-* Emufarmers
-* Fran Rogers
-* Greg Sabino Mullane
-* Guy Van den Broeck
-* Happy-melon
-* Hojjat
-* Ian Baker
-* Ilmari Karonen
-* Jack D. Pond
-* Jack Phoenix
-* Jackmcbarn
-* James Forrester
-* Jan Paul Posma
-* Jason Richey
-* Jeroen De Dauw
-* John Du Hart
-* Jon Harald Søby
-* Juliano F. Ravasi
-* Leo Koppelkamm
-* Leon Weber
-* Leslie Hoare
-* Marco Schuster
-* Marius Hoch
-* Matěj Grabovský
-* Matt Johnston
-* Matthew Flaschen
-* Max Semenik
-* Meno25
-* MinuteElectron
-* Mohamed Magdy
-* Nathaniel Herman
-* Neil Kandalgaonkar
-* Nicolas Dumazet
-* Niklas Laxström
-* Ori Livneh
-* Patrick Reilly
-* Philip Tzou
-* Platonides
-* Purodha Blissenbach
-* Raimond Spekking
-* Remember the dot
-* Roan Kattouw
-* Robert Stojnić
-* Robin Pepermans
-* Rotem Liss
-* Ryan Kaldari
-* Ryan Lane
-* Ryan Schmidt
-* Sam Reed
-* Shinjiman
-* Siebrand Mazeland
-* Soxred93
-* SQL
-* Szymon Świerkosz
-* This, that and the other
-* Thomas Bleher
-* Thomas Gries
-* Tim Starling
-* Timo Tijhof
-* Trevor Parscal
-* Tyler Anthony Romeo
-* Victor Vasiliev
-* Yesid Carrillo
-* Yuri Astrakhan
-
-== Patch Contributors ==
+== Contributors ==
+
 * Aaron Ball
 * Aaron Pramana
+* Aaron Schulz
 * Agbad
 * Ahmad Sherif
 * Alejandro Mery
+* Alex Z.
+* Alexander Monk
+* Alexandre Emsenhuber
 * Amalthea
 * Amir E. Aharoni
 * Andrew Dunbar
+* Andrew Garrett
+* Antoine Musso
 * Antonio Ospite
+* Arthur Richards
+* Aryeh Gregor
 * Asier Lostalé
 * Azliq7
 * Bagariavivek
+* Bartosz Dziewoński
 * Beau
 * Benny Situ
 * Bergi
+* Bertrand Grondin
 * Borislav Manolov
+* Brad Jorsch
 * Brent G
+* Brian Wolff
 * Brianna Laugher
+* Brion Vibber
+* Bryan Davis
+* Bryan Tong Minh
 * Carlin
 * Carsten Nielsen
+* Chad Horohoe
+* Charles Melbye
+* Chris Steipp
 * Christian Aistleitner
 * Christian Neubauer
+* church of emacs
 * Conrad Irwin
 * cryptocoryne
 * Dan Barrett
 * Dan Collins
 * Dan Nessett
 * Daniel Arnold
+* Daniel Friesen
+* Daniel Kinzler
+* Daniel Renfro
 * Daniel Werner
+* Danny B.
 * David Baumgarten
+* David McCabe
 * Denny Vrandecic
+* Derk-Jan Hartman
 * Dévai Tamás
+* Domas Mituzas
 * Ebrahim Byagowi
 * Edward Z. Yang
 * Elvis Stansvik
+* Emufarmers
 * Eranroz
 * Erwin Dokter
 * Étienne Beaulé
 * Federico Leva
 * Florian Schmidt
 * fomafix
+* Fran Rogers
 * FunPika
 * Gabriel Wicke
 * Geoffrey Mon
 * Gero Scholz
 * Gilles van den Hoven
+* Greg Sabino Mullane
 * Grunny
+* Guy Van den Broeck
+* Happy-melon
 * Harry Burt
+* Hojjat
+* Ian Baker
+* Ilmari Karonen
 * Ireas
+* Jack D. Pond
+* Jack Phoenix
+* Jackmcbarn
 * Jacob Block
+* James Forrester
 * Jan Gerber
 * Jan Luca Naumann
+* Jan Paul Posma
 * Jaska Zedlik
+* Jason Richey
 * Jeremy Baron
+* Jeroen De Dauw
 * Jidanni
 * Jimmy Xu
+* John Du Hart
 * John N
+* Jon Harald Søby
 * Jonathan Wiltshire
+* Juliano F. Ravasi
 * JuneHyeon Bae
 * Jure Kajzer
 * Karun Dambiec
@@ -165,7 +118,10 @@
 * Kim Hyun-Joon
 * Lee Worden
 * Lejonel
+* Leo Koppelkamm
 * Leon Liesener
+* Leon Weber
+* Leslie Hoare
 * liangent
 * Louperivois
 * Lucas Garczewski
@@ -176,16 +132,23 @@
 * Manuel Menal
 * Marc-André Pelletier
 * Marcin Cieślak
+* Marco Schuster
 * Marcus Buck
+* Marius Hoch
 * Mark Hershberger
 * Mark Holmquist
 * Marooned
+* Matěj Grabovský
 * Mathias Ertl
 * mati
+* Matt Johnston
 * Matthew Britton
+* Matthew Flaschen
 * Matthias Mullie
 * Max
+* Max Semenik
 * Max Sikström
+* Meno25
 * merl
 * Michael Dale
 * Michael De La Rue
@@ -193,7 +156,9 @@
 * Michael Newton
 * Michael Walsh
 * Mike Horvath
+* MinuteElectron
 * moejoe
+* Mohamed Magdy
 * Mormegil
 * MrBlueSky
 * MrPete
@@ -201,56 +166,91 @@
 * MZMcBride
 * Nakon
 * Nathan Larson
+* Nathaniel Herman
+* Neil Kandalgaonkar
 * nephele
+* Nicolas Dumazet
 * Nik
+* Niklas Laxström
 * Nikola Kovacs
 * Nikolaos S. Karastathis
 * Nischay Nahata
 * Nx.devnull
 * Olaf Lenz
 * Olivier Finlay 

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Prevent selecting the same revision twice

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

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

Change subject: Prevent selecting the same revision twice
..

Prevent selecting the same revision twice

Bug: T141254
Change-Id: Ic51605dca1484ce66ce9764a2291c8a947f9d376
---
M modules/ext.RevisionSlider.SliderView.js
1 file changed, 17 insertions(+), 10 deletions(-)


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

diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index 5b49fe8..baa6421 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -83,6 +83,7 @@
pointerContainerPosition = 53,
pointerContainerWidth = containerWidth + 
this.revisionWidth - 1,
pointerContainerStyle,
+   lastValidLeftPos,
$revisions = 
this.slider.getRevisions().getView().render( this.revisionWidth ),
$slider = $( '' )
.addClass( 
'mw-revslider-revision-slider' )
@@ -225,18 +226,24 @@
$( '.mw-revslider-revision-wrapper' 
).removeClass( 'mw-revslider-pointer-cursor' );
},
drag: function ( event, ui ) {
-   var newestVisibleRevisionLeftPos = $( 
'.mw-revslider-revisions-container' ).width() - self.revisionWidth;
+   var olderLeftPos, newerLeftPos,
+   isNew = $( this ).hasClass( 
'mw-revslider-pointer-newer' ),
+   newestVisibleRevisionLeftPos = 
$( '.mw-revslider-revisions-container' ).width() - self.revisionWidth;
+
ui.position.left = Math.min( 
ui.position.left, newestVisibleRevisionLeftPos );
-   if ( self.dir === 'ltr' ) {
-   
self.resetPointerColorsBasedOnValues(
-   
self.pointerOlder.getView().getElement().offset().left,
-   
self.pointerNewer.getView().getElement().offset().left
-   );
+
+   olderLeftPos = 
self.pointerOlder.getView().getElement().position().left;
+   newerLeftPos = 
self.pointerNewer.getView().getElement().position().left;
+
+   if ( ui.position.left === ( isNew ? 
olderLeftPos : newerLeftPos ) ) {
+   ui.position.left = 
lastValidLeftPos;
} else {
-   
self.resetPointerColorsBasedOnValues(
-   
self.pointerNewer.getView().getElement().offset().left,
-   
self.pointerOlder.getView().getElement().offset().left
-   );
+   lastValidLeftPos = 
ui.position.left;
+   if ( self.dir === 'ltr' ) {
+   
self.resetPointerColorsBasedOnValues( olderLeftPos, newerLeftPos );
+   } else {
+   
self.resetPointerColorsBasedOnValues( newerLeftPos, olderLeftPos );
+   }
}
}
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic51605dca1484ce66ce9764a2291c8a947f9d376
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Correct inheritance in graph dialog documentation

2016-10-12 Thread Tchanders (Code Review)
Tchanders has uploaded a new change for review.

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

Change subject: Correct inheritance in graph dialog documentation
..

Correct inheritance in graph dialog documentation

Change-Id: I9c74f69c260035fdc0603dbf54b13e35290d5572
---
M modules/ve-graph/ve.ui.MWGraphDialog.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-graph/ve.ui.MWGraphDialog.js 
b/modules/ve-graph/ve.ui.MWGraphDialog.js
index 7c9865f..dcbad45 100644
--- a/modules/ve-graph/ve.ui.MWGraphDialog.js
+++ b/modules/ve-graph/ve.ui.MWGraphDialog.js
@@ -8,7 +8,7 @@
  * MediaWiki graph dialog.
  *
  * @class
- * @extends ve.ui.NodeDialog
+ * @extends ve.ui.MWExtensionDialog
  *
  * @constructor
  * @param {Object} [element]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c74f69c260035fdc0603dbf54b13e35290d5572
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Tchanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix sanitizing of query value in media search

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

Change subject: Fix sanitizing of query value in media search
..


Fix sanitizing of query value in media search

Always use #getQueryValue which trims whitespace, so we
don't pass whitespace to the API.

Also rename some variables for clarity, and remove some
unused arguments.

Change-Id: I0d27f59488295bc1c398d0fd287e3e16a3f5aaec
---
M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
1 file changed, 21 insertions(+), 12 deletions(-)

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



diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
index 59cde6d..0679b29 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
@@ -26,7 +26,7 @@
 
// Properties
this.providers = {};
-   this.searchValue = '';
+   this.lastQueryValue = '';
this.searchQueue = new ve.dm.MWMediaSearchQueue( {
limit: this.constructor.static.limit,
threshold: this.constructor.static.threshold
@@ -86,8 +86,7 @@
  * be updated.
  */
 ve.ui.MWMediaSearchWidget.prototype.afterResultsResize = function () {
-   var items = this.currentItemCache,
-   value = this.query.getValue();
+   var items = this.currentItemCache;
 
if (
items.length > 0 &&
@@ -98,7 +97,7 @@
) {
this.resetRows();
this.itemCache = {};
-   this.processQueueResults( items, value );
+   this.processQueueResults( items );
if ( this.results.getItems().length > 0 ) {
this.lazyLoadResults();
}
@@ -132,7 +131,7 @@
  */
 ve.ui.MWMediaSearchWidget.prototype.queryMediaQueue = function () {
var search = this,
-   value = this.query.getValue();
+value = this.getQueryValue();
 
if ( value === '' ) {
return;
@@ -145,7 +144,7 @@
this.searchQueue.get( this.constructor.static.limit )
.then( function ( items ) {
if ( items.length > 0 ) {
-   search.processQueueResults( items, value );
+   search.processQueueResults( items );
search.currentItemCache = 
search.currentItemCache.concat( items );
}
 
@@ -167,7 +166,7 @@
 ve.ui.MWMediaSearchWidget.prototype.processQueueResults = function ( items ) {
var i, len, title,
resultWidgets = [],
-   inputSearchQuery = this.query.getValue(),
+   inputSearchQuery = this.getQueryValue(),
queueSearchQuery = this.searchQueue.getSearchQuery();
 
if ( inputSearchQuery === '' || queueSearchQuery !== inputSearchQuery ) 
{
@@ -195,17 +194,26 @@
 };
 
 /**
+ * Get the sanitized query value from the input
+ *
+ * @return {string} Query value
+ */
+ve.ui.MWMediaSearchWidget.prototype.getQueryValue = function () {
+   return this.query.getValue().trim();
+};
+
+/**
  * Handle search value change
  *
  * @param {string} value New value
  */
-ve.ui.MWMediaSearchWidget.prototype.onQueryChange = function ( value ) {
-   var trimmed = value.trim();
+ve.ui.MWMediaSearchWidget.prototype.onQueryChange = function () {
+   // Get the sanitized query value
+   var queryValue = this.getQueryValue();
 
-   if ( trimmed === this.searchValue ) {
+   if ( queryValue === this.lastQueryValue ) {
return;
}
-   this.searchValue = trimmed;
 
// Parent method
ve.ui.MWMediaSearchWidget.super.prototype.onQueryChange.apply( this, 
arguments );
@@ -219,7 +227,8 @@
this.layoutQueue = [];
 
// Change resource queue query
-   this.searchQueue.setSearchQuery( this.searchValue );
+   this.searchQueue.setSearchQuery( queryValue );
+   this.lastQueryValue = queryValue;
 
// Queue
clearTimeout( this.queryTimeout );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d27f59488295bc1c398d0fd287e3e16a3f5aaec
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Tchanders 
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...RevisionSlider[master]: Compute and cache directionality once

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

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

Change subject: Compute and cache directionality once
..

Compute and cache directionality once

Computed CSS ($.css) is relatively slow, and directionality
should never change, so just compute it once.

Change-Id: I6519fa7f54599c498e22a348dfaedd940c860955
---
M modules/ext.RevisionSlider.SliderView.js
1 file changed, 13 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/18/315618/1

diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index 090ceac..5b49fe8 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -73,6 +73,11 @@
 */
noMoreOlderRevisions: false,
 
+   /**
+* @type {string}
+*/
+   dir: null,
+
render: function ( $container ) {
var containerWidth = 
this.calculateSliderContainerWidth(),
pointerContainerPosition = 53,
@@ -88,7 +93,9 @@
forwardArrowPopup,
self = this;
 
-   if ( $slider.css( 'direction' ) === 'rtl' ) {
+   this.dir = $container.css( 'direction' ) || 'ltr';
+
+   if ( this.dir === 'rtl' ) {
this.rtlScrollLeftType = 
this.determineRtlScrollType();
}
 
@@ -161,7 +168,7 @@
.focusin( { button: this.forwardArrowButton }, 
this.arrowFocusHandler );
 
pointerContainerStyle = { left: 
pointerContainerPosition + 'px', width: pointerContainerWidth + 'px' };
-   if ( $slider.css( 'direction' ) === 'rtl' ) {
+   if ( this.dir === 'rtl' ) {
// Due to properly limit dragging a pointer on 
the right side of the screen,
// there must some extra space added to the 
right of the revision bar container
// For this reason right position of the 
pointer container in the RTL mode is
@@ -200,7 +207,7 @@
var $p = $( this ),
pointer = self.whichPointer( $p 
),
pos = parseInt( $p.css( 'left' 
), 10 ),
-   adjustedPos = 
$p.offsetParent().css( 'direction' ) === 'rtl' ? 
pointer.getView().getAdjustedLeftPositionWhenRtl( pos ) : pos,
+   adjustedPos = self.dir === 
'rtl' ? pointer.getView().getAdjustedLeftPositionWhenRtl( pos ) : pos,
relativeIndex = Math.ceil( ( 
adjustedPos + self.revisionWidth / 2 ) / self.revisionWidth ),
revId1, revId2;
mw.track( 
'counter.MediaWiki.RevisionSlider.event.pointerMove' );
@@ -220,7 +227,7 @@
drag: function ( event, ui ) {
var newestVisibleRevisionLeftPos = $( 
'.mw-revslider-revisions-container' ).width() - self.revisionWidth;
ui.position.left = Math.min( 
ui.position.left, newestVisibleRevisionLeftPos );
-   if ( $( this ).css( 'direction' ) === 
'ltr' ) {
+   if ( self.dir === 'ltr' ) {

self.resetPointerColorsBasedOnValues(

self.pointerOlder.getView().getElement().offset().left,

self.pointerNewer.getView().getElement().offset().left
@@ -503,7 +510,7 @@
}
 
animateObj = { scrollLeft: 
this.slider.getFirstVisibleRevisionIndex() * this.revisionWidth };
-   if ( this.$element.css( 'direction' ) === 'rtl' ) {
+   if ( this.dir === 'rtl' ) {
animateObj.scrollLeft = this.getRtlScrollLeft( 
$animatedElement, animateObj.scrollLeft );
}
 
@@ -769,7 +776,7 @@
 
scrollLeft = this.slider.getFirstVisibleRevisionIndex() 
* this.revisionWidth;
$revisionContainer.scrollLeft( scrollLeft );
-   if ( this.$element.css( 'direction' ) === 'rtl' ) {
+   if ( this.dir === 'rtl' ) {
$revisionContainer.scrollLeft( 
self.getRtlScrollLeft( $revisionContainer, scrollLeft ) );
}
 


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Throttle the window resize event handler

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

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

Change subject: Throttle the window resize event handler
..

Throttle the window resize event handler

Drag-resizing a window results in hundreds of events being fired,
so limit this to one event every 250ms.

Change-Id: Ie3ace9001cd840a5d790cd269c4ae3c77649079a
---
M modules/ext.RevisionSlider.init.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ext.RevisionSlider.init.js 
b/modules/ext.RevisionSlider.init.js
index fbdb217..982f874 100644
--- a/modules/ext.RevisionSlider.init.js
+++ b/modules/ext.RevisionSlider.init.js
@@ -38,9 +38,9 @@
slider = new 
mw.libs.revisionSlider.Slider( revisionList );
slider.getView().render( $container );
 
-   window.addEventListener( 'resize', 
function () {
+   $( window ).on( 'resize', 
OO.ui.throttle( function () {
slider.getView().render( 
$container );
-   } );
+   }, 250 ) );
 
if ( !mw.user.options.get( 
'userjs-revslider-hidehelp' ) ) {

mw.libs.revisionSlider.HelpDialog.show();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3ace9001cd840a5d790cd269c4ae3c77649079a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Use one query per term type in SqlEntityInfoBuilder::collect...

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

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

Change subject: Use one query per term type in 
SqlEntityInfoBuilder::collectTermsForEntities
..

Use one query per term type in SqlEntityInfoBuilder::collectTermsForEntities

This is way faster on MySQL, see T147748#2711717 for benchmarks.

Bug: T147748
Change-Id: Ide5dc20cfd0ce7b4a3d465495dc7be91c87159b6
---
M lib/includes/Store/Sql/SqlEntityInfoBuilder.php
M lib/tests/phpunit/Store/EntityInfoBuilderTest.php
2 files changed, 43 insertions(+), 12 deletions(-)


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

diff --git a/lib/includes/Store/Sql/SqlEntityInfoBuilder.php 
b/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
index 0fe4b65..337f5b1 100644
--- a/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
+++ b/lib/includes/Store/Sql/SqlEntityInfoBuilder.php
@@ -351,8 +351,8 @@
'term_entity_id' => $entityIds,
);
 
-   if ( $termTypes ) {
-   $where['term_type'] = $termTypes;
+   if ( $termTypes === null ) {
+   $termTypes = [ null ];
}
 
if ( $languages ) {
@@ -361,14 +361,17 @@
 
$dbw = $this->getConnection( DB_SLAVE );
 
-   $res = $dbw->select(
-   $this->termTable,
-   array( 'term_entity_type', 'term_entity_id', 
'term_type', 'term_language', 'term_text' ),
-   $where,
-   __METHOD__
-   );
+   // Do one query per term type here, this is way faster on 
MySQL: T147748
+   foreach ( $termTypes as $termType ) {
+   $res = $dbw->select(
+   $this->termTable,
+   array( 'term_entity_type', 'term_entity_id', 
'term_type', 'term_language', 'term_text' ),
+   array_merge( $where, $termType !== null ? [ 
'term_type' => $termType ] : [] ),
+   __METHOD__
+   );
 
-   $this->injectTerms( $res );
+   $this->injectTerms( $res );
+   }
 
$this->releaseConnection( $dbw );
}
diff --git a/lib/tests/phpunit/Store/EntityInfoBuilderTest.php 
b/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
index 8b3730a..c3c59da 100644
--- a/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
+++ b/lib/tests/phpunit/Store/EntityInfoBuilderTest.php
@@ -189,14 +189,14 @@
 
public function collectTermsProvider() {
return array(
-   array(
+   'empty set' => array(
array(),
null,
null,
array()
),
 
-   array(
+   'all term types' => array(
array(
new ItemId( 'Q1' ),
new PropertyId( 'P3' ),
@@ -229,7 +229,7 @@
)
),
 
-   array(
+   'one term type' => array(
array(
new ItemId( 'Q1' ),
new PropertyId( 'P3' ),
@@ -247,6 +247,34 @@
'Q7' => array( 'id' => 'Q7', 'type' => 
Item::ENTITY_TYPE, 'labels' => array() ),
)
),
+
+   'two term types' => array(
+   array(
+   new ItemId( 'Q1' ),
+   new PropertyId( 'P3' ),
+   new ItemId( 'Q7' ),
+   ),
+   array( 'label', 'description' ),
+   null,
+   array(
+   'Q1' => array( 'id' => 'Q1', 'type' => 
Item::ENTITY_TYPE,
+   'labels' => 
$this->makeLanguageValueRecords( array(
+   'en' => 'label:Q1/en', 
'de' => 'label:Q1/de' ) ),
+   'descriptions' => 
$this->makeLanguageValueRecords( array(
+   'en' => 
'description:Q1/en', 'de' => 'description:Q1/de' ) )
+   ),
+   'P3' => array( 'id' => 'P3', 'type' => 
Property::ENTITY_TYPE,
+   'labels' => 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Module and role for Recommendation API

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

Change subject: Module and role for Recommendation API
..


Module and role for Recommendation API

The Wikimedia Recommendation API is a JSON API that provides personalized
recommendations of wiki content (to discover, edit, translate, etc.).
It is a Flask webapp running under uWSGI.

See  for more info.

Bug: T116102
Change-Id: If5db926def3c5d1933ea0d284d540a9e99e18613
---
A manifests/role/recommendation_api.pp
A modules/recommendation_api/manifests/init.pp
A modules/role/templates/apache/sites/recommendation_api.erb
3 files changed, 98 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/recommendation_api.pp 
b/manifests/role/recommendation_api.pp
new file mode 100644
index 000..70d7a9c
--- /dev/null
+++ b/manifests/role/recommendation_api.pp
@@ -0,0 +1,18 @@
+# == Class: role::recommendation_api
+#
+# Provisions a JSON API for personalized recommendations.
+#
+class role::recommendation_api {
+include ::recommendation_api
+
+include ::apache::mod::uwsgi
+
+apache::site { 'recommendation_api':
+content => template('role/apache/sites/recommendation_api.erb'),
+}
+
+ferm::service { 'recommendation_api_http':
+proto => 'tcp',
+port  => '80',
+}
+}
diff --git a/modules/recommendation_api/manifests/init.pp 
b/modules/recommendation_api/manifests/init.pp
new file mode 100644
index 000..7c0439b
--- /dev/null
+++ b/modules/recommendation_api/manifests/init.pp
@@ -0,0 +1,75 @@
+# == Class: recommendation_api
+#
+# The Wikimedia Recommendation API is a JSON API that provides personalized
+# recommendations of wiki content (to discover, edit, translate, etc.).
+# It is a Flask webapp running under uWSGI.
+#
+# See  for more info.
+#
+class recommendation_api {
+requires_os('debian >= jessie')
+
+require_package(
+'python3-bs4',
+'python3-dateutil',
+'python3-flask',
+'python3-numpy',
+'python3-pip',
+'python3-requests',
+'python3-simplejson',
+'python3-wheel',
+'python3-yaml',
+)
+
+$base_dir   = '/srv/recommendation-api'  # top-level dir for app
+$core_dir   = "${base_dir}/core" # source code
+$wheels_dir = "${base_dir}/wheels"   # *.whl files
+$lib_dir= "${base_dir}/lib"  # dependencies (installed from 
*.whl)
+
+file { [ $base_dir, $lib_dir ]:
+ensure => directory,
+owner  => 'root',
+group  => 'root',
+mode   => '0755',
+}
+
+git::clone { 'research/recommendation-api/wheels':
+ensure=> 'latest',
+directory => $wheels_dir,
+branch=> 'master',
+}
+
+git::clone { 'research/recommendation-api':
+ensure=> 'latest',
+directory => $core_dir,
+branch=> 'master',
+}
+
+exec { 'pip_install_wheels':
+command => "/usr/bin/pip3 install --target=${lib_dir} --no-deps 
${wheels_dir}/wheels/*.whl",
+require => File[$lib_dir],
+user=> 'root',
+group   => 'root',
+subscribe   => Git::Clone['research/recommendation-api/wheels'],
+refreshonly => true,
+}
+
+uwsgi::app { 'recommendation_api':
+settings => {
+uwsgi => {
+'plugin'  => 'python3',
+'wsgi-file'   => 
"${core_dir}/recommendation/data/recommendation.wsgi",
+'master'  => true,
+'chdir'   => $core_dir,
+'http-socket' => '0.0.0.0:8080',
+'socket'  => '/run/uwsgi/recommendation_api.sock',
+'pythonpath'  => $lib_dir,
+'processes'   => inline_template('<%= @processorcount.to_i 
%>'),
+}
+},
+require  => [
+Exec['pip_install_wheels'],
+Git::Clone['research/recommendation-api'],
+],
+}
+}
diff --git a/modules/role/templates/apache/sites/recommendation_api.erb 
b/modules/role/templates/apache/sites/recommendation_api.erb
new file mode 100644
index 000..4793140
--- /dev/null
+++ b/modules/role/templates/apache/sites/recommendation_api.erb
@@ -0,0 +1,5 @@
+
+ServerName recommendation-api
+uWSGIsocket /run/uwsgi/recommendation_api.sock
+SetHandler uwsgi-handler
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5db926def3c5d1933ea0d284d540a9e99e18613
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Nschaaf 
Gerrit-Reviewer: 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Section editing in NWE

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

Change subject: Section editing in NWE
..


Section editing in NWE

Bug: T144654
Change-Id: Ida6e721e0d980b47e3fda6a1f0744cbce1b2235a
---
M ApiVisualEditor.php
M ApiVisualEditorEdit.php
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopWikitextArticleTarget.js
M modules/ve-mw/init/ve.init.MWVESwitchConfirmDialog.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/init/ve.init.mw.ArticleTargetLoader.js
10 files changed, 122 insertions(+), 55 deletions(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 960edf5..a79d5ee 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -190,13 +190,15 @@
);
}
 
-   protected function diffWikitext( $title, $wikitext ) {
+   protected function diffWikitext( $title, $wikitext, $section = null ) {
$apiParams = [
'action' => 'query',
'prop' => 'revisions',
'titles' => $title->getPrefixedDBkey(),
-   'rvdifftotext' => $this->pstWikitext( $title, $wikitext 
)
+   'rvdifftotext' => $this->pstWikitext( $title, $wikitext 
),
+   'rvsection' => $section
];
+
$api = new ApiMain(
new DerivativeRequest(
$this->getRequest(),
@@ -345,6 +347,11 @@
'prop' => 'revisions',
'rvprop' => 'content'
];
+
+   if ( isset( $params['section'] 
) ) {
+   $apiParams['rvsection'] 
= $params['section'];
+   }
+
$api = new ApiMain(
new DerivativeRequest(

$this->getRequest(),
@@ -623,7 +630,8 @@
}
}
 
-   $diff = $this->diffWikitext( $title, $wikitext 
);
+   $section = isset( $params['section'] ) ? 
$params['section'] : null;
+   $diff = $this->diffWikitext( $title, $wikitext, 
$section );
if ( $diff['result'] === 'fail' ) {
$this->dieUsage( 'Diff failed', 
'difffailed' );
}
@@ -759,6 +767,7 @@
],
],
'wikitext' => null,
+   'section' => null,
'oldid' => null,
'html' => null,
'etag' => null,
diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index d7bee07..c52112f 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -252,6 +252,7 @@
ApiBase::PARAM_REQUIRED => true,
],
'wikitext' => null,
+   'section' => null,
'basetimestamp' => null,
'starttimestamp' => null,
'oldid' => null,
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index f58cb81..570d4cc 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -28,6 +28,7 @@
"apihelp-visualeditor-param-paction": "Action to perform.",
"apihelp-visualeditor-param-page": "The page to perform actions on.",
"apihelp-visualeditor-param-pst": "Pre-save transform wikitext before 
sending it to Parsoid (paction=parsefragment).",
+   "apihelp-visualeditor-param-section": "The section on which to act.",
"apihelp-visualeditor-param-starttimestamp": "When saving, set this to 
the timestamp of when the page was loaded. Used to detect edit conflicts.",
"apihelp-visualeditor-param-wikitext": "Wikitext to send to Parsoid to 
convert to HTML (paction=parsefragment).",
"apihelp-visualeditoredit-description": "Save an HTML5 page to 
MediaWiki (converted to wikitext via the Parsoid service).",
@@ -41,6 +42,7 @@
"apihelp-visualeditoredit-param-needcheck": "When saving, set this 
parameter if the revision might have roundtrip problems. This will result in 
the edit being tagged.",

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add EditActionHookHandler in client to inject entity usage data

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

Change subject: Add EditActionHookHandler in client to inject entity usage data
..


Add EditActionHookHandler in client to inject entity usage data

Bug: T144921
Change-Id: I1f1fad785545be475f1db8c12d1647ec449a29d7
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
M client/i18n/qqq.json
A client/includes/Hooks/EditActionHookHandler.php
M client/resources/Resources.php
A client/resources/wikibase.client.action.edit.collapsibleFooter.js
A client/tests/phpunit/includes/Hooks/EditActionHookHandlerTest.php
7 files changed, 538 insertions(+), 2 deletions(-)

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



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 1a5ee70..14a013a 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -6,6 +6,7 @@
 use BaseTemplate;
 use ChangesList;
 use EchoEvent;
+use EditPage;
 use IContextSource;
 use Message;
 use OutputPage;
@@ -22,6 +23,7 @@
 use Wikibase\Client\Hooks\BeforePageDisplayHandler;
 use Wikibase\Client\Hooks\DeletePageNoticeCreator;
 use Wikibase\Client\Hooks\EchoNotificationsHandlers;
+use Wikibase\Client\Hooks\EditActionHookHandler;
 use Wikibase\Client\Hooks\InfoActionHookHandler;
 use Wikibase\Client\RecentChanges\ChangeLineFormatter;
 use Wikibase\Client\RecentChanges\ExternalChangeFactory;
@@ -438,6 +440,28 @@
}
 
/**
+* Adds the Entity usage data in ActionEdit
+*
+* @param EditPage $editor
+* @param string[] $checkboxes
+* @param int $tabindex
+*/
+   public static function onEditAction( EditPage &$editor, array 
&$checkboxes, &$tabindex ) {
+   if ( $editor->preview || $editor->section ) {
+   // Shorten out, like template transclusion in core
+   return;
+   }
+
+   $editActionHookHandler = 
EditActionHookHandler::newFromGlobalState(
+   $editor->getContext()
+   );
+   $editActionHookHandler->handle( $editor );
+
+   $out = $editor->getContext()->getOutput();
+   $out->addModules( 
'wikibase.client.action.edit.collapsibleFooter' );
+   }
+
+   /**
 * Notify the user that we have automatically updated the repo or that 
they
 * need to do that per hand.
 *
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 7b34a44..6df21ae 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -122,6 +122,7 @@
$wgHooks['BeforePageDisplay'][] = 
'\Wikibase\ClientHooks::onBeforePageDisplayAddJsConfig';
$wgHooks['ScribuntoExternalLibraries'][] = 
'\Wikibase\ClientHooks::onScribuntoExternalLibraries';
$wgHooks['InfoAction'][] = '\Wikibase\ClientHooks::onInfoAction';
+   $wgHooks['EditPageBeforeEditChecks'][] = 
'\Wikibase\ClientHooks::onEditAction';
$wgHooks['BaseTemplateAfterPortlet'][] = 
'\Wikibase\ClientHooks::onBaseTemplateAfterPortlet';
$wgHooks['GetBetaFeaturePreferences'][] = 
'\Wikibase\ClientHooks::onGetBetaFeaturePreferences';
$wgHooks['ArticleDeleteAfterSuccess'][] = 
'\Wikibase\ClientHooks::onArticleDeleteAfterSuccess';
diff --git a/client/i18n/qqq.json b/client/i18n/qqq.json
index 012b245..6bb1a02 100644
--- a/client/i18n/qqq.json
+++ b/client/i18n/qqq.json
@@ -110,7 +110,7 @@
"wikibase-entityusage-submit": "Label for the button that activates the 
action",
"wikibase-pageinfo-entity-id": "A link to the corresponding Wikibase 
Item",
"wikibase-pageinfo-entity-id-none": "The page is not linked with a 
wikibase item.\n{{Identical|None}}",
-   "wikibase-pageinfo-entity-usage": "Desciption in action=info about 
entities used in the page",
+   "wikibase-pageinfo-entity-usage": "Desciption in action=info and 
action=edit about entities used in the page",
"wikibase-pageinfo-entity-usage-S": "Name for ''sitelink'' entity 
usage",
"wikibase-pageinfo-entity-usage-L": "Name for ''label'' entity 
usage\n{{Identical|Label}}",
"wikibase-pageinfo-entity-usage-T": "Name for ''title'' entity 
usage\n{{Identical|Title}}",
diff --git a/client/includes/Hooks/EditActionHookHandler.php 
b/client/includes/Hooks/EditActionHookHandler.php
new file mode 100644
index 000..c25ad2e
--- /dev/null
+++ b/client/includes/Hooks/EditActionHookHandler.php
@@ -0,0 +1,179 @@
+
+ */
+class EditActionHookHandler {
+
+   /**
+* @var RepoLinker
+*/
+   private $repoLinker;
+
+   /**
+* @var UsageLookup
+*/
+   private $usageLookup;
+
+   /**
+* @var LanguageFallbackLabelDescriptionLookupFactory
+*/
+   private $labelDescriptionLookupFactory;
+
+   /**
+* @var EntityIdParser
+*/
+   private 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix sanitizing of query value in media search

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

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

Change subject: Fix sanitizing of query value in media search
..

Fix sanitizing of query value in media search

Always use #getQueryValue which trims whitespace, so we
don't pass whitespace to the API.

Also rename some variables for clarity, and remove some
unused arguments.

Change-Id: I0d27f59488295bc1c398d0fd287e3e16a3f5aaec
---
M modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
1 file changed, 21 insertions(+), 12 deletions(-)


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

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
index 59cde6d..b00e5c3 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWMediaSearchWidget.js
@@ -26,7 +26,7 @@
 
// Properties
this.providers = {};
-   this.searchValue = '';
+   this.lastQueryValue = '';
this.searchQueue = new ve.dm.MWMediaSearchQueue( {
limit: this.constructor.static.limit,
threshold: this.constructor.static.threshold
@@ -86,8 +86,7 @@
  * be updated.
  */
 ve.ui.MWMediaSearchWidget.prototype.afterResultsResize = function () {
-   var items = this.currentItemCache,
-   value = this.query.getValue();
+   var items = this.currentItemCache;
 
if (
items.length > 0 &&
@@ -98,7 +97,7 @@
) {
this.resetRows();
this.itemCache = {};
-   this.processQueueResults( items, value );
+   this.processQueueResults( items );
if ( this.results.getItems().length > 0 ) {
this.lazyLoadResults();
}
@@ -132,7 +131,7 @@
  */
 ve.ui.MWMediaSearchWidget.prototype.queryMediaQueue = function () {
var search = this,
-   value = this.query.getValue();
+   value = this.getQueryValue();
 
if ( value === '' ) {
return;
@@ -145,7 +144,7 @@
this.searchQueue.get( this.constructor.static.limit )
.then( function ( items ) {
if ( items.length > 0 ) {
-   search.processQueueResults( items, value );
+   search.processQueueResults( items );
search.currentItemCache = 
search.currentItemCache.concat( items );
}
 
@@ -167,7 +166,7 @@
 ve.ui.MWMediaSearchWidget.prototype.processQueueResults = function ( items ) {
var i, len, title,
resultWidgets = [],
-   inputSearchQuery = this.query.getValue(),
+   inputSearchQuery = this.getQueryValue(),
queueSearchQuery = this.searchQueue.getSearchQuery();
 
if ( inputSearchQuery === '' || queueSearchQuery !== inputSearchQuery ) 
{
@@ -195,17 +194,26 @@
 };
 
 /**
+ * Get the sanitized query value from the input
+ *
+ * @return {string} Query value
+ */
+ve.ui.MWMediaSearchWidget.prototype.getQueryValue = function () {
+   return this.query.getValue().trim();
+};
+
+/**
  * Handle search value change
  *
  * @param {string} value New value
  */
-ve.ui.MWMediaSearchWidget.prototype.onQueryChange = function ( value ) {
-   var trimmed = value.trim();
+ve.ui.MWMediaSearchWidget.prototype.onQueryChange = function () {
+   // Get the sanitized query value
+   var queryValue = this.getQueryValue();
 
-   if ( trimmed === this.searchValue ) {
+   if ( queryValue === this.lastQueryValue ) {
return;
}
-   this.searchValue = trimmed;
 
// Parent method
ve.ui.MWMediaSearchWidget.super.prototype.onQueryChange.apply( this, 
arguments );
@@ -219,7 +227,8 @@
this.layoutQueue = [];
 
// Change resource queue query
-   this.searchQueue.setSearchQuery( this.searchValue );
+   this.searchQueue.setSearchQuery( queryValue );
+   this.lastQueryValue = queryValue;
 
// Queue
clearTimeout( this.queryTimeout );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make TransactionProfiler::setSilenced() calls handle nesting

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

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

Change subject: Make TransactionProfiler::setSilenced() calls handle nesting
..

Make TransactionProfiler::setSilenced() calls handle nesting

Change-Id: I6511a72a0fb921468a8a19ceb4d0a8ae669aa6e4
---
M includes/auth/AuthManager.php
M includes/libs/rdbms/TransactionProfiler.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M includes/specials/SpecialConfirmemail.php
M includes/specials/SpecialEmailInvalidate.php
5 files changed, 14 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/315614/1

diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php
index e223e16..eeb233e 100644
--- a/includes/auth/AuthManager.php
+++ b/includes/auth/AuthManager.php
@@ -1678,7 +1678,7 @@
 
// Ignore warnings about master connections/writes...hard to 
avoid here
$trxProfiler = \Profiler::instance()->getTransactionProfiler();
-   $trxProfiler->setSilenced( true );
+   $old = $trxProfiler->setSilenced( true );
try {
$status = $user->addToDatabase();
if ( !$status->isOK() ) {
@@ -1704,7 +1704,7 @@
return $status;
}
} catch ( \Exception $ex ) {
-   $trxProfiler->setSilenced( false );
+   $trxProfiler->setSilenced( $old );
$this->logger->error( __METHOD__ . ': {username} failed 
with exception {exception}', [
'username' => $username,
'exception' => $ex,
@@ -1743,7 +1743,7 @@
$logEntry->insert();
}
 
-   $trxProfiler->setSilenced( false );
+   $trxProfiler->setSilenced( $old );
 
if ( $login ) {
$this->setSessionDataForUser( $user );
diff --git a/includes/libs/rdbms/TransactionProfiler.php 
b/includes/libs/rdbms/TransactionProfiler.php
index 12f6df5..bf5e299 100644
--- a/includes/libs/rdbms/TransactionProfiler.php
+++ b/includes/libs/rdbms/TransactionProfiler.php
@@ -80,11 +80,15 @@
}
 
/**
-* @param bool $value
+* @param bool $value New value
+* @return bool Old value
 * @since 1.28
 */
public function setSilenced( $value ) {
+   $old = $this->silenced;
$this->silenced = $value;
+
+   return $old;
}
 
/**
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index 083dcd6..32df19d 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -1324,7 +1324,7 @@
$cache->makeGlobalKey( __CLASS__, 'server-read-only', 
$masterServer ),
self::TTL_CACHE_READONLY,
function () use ( $domain, $conn ) {
-   $this->trxProfiler->setSilenced( true );
+   $old = $this->trxProfiler->setSilenced( true );
try {
$dbw = $conn ?: $this->getConnection( 
self::DB_MASTER, [], $domain );
$readOnly = 
(int)$dbw->serverIsReadOnly();
@@ -1334,7 +1334,7 @@
} catch ( DBError $e ) {
$readOnly = 0;
}
-   $this->trxProfiler->setSilenced( false );
+   $this->trxProfiler->setSilenced( $old );
return $readOnly;
},
[ 'pcTTL' => $cache::TTL_PROC_LONG, 'busyValue' => 0 ]
diff --git a/includes/specials/SpecialConfirmemail.php 
b/includes/specials/SpecialConfirmemail.php
index 7b4e9db..f494b9d 100644
--- a/includes/specials/SpecialConfirmemail.php
+++ b/includes/specials/SpecialConfirmemail.php
@@ -69,9 +69,9 @@
$this->getOutput()->addWikiMsg( 
'confirmemail_noemail' );
}
} else {
-   $trxProfiler->setSilenced( true );
+   $old = $trxProfiler->setSilenced( true );
$this->attemptConfirm( $code );
-   $trxProfiler->setSilenced( false );
+   $trxProfiler->setSilenced( $old );
}
}
 
diff --git a/includes/specials/SpecialEmailInvalidate.php 
b/includes/specials/SpecialEmailInvalidate.php
index d2e3e7f..c54abad 100644
--- a/includes/specials/SpecialEmailInvalidate.php
+++ b/includes/specials/SpecialEmailInvalidate.php

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src to 63f1e151 for next week's deploy

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

Change subject: Bump src to 63f1e151 for next week's deploy
..


Bump src to 63f1e151 for next week's deploy

* Required to enable Parsoid for olowiki

Change-Id: Ib7db916f591825701bca8122b096e0fd3be81a3f
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index a802de0..63f1e15 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit a802de0b2d36d6a02aa987749fa0237be557bf90
+Subproject commit 63f1e1512785d31a15f97210fce14b715dfd1a95

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7db916f591825701bca8122b096e0fd3be81a3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
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...ORES[master]: Fix LTR beta features screenshot

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

Change subject: Fix LTR beta features screenshot
..


Fix LTR beta features screenshot

Internal flipping was broken after SVGO compression.

Change-Id: I4884ef1258acddcc77dd1a8814ff5cd43185b10f
---
M images/ORES-beta-features-ltr.svg
1 file changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/images/ORES-beta-features-ltr.svg 
b/images/ORES-beta-features-ltr.svg
index fa8248e..c4adef1 100644
--- a/images/ORES-beta-features-ltr.svg
+++ b/images/ORES-beta-features-ltr.svg
@@ -2,37 +2,37 @@
 http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
 
 
-
+
 
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
 
-
+
 
 
 
-
-
-
-
+
+
+
+
 
-
-
-
-
-
-
+
+
+
+
+
+
 
-
-
-
-
-
+
+
+
+
+
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4884ef1258acddcc77dd1a8814ff5cd43185b10f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Ladsgroup 
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...parsoid[master]: T141905: Fix crasher and other bugs of that category

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

Change subject: T141905: Fix crasher and other bugs of that category
..


T141905: Fix crasher and other bugs of that category

 * Only transclusions have parts.

 * Should we even be marking up mw:Params?

 * From 
/ar.wikipedia.org/v3/page/html/%D9%86%D9%82%D8%A7%D8%B4_%D8%A7%D9%84%D9%85%D8%B3%D8%AA%D8%AE%D8%AF%D9%85:TheEgyptian/17688207

Change-Id: I7e18f52b67f51bcb1ecd2c04257dbcc5ac5ba755
---
M lib/wt2html/pp/handlers/handleLinkNeighbours.js
M lib/wt2html/pp/handlers/tableFixups.js
2 files changed, 7 insertions(+), 5 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/handleLinkNeighbours.js 
b/lib/wt2html/pp/handlers/handleLinkNeighbours.js
index c7a98dc..ae8087c 100644
--- a/lib/wt2html/pp/handlers/handleLinkNeighbours.js
+++ b/lib/wt2html/pp/handlers/handleLinkNeighbours.js
@@ -117,7 +117,6 @@
  */
 var linkTypes = new Set([ 'mw:ExtLink', 'mw:WikiLink' ]);
 function handleLinkNeighbours(node, env) {
-
var rel = node.getAttribute('rel');
if (!linkTypes.has(rel)) {
return true;
@@ -138,7 +137,7 @@
}
if (prefix.src.length > 0) {
dp.prefix = prefix.src;
-   if (DU.isFirstEncapsulationWrapperNode(node)) {
+   if 
(/(?:^|\s)mw:Transclusion(?:\s|$)/.test(node.getAttribute('typeof'))) {
// only necessary if we're the first
dataMW = DU.getDataMw(node);
dataMW.parts.unshift(prefix.src);
@@ -164,7 +163,8 @@
// only if we're the last. otherwise can assume
// template encapsulation will handle it
var wrapper = 
DU.findFirstEncapsulationWrapperNode(node);
-   if (wrapper !== null) {
+   if (wrapper !== null &&
+   
/(?:^|\s)mw:Transclusion(?:\s|$)/.test(wrapper.getAttribute('typeof'))) {
dataMW = DU.getDataMw(wrapper);
dataMW.parts.push(trail.src);
}
diff --git a/lib/wt2html/pp/handlers/tableFixups.js 
b/lib/wt2html/pp/handlers/tableFixups.js
index 101f936..17fb389 100644
--- a/lib/wt2html/pp/handlers/tableFixups.js
+++ b/lib/wt2html/pp/handlers/tableFixups.js
@@ -52,7 +52,7 @@
!DU.isLiteralHTMLNode(nextNode) &&
DU.nodeEssentiallyEmpty(node) &&
(// FIXME: will not be set for nested templates
-   DU.isFirstEncapsulationWrapperNode(nextNode) ||
+   
/(?:^|\s)mw:Transclusion(?:\s|$)/.test(nextNode.getAttribute('typeof')) ||
// Hacky work-around for nested templates
/^{{.*?}}$/.test(DU.getDataParsoid(nextNode).src))
) {
@@ -375,7 +375,9 @@
 
if (!hasAttrs) {
about = node.getAttribute("about");
-   var templateWrapper = about && Util.isParsoidObjectId(about) ? 
node : null;
+   var typeOf = node.getAttribute('typeof');
+   var templateWrapper = 
/(?:^|\s)mw:Transclusion(?:\s|$)/.test(typeOf) ?
+   node : null;
this.reparseTemplatedAttributes(env, node, templateWrapper);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e18f52b67f51bcb1ecd2c04257dbcc5ac5ba755
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Don't strip empty paragraphs on paste if they are generated

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

Change subject: Don't strip empty paragraphs on paste if they are generated
..


Don't strip empty paragraphs on paste if they are generated

Bug: T147949
Change-Id: I36547da07294bfc138c71f37533f6e5e0bd6e5e5
---
M src/dm/lineardata/ve.dm.ElementLinearData.js
M tests/dm/lineardata/ve.dm.ElementLinearData.test.js
2 files changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js 
b/src/dm/lineardata/ve.dm.ElementLinearData.js
index 4485d41..b080ed7 100644
--- a/src/dm/lineardata/ve.dm.ElementLinearData.js
+++ b/src/dm/lineardata/ve.dm.ElementLinearData.js
@@ -1126,6 +1126,7 @@
if (
!rules.keepEmptyContentBranches &&
i > 0 && !isOpen && this.isOpenElementData( i - 
1 ) &&
+   !ve.getProp( this.getData( i - 1 ), 'internal', 
'generated' ) &&
canContainContent
) {
this.splice( i - 1, 2 );
diff --git a/tests/dm/lineardata/ve.dm.ElementLinearData.test.js 
b/tests/dm/lineardata/ve.dm.ElementLinearData.test.js
index e65456a..8d4f48a 100644
--- a/tests/dm/lineardata/ve.dm.ElementLinearData.test.js
+++ b/tests/dm/lineardata/ve.dm.ElementLinearData.test.js
@@ -1623,6 +1623,20 @@
msg: 'Empty content nodes are stripped'
},
{
+   html: '',
+   data: [
+   { type: 'list', attributes: { style: 
'bullet' } },
+   { type: 'listItem' },
+   { type: 'paragraph', internal: { 
generated: 'empty' } },
+   { type: '/paragraph' },
+   { type: '/listItem' },
+   { type: '/list' },
+   { type: 'internalList' },
+   { type: '/internalList' }
+   ],
+   msg: 'Empty, but generated, content nodes are 
preserved'
+   },
+   {
html: 'Foo',
data: [
{ type: 'paragraph' },

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Balancer: remove unnecessary extra argument

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

Change subject: Balancer: remove unnecessary extra argument
..


Balancer: remove unnecessary extra argument

The full HTML5 spec clones element attributes when they are added to
the ActiveFormattingElements list, so that when an element on that
list is later cloned and reinserted the attributes are the *original*
attributes, not reflecting any changes which embedded JavaScript
in an inline 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Restore 'end/response' log event

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

Change subject: Restore 'end/response' log event
..


Restore 'end/response' log event

This is used to send the buffered lint log messages (introduced in
5afb107db58e) and was probably lost in refactoring.

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

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



diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 5996352..175c375 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -82,6 +82,8 @@
res.status(status);
}
res.send(body);
+   // Flush log buffer for linter
+   env.log('end/response');
}
 };
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4f3a02cfb08f51d824e674556b2fb617aeb05f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix subscr_cancel error

2016-10-12 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: Fix subscr_cancel error
..

Fix subscr_cancel error

Also fix the way the test loops over the different transactions. It's
pretty pathetic that it didn't occur to me that I was just overwriting
keys and not testing duplicates ¯\_(ツ)_/¯

Change-Id: I927127e59ff86a9dfac0e58065acf8c170e073dd
---
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
2 files changed, 19 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/13/315613/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index bafbd2d..18901bd 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -100,7 +100,7 @@
->push( $new_msg );
 
// FIXME random document formats
-   if ( $txn_type === 'subscr_signup' ) {
+   if ( substr( $txn_type, 0, 7 ) === 'subscr_' ) {
$log_id = "subscr_id:{$request['subscr_id']}";
} else {
$log_id = "txn_id:{$request['txn_id']}";
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
index ae2cbac..d2d4bac 100644
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
@@ -25,10 +25,10 @@
static $fail_verification = false;
 
static $message_locations = array(
-   'verified' => 'web_accept.json',
-   'recurring' => 'subscr_signup.json',
-   'recurring' => 'subscr_payment.json',
-   'refund' => 'refund.json',
+   'web_accept.json' => 'verified',
+   'subscr_signup.json' => 'recurring',
+   'subscr_payment.json' => 'recurring',
+   'refund.json' => 'refund'
);
 
static $messages = array();
@@ -42,10 +42,13 @@
->createTable( 'jobs-paypal' );
 
Context::initWithLogger( $this->config );
-   foreach ( self::$message_locations as $type => $file ) {
-   self::$messages[$type] = json_decode(
-   file_get_contents( __DIR__ . '/../Data/' . 
$file ),
-   true
+   foreach ( self::$message_locations as $file => $type ) {
+   self::$messages[] = array(
+   'type' => $type,
+   'payload' => json_decode(
+   file_get_contents( __DIR__ . 
'/../Data/' . $file ),
+   true
+   )
);
}
}
@@ -58,9 +61,9 @@
}
 
public function testCapture() {
-   foreach ( self::$messages as $type => $msg ) {
+   foreach ( self::$messages as $msg ) {
 
-   $this->capture( $msg );
+   $this->capture( $msg['payload'] );
 
$jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
$jobMessage = $jobQueue->pop();
@@ -68,8 +71,7 @@
$this->assertEquals( $jobMessage['php-message-class'],
'SmashPig\PaymentProviders\PayPal\Job' );
 
-   $this->assertEquals( $jobMessage['payload'], $msg );
-
+   $this->assertEquals( $jobMessage['payload'], 
$msg['payload'] );
}
}
 
@@ -80,8 +82,8 @@
}
 
public function testConsume() {
-   foreach ( self::$messages as $type => $msg ) {
-   $this->capture( $msg );
+   foreach ( self::$messages as $msg ) {
+   $this->capture( $msg['payload'] );
 
$jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
$jobMessage = $jobQueue->pop();
@@ -93,8 +95,8 @@
 
$job->execute();
 
-   $queue = $this->config->object( 'data-store/' . $type );
-   $queue->createTable( $type );
+   $queue = $this->config->object( 'data-store/' . 
$msg['type'] );
+   $queue->createTable( $msg['type'] );
$message = $queue->pop();
 
$this->assertNotEmpty( $message );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I927127e59ff86a9dfac0e58065acf8c170e073dd
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Stop asserting that we'll never be encapsulating a flipped r...

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

Change subject: Stop asserting that we'll never be encapsulating a flipped range
..


Stop asserting that we'll never be encapsulating a flipped range

 * Follow up to 8976ab9, where the story isn't exactly right.

 * Avoids triggering the assertion in,
   /es.wikipedia.org/v3/page/html/Línea_B_(Subte_de_Buenos_Aires)/91283888

 * The conclusion of the long comment in the patch is that we need to
   either,

   1) Fix up encapsulateTemplates() to handle flipped ranges in the
  really edgy case they occur,

   2) Or, emit foster boxes even in transclusion, since they may be
  fostering their own closing meta.  Try, {{1x|}}

 * Of course, this is all very broken wikitext,
   
https://es.wikipedia.org/w/index.php?title=L%C3%ADnea_B_%28Subte_de_Buenos_Aires%29=revision=91283888=91283810

Bug: T141905
Change-Id: Ib963191c4b47205ffda711570a38302d3140c6ca
---
M lib/wt2html/pp/processors/wrapTemplates.js
1 file changed, 42 insertions(+), 5 deletions(-)

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



diff --git a/lib/wt2html/pp/processors/wrapTemplates.js 
b/lib/wt2html/pp/processors/wrapTemplates.js
index 68db119..a105ce6 100644
--- a/lib/wt2html/pp/processors/wrapTemplates.js
+++ b/lib/wt2html/pp/processors/wrapTemplates.js
@@ -604,12 +604,49 @@
for (var i = 0; i < numRanges; i++) {
var range = tplRanges[i];
 
-   expandRangeToAvoidSpanWrapping(range);
+   // We should never have flipped overlapping ranges, and indeed 
that's
+   // asserted in `findTopLevelNonOverlappingRanges`.  Flipping 
results
+   // in either completely nested ranges, or non-intersecting 
ranges.
+   //
+   // If the table causing the fostering is not transcluded, we 
emit a
+   // foster box and wrap the whole table+fb in metas, producing 
nested
+   // ranges.  For ex,
+   //
+   //   
+   //   {{1x|}}
+   //
+   // The tricky part is when the table *is* transcluded, and we 
omit the
+   // foster box.  The common case (for some definition of common) 
might
+   // be like,
+   //
+   //   {{1x|}}
+   //   {{1x|}}
+   //
+   // Here, #mwt1 leaves a table open and the end meta from #mwt2 
is
+   // fostered, since it gets closed into the div.  The range for 
#mwt1
+   // is the entire table, which thankfully contains #mwt2, so we 
still
+   // have the expected entire neseting.  Any tricks to extend the 
range
+   // of #mwt2 beyond the table so that we have an overlapping 
range will
+   // ineviatbly result in the end meta not being fostered, and we 
avoid
+   // this situation altogether.
+   //
+   // The very edgy case is as follows,
+   //
+   //   {{1x|}}
+   //   {{1x|}}
+   //
+   // where both end metas are fostered.  Ignoring that we don't 
even
+   // roundtrip the first transclusion properly on its own, here 
we have
+   // a flipped range where, since the end meta for the first 
range was
+   // also fostered, the ranges still don't overlap.
 
-   // If transcluded content ends up in the foster box, we wrap 
the whole
-   // table+fb in metas, so `findTopLevelNonOverlappingRanges` 
should
-   // only produce non-flipped ranges.
-   console.assert(!range.flipped, 'Encapsulating a flipped 
range.');
+   if (range.flipped) {
+   // FIXME: The code below needs to be aware of flipped 
ranges.
+   env.log('warning/template',
+   'Encapsulating a flipped range: ' + range.id);
+   }
+
+   expandRangeToAvoidSpanWrapping(range);
 
var n = range.start;
var e = range.end;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib963191c4b47205ffda711570a38302d3140c6ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Fix LTR beta features screenshot

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

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

Change subject: Fix LTR beta features screenshot
..

Fix LTR beta features screenshot

Internal flipping was broken after SVGO compression.

Change-Id: I4884ef1258acddcc77dd1a8814ff5cd43185b10f
---
M images/ORES-beta-features-ltr.svg
1 file changed, 24 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/12/315612/1

diff --git a/images/ORES-beta-features-ltr.svg 
b/images/ORES-beta-features-ltr.svg
index fa8248e..c4adef1 100644
--- a/images/ORES-beta-features-ltr.svg
+++ b/images/ORES-beta-features-ltr.svg
@@ -2,37 +2,37 @@
 http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
 
 
-
+
 
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
 
-
+
 
 
 
-
-
-
-
+
+
+
+
 
-
-
-
-
-
-
+
+
+
+
+
+
 
-
-
-
-
-
+
+
+
+
+
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4884ef1258acddcc77dd1a8814ff5cd43185b10f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: mw.LinkCache: Links aren't missing if they're known

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

Change subject: mw.LinkCache: Links aren't missing if they're known
..


mw.LinkCache: Links aren't missing if they're known

Thanks to new sparkly API data.

Bug: T72123
Change-Id: I9d4ff14bb2e81404224819c9153a7b8d86ca6f11
---
M modules/ve-mw/init/ve.init.mw.LinkCache.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.LinkCache.js 
b/modules/ve-mw/init/ve.init.mw.LinkCache.js
index f2d01af..cf2c67b 100644
--- a/modules/ve-mw/init/ve.init.mw.LinkCache.js
+++ b/modules/ve-mw/init/ve.init.mw.LinkCache.js
@@ -51,6 +51,7 @@
 ve.init.mw.LinkCache.static.processPage = function ( page ) {
return {
missing: page.missing !== undefined,
+   known: page.known !== undefined,
redirect: page.redirect !== undefined,
disambiguation: ve.getProp( page, 'pageprops', 'disambiguation' 
) !== undefined,
imageUrl: ve.getProp( page, 'thumbnail', 'source' ),
@@ -78,7 +79,7 @@
}
 
promise.done( function ( data ) {
-   if ( data.missing ) {
+   if ( data.missing && !data.known ) {
$element.addClass( 'new' );
} else {
// Provided by core MediaWiki, no styles by default.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d4ff14bb2e81404224819c9153a7b8d86ca6f11
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Set gallery dialog to larger size when search panel is focused

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

Change subject: Set gallery dialog to larger size when search panel is focused
..


Set gallery dialog to larger size when search panel is focused

Bug: T145246
Change-Id: I49b218f704d31b4f699fe39f414a84abbfffc093
---
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
1 file changed, 18 insertions(+), 4 deletions(-)

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



diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
index bfd54f1..2669bd7 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
@@ -42,7 +42,7 @@
  * @inheritdoc
  */
 ve.ui.MWGalleryDialog.prototype.initialize = function () {
-   var indexLayout, imagesCard, optionsCard, menuLayout, menuPanel,
+   var imagesCard, optionsCard, menuLayout, menuPanel,
modeField, captionField, widthsField, heightsField,
perrowField, showFilenameField, classesField, stylesField;
 
@@ -57,7 +57,7 @@
this.defaults = mw.config.get( 'wgVisualEditorConfig' ).galleryOptions;
 
// Images and options cards
-   indexLayout = new OO.ui.IndexLayout( {
+   this.indexLayout = new OO.ui.IndexLayout( {
scrollable: false,
expanded: true
} );
@@ -244,11 +244,11 @@
classesField.$element,
stylesField.$element
);
-   indexLayout.addCards( [
+   this.indexLayout.addCards( [
imagesCard,
optionsCard
] );
-   this.$body.append( indexLayout.$element );
+   this.$body.append( this.indexLayout.$element );
 };
 
 /**
@@ -348,6 +348,7 @@
this.stylesInput.setValue( styles );
 
// Add event handlers
+   this.indexLayout.connect( this, { set: 
'updateDialogSize' } );
this.searchWidget.getResults().connect( this, { choose: 
'onSearchResultsChoose' } );
this.showSearchPanelButton.connect( this, { click: 
'onShowSearchPanelButtonClick' } );
this.galleryGroup.connect( this, { editItem: 
'onHighlightItem' } );
@@ -383,6 +384,7 @@
this.searchPanelVisible = false;
 
// Disconnect events
+   this.indexLayout.disconnect( this );
this.searchWidget.getResults().disconnect( this );
this.showSearchPanelButton.disconnect( this );
this.galleryGroup.disconnect( this );
@@ -581,6 +583,18 @@
} else {
this.searchWidget.getQuery().focus().select();
}
+   this.updateDialogSize();
+};
+
+/**
+ * Resize the dialog according to which panel is focused
+ */
+ve.ui.MWGalleryDialog.prototype.updateDialogSize = function () {
+   if ( this.searchPanelVisible && this.indexLayout.currentCardName === 
'images' ) {
+   this.setSize( 'larger' );
+   } else {
+   this.setSize( 'large' );
+   }
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49b218f704d31b4f699fe39f414a84abbfffc093
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: CapsuleMultiselectWidget: Add placeholder option

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

Change subject: CapsuleMultiselectWidget: Add placeholder option
..


CapsuleMultiselectWidget: Add placeholder option

Bug: T147813
Change-Id: If665d261ddba54b8b237c5c3080ecfdc05b14e11
---
M demos/pages/widgets.js
M src/widgets/CapsuleMultiselectWidget.js
2 files changed, 48 insertions(+), 4 deletions(-)

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



diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 2ab84bb..b9d6b08 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1370,6 +1370,25 @@
),
new OO.ui.FieldLayout(
new OO.ui.CapsuleMultiselectWidget( {
+   placeholder: 'Type like a 
cat...',
+   menu: {
+   items: [
+   new 
OO.ui.MenuOptionWidget( { data: 'abc', label: 'Label for abc' } ),
+   new 
OO.ui.MenuOptionWidget( { data: 'asd', label: 'Label for asd' } ),
+   new 
OO.ui.MenuOptionWidget( { data: 'jkl', label: 'Label for jkl' } ),
+   new 
OO.ui.MenuOptionWidget( { data: 'jjj', label: 'Label for jjj' } ),
+   new 
OO.ui.MenuOptionWidget( { data: 'zxc', label: 'Label for zxc' } ),
+   new 
OO.ui.MenuOptionWidget( { data: 'vbn', label: 'Label for vbn' } )
+   ]
+   }
+   } ),
+   {
+   label: 
'CapsuleMultiselectWidget (with placeholder)',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.CapsuleMultiselectWidget( {
allowArbitrary: true,
icon: 'tag',
indicator: 'required',
diff --git a/src/widgets/CapsuleMultiselectWidget.js 
b/src/widgets/CapsuleMultiselectWidget.js
index 4a5b682..f7bc973 100644
--- a/src/widgets/CapsuleMultiselectWidget.js
+++ b/src/widgets/CapsuleMultiselectWidget.js
@@ -50,6 +50,7 @@
  *
  * @constructor
  * @param {Object} [config] Configuration options
+ * @cfg {string} [placeholder] Placeholder text
  * @cfg {boolean} [allowArbitrary=false] Allow data items to be added even if 
not present in the menu.
  * @cfg {Object} [menu] (required) Configuration options to pass to the
  *  {@link OO.ui.MenuSelectWidget menu select widget}.
@@ -76,8 +77,11 @@
}, config );
 
// Properties (must be set before mixin constructor calls)
-   this.$input = config.popup ? null : $( '' );
this.$handle = $( '' );
+   this.$input = config.popup ? null : $( '' );
+   if ( config.placeholder !== undefined && config.placeholder !== '' ) {
+   this.$input.attr( 'placeholder', config.placeholder );
+   }
 
// Mixin constructors
OO.ui.mixin.GroupElement.call( this, config );
@@ -153,7 +157,6 @@
role: 'combobox',
'aria-autocomplete': 'list'
} );
-   this.updateInputSize();
}
if ( config.data ) {
this.setItemsFromData( config.data );
@@ -172,6 +175,14 @@
this.$content.append( this.$input );
this.$overlay.append( this.menu.$element );
}
+
+   // Input size needs to be calculated after everything else is rendered
+   setTimeout( function () {
+   if ( this.$input ) {
+   this.updateInputSize();
+   }
+   } );
+
this.onMenuItemsChange();
 };
 
@@ -628,26 +639,40 @@
  * @param {jQuery.Event} e Event of some sort
  */
 OO.ui.CapsuleMultiselectWidget.prototype.updateInputSize = function () {
-   var $lastItem, direction, contentWidth, currentWidth, bestWidth;
+   var $lastItem, direction, contentWidth, currentWidth, bestWidth, 
movedPlaceholder;
if ( !this.isDisabled() ) {
this.$input.css( 'width', '1em' );
$lastItem = this.$group.children().last();
direction = OO.ui.Element.static.getDir( this.$handle );
+
+   // Move the placeholder text to 

[MediaWiki-commits] [Gerrit] maps...deploy[master]: Update kartotherian to 4f4fb72

2016-10-12 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update kartotherian to 4f4fb72
..

Update kartotherian to 4f4fb72

List of changes:
74dedaf v0.0.15 added postgres dep
d6bc3e4 Fixed postgres ref link
4f4fb72 v0.0.17
xxx Update node module dependencies

Change-Id: I3d0c5f6eab9cbdeb7976c930de11d15213402312
---
C node_modules/.bin/semver
R node_modules/extend/.eslintrc
R node_modules/extend/.jscs.json
R node_modules/extend/.npmignore
R node_modules/extend/.travis.yml
R node_modules/extend/LICENSE
R node_modules/extend/component.json
R node_modules/extend/index.js
R node_modules/extend/package.json
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/pg-connection-string/package.json
D node_modules/kartotherian-geoshapes/node_modules/pg-types/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/pg.js/node_modules/buffer-writer/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/pg.js/node_modules/generic-pool/package.json
D node_modules/kartotherian-geoshapes/node_modules/pgpass/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
C node_modules/kartotherian-postgres/.npmignore
A node_modules/kartotherian-postgres/LICENSE
A node_modules/kartotherian-postgres/Postgres.js
C node_modules/kartotherian-postgres/node_modules/pg-query-stream/.npmignore
A node_modules/kartotherian-postgres/node_modules/pg-query-stream/.travis.yml
C node_modules/kartotherian-postgres/node_modules/pg-query-stream/Makefile
A node_modules/kartotherian-postgres/node_modules/pg-query-stream/index.js
C 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/.npmignore
C 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/.travis.yml
C 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/Makefile
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/index.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/package.json
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/pg.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/test/close.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/test/error-handling.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/test/index.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/test/mocha.opts
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/pg-cursor/test/no-data-handling.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/.npmignore
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/.travis.yml
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/LICENSE
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/duplex.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/lib/_stream_duplex.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/lib/_stream_passthrough.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/lib/_stream_readable.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/lib/_stream_transform.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/lib/_stream_writable.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/node_modules/buffer-shims/index.js
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/node_modules/buffer-shims/package.json
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/node_modules/core-util-is/LICENSE
A 
node_modules/kartotherian-postgres/node_modules/pg-query-stream/node_modules/readable-stream/node_modules/core-util-is/float.patch
A 

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Move logic for dwelledButAbandoned to central log method

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

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

Change subject: Move logic for dwelledButAbandoned to central log method
..

Move logic for dwelledButAbandoned to central log method

Add tests.

Change-Id: Ieba557c9adb544db6200aecdf141587c49ebb2e2
---
M resources/ext.popups.core.js
M resources/ext.popups.renderer/desktopRenderer.js
M resources/ext.popups.targets/desktopTarget.js
M tests/qunit/ext.popups.core.test.js
4 files changed, 60 insertions(+), 31 deletions(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 42d5418..9964937 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -1,7 +1,16 @@
 ( function ( $, mw ) {
'use strict';
-   var previewCountStorageKey = 'ext.popups.core.previewCount',
+   var DWELL_EVENTS_MIN_INTERACTION_TIME,
+   previewCountStorageKey = 'ext.popups.core.previewCount',
popupsEnabledStorageKey = 'mwe-popups-enabled';
+
+   /**
+* Minimum time to log dwelledButAbandoned events. Initially considered 
as
+* 250ms to avoid accidental hovers being logged. Now logging all 
events to
+* verify data. See T145379
+* @property DWELL_EVENTS_MIN_INTERACTION_TIME
+*/
+   DWELL_EVENTS_MIN_INTERACTION_TIME = 0;
 
/**
 * @class mw.popups
@@ -36,6 +45,25 @@
];
 
/**
+* Decide whether to log an event
+*
+* @method log
+* @param {string} action that is being logged
+* @param {Object} [logData]
+*/
+   function shouldLog( action, logData ) {
+   if ( action === 'dwelledButAbandoned' &&
+   logData.dwellStartTime &&
+   logData.linkInteractionToken &&
+   mw.now() - logData.dwellStartTime < 
DWELL_EVENTS_MIN_INTERACTION_TIME
+   ) {
+   return false;
+   } else {
+   return true;
+   }
+   }
+
+   /**
 * Log events
 *
 * @method log
@@ -44,13 +72,16 @@
 */
mw.popups.log = function ( action, logData ) {
logData = logData || {};
-   mw.track( 'ext.popups.schemaPopups',
-   $.extend( {}, logData, {
-   action: action,
-   // Some events e.g. pageLoaded do not have an 
interaction time.
-   totalInteractionTime: logData.dwellStartTime ? 
Math.round( mw.now() - logData.dwellStartTime ) : undefined
-   } )
-   );
+
+   if ( shouldLog( action, logData ) ) {
+   mw.track( 'ext.popups.schemaPopups',
+   $.extend( {}, logData, {
+   action: action,
+   // Some events e.g. pageLoaded do not 
have an interaction time.
+   totalInteractionTime: 
logData.dwellStartTime ? Math.round( mw.now() - logData.dwellStartTime ) : 
undefined
+   } )
+   );
+   }
};
 
/**
diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index 7b574d5..1005f56 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -75,14 +75,6 @@
mw.popups.render.API_DELAY = 50;
 
/**
-* Minimum time to log dwelledButAbandoned events. Initially considered 
as
-* 250ms to avoid accidental hovers being logged. Now logging all 
events to
-* verify data. See T145379
-* @property DWELL_EVENTS_MIN_INTERACTION_TIME
-*/
-   mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME = 0;
-
-   /**
 * Cache of all the popups that were opened in this session
 * @property {Object} cache
 */
@@ -372,12 +364,7 @@
function leaveInactive() {
var $activeLink = getActiveLink();
 
-   if ( logData.dwellStartTime &&
-   logData.linkInteractionToken &&
-   mw.now() - logData.dwellStartTime >= 
mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME
-   ) {
-   mw.popups.log( 'dwelledButAbandoned', logData );
-   }
+   mw.popups.log( 'dwelledButAbandoned', logData );
// TODO: should `blur` also be here?
$activeLink.off( 'mouseleave', leaveInactive );
if ( openTimer ) {
diff --git a/resources/ext.popups.targets/desktopTarget.js 

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Ic2f60b4f30e8d6768ca386b9af4d544cb72f0a75
---
D images/ORES-beta-features-ltr.png
A images/ORES-beta-features-ltr.svg
D images/ORES-beta-features-rtl.png
A images/ORES-beta-features-rtl.svg
M includes/Hooks.php
5 files changed, 78 insertions(+), 2 deletions(-)

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



diff --git a/images/ORES-beta-features-ltr.png 
b/images/ORES-beta-features-ltr.png
deleted file mode 100644
index ae73660..000
--- a/images/ORES-beta-features-ltr.png
+++ /dev/null
Binary files differ
diff --git a/images/ORES-beta-features-ltr.svg 
b/images/ORES-beta-features-ltr.svg
new file mode 100644
index 000..fa8248e
--- /dev/null
+++ b/images/ORES-beta-features-ltr.svg
@@ -0,0 +1,38 @@
+
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/images/ORES-beta-features-rtl.png 
b/images/ORES-beta-features-rtl.png
deleted file mode 100644
index 637d8e5..000
--- a/images/ORES-beta-features-rtl.png
+++ /dev/null
Binary files differ
diff --git a/images/ORES-beta-features-rtl.svg 
b/images/ORES-beta-features-rtl.svg
new file mode 100644
index 000..692b409
--- /dev/null
+++ b/images/ORES-beta-features-rtl.svg
@@ -0,0 +1,38 @@
+
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 0b5955b..48c52a6 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -498,8 +498,8 @@
'label-message' => 'ores-beta-feature-message',
'desc-message' => 'ores-beta-feature-description',
'screenshot' => [
-   'ltr' => 
"$wgExtensionAssetsPath/ORES/images/ORES-beta-features-ltr.png",
-   'rtl' => 
"$wgExtensionAssetsPath/ORES/images/ORES-beta-features-rtl.png",
+   'ltr' => 
"$wgExtensionAssetsPath/ORES/images/ORES-beta-features-ltr.svg",
+   'rtl' => 
"$wgExtensionAssetsPath/ORES/images/ORES-beta-features-rtl.svg",
],
'info-link' => 
'https://www.mediawiki.org/wiki/ORES_review_tool',
'discussion-link' => 
'https://www.mediawiki.org/wiki/Talk:ORES_review_tool',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2f60b4f30e8d6768ca386b9af4d544cb72f0a75
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BetaFeatures[master]: Create SVG templates for screenshot images

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

Change subject: Create SVG templates for screenshot images
..


Create SVG templates for screenshot images

Bug: T144428
Change-Id: I4ccf605b034303cb2fcbdbd31a76a64f353e321f
---
A resources/images/screenshot-template-ltr.svg
A resources/images/screenshot-template-rtl.svg
2 files changed, 46 insertions(+), 0 deletions(-)

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



diff --git a/resources/images/screenshot-template-ltr.svg 
b/resources/images/screenshot-template-ltr.svg
new file mode 100644
index 000..6716c04
--- /dev/null
+++ b/resources/images/screenshot-template-ltr.svg
@@ -0,0 +1,23 @@
+
+http://www.w3.org/2000/svg; id="svg2" viewBox="0 0 264 162" 
height="162" width="264">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/images/screenshot-template-rtl.svg 
b/resources/images/screenshot-template-rtl.svg
new file mode 100644
index 000..22398c8
--- /dev/null
+++ b/resources/images/screenshot-template-rtl.svg
@@ -0,0 +1,23 @@
+
+http://www.w3.org/2000/svg; id="svg2" viewBox="0 0 264 162" 
height="162" width="264">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ccf605b034303cb2fcbdbd31a76a64f353e321f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: VolkerE 
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...ContentTranslation[master]: Use correct blue (#36c) in beta features icon

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

Change subject: Use correct blue (#36c) in beta features icon
..


Use correct blue (#36c) in beta features icon

Change-Id: Ief2d6fbfc802f0bdff6368e328e77b66138ce1bf
---
M images/cx-icon-ltr.svg
M images/cx-icon-rtl.svg
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/images/cx-icon-ltr.svg b/images/cx-icon-ltr.svg
index 9a32e85..366bf3b 100644
--- a/images/cx-icon-ltr.svg
+++ b/images/cx-icon-ltr.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg; viewBox="-288 514.5 264 162" width="264" 
height="162">
+http://www.w3.org/2000/svg; viewBox="-288 514.5 264 162" width="264" 
height="162">
diff --git a/images/cx-icon-rtl.svg b/images/cx-icon-rtl.svg
index 9c755ec..12fe34e 100644
--- a/images/cx-icon-rtl.svg
+++ b/images/cx-icon-rtl.svg
@@ -1 +1 @@
-http://www.w3.org/2000/svg; viewBox="-288 514.5 264 162" width="264" 
height="162">
+http://www.w3.org/2000/svg; viewBox="-288 514.5 264 162" width="264" 
height="162">

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief2d6fbfc802f0bdff6368e328e77b66138ce1bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I0d02c6c6bce35742084f4c72010639ddae2de0b9
---
M images/BetaFeatures/wb-readmore-beta-ltr.svg
M images/BetaFeatures/wb-readmore-beta-rtl.svg
2 files changed, 83 insertions(+), 111 deletions(-)

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



diff --git a/images/BetaFeatures/wb-readmore-beta-ltr.svg 
b/images/BetaFeatures/wb-readmore-beta-ltr.svg
index 00b2a41..a46b91c 100644
--- a/images/BetaFeatures/wb-readmore-beta-ltr.svg
+++ b/images/BetaFeatures/wb-readmore-beta-ltr.svg
@@ -1,61 +1,48 @@
 
-http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns;>
-
-wb-otherprojects-beta-ltr
-Created with Sketch.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
-
-
-
-
-
-
+
+
+
+
+
+
 
-
-
-
-
-
+
+
+
+
+
 
 
-
\ No newline at end of file
+
diff --git a/images/BetaFeatures/wb-readmore-beta-rtl.svg 
b/images/BetaFeatures/wb-readmore-beta-rtl.svg
index d61cdf0..7bfa257 100644
--- a/images/BetaFeatures/wb-readmore-beta-rtl.svg
+++ b/images/BetaFeatures/wb-readmore-beta-rtl.svg
@@ -1,63 +1,48 @@
 
-http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns;>
-
-wb-otherprojects-beta-ltr
-Created with Sketch.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
-
\ No newline at end of file
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d02c6c6bce35742084f4c72010639ddae2de0b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I755d0d3b3fdcf569d2470a4a9980ae0e2df66a37
---
M UniversalLanguageSelector.hooks.php
D resources/images/compact-links-ltr.png
M resources/images/compact-links-ltr.svg
D resources/images/compact-links-rtl.png
M resources/images/compact-links-rtl.svg
5 files changed, 70 insertions(+), 4 deletions(-)

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



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index fed4065..2bd92cc 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -404,8 +404,8 @@
'label-message' => 'uls-betafeature-label',
'desc-message' => 'uls-betafeature-desc',
'screenshot' => [
-   'ltr' => 
"$imagesDir/compact-links-ltr.png",
-   'rtl' => 
"$imagesDir/compact-links-rtl.png",
+   'ltr' => 
"$imagesDir/compact-links-ltr.svg",
+   'rtl' => 
"$imagesDir/compact-links-rtl.svg",
],
'info-link' =>

'https://www.mediawiki.org/wiki/Universal_Language_Selector/Compact_Language_Links',
diff --git a/resources/images/compact-links-ltr.png 
b/resources/images/compact-links-ltr.png
deleted file mode 100644
index ac141dd..000
--- a/resources/images/compact-links-ltr.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/compact-links-ltr.svg 
b/resources/images/compact-links-ltr.svg
index cb5f42c..67283ff 100644
--- a/resources/images/compact-links-ltr.svg
+++ b/resources/images/compact-links-ltr.svg
@@ -1 +1,34 @@
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; id="svg2" viewBox="0 0 264 162" 
height="162" width="264">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/images/compact-links-rtl.png 
b/resources/images/compact-links-rtl.png
deleted file mode 100644
index 0f73c95..000
--- a/resources/images/compact-links-rtl.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/compact-links-rtl.svg 
b/resources/images/compact-links-rtl.svg
index 1589d0f..5908560 100644
--- a/resources/images/compact-links-rtl.svg
+++ b/resources/images/compact-links-rtl.svg
@@ -1 +1,34 @@
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; id="svg2" viewBox="0 0 264 162" 
height="162" width="264">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I755d0d3b3fdcf569d2470a4a9980ae0e2df66a37
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I51993b85c7720a025e8deeaf079806b56ac09f9b
---
M images/betafeatures-icon-notifications-ltr.svg
M images/betafeatures-icon-notifications-rtl.svg
2 files changed, 52 insertions(+), 22 deletions(-)

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



diff --git a/images/betafeatures-icon-notifications-ltr.svg 
b/images/betafeatures-icon-notifications-ltr.svg
index 71682ac..2a55cd9 100644
--- a/images/betafeatures-icon-notifications-ltr.svg
+++ b/images/betafeatures-icon-notifications-ltr.svg
@@ -1,12 +1,27 @@
-
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
-
-
-
-
-
-
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
diff --git a/images/betafeatures-icon-notifications-rtl.svg 
b/images/betafeatures-icon-notifications-rtl.svg
index 3fbb189..e6d2be7 100644
--- a/images/betafeatures-icon-notifications-rtl.svg
+++ b/images/betafeatures-icon-notifications-rtl.svg
@@ -1,12 +1,27 @@
-
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
-
-
-
-
-
-
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51993b85c7720a025e8deeaf079806b56ac09f9b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Ic97bed840c5e9c34a4c8e81a2148e2a0af4ed286
---
M resources/images/popups-ltr.svg
M resources/images/popups-rtl.svg
2 files changed, 82 insertions(+), 2 deletions(-)

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



diff --git a/resources/images/popups-ltr.svg b/resources/images/popups-ltr.svg
index 9df91c2..c1f2dd5 100644
--- a/resources/images/popups-ltr.svg
+++ b/resources/images/popups-ltr.svg
@@ -1 +1,41 @@
-http://www.w3.org/2000/svg; 
width="264" height="162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/images/popups-rtl.svg b/resources/images/popups-rtl.svg
index 3a7cdf1..65c7ae9 100644
--- a/resources/images/popups-rtl.svg
+++ b/resources/images/popups-rtl.svg
@@ -1 +1,41 @@
-http://www.w3.org/2000/svg; 
width="264" height="162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic97bed840c5e9c34a4c8e81a2148e2a0af4ed286
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: ButtonWidget: Remove code to not let the button get focus af...

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

Change subject: ButtonWidget: Remove code to not let the button get focus after 
clicking
..


ButtonWidget: Remove code to not let the button get focus after clicking

Bug: T76636
Change-Id: Ia8d55fbb2aa950447eacb0776c249ed76346d391
---
M src/widgets/ButtonWidget.js
1 file changed, 7 insertions(+), 24 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, but someone else must approve
  Jforrester: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/widgets/ButtonWidget.js b/src/widgets/ButtonWidget.js
index 6c27d06..1b9d06a 100644
--- a/src/widgets/ButtonWidget.js
+++ b/src/widgets/ButtonWidget.js
@@ -83,31 +83,14 @@
 OO.mixinClass( OO.ui.ButtonWidget, OO.ui.mixin.TabIndexedElement );
 OO.mixinClass( OO.ui.ButtonWidget, OO.ui.mixin.AccessKeyedElement );
 
+/* Static Properties */
+
+/**
+ * @inheritdoc
+ */
+OO.ui.ButtonWidget.static.cancelButtonMouseDownEvents = false;
+
 /* Methods */
-
-/**
- * @inheritdoc
- */
-OO.ui.ButtonWidget.prototype.onMouseDown = function ( e ) {
-   if ( !this.isDisabled() ) {
-   // Remove the tab-index while the button is down to prevent the 
button from stealing focus
-   this.$button.removeAttr( 'tabindex' );
-   }
-
-   return OO.ui.mixin.ButtonElement.prototype.onMouseDown.call( this, e );
-};
-
-/**
- * @inheritdoc
- */
-OO.ui.ButtonWidget.prototype.onMouseUp = function ( e ) {
-   if ( !this.isDisabled() ) {
-   // Restore the tab-index after the button is up to restore the 
button's accessibility
-   this.$button.attr( 'tabindex', this.tabIndex );
-   }
-
-   return OO.ui.mixin.ButtonElement.prototype.onMouseUp.call( this, e );
-};
 
 /**
  * Get hyperlink location.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8d55fbb2aa950447eacb0776c249ed76346d391
Gerrit-PatchSet: 6
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: VolkerE 
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...ORES[master]: Remove redundant $wgUser

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

Change subject: Remove redundant $wgUser
..


Remove redundant $wgUser

See I180435f1

Change-Id: I997dd8d2b5d68c798b72c1310cdfbc0b4318c501
---
M tests/phpunit/includes/HooksTest.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/tests/phpunit/includes/HooksTest.php 
b/tests/phpunit/includes/HooksTest.php
index b7c03a7..77353fa 100644
--- a/tests/phpunit/includes/HooksTest.php
+++ b/tests/phpunit/includes/HooksTest.php
@@ -71,8 +71,6 @@
}
 
public function testOnChangesListSpecialPageQuery() {
-   global $wgUser;
-   $oldUser = $wgUser;
$this->setMwGlobals( 'wgUser', $this->user );
 
$opts = new FormOptions();
@@ -128,8 +126,6 @@
$this->assertSame( $expected['conds'], $conds );
$this->assertSame( $expected['query_options'], $query_options );
$this->assertSame( $expected['join_conds'], $join_conds );
-
-   $this->setMwGlobals( 'wgUser', $oldUser );
}
 
public function testOnEnhancedChangesListModifyLineDataDamaging() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I997dd8d2b5d68c798b72c1310cdfbc0b4318c501
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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...VisualEditor[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Iee029136dfc3728f16f1d28910c83139e2d471cb
---
M betafeatures-icon-VisualEditor-ltr.svg
M betafeatures-icon-VisualEditor-rtl.svg
M betafeatures-icon-WikitextEditor-ltr.svg
M betafeatures-icon-WikitextEditor-rtl.svg
4 files changed, 213 insertions(+), 693 deletions(-)

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



diff --git a/betafeatures-icon-VisualEditor-ltr.svg 
b/betafeatures-icon-VisualEditor-ltr.svg
index 5ae38fa..6858b50 100644
--- a/betafeatures-icon-VisualEditor-ltr.svg
+++ b/betafeatures-icon-VisualEditor-ltr.svg
@@ -1,113 +1,56 @@
 
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
+http://www.w3.org/2000/svg; id="svg2" viewBox="0 0 264 162" 
height="162" width="264">
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
 
-
-
+
+
 
-
-
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
-
+
+
 
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/betafeatures-icon-VisualEditor-rtl.svg 
b/betafeatures-icon-VisualEditor-rtl.svg
index e561802..ce2d989 100644
--- a/betafeatures-icon-VisualEditor-rtl.svg
+++ b/betafeatures-icon-VisualEditor-rtl.svg
@@ -1,113 +1,61 @@
 
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
 
-
-
+
+
 
-
-
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
-
+
+
 
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/betafeatures-icon-WikitextEditor-ltr.svg 
b/betafeatures-icon-WikitextEditor-ltr.svg
index 67b49cc..8a0cb2f 100644
--- a/betafeatures-icon-WikitextEditor-ltr.svg
+++ b/betafeatures-icon-WikitextEditor-ltr.svg
@@ -1,239 +1,62 @@
 
-
-
-http://purl.org/dc/elements/1.1/;
-   xmlns:cc="http://creativecommons.org/ns#;
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;
-   xmlns:svg="http://www.w3.org/2000/svg;
-   xmlns="http://www.w3.org/2000/svg;
-   version="1.1"
-   width="264"
-   height="162"
-   

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Use `color-progressive` for switched-on bin...

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

Change subject: MediaWiki theme: Use `color-progressive` for switched-on binary 
inputs
..


MediaWiki theme: Use `color-progressive` for switched-on binary inputs

Using `color-progressive` color for switched-on binary input widgets
(CheckboxInput-, RadioInput- and ToggleSwitchWidget) and treat
ToggleButtonWidget as special case.

Bug: T145629
Change-Id: I57c7bc4b7d12354a54e5d0d4d2b612b3dec1ce87
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
2 files changed, 27 insertions(+), 25 deletions(-)

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



diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index d91a0c7..968aa98 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -111,11 +111,13 @@
 @transition-ease-out-sine-medium: 200ms cubic-bezier( 0.39, 0.575, 0.565, 1 );
 
 // Binary Input Widgets (CheckboxInput, RadioInput, ToggleSwitch)
-@background-color-input-binary-active: @color-progressive;
+@background-color-input-binary-active: @color-progressive-active;
+@background-color-input-binary-on: @color-progressive;
 @size-input-binary: 1.6em;
 @border-input-binary: @border-width-default solid @border-color-input-binary;
 @border-color-input-binary: @border-color-default-active;
 @border-color-input-binary-active: @color-progressive-active;
+@border-color-input-binary-on: @color-progressive;
 @box-shadow-input-binary: 0 0 0 1px rgba( 0, 0, 0, 0.1 );
 @padding-input-binary-label: 0.25em 0.25em 0.25em 0.5em;
 
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 8d1009f..325fc1a 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -473,25 +473,25 @@
 
&:checked {
& + span {
-   background-color: @color-progressive-active;
-   border-color: @border-color-input-binary-active;
+   background-color: 
@background-color-input-binary-on;
+   border-color: @border-color-input-binary-on;
}
 
&:hover + span,
&:focus:hover + span {
-   background-color: 
@color-progressive-active-hover;
-   border-color: @color-progressive-active-hover;
+   background-color: @color-progressive-hover;
+   border-color: @color-progressive-hover;
}
 
&:active + span,
&:active:hover + span {
-   background-color: @color-progressive-active;
+   background-color: 
@background-color-input-binary-active;
border-color: @border-color-input-binary-active;
}
 
&:focus + span {
-   background-color: @color-progressive-active;
-   border-color: @color-progressive-active;
+   background-color: 
@background-color-input-binary-on;
+   border-color: @border-color-input-binary-on;
box-shadow: @box-shadow-focus-inset;
}
}
@@ -642,28 +642,28 @@
}
 
&:active + span {
-   background-color: @color-progressive-active;
-   border-color: @color-progressive-active;
+   background-color: @background-color-input-binary-active;
+   border-color: @border-color-input-binary-active;
}
 
&:checked {
& + span {
-   border-color: @color-progressive-active;
+   border-color: @border-color-input-binary-on;
}
 
&:hover + span {
-   border-color: @color-progressive;
+   border-color: @color-progressive-hover;
}
 
&:hover:focus + span {
-   border-color: @color-progressive;
-   box-shadow: inset 0 0 0 1px @color-progressive;
+   border-color: @color-progressive-hover;
+   box-shadow: inset 0 0 0 1px 
@color-progressive-hover;
}
 
&:active + span,

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: TitleWidget: Take 'known' status into account when deciding ...

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

Change subject: TitleWidget: Take 'known' status into account when deciding 
page existence
..


TitleWidget: Take 'known' status into account when deciding page existence

Bug: T72123
Change-Id: Id00215946a9a1927967e8af7f321862e89261c51
---
M resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
1 file changed, 23 insertions(+), 4 deletions(-)

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



diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
index b25b2d4..222586f 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
@@ -146,7 +146,13 @@
}
req = new mw.Api().get( params );
promiseAbortObject.abort = 
req.abort.bind( req ); // TODO ew
-   return req;
+   return req.then( function ( ret ) {
+   if ( ret.query === undefined ) {
+   ret = new mw.Api().get( 
{ action: 'query', titles: query } );
+   
promiseAbortObject.abort = ret.abort.bind( ret );
+   }
+   return ret;
+   } );
}
} ).promise( promiseAbortObject );
} else {
@@ -186,6 +192,7 @@
continue;
}
pageData[ suggestionPage.title ] = {
+   known: suggestionPage.known !== undefined,
missing: suggestionPage.missing !== undefined,
redirect: suggestionPage.redirect !== undefined,
disambiguation: OO.getProp( suggestionPage, 
'pageprops', 'disambiguation' ) !== undefined,
@@ -205,6 +212,7 @@
for ( i = 0, len = redirects.length; i < len; i++ ) {
pageData[ redirects[ i ] ] = {
missing: false,
+   known: true,
redirect: true,
disambiguation: false,
description: mw.msg( 
'mw-widgets-titleinput-description-redirect', suggestionPage.title ),
@@ -222,14 +230,25 @@
// If not found, run value through mw.Title to avoid treating a 
match as a
// mismatch where normalisation would make them matching (bug 
48476)
 
-   pageExistsExact = titles.indexOf( this.getQueryValue() ) !== -1;
+   pageExistsExact = (
+   Object.prototype.hasOwnProperty.call( pageData, 
this.getQueryValue() ) &&
+   (
+   !pageData[ this.getQueryValue() ].missing ||
+   pageData[ this.getQueryValue() ].known
+   )
+   );
pageExists = pageExistsExact || (
-   titleObj && titles.indexOf( titleObj.getPrefixedText() 
) !== -1
+   titleObj &&
+   Object.prototype.hasOwnProperty.call( pageData, 
titleObj.getPrefixedText() ) &&
+   (
+   !pageData[ titleObj.getPrefixedText() ].missing 
||
+   pageData[ titleObj.getPrefixedText() ].known
+   )
);
 
if ( !pageExists ) {
pageData[ this.getQueryValue() ] = {
-   missing: true, redirect: false, disambiguation: 
false,
+   missing: true, known: false, redirect: false, 
disambiguation: false,
description: mw.msg( 
'mw-widgets-titleinput-description-new-page' )
};
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id00215946a9a1927967e8af7f321862e89261c51
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Balancer: remove unnecessary extra argument

2016-10-12 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review.

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

Change subject: Balancer: remove unnecessary extra argument
..

Balancer: remove unnecessary extra argument

The full HTML5 spec clones element attributes when they are added to
the ActiveFormattingElements list, so that when an element on that
list is later cloned and reinserted the attributes are the *original*
attributes, not reflecting any changes which embedded JavaScript
in an inline 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add role for etsy/phan static analyzer

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

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

Change subject: Add role for etsy/phan static analyzer
..

Add role for etsy/phan static analyzer

Phan is a static analyzer for PHP. Assuming code is appropriately
annotated it can detect common problems in php, such as referencing a
class/function/variable that does not exist. This has shown to be useful
in the CirrusSearch codebase, so adding a role for it to make it more
widely available.

I'm not sure the method for adding php7 is quite the right
way...suggestions accepted.

Change-Id: I51dd02c134a9bf6cdf04f2ba20ce428e72d3a2d6
---
M puppet/hieradata/common.yaml
M puppet/modules/php/manifests/composer/install.pp
A puppet/modules/role/manifests/phan.pp
A puppet/modules/role/manifests/php7.pp
M puppet/modules/service/manifests/gitupdate.pp
5 files changed, 66 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/08/315608/1

diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index 30d756f..7aab94b 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -308,6 +308,8 @@
 role::oauthauthentication::consumer_secret: 
143a7e53fe1e0fe7f42a2aed77b8e6fc9f38112a
 role::oauthauthentication::callback_url: 
"http://dev.wiki.local.wmftest.net%{::port_fragment}/wiki/Special:OAuthLogin/finish;
 
+role::phan::install_dir: "%{hiera('mwv::services_dir')}/phan"
+
 role::phragile::debug: true
 role::phragile::install_dir: "%{hiera('mwv::services_dir')}/phragile"
 role::phragile::vhost_name: "phragile%{hiera('mwv::tld')}"
diff --git a/puppet/modules/php/manifests/composer/install.pp 
b/puppet/modules/php/manifests/composer/install.pp
index e63d1cc..85eed3d 100644
--- a/puppet/modules/php/manifests/composer/install.pp
+++ b/puppet/modules/php/manifests/composer/install.pp
@@ -25,6 +25,7 @@
 $directory  = $title,
 $vendor_dir = undef,
 $prefer = 'dist',
+$php= '/usr/bin/php5',
 ) {
 require ::php::composer
 
@@ -39,7 +40,7 @@
 }
 
 exec { "composer-install-${safe_dir}":
-command => "/usr/local/bin/composer install --optimize-autoloader 
--prefer-${prefer}",
+command => "${php} /usr/local/bin/composer install 
--optimize-autoloader --prefer-${prefer}",
 cwd => $directory,
 environment => [
   "COMPOSER_HOME=${::php::composer::home}",
diff --git a/puppet/modules/role/manifests/phan.pp 
b/puppet/modules/role/manifests/phan.pp
new file mode 100644
index 000..628ebe6
--- /dev/null
+++ b/puppet/modules/role/manifests/phan.pp
@@ -0,0 +1,32 @@
+# == Class role::phan
+# Install etsy/phan static analyzer for php
+class role::phan(
+$install_dir
+) {
+require ::role::php7
+
+package { 'php-ast':
+require => Apt::Ppa['ondrej/php']
+}
+
+git::clone { 'etsy/phan':
+directory => $install_dir,
+remote=> 'https://github.com/etsy/phan.git',
+}
+
+service::gitupdate { 'etsy/phan':
+dir=> $install_dir,
+type   => 'php',
+update => true,
+}
+
+php::composer::install { 'etsy/phan':
+directory => $install_dir,
+php   => '/usr/bin/php7.0',
+require   => [
+Git::Clone['etsy/phan'],
+Package['php7.0-cli'],
+Package['php-ast'],
+],
+}
+}
diff --git a/puppet/modules/role/manifests/php7.pp 
b/puppet/modules/role/manifests/php7.pp
new file mode 100644
index 000..c6956a9
--- /dev/null
+++ b/puppet/modules/role/manifests/php7.pp
@@ -0,0 +1,25 @@
+# == Class role::php7
+# Install php7 alongside php5
+class role::php7 {
+apt::ppa { 'ondrej/php': }
+package { [
+'php7.0',
+'php-apcu-bc',
+'php7.0-cli',
+'php7.0-curl',
+'php7.0-dom',
+'php7.0-dev',
+'php7.0-gd',
+'php7.0-intl',
+'php7.0-json',
+'php7.0-mcrypt',
+'php7.0-mysql',
+'php7.0-readline',
+'php7.0-sqlite3',
+'php7.0-tidy',
+'php-xdebug',
+]:
+ensure  => present,
+require => Apt::Ppa['ondrej/php']
+}
+}
diff --git a/puppet/modules/service/manifests/gitupdate.pp 
b/puppet/modules/service/manifests/gitupdate.pp
index 485d68e..f6179f4 100644
--- a/puppet/modules/service/manifests/gitupdate.pp
+++ b/puppet/modules/service/manifests/gitupdate.pp
@@ -94,8 +94,11 @@
 fail("Invalid service type ${type} given, valid values are php, 
nodejs, python")
 }
 
+# make title safe to use as a filename
+$safe_title = regsubst($title, '/' ,'_', 'G')
+
 $srv_dir = $dir ? {
-undef   => "${::service::root_dir}/${title}",
+undef   => "${::service::root_dir}/${safe_title}",
 default => $dir
 }
 
@@ -119,7 +122,7 @@
 default => $service_name,
 }
 
-file { 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Convert CREDITS to list of all known git contributors

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

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

Change subject: Convert CREDITS to list of all known git contributors
..

Convert CREDITS to list of all known git contributors

* Update the existing .mailmap file to de-duplicate author list
* Replace manually curated "developers" and "patch contributors" lists
  with a single "contributors" list generated by git-log.

This list should be refreshed at least once per MediaWiki release cycle.
Ideally the automation scripts that are used to prepare release branches
will be updated to run the git-log command and replace the contributor
list content.

Bug: T139300
Change-Id: If00ae955c8026d6be38575f3766a06c46e5e7126
---
M .mailmap
M CREDITS
2 files changed, 533 insertions(+), 216 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/315607/1

diff --git a/.mailmap b/.mailmap
index 5c82af8..b93edf1 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1,11 +1,39 @@
+# Map author and committer names and email addresses to canonical real names
+# and email addresses.
+#
+# To update the CREDITS file, generate a list of authors using:
+#
+#   git log --format='%aN' | grep -v '[BOT]' | LC_ALL=C sort -f | uniq
+#
+# Two types of entries are useful here. The first sets a cannonical author
+# name for a given email address:
+#
+#   Cannonical Author Name 
+#
+# The second allows collecting alternate email addresses into a single
+# cannonical author name and email address:
+#
+#   Cannonical Author Name  
+#
+# Mappings are only needed for authors who have used multiple author names
+# and/or author emails for revisions over time.
+#
+# See also: https://git-scm.com/docs/git-shortlog#_mapping_authors
+#
+[BOT] Gerrit Code Review 
 [BOT] Gerrit Patch Uploader 
+[BOT] jenkins-bot 
+[BOT] jenkins-bot  

 [BOT] Translation updater bot 
 Aaron Schulz 
 Aaron Schulz  
 Adam Roses Wight 
+Adam Roses Wight  
 addshore 
+Aditya Sastry 
 Adrian Heine 
 Alex Monk 
+Alex Monk  
 Alex Monk  
 Alex Z  
 Alexander Emsenhuber 
@@ -14,17 +42,23 @@
 Alexia E. Smith 
 Amir E. Aharoni 
 Amir E. Aharoni  
+Amir E. Aharoni  
+Amir E. Aharoni  
 Anders Wegge Jakobsen  
 Andre Engels  
+Andrew Garrett 
 Andrew Garrett  
 Angela Beesley Starling  
 Antoine Musso 
 Antoine Musso  
 Aran Dunkley  
 Ariel Glenn  
+Ariel Glenn  
 Arlo Breault 
+Arthur Richards 
 Arthur Richards  
 Aryeh Gregor  
+Asher Feldman 
 Asher Feldman  
 aude 
 Audrey Tang 
@@ -32,21 +66,27 @@
 ayush_garg 
 Bahodir Mansurov 
 Bartosz Dziewoński 
-Bartosz Dziewoński  
 Bartosz Dziewoński  
+Bartosz Dziewoński  
 Ben Hartshorne  
 Bene 
+Bene  
 Benjamin Lees  
+Benny Situ 
 Benny Situ  
 Bertrand Grondin  
 Brad Jorsch 
+Brad Jorsch  
 Brandon Harris  
-Brian Wolff  

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Remove redundant $wgUser

2016-10-12 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Remove redundant $wgUser
..

Remove redundant $wgUser

See I180435f1

Change-Id: I997dd8d2b5d68c798b72c1310cdfbc0b4318c501
---
M tests/phpunit/includes/HooksTest.php
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/tests/phpunit/includes/HooksTest.php 
b/tests/phpunit/includes/HooksTest.php
index b7c03a7..77353fa 100644
--- a/tests/phpunit/includes/HooksTest.php
+++ b/tests/phpunit/includes/HooksTest.php
@@ -71,8 +71,6 @@
}
 
public function testOnChangesListSpecialPageQuery() {
-   global $wgUser;
-   $oldUser = $wgUser;
$this->setMwGlobals( 'wgUser', $this->user );
 
$opts = new FormOptions();
@@ -128,8 +126,6 @@
$this->assertSame( $expected['conds'], $conds );
$this->assertSame( $expected['query_options'], $query_options );
$this->assertSame( $expected['join_conds'], $join_conds );
-
-   $this->setMwGlobals( 'wgUser', $oldUser );
}
 
public function testOnEnhancedChangesListModifyLineDataDamaging() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I997dd8d2b5d68c798b72c1310cdfbc0b4318c501
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Restore 'end/response' log event

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

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

Change subject: Restore 'end/response' log event
..

Restore 'end/response' log event

This is used to send the buffered lint log messages (introduced in
5afb107db58e) and was probably lost in refactoring.

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


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

diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js
index 5996352..175c375 100644
--- a/lib/api/apiUtils.js
+++ b/lib/api/apiUtils.js
@@ -82,6 +82,8 @@
res.status(status);
}
res.send(body);
+   // Flush log buffer for linter
+   env.log('end/response');
}
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove ContentHandler::deprecated()

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

Change subject: Remove ContentHandler::deprecated()
..


Remove ContentHandler::deprecated()

Now unused, replaced with wfDeprecated() calls specifically

Bug: T145728
Change-Id: Id269bcd2958f23ecbc7f4f06a8c3ab5873c53117
---
M includes/content/ContentHandler.php
1 file changed, 0 insertions(+), 28 deletions(-)

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



diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index 5755918..3389a00 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -83,15 +83,6 @@
  */
 abstract class ContentHandler {
/**
-* Switch for enabling deprecation warnings. Used by 
ContentHandler::deprecated()
-* and ContentHandler::runLegacyHooks().
-*
-* Once the ContentHandler code has settled in a bit, this should be 
set to true to
-* make extensions etc. show warnings when using deprecated functions 
and hooks.
-*/
-   protected static $enableDeprecationWarnings = false;
-
-   /**
 * Convenience function for getting flat text from a Content object. 
This
 * should only be used in the context of backwards compatibility with 
code
 * that is not yet able to handle Content objects!
@@ -1137,25 +1128,6 @@
 */
public function supportsDirectApiEditing() {
return $this->supportsDirectEditing();
-   }
-
-   /**
-* Logs a deprecation warning, visible if $wgDevelopmentWarnings, but 
only if
-* self::$enableDeprecationWarnings is set to true.
-*
-* @param string $func The name of the deprecated function
-* @param string $version The version since the method is deprecated. 
Usually 1.21
-*   for ContentHandler related stuff.
-* @param string|bool $component : Component to which the function 
belongs.
-*   If false, it is assumed the function is in MediaWiki core.
-*
-* @see ContentHandler::$enableDeprecationWarnings
-* @see wfDeprecated
-*/
-   public static function deprecated( $func, $version, $component = false 
) {
-   if ( self::$enableDeprecationWarnings ) {
-   wfDeprecated( $func, $version, $component, 3 );
-   }
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id269bcd2958f23ecbc7f4f06a8c3ab5873c53117
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make Article::getContent() emit deprecation warnings

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

Change subject: Make Article::getContent() emit deprecation warnings
..


Make Article::getContent() emit deprecation warnings

Bug: T145729
Change-Id: I35b619cfc0c1548deb8805b4aacd3477dec0d1f7
---
M includes/page/Article.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/page/Article.php b/includes/page/Article.php
index 9428609..548e533 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -210,7 +210,7 @@
 * @return string Return the text of this revision
 */
public function getContent() {
-   ContentHandler::deprecated( __METHOD__, '1.21' );
+   wfDeprecated( __METHOD__, '1.21' );
$content = $this->getContentObject();
return ContentHandler::getContentText( $content );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35b619cfc0c1548deb8805b4aacd3477dec0d1f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Update beta feature screenshots to use proper layout and col...

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

Change subject: Update beta feature screenshots to use proper layout and colours
..


Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Ied0524126f3d76e8e3635ebf2f097c621e134f2a
---
M images/betafeature-flow-ltr.svg
M images/betafeature-flow-rtl.svg
2 files changed, 50 insertions(+), 38 deletions(-)

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



diff --git a/images/betafeature-flow-ltr.svg b/images/betafeature-flow-ltr.svg
index 9fb14a6..a0e6100 100644
--- a/images/betafeature-flow-ltr.svg
+++ b/images/betafeature-flow-ltr.svg
@@ -1,23 +1,29 @@
 
 http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
diff --git a/images/betafeature-flow-rtl.svg b/images/betafeature-flow-rtl.svg
index a0de77b..1e627ad 100644
--- a/images/betafeature-flow-rtl.svg
+++ b/images/betafeature-flow-rtl.svg
@@ -1,23 +1,29 @@
 
 http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied0524126f3d76e8e3635ebf2f097c621e134f2a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.28.0-wmf.22]: Fix full screen button for some maps

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

Change subject: Fix full screen button for some maps
..


Fix full screen button for some maps

Bug: T147987
Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
---
M modules/box/Map.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/box/Map.js b/modules/box/Map.js
index 43b7e56..6880fc4 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -270,8 +270,8 @@
if ( this.parentMap ) {
$.each( this.parentMap.dataLayers, function ( 
groupId, layer ) {
map.addGeoJSONLayer( groupId, 
layer.getGeoJSON(), layer.options );
-   ready();
} );
+   ready();
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.28.0-wmf.22
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: build: Bump various dev dependencies to latest

2016-10-12 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: build: Bump various dev dependencies to latest
..

build: Bump various dev dependencies to latest

 grunt-contrib-cssmin1.0.1  →  1.0.2
 grunt-contrib-less  1.3.0  →  1.4.0
 grunt-contrib-uglify1.0.1  →  2.0.0
 grunt-exec  1.0.0  →  1.0.1
 grunt-image 1.5.2  →  2.2.1
 karma   1.1.1  →  1.3.0
 karma-chrome-launcher   1.0.1  →  2.0.0
 karma-coverage  1.1.0  →  1.1.1
 karma-qunit 1.1.0  →  1.2.1

Note that the new release of qunitjs is a breaking change, hence the
lack of an upgrade now.

Change-Id: Ib304f053022a191b4a025094ad091ce2816e389c
---
M package.json
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/04/315604/1

diff --git a/package.json b/package.json
index 46bb817..14b7938 100644
--- a/package.json
+++ b/package.json
@@ -32,27 +32,27 @@
 "grunt-contrib-clean": "1.0.0",
 "grunt-contrib-concat": "1.0.1",
 "grunt-contrib-copy": "1.0.0",
-"grunt-contrib-cssmin": "1.0.1",
-"grunt-contrib-less": "1.3.0",
-"grunt-contrib-uglify": "1.0.1",
+"grunt-contrib-cssmin": "1.0.2",
+"grunt-contrib-less": "1.4.0",
+"grunt-contrib-uglify": "2.0.0",
 "grunt-contrib-watch": "1.0.0",
 "grunt-csscomb": 
"git://github.com/jdforrester/grunt-csscomb.git#v3.1.0-wmf.1",
 "grunt-cssjanus": "0.3.2",
 "grunt-eslint": "19.0.0",
-"grunt-exec": "1.0.0",
+"grunt-exec": "1.0.1",
 "grunt-file-exists": "0.1.4",
-"grunt-image": "1.5.2",
+"grunt-image": "2.2.1",
 "grunt-jsonlint": "1.1.0",
 "grunt-karma": "2.0.0",
 "grunt-promise-q": 
"git://github.com/jdforrester/grunt-promise-q.git#v0.1.1-wmf.1",
 "grunt-stylelint": "0.6.0",
 "grunt-svg2png": 
"git://github.com/jdforrester/grunt-svg2png.git#v0.2.7-wmf.1",
 "grunt-tyops": "0.1.0",
-"karma": "1.1.1",
-"karma-chrome-launcher": "1.0.1",
-"karma-coverage": "1.1.0",
+"karma": "1.3.0",
+"karma-chrome-launcher": "2.0.0",
+"karma-coverage": "1.1.1",
 "karma-firefox-launcher": "1.0.0",
-"karma-qunit": "1.1.0",
+"karma-qunit": "1.2.1",
 "q": "1.4.1",
 "qunitjs": "1.22.0",
 "stylelint-config-wikimedia": "0.3.0"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib304f053022a191b4a025094ad091ce2816e389c
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Fix full screen button for some maps

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

Change subject: Fix full screen button for some maps
..


Fix full screen button for some maps

Bug: T147987
Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
---
M modules/box/Map.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/box/Map.js b/modules/box/Map.js
index 43b7e56..6880fc4 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -270,8 +270,8 @@
if ( this.parentMap ) {
$.each( this.parentMap.dataLayers, function ( 
groupId, layer ) {
map.addGeoJSONLayer( groupId, 
layer.getGeoJSON(), layer.options );
-   ready();
} );
+   ready();
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.28.0-wmf.22]: Fix full screen button for some maps

2016-10-12 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Fix full screen button for some maps
..

Fix full screen button for some maps

Bug: T147987
Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
---
M modules/box/Map.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/box/Map.js b/modules/box/Map.js
index 43b7e56..6880fc4 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -270,8 +270,8 @@
if ( this.parentMap ) {
$.each( this.parentMap.dataLayers, function ( 
groupId, layer ) {
map.addGeoJSONLayer( groupId, 
layer.getGeoJSON(), layer.options );
-   ready();
} );
+   ready();
return;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.28.0-wmf.22
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: $wgMWOAuthCentralWiki = false;

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

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

Change subject: $wgMWOAuthCentralWiki = false;
..

$wgMWOAuthCentralWiki = false;

Fixes noise on wikitech

Change-Id: Ie44b42b0fb2642c7bad5e5280e81ba97d93f23c8
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 0a1dfb0..d9929b7 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3101,6 +3101,7 @@
 
 if ( $wmgUseOAuth ) {
wfLoadExtension( 'OAuth' );
+   $wgMWOAuthCentralWiki = false;
if ( !in_array( $wgDBname, [ 'labswiki', 'labtestwiki' ] ) ) {
$wgMWOAuthCentralWiki = 'metawiki';
$wgMWOAuthSharedUserSource = 'CentralAuth';

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Fully test MobileContext#shouldDisplayMobileView

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

Change subject: Fully test MobileContext#shouldDisplayMobileView
..


Fully test MobileContext#shouldDisplayMobileView

Changes:
* Remove unnecessary MobileContextTest#setUp.
* Locate suites of test cases for MobileContext methods near one another
  in tests/phpunit/context/.
* Extract MobileContextTest#testIsFauxMobileDevice and
  #testShouldDisplayMobileView to
  MobileContextShouldDisplayMobileViewIntegrationTest and merge them

Bug: T143891
Change-Id: I9512c455e56edecf94737249c4848d6578e8124c
---
M tests/phpunit/MobileContextTest.php
A tests/phpunit/context/MobileContextShouldDisplayMobileViewIntegrationTest.php
R tests/phpunit/context/MobileContextWikibaseDescriptionsTest.php
3 files changed, 131 insertions(+), 77 deletions(-)

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



diff --git a/tests/phpunit/MobileContextTest.php 
b/tests/phpunit/MobileContextTest.php
index 15a87e2..7331e6b 100644
--- a/tests/phpunit/MobileContextTest.php
+++ b/tests/phpunit/MobileContextTest.php
@@ -19,10 +19,6 @@
return $method;
}
 
-   protected function setUp() {
-   parent::setUp();
-   }
-
protected function tearDown() {
parent::tearDown();
 
@@ -265,76 +261,6 @@
"http://en.wikipedia.org/wiki/mobile/Gustavus_Airport;,
wfAssembleUrl( $parsedUrl )
);
-   }
-
-   /**
-* @dataProvider isFauxMobileDeviceProvider
-* @covers MobileContext::isFauxMobileDevice
-*/
-   public function testIsFauxMobileDevice( $isFauxDevice, $msg, $useformat 
= null ) {
-   $isFauxMobileDevice = self::getMethod( 'isFauxMobileDevice' );
-
-   $testMethod = ( $isFauxDevice ) ? 'assertTrue' : 'assertFalse';
-
-   $context = $this->makeContext();
-   $context->setUseFormat( $useformat );
-   $this->$testMethod(
-   $isFauxMobileDevice->invokeArgs( $context, [] ),
-   $msg
-   );
-   }
-
-   public function isFauxMobileDeviceProvider() {
-   return [
-   [ false, 'Nothing set' ],
-   [ true, 'useformat=mobile', 'mobile' ],
-   [ true, 'useformat=mobile-wap', 'mobile-wap' ],
-   [ false, 'useformat=yourmom', 'yourmom' ],
-   ];
-   }
-
-   /**
-* @dataProvider shouldDisplayMobileViewProvider
-* @covers MobileContext::shouldDisplayMobileView
-*/
-   public function testShouldDisplayMobileView( $shouldDisplay, $xWap = 
null,
-   $requestVal = [], $msg = null
-   ) {
-   $testMethod = ( $shouldDisplay ) ? 'assertTrue' : 'assertFalse';
-
-   $this->setMwGlobals( [
-   'wgMFMobileHeader' => 'X-WAP',
-   'wgMobileUrlTemplate' => '%h0.m.%h1.%h2',
-   ] );
-   $context = $this->makeContext();
-   $request = $context->getRequest();
-   if ( count( $requestVal ) ) {
-   foreach ( $requestVal as $key => $val ) {
-   if ( $key == 'useformat' ) {
-   $context->setUseFormat( $val );
-   } else {
-   $request->setVal( $key, $val );
-   }
-   }
-   }
-
-   if ( !is_null( $xWap ) ) {
-   $request->setHeader( 'X-WAP', $xWap );
-   }
-
-   $this->$testMethod( $context->shouldDisplayMobileView(), $msg );
-   }
-
-   public function shouldDisplayMobileViewProvider() {
-   return [
-   [ false, null, [] ],
-   [ true, 'yes', [] ],
-   [ true, 'no', [] ],
-   [ false, 'yes', [ 'useformat' => 'desktop' ] ],
-   [ true, null, [ 'useformat' => 'mobile-wap' ] ],
-   [ false, null, [ 'useformat' => 'desktop' ] ],
-   [ true, null, [ 'useformat' => 'mobile' ] ],
-   ];
}
 
/**
diff --git 
a/tests/phpunit/context/MobileContextShouldDisplayMobileViewIntegrationTest.php 
b/tests/phpunit/context/MobileContextShouldDisplayMobileViewIntegrationTest.php
new file mode 100644
index 000..e844fe5
--- /dev/null
+++ 
b/tests/phpunit/context/MobileContextShouldDisplayMobileViewIntegrationTest.php
@@ -0,0 +1,129 @@
+context = MobileContext::singleton();
+   }
+
+   /**
+* @covers MobileContext::shouldDisplayMobileView
+*/
+   public function test_it_can_be_overridden() {
+   $this->context->setForceMobileView( 

[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Fix full screen button for some maps

2016-10-12 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Fix full screen button for some maps
..

Fix full screen button for some maps

Bug: T147987
Change-Id: I0965f6e4893dfbf1d792f4e9de7952941b9b9445
---
M modules/box/Map.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/01/315601/1

diff --git a/modules/box/Map.js b/modules/box/Map.js
index 43b7e56..6880fc4 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -270,8 +270,8 @@
if ( this.parentMap ) {
$.each( this.parentMap.dataLayers, function ( 
groupId, layer ) {
map.addGeoJSONLayer( groupId, 
layer.getGeoJSON(), layer.options );
-   ready();
} );
+   ready();
return;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Expose references in a new endpoint

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

Change subject: Expose references in a new endpoint
..


Expose references in a new endpoint

Bug: T146398
Change-Id: I047a05d5bc4d4386f3b606d2f3aed33ee61cd109
---
M routes/mobile-sections.js
M test/features/mobile-sections/pagecontent.js
2 files changed, 43 insertions(+), 0 deletions(-)

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



diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 5cb300f..b86a0ef 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -128,6 +128,24 @@
 }
 
 /*
+ * Build a response which contains only reference sections
+ * @param {Object} input
+ * @return {Object}
+ */
+function buildReferences(input) {
+var remaining = buildRemaining(input);
+var sections = [];
+remaining.sections.forEach(function (section) {
+if (section.isReferenceSection) {
+sections.push(section);
+}
+});
+return {
+sections: sections
+};
+}
+
+/*
  * @param {Object} input
  * @param {Boolean} [removeNodes] whether to remove nodes from the lead text
  * @return {Object}
@@ -221,6 +239,21 @@
 });
 });
 
+/**
+ * GET {domain}/v1/page/mobile-sections-references/{title}/{revision:?}
+ * Gets any sections which are part of a reference sections for a given wiki 
page.
+ */
+router.get('/mobile-sections-references/:title/:revision?', function (req, 
res) {
+return BBPromise.props({
+page: parsoid.pageContentPromise(app, req)
+}).then(function (response) {
+res.status(200);
+mUtil.setETag(req, res, response.page.revision);
+mUtil.setContentType(res, mUtil.CONTENT_TYPES.mobileSections);
+res.json(buildReferences(response)).end();
+});
+});
+
 if ( process.env.MOBILE_CONTENT_SERVICE_EDGE_VERSION ) {
 /**
 * GET {domain}/v1/page/formatted/{title}/{revision?}
diff --git a/test/features/mobile-sections/pagecontent.js 
b/test/features/mobile-sections/pagecontent.js
index 374e983..714c96c 100644
--- a/test/features/mobile-sections/pagecontent.js
+++ b/test/features/mobile-sections/pagecontent.js
@@ -177,6 +177,15 @@
 });
 });
 });
+
+it('Requesting just references returns only sections with references', 
function() {
+return preq.get({uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-sections-references/Barack_Obama'})
+.then(function (res) {
+assert.equal(res.status, 200);
+assert.equal(res.body.sections.length, 4, 'Barack Obama has 4 
reference sections');
+});
+});
+
 it('The last section can be marked as a reference section', function() {
 return preq.get({uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-sections/Vallejo_(ferry)'})
 .then(function (res) {
@@ -190,6 +199,7 @@
 });
 });
 });
+
 it('Page with math formulas should load without error', function() {
 return preq.get({uri: server.config.uri + 
'de.wikipedia.org/v1/page/mobile-sections/Verallgemeinerter_Laplace-Operator'})
 .then(function (res) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I047a05d5bc4d4386f3b606d2f3aed33ee61cd109
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
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...mobileapps[master]: Mark reference sections with isReferenceSection flag

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

Change subject: Mark reference sections with isReferenceSection flag
..


Mark reference sections with isReferenceSection flag

When a section is a reference section add a flag for API consumers.
This is helpful for the lazy loading use case in MobileFrontend.

a follow up patch will expose reference sections in a separate endpoint

Bug: T146398
Change-Id: I2ed205781c65576f0b874491497268c4b5291442
---
A lib/transformations/markReferenceSections.js
M lib/transforms.js
M routes/mobile-sections.js
M test/features/mobile-sections/pagecontent.js
4 files changed, 78 insertions(+), 2 deletions(-)

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



diff --git a/lib/transformations/markReferenceSections.js 
b/lib/transformations/markReferenceSections.js
new file mode 100644
index 000..55e6549
--- /dev/null
+++ b/lib/transformations/markReferenceSections.js
@@ -0,0 +1,43 @@
+"use strict";
+
+/**
+ * Scan an array of sections and add an isReferenceSection property to any 
sections that
+ * contain references.
+ *
+ * @param {Array} sections to scan for references
+ * @param {Boolean} [removeText] whether to remove references from the section 
text after marking
+ */
+function markReferenceSections( sections, removeText ) {
+var topHeadingLevel = sections[0].toclevel;
+var lastTopLevelSection,
+  isReferenceSection = false;
+
+function mark( from, to ) {
+if ( isReferenceSection && from !== undefined ) {
+// Mark all the sections between the last heading and this one as 
reference sections
+sections.slice( from, to ).forEach( function ( section ) {
+section.isReferenceSection = true;
+if ( removeText ) {
+delete section.text;
+}
+} );
+}
+}
+
+sections.forEach( function ( section, i ) {
+var text = section.text;
+if ( section.toclevel === topHeadingLevel ) {
+mark( lastTopLevelSection, i );
+// reset the top level section and begin the hunt for references 
again.
+lastTopLevelSection = i;
+isReferenceSection = false;
+}
+if ( text.indexOf( 'class="mw-references' ) > -1 || text.indexOf( 
'class="refbegin' ) > -1 ) {
+isReferenceSection = true;
+}
+} );
+// the last section may have been a reference section
+mark( lastTopLevelSection, sections.length );
+}
+
+module.exports = markReferenceSections;
diff --git a/lib/transforms.js b/lib/transforms.js
index c20bfa9..aca4950 100644
--- a/lib/transforms.js
+++ b/lib/transforms.js
@@ -11,6 +11,7 @@
 var hideRedLinks = require('./transformations/hideRedLinks');
 var hideIPA = require('./transformations/hideIPA');
 var extractHatnotes = require('./transformations/extractHatnotes');
+var markReferenceSections = require('./transformations/markReferenceSections');
 
 var transforms = {};
 
@@ -259,5 +260,6 @@
 transforms._rmElementsWithSelectors = _rmElementsWithSelectors;
 
 transforms.extractHatnotes = extractHatnotes;
+transforms.markReferenceSections = markReferenceSections;
 
 module.exports = transforms;
diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 9498ee1..5cb300f 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -116,8 +116,14 @@
 }
 
 function buildRemaining(input) {
+// don't repeat the first section in remaining
+var sections = input.page.sections.slice(1);
+// mark references sections with a flag (if no sections its a stub or main 
page)
+if ( sections.length ) {
+transforms.markReferenceSections( sections, false );
+}
 return {
-sections: input.page.sections.slice(1) // don't repeat the first 
section
+sections: sections
 };
 }
 
diff --git a/test/features/mobile-sections/pagecontent.js 
b/test/features/mobile-sections/pagecontent.js
index 4e167dc..374e983 100644
--- a/test/features/mobile-sections/pagecontent.js
+++ b/test/features/mobile-sections/pagecontent.js
@@ -164,7 +164,32 @@
 assert.contains(res.body.lead.sections[0].text, '');
 });
 });
-
+it('Any sections that contain references should have a reference flag', 
function() {
+return preq.get({uri: server.config.uri + 
'en.wikipedia.org/v1/page/mobile-sections/Barack_Obama'})
+.then(function (res) {
+assert.equal(res.status, 200);
+res.body.remaining.sections.forEach(function(section) {
+if ( [ 'Notes and references', 'Notes', 'References', 
'Further reading' ].indexOf( section.line ) > -1 ) {
+assert.ok(section.isReferenceSection === true, 
section.line + ' should have a reference flag');
+} else {
+

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: service-runner doesn't recognize warning level

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

Change subject: service-runner doesn't recognize warning level
..


service-runner doesn't recognize warning level

 * Maybe a better fix would be to the replace throughout our codebase.

Change-Id: Idb0feb8113675230e3669279d46e3328797b857f
---
M lib/index.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/lib/index.js b/lib/index.js
index 839d3fd..79495c8 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -174,7 +174,8 @@
// By default, set the loggerBackend and metrics to service-runner's.
var parsoidOptions = {
loggerBackend: function(logData, cb) {
-   options.logger.log(logData.logType, 
prepareLog(logData));
+   var type = logData.logType.replace(/^warning/, 'warn');
+   options.logger.log(type, prepareLog(logData));
cb();
},
metrics: options.metrics,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb0feb8113675230e3669279d46e3328797b857f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add 'lint' to known log level types

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

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

Change subject: Add 'lint' to known log level types
..

Add 'lint' to known log level types

Used by the internal wikitext linter

Change-Id: I4c2c509fbb5dd6b5fcd343a17c543190d5db58e6
---
M lib/config/MWParserEnvironment.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 002cd50..3ce07ba 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -257,7 +257,7 @@
 
// Configure backends
logger.registerLoggingBackends([
-   "fatal", "error", "warning", "info",
+   "fatal", "error", "warning", "info", "lint"
], this.conf.parsoid, this.linter);
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Raise abuse filter emergency threshold for es.wikibooks

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

Change subject: Raise abuse filter emergency threshold for es.wikibooks
..


Raise abuse filter emergency threshold for es.wikibooks

Abuse Filter contains a security to avoid a filter to trigger
too many times, to avoid to disrupt contributions if a filter
configuration doesn't work as expected, blocking too much edits.

The regular configuration (5%, at least 2 edits) doesn't seem
to fit es.wikibooks, where they main antivandalism filter is
often automatically disabled.

We so raise the limit to only diasalbe a filter if it matches
more than 10 edits, constituting more than 30% of the actions.

Reference: https://www.mediawiki.org/wiki/Extension:AbuseFilter#Configuration

Bug: T145765
Change-Id: I41d11a811171fb02086e7d37c51153336c40fa0e
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c4d11d5..cbd4342 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12184,6 +12184,9 @@
'commonswiki' => [ // T87431
'default' => 0.30,
],
+   'eswikibooks' => [
+   'default' => 0.30, // T145765
+   ],
 ],
 'wmgAbuseFilterEmergencyDisableCount' => [
'default' => [
@@ -12192,6 +12195,9 @@
'enwiki' => [
'default' => 25,
],
+   'eswikibooks' => [
+   'default' => 10, // T145765
+   ],
'commonswiki' => [ // T87431
'default' => 25,
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41d11a811171fb02086e7d37c51153336c40fa0e
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MarcoAurelio 
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...Echo[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I51993b85c7720a025e8deeaf079806b56ac09f9b
---
M images/betafeatures-icon-notifications-ltr.svg
M images/betafeatures-icon-notifications-rtl.svg
2 files changed, 52 insertions(+), 22 deletions(-)


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

diff --git a/images/betafeatures-icon-notifications-ltr.svg 
b/images/betafeatures-icon-notifications-ltr.svg
index 71682ac..2a55cd9 100644
--- a/images/betafeatures-icon-notifications-ltr.svg
+++ b/images/betafeatures-icon-notifications-ltr.svg
@@ -1,12 +1,27 @@
-
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
-
-
-
-
-
-
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
diff --git a/images/betafeatures-icon-notifications-rtl.svg 
b/images/betafeatures-icon-notifications-rtl.svg
index 3fbb189..e6d2be7 100644
--- a/images/betafeatures-icon-notifications-rtl.svg
+++ b/images/betafeatures-icon-notifications-rtl.svg
@@ -1,12 +1,27 @@
-
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
-
-
-
-
-
-
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Ic2f60b4f30e8d6768ca386b9af4d544cb72f0a75
---
D images/ORES-beta-features-ltr.png
A images/ORES-beta-features-ltr.svg
D images/ORES-beta-features-rtl.png
A images/ORES-beta-features-rtl.svg
4 files changed, 76 insertions(+), 0 deletions(-)


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

diff --git a/images/ORES-beta-features-ltr.png 
b/images/ORES-beta-features-ltr.png
deleted file mode 100644
index ae73660..000
--- a/images/ORES-beta-features-ltr.png
+++ /dev/null
Binary files differ
diff --git a/images/ORES-beta-features-ltr.svg 
b/images/ORES-beta-features-ltr.svg
new file mode 100644
index 000..fa8248e
--- /dev/null
+++ b/images/ORES-beta-features-ltr.svg
@@ -0,0 +1,38 @@
+
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/images/ORES-beta-features-rtl.png 
b/images/ORES-beta-features-rtl.png
deleted file mode 100644
index 637d8e5..000
--- a/images/ORES-beta-features-rtl.png
+++ /dev/null
Binary files differ
diff --git a/images/ORES-beta-features-rtl.svg 
b/images/ORES-beta-features-rtl.svg
new file mode 100644
index 000..692b409
--- /dev/null
+++ b/images/ORES-beta-features-rtl.svg
@@ -0,0 +1,38 @@
+
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2f60b4f30e8d6768ca386b9af4d544cb72f0a75
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: puppetize reviewer-counts.json

2016-10-12 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: gerrit: puppetize reviewer-counts.json
..


gerrit: puppetize reviewer-counts.json

After putting the gerrit server role on new host cobalt,
we got some cronspam from this because the file it writes to
wasn't puppetized. It was fixed meanwhile but was still lacking
this to prevent it from happening again next time the role moves.

Bug: T147776
Change-Id: I0036971d2c57e7592b5848ac2cd5093fe1ba7f8e
---
M modules/gerrit/manifests/crons.pp
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/gerrit/manifests/crons.pp 
b/modules/gerrit/manifests/crons.pp
index 198c0be..a1cfc18 100644
--- a/modules/gerrit/manifests/crons.pp
+++ b/modules/gerrit/manifests/crons.pp
@@ -7,12 +7,20 @@
 minute  => [0, 15, 30, 45],
 }
 
-cron { 'list_reviewer_counts':
 # This is useful information about the distribution of reviewers.
 # Gerrit's rest api doesn't provide an easy way to get this data.
+file { '/var/www/reviewer-counts.json':
+ensure => 'present',
+owner  => 'gerrit2',
+group  => 'root',
+mode   => '0644',
+}
+
+cron { 'list_reviewer_counts':
 command => "/usr/bin/java -jar 
/var/lib/gerrit2/review_site/bin/gerrit.war gsql -d 
/var/lib/gerrit2/review_site/ --format JSON_SINGLE -c 'SELECT changes.change_id 
AS change_id, COUNT(DISTINCT patch_set_approvals.account_id) AS reviewer_count 
FROM changes LEFT JOIN patch_set_approvals ON (changes.change_id = 
patch_set_approvals.change_id) GROUP BY changes.change_id' > 
/var/www/reviewer-counts.json",
 user=> 'gerrit2',
 hour=> 1,
+require => File['/var/www/reviewer-counts.json'],
 }
 
 cron { 'clear_gerrit_logs':

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Bumped to the new wikimedia-mapdata

2016-10-12 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Bumped to the new wikimedia-mapdata
..

Bumped to the new wikimedia-mapdata

Change-Id: I73c8c1247781dec7e420a81fe6bb75cf3dd0f7d7
---
M lib/wikimedia-mapdata.js
M modules/box/data.js
2 files changed, 403 insertions(+), 385 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/98/315598/1

diff --git a/lib/wikimedia-mapdata.js b/lib/wikimedia-mapdata.js
index 924167b..18fa0bf 100644
--- a/lib/wikimedia-mapdata.js
+++ b/lib/wikimedia-mapdata.js
@@ -8,102 +8,103 @@
  */
 var DataLoader = function ( createPromise, createResolvedPromise, mwApi, 
clientStore, title, debounce, bind ) {
 
-   var DataLoader = function () {
-   /**
-* @type {Object} Hash of group ids and associated promises.
-* @private
-*/
-   this.promiseByGroup = {};
-   /**
-* @type {string[]} List of group ids to fetch next time
-*   {@link #fetch} is called.
-*
-* @private
-*/
-   this.nextFetch = [];
+  var DataLoader = function () {
+/**
+ * @type {Object} Hash of group ids and associated promises.
+ * @private
+ */
+this.promiseByGroup = {};
+/**
+ * @type {string[]} List of group ids to fetch next time
+ *   {@link #fetch} is called.
+ *
+ * @private
+ */
+this.nextFetch = [];
 
-   if ( debounce && bind ) {
-   this.fetch = debounce( 100, bind( this.fetch, this ) );
-   }
-   };
+if ( debounce && bind ) {
+  this.fetch = debounce( 100, bind( this.fetch, this ) );
+}
+  };
 
-   clientStore = clientStore || {};
+  clientStore = clientStore || {};
 
-   /**
-* @param {string} groupId
-* @return {Promise}
-*/
-   DataLoader.prototype.fetchGroup = function ( groupId ) {
-   var promise = this.promiseByGroup[ groupId ],
-   resolveFunc, rejectFunc;
-   if ( !promise ) {
-   if ( clientStore[groupId] ) {
-   promise = createResolvedPromise( 
clientStore[groupId] );
-   } else {
-   // FIXME: this is a horrible hack
-   // The resolve and reject functions are 
attached to the promise object's instance
-   // so that they can be called from the fetch 
function later
-   this.nextFetch.push( groupId );
-   promise = createPromise( function ( resolve, 
reject ) {
-   resolveFunc = resolve;
-   rejectFunc = reject;
-   } );
-   promise.mwResolve = resolveFunc;
-   promise.mwReject = rejectFunc;
-   }
+  /**
+   * @param {string} groupId
+   * @return {Promise}
+   */
+  DataLoader.prototype.fetchGroup = function ( groupId ) {
+var promise = this.promiseByGroup[ groupId ],
+resolveFunc, rejectFunc;
+if ( !promise ) {
+  if ( clientStore[ groupId ] ) {
+promise = createResolvedPromise( clientStore[ groupId ] );
+  } else {
+// FIXME: this is a horrible hack
+// The resolve and reject functions are attached to the promise 
object's instance
+// so that they can be called from the fetch function later
+this.nextFetch.push( groupId );
+promise = createPromise( function ( resolve, reject ) {
+  resolveFunc = resolve;
+  rejectFunc = reject;
+} );
+promise.mwResolve = resolveFunc;
+promise.mwReject = rejectFunc;
+  }
 
-   this.promiseByGroup[groupId] = promise;
-   }
-   return promise;
-   };
+  this.promiseByGroup[ groupId ] = promise;
+}
+return promise;
+  };
 
-   /**
-* @return {Promise}
-*/
-   DataLoader.prototype.fetch = function () {
-   var loader = this,
-   groupsToLoad = loader.nextFetch;
+  /**
+   * @return {Promise}
+   */
+  DataLoader.prototype.fetch = function () {
+var loader = this,
+groupsToLoad = loader.nextFetch;
 
-   if ( !groupsToLoad.length ) {
-   return createResolvedPromise();
-   }
+if ( !groupsToLoad.length ) {
+  return createResolvedPromise();
+}
 
-   loader.nextFetch = [];
+loader.nextFetch = [];
 
-   // FIXME: we need to fix this horrid hack
-   // 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: puppetize reviewer-counts.json

2016-10-12 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: gerrit: puppetize reviewer-counts.json
..

gerrit: puppetize reviewer-counts.json

After putting the gerrit server role on new host cobalt,
we got some cronspam from this because the file it writes to
wasn't puppetized. It was fixed meanwhile but was still lacking
this to prevent it from happening again next time the role moves.

Bug: T147776
Change-Id: I0036971d2c57e7592b5848ac2cd5093fe1ba7f8e
---
M modules/gerrit/manifests/crons.pp
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/315596/1

diff --git a/modules/gerrit/manifests/crons.pp 
b/modules/gerrit/manifests/crons.pp
index 198c0be..a1cfc18 100644
--- a/modules/gerrit/manifests/crons.pp
+++ b/modules/gerrit/manifests/crons.pp
@@ -7,12 +7,20 @@
 minute  => [0, 15, 30, 45],
 }
 
-cron { 'list_reviewer_counts':
 # This is useful information about the distribution of reviewers.
 # Gerrit's rest api doesn't provide an easy way to get this data.
+file { '/var/www/reviewer-counts.json':
+ensure => 'present',
+owner  => 'gerrit2',
+group  => 'root',
+mode   => '0644',
+}
+
+cron { 'list_reviewer_counts':
 command => "/usr/bin/java -jar 
/var/lib/gerrit2/review_site/bin/gerrit.war gsql -d 
/var/lib/gerrit2/review_site/ --format JSON_SINGLE -c 'SELECT changes.change_id 
AS change_id, COUNT(DISTINCT patch_set_approvals.account_id) AS reviewer_count 
FROM changes LEFT JOIN patch_set_approvals ON (changes.change_id = 
patch_set_approvals.change_id) GROUP BY changes.change_id' > 
/var/www/reviewer-counts.json",
 user=> 'gerrit2',
 hour=> 1,
+require => File['/var/www/reviewer-counts.json'],
 }
 
 cron { 'clear_gerrit_logs':

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Check user group memberships on protected pages

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

Change subject: Check user group memberships on protected pages
..


Check user group memberships on protected pages

Now that we know what groups a user is a member of we can check
if the user is a member of any of the allowed groups to edit the page.

This will enable a logged in user to see the regular edit pencils instead
of the disabled ones. The server still ultimately checks permissions upon
an edit submission.

Bug: T132834
Change-Id: I01a180f256f3a82ac197ed23445e976581ca8813
---
M app/src/main/java/org/wikipedia/server/Protection.java
M app/src/main/java/org/wikipedia/server/restbase/RbPageLead.java
2 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/server/Protection.java 
b/app/src/main/java/org/wikipedia/server/Protection.java
index 73aff64..90fdedf 100644
--- a/app/src/main/java/org/wikipedia/server/Protection.java
+++ b/app/src/main/java/org/wikipedia/server/Protection.java
@@ -1,5 +1,6 @@
 package org.wikipedia.server;
 
+import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 
 /** Protection settings for a page */
@@ -14,4 +15,9 @@
 }
 return null;
 }
+
+@NonNull
+public String[] getEditRoles() {
+return edit.clone();
+}
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/server/restbase/RbPageLead.java 
b/app/src/main/java/org/wikipedia/server/restbase/RbPageLead.java
index 4277ee2..21011c7 100644
--- a/app/src/main/java/org/wikipedia/server/restbase/RbPageLead.java
+++ b/app/src/main/java/org/wikipedia/server/restbase/RbPageLead.java
@@ -8,6 +8,7 @@
 import com.google.gson.annotations.SerializedName;
 
 import org.wikipedia.Site;
+import org.wikipedia.login.User;
 import org.wikipedia.page.GeoTypeAdapter;
 import org.wikipedia.page.Namespace;
 import org.wikipedia.page.Page;
@@ -185,7 +186,14 @@
 
 @Override
 public boolean isEditable() {
-return editable;
+return editable || isLoggedInUserAllowedToEdit();
+}
+
+private boolean isLoggedInUserAllowedToEdit() {
+User user = User.getUser();
+return user != null
+&& protection != null
+&& user.isAllowed(protection.getEditRoles());
 }
 
 @Override

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01a180f256f3a82ac197ed23445e976581ca8813
Gerrit-PatchSet: 19
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Retrieve group membership info when logging in

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

Change subject: Retrieve group membership info when logging in
..


Retrieve group membership info when logging in

This is in preparation for bug T132834 (Semi-protected page cannot be edited).
The problem is that with the highly cached responses we get from RESTBase
the app doesn't get any user specific responses anymore.
In the case of a semi-protected page, it would return false, no matter as
what user one is logged in. Instead of taking that as the truth we could
consider the value of "editable" in the lead response to be "editable for
anonymous users". To be able to do that we need to retrieve the group
membership information for a logged in user first.

The membership info would only be available for newly logged in users.
If it's important that it works for already logged in users we could follow
up with another patch which checks if there is membership data when
downloading a page.

GroupMembershipClient:
Added another DataClient which automatically gets executed
when the login process is complete.

The login would be marked as failed if the retrieval of group membership
info fails. We could theoretically mark it as successful instead. This is
just so we can say that if a user is newly logged in and has the proper
membership she should be able to edit semi-protected pages.

The list=users request could provide more information in the future.
We just don't need more at this time.

Bug: T132834
Change-Id: Iccb8a482bbe4646ed3f625b7da8e3284a5a3f8d8
---
A app/src/main/java/org/wikipedia/login/GroupMembershipClient.java
M app/src/main/java/org/wikipedia/login/LoginClient.java
M app/src/main/java/org/wikipedia/login/User.java
M app/src/main/java/org/wikipedia/login/UserInfoStorage.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/java/org/wikipedia/settings/PrefsIoUtil.java
M app/src/main/res/values/preference_keys.xml
M app/src/test/java/org/wikipedia/login/UserTest.java
8 files changed, 253 insertions(+), 22 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/login/GroupMembershipClient.java 
b/app/src/main/java/org/wikipedia/login/GroupMembershipClient.java
new file mode 100644
index 000..b1229aa
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/login/GroupMembershipClient.java
@@ -0,0 +1,126 @@
+package org.wikipedia.login;
+
+import org.wikipedia.Site;
+import org.wikipedia.dataclient.mwapi.MwQueryResponse;
+import org.wikipedia.dataclient.retrofit.MwCachedService;
+
+import com.google.gson.annotations.SerializedName;
+
+import retrofit2.Call;
+import retrofit2.Callback;
+import retrofit2.Response;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Retrofit DataClient to retrieve implicit group membership information for a 
specific user.
+ */
+class GroupMembershipClient {
+@NonNull private final MwCachedService cachedService = new 
MwCachedService<>(Service.class);
+
+@Nullable private Call groupCall;
+
+interface GroupMembershipCallback {
+void success(@NonNull Set result);
+void error(@NonNull Throwable caught);
+}
+
+public void request(@NonNull final Site site, @NonNull final String 
userName,
+@NonNull final GroupMembershipCallback cb) {
+cancel();
+
+groupCall = cachedService.service(site).listUsers(userName);
+groupCall.enqueue(new Callback() {
+@Override
+public void onResponse(Call call,
+   Response 
response) {
+if (response.isSuccessful()) {
+final MwQueryResponse body = 
response.body();
+final UserMemberships query = body.query();
+if (query != null) {
+cb.success(query.getGroupsFor(userName));
+} else if (body.getError() != null) {
+cb.error(new LoginClient.LoginFailedException(
+"Failed to retrieve group membership data. "
++ body.getError().toString()));
+} else {
+cb.error(new LoginClient.LoginFailedException(
+"Unexpected error trying to retrieve group 
membership data. "
++ body.toString()));
+}
+} else {
+cb.error(new 
LoginClient.LoginFailedException(response.message()));
+}
+}
+
+  

[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I0d02c6c6bce35742084f4c72010639ddae2de0b9
---
M images/BetaFeatures/wb-readmore-beta-ltr.svg
M images/BetaFeatures/wb-readmore-beta-rtl.svg
2 files changed, 83 insertions(+), 111 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RelatedArticles 
refs/changes/94/315594/1

diff --git a/images/BetaFeatures/wb-readmore-beta-ltr.svg 
b/images/BetaFeatures/wb-readmore-beta-ltr.svg
index 00b2a41..a46b91c 100644
--- a/images/BetaFeatures/wb-readmore-beta-ltr.svg
+++ b/images/BetaFeatures/wb-readmore-beta-ltr.svg
@@ -1,61 +1,48 @@
 
-http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns;>
-
-wb-otherprojects-beta-ltr
-Created with Sketch.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
-
-
-
-
-
-
+
+
+
+
+
+
 
-
-
-
-
-
+
+
+
+
+
 
 
-
\ No newline at end of file
+
diff --git a/images/BetaFeatures/wb-readmore-beta-rtl.svg 
b/images/BetaFeatures/wb-readmore-beta-rtl.svg
index d61cdf0..7bfa257 100644
--- a/images/BetaFeatures/wb-readmore-beta-rtl.svg
+++ b/images/BetaFeatures/wb-readmore-beta-rtl.svg
@@ -1,63 +1,48 @@
 
-http://www.w3.org/2000/svg; xmlns:xlink="http://www.w3.org/1999/xlink; 
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns;>
-
-wb-otherprojects-beta-ltr
-Created with Sketch.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
-
\ No newline at end of file
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d02c6c6bce35742084f4c72010639ddae2de0b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RelatedArticles
Gerrit-Branch: master
Gerrit-Owner: Esanders 

___
MediaWiki-commits mailing 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: WIP: bdsync backup setup for labstore

2016-10-12 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: WIP: bdsync backup setup for labstore
..

WIP: bdsync backup setup for labstore

Change-Id: I67cb9b5579788ae4542f86646d01f502f95733df
---
A modules/labstore/files/block_sync.sh
A modules/labstore/manifests/bdsync.pp
A modules/labstore/manifests/device_backup.pp
3 files changed, 72 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/315595/1

diff --git a/modules/labstore/files/block_sync.sh 
b/modules/labstore/files/block_sync.sh
new file mode 100644
index 000..207d8f6
--- /dev/null
+++ b/modules/labstore/files/block_sync.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+#PV_OPTIONS='-p -t -e -r -a -b'
+PV_OPTIONS='-q'
+
+remotehost=$1
+
+remotedev=$2
+
+localdev=$3
+
+remotenice=10
+
+blocksize=16384
+
+/bin/findmnt --notruncate -P -n -c $localdev
+if [ $? -eq 0 ]
+then
+  echo "Local device is mounted.  Operations may be unsafe."
+  exit 1
+fi
+
+/usr/bin/bdsync --blocksize=$blocksize \
+--remdata "ssh -i /root/.ssh/id_labstore root@$remotehost 'nice 
-${remotenice} /usr/bin/bdsync --server'" \
+$localdev \
+$remotedev | pv $PV_OPTIONS | sudo /usr/bin/bdsync --patch=$localdev
diff --git a/modules/labstore/manifests/bdsync.pp 
b/modules/labstore/manifests/bdsync.pp
new file mode 100644
index 000..0adfcc8
--- /dev/null
+++ b/modules/labstore/manifests/bdsync.pp
@@ -0,0 +1,15 @@
+class labstore::bdsync {
+
+package { 'bdsync':
+ensure => present,
+before => File['/usr/local/sbin/block_sync'],
+}
+
+file { '/usr/local/sbin/block_sync':
+source => 'puppet:///modules/labstore/block_sync.sh',
+owner   => 'root',
+group   => 'root',
+mode=> '0655',
+}
+}
+
diff --git a/modules/labstore/manifests/device_backup.pp 
b/modules/labstore/manifests/device_backup.pp
new file mode 100644
index 000..0e0e8a2
--- /dev/null
+++ b/modules/labstore/manifests/device_backup.pp
@@ -0,0 +1,31 @@
+define labstore::device_backup (
+$remotehost,
+$remotedev,
+$localdev,
+$remotenice,
+$weekday,
+$hour=0,
+) {
+
+include labstore::bdsync
+$remote_ip = ip_resolve($remotehost, 4)
+
+$day = {
+'sunday'=> 0,
+'monday'=> 1,
+'tuesday'   => 2,
+'wednesday' => 3,
+'thursday'  => 4,
+'friday'=> 5,
+'saturday'  => 6,
+}
+
+cron { "bdsync-${remotehost}-${remotedev}":
+ensure  => 'present',
+environment => 'MAILTO=labs-adm...@wikimedia.org',
+user=> 'root',
+command => "/usr/local/sbin/block_sync ${remote_ip} ${remotedev} 
${localdev} ${remotenice}" 
+weekday => $day[$weekday],
+hour=> $hour,
+}
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Remove outdated lgtoken checks that break tests

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

Change subject: Remove outdated lgtoken checks that break tests
..


Remove outdated lgtoken checks that break tests

Change-Id: If2d17d00c7ad8bcf47fa6245b987d3cd8e5cde60
---
M tests/phpunit/ApiPageTriageActionTest.php
M tests/phpunit/SpecialNewPagesFeedTest.php
2 files changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/ApiPageTriageActionTest.php 
b/tests/phpunit/ApiPageTriageActionTest.php
index 0f5853c..751ebc2 100644
--- a/tests/phpunit/ApiPageTriageActionTest.php
+++ b/tests/phpunit/ApiPageTriageActionTest.php
@@ -64,7 +64,6 @@
$this->assertArrayHasKey( "login", $result );
$this->assertArrayHasKey( "result", $result['login'] );
$this->assertEquals( "Success", 
$result['login']['result'] );
-   $this->assertArrayHasKey( 'lgtoken', $result['login'] );
 
$this->assertNotEmpty( $session, 'API Login must return 
a session' );
 
diff --git a/tests/phpunit/SpecialNewPagesFeedTest.php 
b/tests/phpunit/SpecialNewPagesFeedTest.php
index 6177c79..f0459b1 100644
--- a/tests/phpunit/SpecialNewPagesFeedTest.php
+++ b/tests/phpunit/SpecialNewPagesFeedTest.php
@@ -62,7 +62,6 @@
$this->assertArrayHasKey( "login", $result );
$this->assertArrayHasKey( "result", $result['login'] );
$this->assertEquals( "Success", 
$result['login']['result'] );
-   $this->assertArrayHasKey( 'lgtoken', $result['login'] );
 
$this->assertNotEmpty( $session, 'API Login must return 
a session' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2d17d00c7ad8bcf47fa6245b987d3cd8e5cde60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: puppet cleanup for CI master

2016-10-12 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: contint: puppet cleanup for CI master
..


contint: puppet cleanup for CI master

* Remove package graphviz, was installed for the Jenkins plugin "job
  dependency graph" which we no more use.
* Drop groovy shutdown workaround for SECURITY-128 now included in
  Jenkins since 1.638 and 1.625.2
  https://github.com/jenkinsci-cert/SECURITY-218

Change-Id: I55b8b5509e7790b981a1b6e6e35ee8e34242f6d6
---
M modules/jenkins/manifests/init.pp
1 file changed, 6 insertions(+), 11 deletions(-)

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



diff --git a/modules/jenkins/manifests/init.pp 
b/modules/jenkins/manifests/init.pp
index 43a81bd..9669681 100644
--- a/modules/jenkins/manifests/init.pp
+++ b/modules/jenkins/manifests/init.pp
@@ -18,8 +18,6 @@
 require => Package['openjdk-7-jre-headless'],
 }
 
-# Graphiz on Jenkins master for the 'job dependency graph' plugin
-require_package('graphviz')
 
 # Jenkins should write everything group writable so admins can interact 
with
 # files easily, hence we need it to run with umask 0002.
@@ -34,18 +32,15 @@
 mode=> '0644',
 }
 
+# Legacy workaround for a Jenkins security issue. No more needed since
+# Jenkins 1.638 and 1.625.2
+# 
https://jenkins.io/blog/2015/11/06/mitigating-unauthenticated-remote-code-execution-0-day-in-jenkins-cli/
+# https://github.com/jenkinsci-cert/SECURITY-218
 file { '/var/lib/jenkins/init.groovy.d':
-ensure => 'directory',
-owner  => 'jenkins',
-group  => 'jenkins',
-mode   => '0755',
+ensure => absent,
 }
-
 file { '/var/lib/jenkins/init.groovy.d/cli-shutdown.groovy':
-source => 'puppet:///modules/jenkins/cli-shutdown.groovy',
-owner  => 'jenkins',
-group  => 'jenkins',
-mode   => '0755',
+ensure => absent,
 }
 
 service { 'jenkins':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I55b8b5509e7790b981a1b6e6e35ee8e34242f6d6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
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...Popups[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Ic97bed840c5e9c34a4c8e81a2148e2a0af4ed286
---
M resources/images/popups-ltr.svg
M resources/images/popups-rtl.svg
2 files changed, 82 insertions(+), 2 deletions(-)


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

diff --git a/resources/images/popups-ltr.svg b/resources/images/popups-ltr.svg
index 9df91c2..c1f2dd5 100644
--- a/resources/images/popups-ltr.svg
+++ b/resources/images/popups-ltr.svg
@@ -1 +1,41 @@
-http://www.w3.org/2000/svg; 
width="264" height="162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/images/popups-rtl.svg b/resources/images/popups-rtl.svg
index 3a7cdf1..65c7ae9 100644
--- a/resources/images/popups-rtl.svg
+++ b/resources/images/popups-rtl.svg
@@ -1 +1,41 @@
-http://www.w3.org/2000/svg; 
width="264" height="162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic97bed840c5e9c34a4c8e81a2148e2a0af4ed286
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Activate ec.wikimedia.org

2016-10-12 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Activate ec.wikimedia.org
..


Activate ec.wikimedia.org

Bug: T135521
Change-Id: Idd0faae440019727664846a5a299808a58075e2c
---
M templates/wikimedia.org
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 3adc14e..aad6e49 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -283,6 +283,7 @@
 co.m600 IN DYNA geoip!text-addrs
 commons.m   600 IN DYNA geoip!text-addrs
 dk.m600 IN DYNA geoip!text-addrs
+ec.m600 IN DYNA geoip!text-addrs
 ee.m600 IN DYNA geoip!text-addrs
 et.m600 IN DYNA geoip!text-addrs
 incubator.m 600 IN DYNA geoip!text-addrs
@@ -555,6 +556,7 @@
 comcom   600 IN DYNA geoip!text-addrs
 commons  600 IN DYNA geoip!text-addrs
 dk   600 IN DYNA geoip!text-addrs
+ec   600 IN DYNA geoip!text-addrs
 educacao 600 IN DYNA geoip!text-addrs
 education600 IN DYNA geoip!text-addrs
 ee   600 IN DYNA geoip!text-addrs

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd0faae440019727664846a5a299808a58075e2c
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia/annualreport[master]: Revert "Remove sentence about charity navigator"

2016-10-12 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Revert "Remove sentence about charity navigator"
..


Revert "Remove sentence about charity navigator"

Requested by Rosie Lewis

This reverts commit 1d660b41391b1130a4c13d84ffdb4e2f7d920e5c.

Change-Id: Ia91c6ef9e80de9a9c51bf4c4b3ff4259b7dff71f
---
M 2015/people/wikimedia-foundation.html
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/2015/people/wikimedia-foundation.html 
b/2015/people/wikimedia-foundation.html
index fd0dc9c..a356607 100644
--- a/2015/people/wikimedia-foundation.html
+++ b/2015/people/wikimedia-foundation.html
@@ -105,6 +105,8 @@
 The whole world needs knowledge: more people than before, in 
different ways than before. Our mission is to ensure that everyone, now and in 
the future, can access all information. In the hands of everyone, it can cure 
disease, settle disputes, lift oppression, and inspire creativity.
 
 Join our mission. Share your knowledge. https://wikimediafoundation.org/wiki/Work_with_us#Wikimedia_Careers;>Work 
with us. Contribute.
+
+The Wikimedia Foundation is a four-star rated charity 
according to http://www.charitynavigator.org/index.cfm?bay=search.summary=11212#.VlTdwhCrTdQ;>Charity
 Navigator.
   
 
   

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia91c6ef9e80de9a9c51bf4c4b3ff4259b7dff71f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/annualreport
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add patch to migrate rc_ip field to varbinary(40)

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

Change subject: Add patch to migrate rc_ip field to varbinary(40)
..


Add patch to migrate rc_ip field to varbinary(40)

This makes it match tables.sql, as it was modified previously but no
related database patch was made.

Bug: T117854
Change-Id: I239e7ee4d97fcc3cb96c98dc53d9371883aaf4fb
---
M includes/installer/MysqlUpdater.php
A maintenance/archives/patch-rc_ip_modify.sql
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/includes/installer/MysqlUpdater.php 
b/includes/installer/MysqlUpdater.php
index 497f273..a637ce0 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -290,6 +290,7 @@
[ 'doNonUniquePlTlIl' ],
[ 'addField', 'change_tag', 'ct_id', 
'patch-change_tag-ct_id.sql' ],
[ 'addField', 'tag_summary', 'ts_id', 
'patch-tag_summary-ts_id.sql' ],
+   [ 'modifyField', 'recentchanges', 'rc_ip', 
'patch-rc_ip_modify.sql' ],
];
}
 
diff --git a/maintenance/archives/patch-rc_ip_modify.sql 
b/maintenance/archives/patch-rc_ip_modify.sql
new file mode 100644
index 000..e889b5c
--- /dev/null
+++ b/maintenance/archives/patch-rc_ip_modify.sql
@@ -0,0 +1 @@
+ALTER TABLE /*_*/recentchanges MODIFY COLUMN rc_ip varbinary(40) NOT NULL 
default '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I239e7ee4d97fcc3cb96c98dc53d9371883aaf4fb
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Jjanes 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: Tim Starling 
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...RevisionSlider[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I60e90436a6e99f7d5131b4cfe0ff4d9e956bcb94
---
M RevisionSlider.hooks.php
D resources/RevisionSlider-beta-features-ltr.png
A resources/RevisionSlider-beta-features-ltr.svg
D resources/RevisionSlider-beta-features-rtl.png
A resources/RevisionSlider-beta-features-rtl.svg
5 files changed, 112 insertions(+), 2 deletions(-)


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

diff --git a/RevisionSlider.hooks.php b/RevisionSlider.hooks.php
index 96fbd00..fc49f61 100644
--- a/RevisionSlider.hooks.php
+++ b/RevisionSlider.hooks.php
@@ -120,8 +120,8 @@
'label-message' => 
'revisionslider-beta-feature-message',
'desc-message' => 
'revisionslider-beta-feature-description',
'screenshot' => [
-   'ltr' => 
"$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-ltr.png",
-   'rtl' => 
"$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-rtl.png",
+   'ltr' => 
"$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-ltr.svg",
+   'rtl' => 
"$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-rtl.svg",
],
'info-link' => 
'https://www.mediawiki.org/wiki/Extension:RevisionSlider',
'discussion-link' => 
'https://www.mediawiki.org/wiki/Extension_talk:RevisionSlider',
diff --git a/resources/RevisionSlider-beta-features-ltr.png 
b/resources/RevisionSlider-beta-features-ltr.png
deleted file mode 100644
index ed4c2d8..000
--- a/resources/RevisionSlider-beta-features-ltr.png
+++ /dev/null
Binary files differ
diff --git a/resources/RevisionSlider-beta-features-ltr.svg 
b/resources/RevisionSlider-beta-features-ltr.svg
new file mode 100644
index 000..82696ca
--- /dev/null
+++ b/resources/RevisionSlider-beta-features-ltr.svg
@@ -0,0 +1,55 @@
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/RevisionSlider-beta-features-rtl.png 
b/resources/RevisionSlider-beta-features-rtl.png
deleted file mode 100644
index 5be6ab5..000
--- a/resources/RevisionSlider-beta-features-rtl.png
+++ /dev/null
Binary files differ
diff --git a/resources/RevisionSlider-beta-features-rtl.svg 
b/resources/RevisionSlider-beta-features-rtl.svg
new file mode 100644
index 000..15a9c44
--- /dev/null
+++ b/resources/RevisionSlider-beta-features-rtl.svg
@@ -0,0 +1,55 @@
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60e90436a6e99f7d5131b4cfe0ff4d9e956bcb94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] wikimedia/annualreport[master]: Revert "Remove sentence about charity navigator"

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

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

Change subject: Revert "Remove sentence about charity navigator"
..

Revert "Remove sentence about charity navigator"

Requested by Rosie Lewis

This reverts commit 1d660b41391b1130a4c13d84ffdb4e2f7d920e5c.

Change-Id: Ia91c6ef9e80de9a9c51bf4c4b3ff4259b7dff71f
---
M 2015/people/wikimedia-foundation.html
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/annualreport 
refs/changes/91/315591/1

diff --git a/2015/people/wikimedia-foundation.html 
b/2015/people/wikimedia-foundation.html
index fd0dc9c..a356607 100644
--- a/2015/people/wikimedia-foundation.html
+++ b/2015/people/wikimedia-foundation.html
@@ -105,6 +105,8 @@
 The whole world needs knowledge: more people than before, in 
different ways than before. Our mission is to ensure that everyone, now and in 
the future, can access all information. In the hands of everyone, it can cure 
disease, settle disputes, lift oppression, and inspire creativity.
 
 Join our mission. Share your knowledge. https://wikimediafoundation.org/wiki/Work_with_us#Wikimedia_Careers;>Work 
with us. Contribute.
+
+The Wikimedia Foundation is a four-star rated charity 
according to http://www.charitynavigator.org/index.cfm?bay=search.summary=11212#.VlTdwhCrTdQ;>Charity
 Navigator.
   
 
   

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia91c6ef9e80de9a9c51bf4c4b3ff4259b7dff71f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/annualreport
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove deprecated ObjectCache::newAccelerator method

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

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

Change subject: Remove deprecated ObjectCache::newAccelerator method
..

Remove deprecated ObjectCache::newAccelerator method

Change-Id: I2be2afe3f2bba830aea4e985005adb72f0e45a82
---
M includes/objectcache/ObjectCache.php
1 file changed, 0 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/315590/1

diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 8160a75..53a474b 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -292,24 +292,6 @@
}
 
/**
-* @param array $params [optional] Array key 'fallback' for $fallback.
-* @param int|string $fallback Fallback cache, e.g. (CACHE_NONE, 
"hash") (since 1.24)
-* @return BagOStuff
-* @deprecated since 1.27
-*/
-   public static function newAccelerator( $params = [], $fallback = null ) 
{
-   if ( $fallback === null ) {
-   if ( is_array( $params ) && isset( $params['fallback'] 
) ) {
-   $fallback = $params['fallback'];
-   } elseif ( !is_array( $params ) ) {
-   $fallback = $params;
-   }
-   }
-
-   return self::getLocalServerInstance( $fallback );
-   }
-
-   /**
 * Create a new cache object of the specified type.
 *
 * @since 1.26

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: I755d0d3b3fdcf569d2470a4a9980ae0e2df66a37
---
M UniversalLanguageSelector.hooks.php
D resources/images/compact-links-ltr.png
M resources/images/compact-links-ltr.svg
D resources/images/compact-links-rtl.png
M resources/images/compact-links-rtl.svg
5 files changed, 70 insertions(+), 4 deletions(-)


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

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index fed4065..2bd92cc 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -404,8 +404,8 @@
'label-message' => 'uls-betafeature-label',
'desc-message' => 'uls-betafeature-desc',
'screenshot' => [
-   'ltr' => 
"$imagesDir/compact-links-ltr.png",
-   'rtl' => 
"$imagesDir/compact-links-rtl.png",
+   'ltr' => 
"$imagesDir/compact-links-ltr.svg",
+   'rtl' => 
"$imagesDir/compact-links-rtl.svg",
],
'info-link' =>

'https://www.mediawiki.org/wiki/Universal_Language_Selector/Compact_Language_Links',
diff --git a/resources/images/compact-links-ltr.png 
b/resources/images/compact-links-ltr.png
deleted file mode 100644
index ac141dd..000
--- a/resources/images/compact-links-ltr.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/compact-links-ltr.svg 
b/resources/images/compact-links-ltr.svg
index cb5f42c..666d554 100644
--- a/resources/images/compact-links-ltr.svg
+++ b/resources/images/compact-links-ltr.svg
@@ -1 +1,34 @@
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/images/compact-links-rtl.png 
b/resources/images/compact-links-rtl.png
deleted file mode 100644
index 0f73c95..000
--- a/resources/images/compact-links-rtl.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/compact-links-rtl.svg 
b/resources/images/compact-links-rtl.svg
index 1589d0f..5982f40 100644
--- a/resources/images/compact-links-rtl.svg
+++ b/resources/images/compact-links-rtl.svg
@@ -1 +1,34 @@
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
\ No newline at end of file
+
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I755d0d3b3fdcf569d2470a4a9980ae0e2df66a37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Ied0524126f3d76e8e3635ebf2f097c621e134f2a
---
M images/betafeature-flow-ltr.svg
M images/betafeature-flow-rtl.svg
2 files changed, 50 insertions(+), 38 deletions(-)


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

diff --git a/images/betafeature-flow-ltr.svg b/images/betafeature-flow-ltr.svg
index 9fb14a6..a0e6100 100644
--- a/images/betafeature-flow-ltr.svg
+++ b/images/betafeature-flow-ltr.svg
@@ -1,23 +1,29 @@
 
 http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
diff --git a/images/betafeature-flow-rtl.svg b/images/betafeature-flow-rtl.svg
index a0de77b..1e627ad 100644
--- a/images/betafeature-flow-rtl.svg
+++ b/images/betafeature-flow-rtl.svg
@@ -1,23 +1,29 @@
 
 http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update beta feature screenshots to use proper layout and col...

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

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

Change subject: Update beta feature screenshots to use proper layout and colours
..

Update beta feature screenshots to use proper layout and colours

Bug: T144428
Change-Id: Iee029136dfc3728f16f1d28910c83139e2d471cb
---
M betafeatures-icon-VisualEditor-ltr.svg
M betafeatures-icon-VisualEditor-rtl.svg
M betafeatures-icon-WikitextEditor-ltr.svg
M betafeatures-icon-WikitextEditor-rtl.svg
4 files changed, 167 insertions(+), 693 deletions(-)


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

diff --git a/betafeatures-icon-VisualEditor-ltr.svg 
b/betafeatures-icon-VisualEditor-ltr.svg
index 5ae38fa..6858b50 100644
--- a/betafeatures-icon-VisualEditor-ltr.svg
+++ b/betafeatures-icon-VisualEditor-ltr.svg
@@ -1,113 +1,56 @@
 
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
+http://www.w3.org/2000/svg; id="svg2" viewBox="0 0 264 162" 
height="162" width="264">
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
 
-
-
+
+
 
-
-
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
-
+
+
 
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/betafeatures-icon-VisualEditor-rtl.svg 
b/betafeatures-icon-VisualEditor-rtl.svg
index e561802..ce2d989 100644
--- a/betafeatures-icon-VisualEditor-rtl.svg
+++ b/betafeatures-icon-VisualEditor-rtl.svg
@@ -1,113 +1,61 @@
 
-http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162">
-
-
-
+http://www.w3.org/2000/svg; width="264" height="162" viewBox="0 0 
264 162" id="svg2">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
-
-
-
-
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
 
-
-
+
+
 
-
-
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
+
+
 
-
-
+
+
 
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/betafeatures-icon-WikitextEditor-ltr.svg 
b/betafeatures-icon-WikitextEditor-ltr.svg
index 67b49cc..23374a6 100644
--- a/betafeatures-icon-WikitextEditor-ltr.svg
+++ b/betafeatures-icon-WikitextEditor-ltr.svg
@@ -1,239 +1,39 @@
 
-
-
-http://purl.org/dc/elements/1.1/;
-   xmlns:cc="http://creativecommons.org/ns#;
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;
-   xmlns:svg="http://www.w3.org/2000/svg;
-   xmlns="http://www.w3.org/2000/svg;
-  

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Event handlers should not be exposed globally

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

Change subject: Event handlers should not be exposed globally
..


Event handlers should not be exposed globally

Bug: T147306
Change-Id: Ib0bae3e7c2e420a4b717391d4a25473a3a9f9128
---
M resources/ext.popups.renderer/desktopRenderer.js
1 file changed, 25 insertions(+), 20 deletions(-)

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



diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index c7e599a..54aa0d2 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -148,9 +148,9 @@
};
 
$link
-   .on( 'mouseleave blur', mw.popups.render.leaveInactive )
-   .off( 'click', mw.popups.render.clickHandler )
-   .on( 'click', mw.popups.render.clickHandler );
+   .on( 'mouseleave blur', leaveInactive )
+   .off( 'click', clickHandler )
+   .on( 'click', clickHandler );
 
if ( mw.popups.render.cache[ $link.attr( 'href' ) ] ) {
openTimer = mw.popups.render.wait( 
mw.popups.render.POPUP_DELAY )
@@ -212,7 +212,7 @@
.append( popup.clone() )
.show()
.attr( 'aria-hidden', 'false' )
-   .on( 'mouseleave', mw.popups.render.leaveActive )
+   .on( 'mouseleave', leaveActive )
.on( 'mouseenter', function () {
if ( closeTimer ) {
closeTimer.abort();
@@ -233,13 +233,13 @@
 
cache.process( link, $.extend( {}, logData ) );
 
-   mw.popups.$popup.find( 'a.mwe-popups-extract, 
a.mwe-popups-discreet' ).click( mw.popups.render.clickHandler );
+   mw.popups.$popup.find( 'a.mwe-popups-extract, 
a.mwe-popups-discreet' ).click( clickHandler );
 
link
-   .off( 'mouseleave blur', mw.popups.render.leaveInactive 
)
-   .on( 'mouseleave blur', mw.popups.render.leaveActive );
+   .off( 'mouseleave blur', leaveInactive )
+   .on( 'mouseleave blur', leaveActive );
 
-   $( document ).on( 'keydown', mw.popups.render.closeOnEsc );
+   $( document ).on( 'keydown', closeOnEsc );
 
mw.popups.incrementPreviewCount();
};
@@ -248,9 +248,10 @@
 * Click handler for the hovercard
 *
 * @method clickHandler
+* @ignore
 * @param {Object} event
 */
-   mw.popups.render.clickHandler = function ( event ) {
+   function clickHandler( event ) {
var action = mw.popups.getAction( event ),
$activeLink = getActiveLink();
 
@@ -262,7 +263,7 @@
 
// close the popup
mw.popups.render.closePopup();
-   };
+   }
 
/**
 * Removes the hover class from the link and unbinds events
@@ -275,7 +276,7 @@
var fadeInClass, fadeOutClass,
$activeLink = getActiveLink();
 
-   $activeLink.off( 'mouseleave blur', 
mw.popups.render.leaveActive );
+   $activeLink.off( 'mouseleave blur', leaveActive );
 
fadeInClass = ( mw.popups.$popup.hasClass( 
'mwe-popups-fade-in-up' ) ) ?
'mwe-popups-fade-in-up' :
@@ -286,7 +287,7 @@
'mwe-popups-fade-out-up';
 
mw.popups.$popup
-   .off( 'mouseleave', mw.popups.render.leaveActive )
+   .off( 'mouseleave', leaveActive )
.removeClass( fadeInClass )
.addClass( fadeOutClass );
 
@@ -303,7 +304,7 @@
closeTimer.abort();
}
 
-   $( document ).off( 'keydown', mw.popups.render.closeOnEsc );
+   $( document ).off( 'keydown', closeOnEsc );
 
if ( $.isFunction( logCallback ) ) {
logCallback();
@@ -341,13 +342,15 @@
 * Use escape to close popup
 *
 * @method closeOnEsc
+* @ignore
+* @param {jQuery.Event} event
 */
-   mw.popups.render.closeOnEsc = function ( event ) {
+   function closeOnEsc( event ) {
var $activeLink = getActiveLink();
if ( event.keyCode === 27 && $activeLink ) {
mw.popups.render.closePopup( logDismissAction );
}
-   };
+   }
 
/**
 * Closes the box after a delay
@@ -355,22 +358,24 @@
 * the link to the popup box. Also avoids closing the popup by accident
 *

[MediaWiki-commits] [Gerrit] mediawiki...BetaFeatures[master]: Create SVG templates for screenshot images

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

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

Change subject: Create SVG templates for screenshot images
..

Create SVG templates for screenshot images

Bug: T144428
Change-Id: I4ccf605b034303cb2fcbdbd31a76a64f353e321f
---
A resources/images/screenshot-template-ltr.svg
A resources/images/screenshot-template-rtl.svg
2 files changed, 190 insertions(+), 0 deletions(-)


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

diff --git a/resources/images/screenshot-template-ltr.svg 
b/resources/images/screenshot-template-ltr.svg
new file mode 100644
index 000..ea3b4d6
--- /dev/null
+++ b/resources/images/screenshot-template-ltr.svg
@@ -0,0 +1,94 @@
+
+http://purl.org/dc/elements/1.1/;
+   xmlns:cc="http://creativecommons.org/ns#;
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns="http://www.w3.org/2000/svg;
+   version="1.1"
+   id="svg2"
+   viewBox="0 0 264 162"
+   height="162"
+   width="264">
+  
+
+  
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage; />
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+
+
+
+
+  
+  
+  
+  
+  
+  
+
+
+  
+  
+
+
+
+  
+
diff --git a/resources/images/screenshot-template-rtl.svg 
b/resources/images/screenshot-template-rtl.svg
new file mode 100644
index 000..c38e1ae
--- /dev/null
+++ b/resources/images/screenshot-template-rtl.svg
@@ -0,0 +1,96 @@
+
+http://purl.org/dc/elements/1.1/;
+   xmlns:cc="http://creativecommons.org/ns#;
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns="http://www.w3.org/2000/svg;
+   version="1.1"
+   id="svg2"
+   viewBox="0 0 264 162"
+   height="162"
+   width="264">
+  
+
+  
+image/svg+xml
+http://purl.org/dc/dcmitype/StillImage; />
+
+  
+
+  
+  
+
+  
+
+  
+  
+
+
+
+
+
+  
+  
+  
+  
+  
+  
+
+
+  
+  
+
+
+
+  
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ccf605b034303cb2fcbdbd31a76a64f353e321f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Wait and reset do not need to be exposed globally

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

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

Change subject: Wait and reset do not need to be exposed globally
..

Wait and reset do not need to be exposed globally

Bug: T147306
Change-Id: I506b12f00ec6ea08512eb1a877e6d0b6d5fb2813
---
M resources/ext.popups.renderer/desktopRenderer.js
1 file changed, 13 insertions(+), 11 deletions(-)


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

diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index 0907d3e..50378e4 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -153,13 +153,13 @@
.on( 'click', clickHandler );
 
if ( mw.popups.render.cache[ $link.attr( 'href' ) ] ) {
-   openTimer = mw.popups.render.wait( 
mw.popups.render.POPUP_DELAY )
+   openTimer = wait( mw.popups.render.POPUP_DELAY )
.done( function () {
mw.popups.render.openPopup( $link, 
event );
} );
} else {
// Wait for timer before making API queries and showing 
hovercard
-   openTimer = mw.popups.render.wait( 
mw.popups.render.API_DELAY )
+   openTimer = wait( mw.popups.render.API_DELAY )
.done( function () {
var cachePopup, key,
renderers = 
mw.popups.render.renderers;
@@ -178,7 +178,7 @@
cachePopup = 
mw.popups.render.renderers.article.init( $link, $.extend( {}, logData ) );
}
 
-   openTimer = mw.popups.render.wait( 
mw.popups.render.POPUP_DELAY - mw.popups.render.API_DELAY );
+   openTimer = wait( 
mw.popups.render.POPUP_DELAY - mw.popups.render.API_DELAY );
 
$.when( openTimer, cachePopup ).done( 
function () {
mw.popups.render.openPopup( 
$link, event );
@@ -291,7 +291,7 @@
.removeClass( fadeInClass )
.addClass( fadeOutClass );
 
-   mw.popups.render.wait( 150 ).done( function () {
+   wait( 150 ).done( function () {
if ( mw.popups.$popup.hasClass( fadeOutClass ) ) {
mw.popups.$popup
.attr( 'aria-hidden', 'true' )
@@ -310,7 +310,7 @@
logCallback();
}
 
-   mw.popups.render.reset();
+   reset();
};
 
/**
@@ -318,10 +318,11 @@
 * to perform the equivalent of `clearTimeout()`
 *
 * @method wait
+* @ignore
 * @param {number} ms Milliseconds to wait
 * @return {jQuery.Promise}
 */
-   mw.popups.render.wait = function ( ms ) {
+   function wait ( ms ) {
var deferred, promise, timeout;
 
deferred = $.Deferred();
@@ -336,7 +337,7 @@
} } );
 
return promise;
-   };
+   }
 
/**
 * Use escape to close popup
@@ -361,7 +362,7 @@
 * @ignore
 */
function leaveActive() {
-   closeTimer = mw.popups.render.wait( 
mw.popups.render.POPUP_CLOSE_DELAY ).done( function () {
+   closeTimer = wait( mw.popups.render.POPUP_CLOSE_DELAY ).done( 
function () {
var $activeLink = getActiveLink();
if ( $activeLink ) {
mw.popups.render.closePopup( logDismissAction );
@@ -394,20 +395,21 @@
}
mw.popups.render.abortCurrentRequest();
 
-   mw.popups.render.reset();
+   reset();
}
 
/**
 * Resets the renderer
 *
 * @method reset
+* @ignore
 */
-   mw.popups.render.reset = function () {
+   function reset() {
logData = {};
setActiveLink( null );
mw.popups.render.abortCurrentRequest();
openTimer = undefined;
closeTimer = undefined;
-   };
+   }
 
 } )( jQuery, mediaWiki );

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

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

[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Switching to simpler "new MWTimestamp" and adding comment

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

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

Change subject: Switching to simpler "new MWTimestamp" and adding comment
..

Switching to simpler "new MWTimestamp" and adding comment

Changing MWTimestamp::getInstance to new MWTimestamp and also adding
a comment about how you can set $wgPageTriageNoIndexTemplates to
false to disable the noindex templates feature entirely. These
changes are based on feedback at change Ibf22b9d59.

Change-Id: If41bdf70362587c4a78fa6a7e8a445b7c3c04829
---
M PageTriage.hooks.php
M PageTriage.php
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index f860899..a97a9dc 100755
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -316,7 +316,7 @@
if ( $pageCreationDateTime ) {
 
// Get the age of the article in days
-   $timestamp = MWTimestamp::getInstance( 
$pageCreationDateTime );
+   $timestamp = new MWTimestamp( 
$pageCreationDateTime );
$dateInterval = $timestamp->diff( 
MWTimestamp::getInstance() );
$articleDaysOld = $dateInterval->format( '%a' );
 
diff --git a/PageTriage.php b/PageTriage.php
index e9d86cf..ff69f81 100644
--- a/PageTriage.php
+++ b/PageTriage.php
@@ -63,7 +63,8 @@
 // 1 day - How long after visiting Special:NewPagesFeed do we show review 
links on articles
 $wgPageTriageMarkPatrolledLinkExpiry = 3600 * 24;
 // Title of page in MediaWiki namespace containing a list of templates that 
will
-// trigger noindexing of pages, e.g. speedy deletion templates
+// trigger noindexing of pages, e.g. speedy deletion templates. Set this to 
false
+// to disable this feature.
 $wgPageTriageNoIndexTemplates = 'Noindex templates';
 // Set this to true if new, unreviewed articles should be set to noindex. In 
other
 // words, if they should not be indexed by search engines until they are 
reviewed.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If41bdf70362587c4a78fa6a7e8a445b7c3c04829
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: horizon: Show role::puppetmaster::standalone instead of role...

2016-10-12 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: horizon: Show role::puppetmaster::standalone instead of 
role::puppet::self
..


horizon: Show role::puppetmaster::standalone instead of role::puppet::self

Death to the latter.

Bug: T120159
Change-Id: I861bb17fefcd187b45a606bcf25b211d92546684
---
M modules/role/manifests/puppet/self.pp
M modules/role/manifests/puppetmaster/standalone.pp
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/role/manifests/puppet/self.pp 
b/modules/role/manifests/puppet/self.pp
index f4cbcf6..f5ac3c6 100644
--- a/modules/role/manifests/puppet/self.pp
+++ b/modules/role/manifests/puppet/self.pp
@@ -9,8 +9,6 @@
 # $::puppetmaster must be set as a global variable.
 # This allows puppet classes to be configured via LDAP
 # and wikitech instance configuration.
-#
-# filtertags: labs-common
 class role::puppet::self(
 $master = $::puppetmaster,
 $autoupdate_master = true,
diff --git a/modules/role/manifests/puppetmaster/standalone.pp 
b/modules/role/manifests/puppetmaster/standalone.pp
index 6178177..4cd50db 100644
--- a/modules/role/manifests/puppetmaster/standalone.pp
+++ b/modules/role/manifests/puppetmaster/standalone.pp
@@ -32,6 +32,8 @@
 # [*server_name*]
 #  Hostname for the puppetmaster. Defaults to fqdn. Is used for SSL
 #  certificates, virtualhost routing, etc
+#
+# filtertags: labs-common
 class role::puppetmaster::standalone(
 $autosign = false,
 $prevent_cherrypicks = false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I861bb17fefcd187b45a606bcf25b211d92546684
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Andrew Bogott 
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...Popups[master]: Log events in one central place

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

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

Change subject: Log events in one central place
..

Log events in one central place

We calculate totalInteractionTime in every single log event. It's no
wonder we're seeing errors in our data.

This change moves the logging into one central place.
Callers are now dumb and pass just an action and additional data to
log.

This is still not perfect but it should help us manage totalInteractionTime
time better.

Change-Id: Ia9f4ae6e343c9114c9fde7d9e98899d4eb43998a
---
M resources/ext.popups.core.js
M resources/ext.popups.renderer.article.js
M resources/ext.popups.renderer/desktopRenderer.js
M resources/ext.popups.settings.js
M resources/ext.popups.targets/desktopTarget.js
5 files changed, 33 insertions(+), 33 deletions(-)


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

diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js
index 20a2054..b86aa22 100644
--- a/resources/ext.popups.core.js
+++ b/resources/ext.popups.core.js
@@ -35,6 +35,25 @@
'.cancelLink a'
];
 
+
+   /**
+* Log events
+*
+* @method log
+* @param {String} action that is being logged
+* @param {Object} [logData]
+*/
+   mw.popups.log = function ( action, logData ) {
+   logData = logData || {};
+   mw.track( 'ext.popups.schemaPopups',
+   $.extend( {}, logData, {
+   action: action,
+   // Some events e.g. pageLoaded do not have an 
interaction time.
+   totalInteractionTime: logData.dwellStartTime ? 
Math.round( mw.now() - logData.dwellStartTime ) : undefined
+   } )
+   );
+   };
+
/**
 * Temporarily remove the title attribute of the links so that
 * the yellow tooltips don't show up alongside the Hovercard.
diff --git a/resources/ext.popups.renderer.article.js 
b/resources/ext.popups.renderer.article.js
index 12b03c8..b38527d 100644
--- a/resources/ext.popups.renderer.article.js
+++ b/resources/ext.popups.renderer.article.js
@@ -68,11 +68,11 @@
currentRequest.fail( function ( textStatus, data ) {
// only log genuine errors, not client aborts
if ( data.textStatus !== 'abort' ) {
-   mw.track( 'ext.popups.schemaPopups', $.extend( 
logData, {
-   action: 'error',
-   errorState: textStatus,
-   totalInteractionTime: Math.round( 
mw.now() - logData.dwellStartTime )
-   } ) );
+   mw.popups.log( 'error',
+   $.extend( logData, {
+   errorState: textStatus
+   } )
+   );
}
deferred.reject();
} )
@@ -552,10 +552,7 @@
 
mw.popups.settings.open( $.extend( {}, logData ) );
 
-   mw.track( 'ext.popups.schemaPopups', $.extend( logData, 
{
-   action: 'tapped settings cog',
-   totalInteractionTime: Math.round( mw.now() - 
logData.dwellStartTime )
-   } ) );
+   mw.popups.log( 'tapped settings cog', logData );
} );
 
if ( !flippedY && !tall && cache.settings.thumbnail.height < 
SIZES.landscapeImage.h ) {
diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index 0907d3e..7b574d5 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -31,20 +31,14 @@
 * @param {Object} event
 */
function logClickAction( event ) {
-   mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
-   action: mw.popups.getAction( event ),
-   totalInteractionTime: Math.round( mw.now() - 
logData.dwellStartTime )
-   } ) );
+   mw.popups.log( mw.popups.getAction( event ), logData );
}
 
/**
 * Logs when a popup is dismissed
 */
function logDismissAction() {
-   mw.track( 'ext.popups.schemaPopups', $.extend( {}, logData, {
-   action: 'dismissed',
-   totalInteractionTime: Math.round( mw.now() - 
logData.dwellStartTime )
-   } ) );
+   mw.popups.log( 'dismissed', logData );
}
/**
 * @class mw.popups.render

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Event handlers should not be exposed globally

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

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

Change subject: Event handlers should not be exposed globally
..

Event handlers should not be exposed globally

Bug: T147306
Change-Id: Ib0bae3e7c2e420a4b717391d4a25473a3a9f9128
---
M resources/ext.popups.renderer/desktopRenderer.js
1 file changed, 24 insertions(+), 19 deletions(-)


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

diff --git a/resources/ext.popups.renderer/desktopRenderer.js 
b/resources/ext.popups.renderer/desktopRenderer.js
index c7e599a..0907d3e 100644
--- a/resources/ext.popups.renderer/desktopRenderer.js
+++ b/resources/ext.popups.renderer/desktopRenderer.js
@@ -148,9 +148,9 @@
};
 
$link
-   .on( 'mouseleave blur', mw.popups.render.leaveInactive )
-   .off( 'click', mw.popups.render.clickHandler )
-   .on( 'click', mw.popups.render.clickHandler );
+   .on( 'mouseleave blur', leaveInactive )
+   .off( 'click', clickHandler )
+   .on( 'click', clickHandler );
 
if ( mw.popups.render.cache[ $link.attr( 'href' ) ] ) {
openTimer = mw.popups.render.wait( 
mw.popups.render.POPUP_DELAY )
@@ -212,7 +212,7 @@
.append( popup.clone() )
.show()
.attr( 'aria-hidden', 'false' )
-   .on( 'mouseleave', mw.popups.render.leaveActive )
+   .on( 'mouseleave', leaveActive )
.on( 'mouseenter', function () {
if ( closeTimer ) {
closeTimer.abort();
@@ -233,13 +233,13 @@
 
cache.process( link, $.extend( {}, logData ) );
 
-   mw.popups.$popup.find( 'a.mwe-popups-extract, 
a.mwe-popups-discreet' ).click( mw.popups.render.clickHandler );
+   mw.popups.$popup.find( 'a.mwe-popups-extract, 
a.mwe-popups-discreet' ).click( clickHandler );
 
link
-   .off( 'mouseleave blur', mw.popups.render.leaveInactive 
)
-   .on( 'mouseleave blur', mw.popups.render.leaveActive );
+   .off( 'mouseleave blur', leaveInactive )
+   .on( 'mouseleave blur', leaveActive );
 
-   $( document ).on( 'keydown', mw.popups.render.closeOnEsc );
+   $( document ).on( 'keydown', closeOnEsc );
 
mw.popups.incrementPreviewCount();
};
@@ -248,9 +248,10 @@
 * Click handler for the hovercard
 *
 * @method clickHandler
+* @ignore
 * @param {Object} event
 */
-   mw.popups.render.clickHandler = function ( event ) {
+   function clickHandler( event ) {
var action = mw.popups.getAction( event ),
$activeLink = getActiveLink();
 
@@ -262,7 +263,7 @@
 
// close the popup
mw.popups.render.closePopup();
-   };
+   }
 
/**
 * Removes the hover class from the link and unbinds events
@@ -275,7 +276,7 @@
var fadeInClass, fadeOutClass,
$activeLink = getActiveLink();
 
-   $activeLink.off( 'mouseleave blur', 
mw.popups.render.leaveActive );
+   $activeLink.off( 'mouseleave blur', leaveActive );
 
fadeInClass = ( mw.popups.$popup.hasClass( 
'mwe-popups-fade-in-up' ) ) ?
'mwe-popups-fade-in-up' :
@@ -286,7 +287,7 @@
'mwe-popups-fade-out-up';
 
mw.popups.$popup
-   .off( 'mouseleave', mw.popups.render.leaveActive )
+   .off( 'mouseleave', leaveActive )
.removeClass( fadeInClass )
.addClass( fadeOutClass );
 
@@ -303,7 +304,7 @@
closeTimer.abort();
}
 
-   $( document ).off( 'keydown', mw.popups.render.closeOnEsc );
+   $( document ).off( 'keydown', closeOnEsc );
 
if ( $.isFunction( logCallback ) ) {
logCallback();
@@ -341,8 +342,10 @@
 * Use escape to close popup
 *
 * @method closeOnEsc
+* @ignore
+* @param {jQuery.Event} event
 */
-   mw.popups.render.closeOnEsc = function ( event ) {
+   function closeOnEsc( event ) {
var $activeLink = getActiveLink();
if ( event.keyCode === 27 && $activeLink ) {
mw.popups.render.closePopup( logDismissAction );
@@ -355,22 +358,24 @@
 * the link to the popup box. Also avoids closing the popup by accident
 *
 * @method leaveActive
+

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2016-10-12 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

f0a2f2f Fix how we get queue for RequeueDelayedMessages

Change-Id: Id17e8dc98e9fdfc727bebc048a2e4935a922cf4e
---
0 files changed, 0 insertions(+), 0 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id17e8dc98e9fdfc727bebc048a2e4935a922cf4e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: logstash: let maintenance hosts connect to elasticsearch

2016-10-12 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: logstash: let maintenance hosts connect to elasticsearch
..


logstash: let maintenance hosts connect to elasticsearch

In addition to deployment hosts, also let maintenance hosts
connect to port 9200 for logstash reporting.

Bug: T147366
Change-Id: Ic73eff334a5d853129d7c15b595d3a92f7f045ca
---
M manifests/role/logstash.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index 245dd86..05a3262 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -47,10 +47,10 @@
 srange => '@resolve(krypton.eqiad.wmnet)',
 }
 
-ferm::service { 'logstash_canary_checker':
+ferm::service { 'logstash_canary_checker_reporting':
 proto  => 'tcp',
 port   => '9200',
-srange => '$DEPLOYMENT_HOSTS',
+srange => '($DEPLOYMENT_HOSTS $MAINTENANCE_HOSTS)',
 }
 
 logstash::input::gelf { 'gelf':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic73eff334a5d853129d7c15b595d3a92f7f045ca
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Eevans 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Eevans 
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...CirrusSearch[master]: Add some options useful for development

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

Change subject: Add some options useful for development
..


Add some options useful for development

On relforge I always need to keep some patches to workaround the fact
we don't have access to mysql.
This patch allows to:
- ignore missing revision
- enable morelike queries by collecting the title from elastic

It'd save some time when rebasing on relforge.
I'm OK not to merge and keep it gerrit if we don't want to pollute cirrus
with such options.

Change-Id: I9f2c28ffba19dc5e4d596d73c5cbe21c4de10495
---
M CirrusSearch.php
M includes/Query/MoreLikeFeature.php
M includes/Search/Result.php
3 files changed, 45 insertions(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 122f79c..87f4bdd 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -1003,6 +1003,15 @@
  */
 $wgCirrusSearchIgnoreOnWikiBoostTemplates = false;
 
+/**
+ * CirrusSearch development options:
+ * - morelike_collect_titles_from_elastic: first pass collection from elastic
+ * - ignore_missing_rev: ignore missing revisions
+ *
+ * NOTE: never activate any of these on a production site
+ */
+$wgCirrusSearchDevelOptions = [];
+
 $includes = __DIR__ . "/includes/";
 $apiDir = $includes . 'Api/';
 $buildDocument = $includes . 'BuildDocument/';
diff --git a/includes/Query/MoreLikeFeature.php 
b/includes/Query/MoreLikeFeature.php
index de801b7..08b2b41 100644
--- a/includes/Query/MoreLikeFeature.php
+++ b/includes/Query/MoreLikeFeature.php
@@ -98,6 +98,37 @@
 * @return Title[]
 */
private function collectTitles( $term ) {
+   if ( $this->config->getElement( 'CirrusSearchDevelOptions',
+   'morelike_collect_titles_from_elastic' )
+   ) {
+   return $this->collectTitlesFromElastic( $term );
+   } else {
+   return $this->collectTitlesFromDB( $term );
+   }
+   }
+
+   /**
+* Use for devel purpose only
+* @param string $terms
+* @return Title[]
+*/
+   private function collectTitlesFromElastic( $terms ) {
+   $titles = [];
+   foreach ( explode( '|', $terms ) as $term ) {
+   $title = null;
+   \CirrusSearch\Hooks::onSearchGetNearMatch( $term, 
$title );
+   if ( $title != null ) {
+   $titles[] = $title;
+   }
+   }
+   return $titles;
+   }
+
+   /**
+* @param string $term
+* @return Title[]
+*/
+   private function collectTitlesFromDB( $term ) {
$titles = [];
$found = [];
foreach ( explode( '|', $term ) as $title ) {
diff --git a/includes/Search/Result.php b/includes/Search/Result.php
index 6491ca3..ce0d192 100644
--- a/includes/Search/Result.php
+++ b/includes/Search/Result.php
@@ -63,6 +63,8 @@
private $score;
/** @var array */
private $explanation;
+   /** @var bool */
+   private $ignoreMissingRev;
 
/**
 * Build the result.
@@ -73,6 +75,8 @@
 * @param \Elastica\Result $result containing information about the 
result this class should represent
 */
public function __construct( $results, $result, $interwiki = '' ) {
+   global $wgCirrusSearchDevelOptions;
+   $this->ignoreMissingRev = isset( 
$wgCirrusSearchDevelOptions['ignore_missing_rev'] );
if ( $interwiki ) {
$this->setInterwiki( $result, $interwiki );
}
@@ -167,7 +171,7 @@
 * @return bool
 */
public function isMissingRevision() {
-   return !$this->mTitle->isKnown();
+   return !($this->ignoreMissingRev || $this->mTitle->isKnown());
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f2c28ffba19dc5e4d596d73c5cbe21c4de10495
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix how we get queue for RequeueDelayedMessages

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

Change subject: Fix how we get queue for RequeueDelayedMessages
..


Fix how we get queue for RequeueDelayedMessages

Use the method that ensures a 'queue' argument

Change-Id: Ib865d351ced835848e0dd9b8e5c579327022
---
M Maintenance/RequeueDelayedMessages.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/Maintenance/RequeueDelayedMessages.php 
b/Maintenance/RequeueDelayedMessages.php
index be16a74..1d0eb6a 100644
--- a/Maintenance/RequeueDelayedMessages.php
+++ b/Maintenance/RequeueDelayedMessages.php
@@ -6,6 +6,7 @@
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Logging\Logger;
 use SmashPig\Core\DataStores\DamagedDatabase;
+use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 
 $maintClass = '\SmashPig\Maintenance\RequeueDelayedMessages';
 
@@ -42,7 +43,7 @@
foreach( $messages as $message ) {
$queueName = $message['original_queue'];
// FIXME: getting it by alias, this will be annoying 
cos -new
-   $queue = $config->object( "data-store/$queueName", true 
);
+   $queue = BaseQueueConsumer::getQueue( $queueName );
unset( $message['original_queue'] );
$queue->push( $message );
$this->damagedDatabase->deleteMessage( $message );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib865d351ced835848e0dd9b8e5c579327022
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix how we get queue for RequeueDelayedMessages

2016-10-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Fix how we get queue for RequeueDelayedMessages
..

Fix how we get queue for RequeueDelayedMessages

Use the method that ensures a 'queue' argument

Change-Id: Ib865d351ced835848e0dd9b8e5c579327022
---
M Maintenance/RequeueDelayedMessages.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/80/315580/1

diff --git a/Maintenance/RequeueDelayedMessages.php 
b/Maintenance/RequeueDelayedMessages.php
index be16a74..1d0eb6a 100644
--- a/Maintenance/RequeueDelayedMessages.php
+++ b/Maintenance/RequeueDelayedMessages.php
@@ -6,6 +6,7 @@
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Logging\Logger;
 use SmashPig\Core\DataStores\DamagedDatabase;
+use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 
 $maintClass = '\SmashPig\Maintenance\RequeueDelayedMessages';
 
@@ -42,7 +43,7 @@
foreach( $messages as $message ) {
$queueName = $message['original_queue'];
// FIXME: getting it by alias, this will be annoying 
cos -new
-   $queue = $config->object( "data-store/$queueName", true 
);
+   $queue = BaseQueueConsumer::getQueue( $queueName );
unset( $message['original_queue'] );
$queue->push( $message );
$this->damagedDatabase->deleteMessage( $message );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib865d351ced835848e0dd9b8e5c579327022
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2016-10-12 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

f0a2f2f Fix how we get queue for RequeueDelayedMessages

Change-Id: Id17e8dc98e9fdfc727bebc048a2e4935a922cf4e
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/81/315581/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id17e8dc98e9fdfc727bebc048a2e4935a922cf4e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: Update kartotherian to d6bc3e4

2016-10-12 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update kartotherian to d6bc3e4
..

Update kartotherian to d6bc3e4

List of changes:
74dedaf v0.0.15 added postgres dep
d6bc3e4 Fixed postgres ref link
xxx Update node module dependencies

Change-Id: Ia989929f4315784b061c7d974e0e687834a003aa
---
C node_modules/.bin/semver
M node_modules/accepts/node_modules/negotiator/package.json
M node_modules/accepts/package.json
M node_modules/blend/package.json
A node_modules/bunyan/node_modules/mv/node_modules/.bin/mkdirp
M node_modules/content-type/package.json
M node_modules/debug/package.json
M node_modules/depd/package.json
M node_modules/fstream/node_modules/rimraf/node_modules/glob/common.js
M node_modules/fstream/node_modules/rimraf/node_modules/glob/glob.js
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/fs.realpath/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
M 
node_modules/fstream/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json
M node_modules/fstream/node_modules/rimraf/node_modules/glob/package.json
M node_modules/fstream/node_modules/rimraf/node_modules/glob/sync.js
M node_modules/fstream/node_modules/rimraf/package.json
M node_modules/fstream/package.json
M node_modules/graceful-fs/package.json
M node_modules/http-errors/node_modules/setprototypeof/package.json
M node_modules/http-errors/package.json
M node_modules/inherits/package.json
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/pg-connection-string/package.json
D node_modules/kartotherian-geoshapes/node_modules/pg-types/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/pg.js/node_modules/buffer-writer/package.json
D 
node_modules/kartotherian-geoshapes/node_modules/pg.js/node_modules/generic-pool/package.json
D node_modules/kartotherian-geoshapes/node_modules/pgpass/package.json
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/LICENSE
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/inherits.js
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/package.json
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/readable-stream/node_modules/inherits/LICENSE
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/readable-stream/node_modules/inherits/inherits.js
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/readable-stream/node_modules/inherits/inherits_browser.js
A 
node_modules/kartotherian-geoshapes/node_modules/topojson/node_modules/d3-geo-projection/node_modules/brfs/node_modules/static-module/node_modules/readable-stream/node_modules/inherits/package.json
A 

  1   2   3   4   >