[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: Ia0fc364f36992e3447f8a0e6d66cb8fe98669851
---
M api/ApiQueryProjectPages.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 14 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/ApiQueryProjectPages.php b/api/ApiQueryProjectPages.php
index 5666496..9e51b81 100644
--- a/api/ApiQueryProjectPages.php
+++ b/api/ApiQueryProjectPages.php
@@ -32,7 +32,11 @@
$params = $this->extractRequestParams();
 
if ( $params['assessments'] && isset( $resultPageSet ) ) {
-   $this->setWarning( 'It is not possible to retrieve page 
assessment results from generator=projectpages.' );
+   if ( is_callable( array( $this, 'addWarning' ) ) ) {
+   $this->addWarning( 
'apiwarn-pageassessments-nogeneratorassessments' );
+   } else {
+   $this->setWarning( 'It is not possible to 
retrieve page assessment results from generator=projectpages.' );
+   }
}
 
$this->buildDbQuery( $params, $resultPageSet );
@@ -134,7 +138,11 @@
if ( $id ) {
$this->projectIds[] = $id;
} else {
-   $this->setWarning( 'Project name not 
recognized: ' . $project );
+   if ( is_callable( array( $this, 
'addWarning' ) ) ) {
+   $this->addWarning( array( 
'apiwarn-pageassessments-badproject', wfEscapeWikiText( $project ) ) );
+   } else {
+   $this->setWarning( 'Project 
name not recognized: ' . $project );
+   }
}
}
}
diff --git a/i18n/en.json b/i18n/en.json
index 515e235..fb93cdf 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,6 +19,8 @@
"apihelp-query+projectpages-example-generator": "Get page info for 
first 10 pages associated with WikiProject Textile Arts.",
"apihelp-query+projects-description": "List all the projects. See 
https://www.mediawiki.org/wiki/Extension:PageAssessments.;,
"apihelp-query+projects-example": "Get a list of all the projects.",
+   "apiwarn-pageassessments-nogeneratorassessments": "It is not possible 
to retrieve page assessment results from generator=projectpages.",
+   "apiwarn-pageassessments-badproject": "Project name not recognized: 
$1.",
"pageassessments-special": "Page assessments",
"pageassessments-project": "Project",
"pageassessments-page-namespace": "Page namespace",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3883d0d..0cd49fc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,6 +19,8 @@
"apihelp-query+projectpages-example-generator": 
"{{doc-apihelp-example|query+projectpages}}",
"apihelp-query+projects-description": 
"{{doc-apihelp-description|query+projects}}",
"apihelp-query+projects-example": 
"{{doc-apihelp-example|query+projects}}",
+   "apiwarn-pageassessments-badproject": 
"{{doc-apierror}}\n\nParameters:\n* $1 - Project name that was supplied",
+   "apiwarn-pageassessments-nogeneratorassessments": "{{doc-apierror}}",
"pageassessments-special": "Name of the Special page",
"pageassessments-project": "Form label for the WikiProject search field 
and the results table column header",
"pageassessments-page-namespace": "Form label for the page namespace 
dropdown select field",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0fc364f36992e3447f8a0e6d66cb8fe98669851
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageAssessments
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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] pywikibot/core[master]: Check only standard watchlist flags

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

Change subject: Check only standard watchlist flags
..


Check only standard watchlist flags

Remove ORES extension oresreview flag from test at all.
Check ony for standard subset of watchlist flags.

Bug: T151156
Change-Id: I0c004bce83b2d09b7772da6029d3422959dac300
---
M tests/paraminfo_tests.py
1 file changed, 1 insertion(+), 12 deletions(-)

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



diff --git a/tests/paraminfo_tests.py b/tests/paraminfo_tests.py
index b72a0ac..2e4bb18 100644
--- a/tests/paraminfo_tests.py
+++ b/tests/paraminfo_tests.py
@@ -81,20 +81,9 @@
 if MediaWikiVersion(self.site.version()) >= MediaWikiVersion('1.24'):
 types.append('unread')
 
-ores_installed = {
-'wikipedia': ('en', 'fa', 'nl', 'pl', 'pt', 'ru', 'tr'),
-'wikidata': ('en',),
-}
-
-if (
-self.site.family in ores_installed and
-self.site.lang in ores_installed[self.site.family]
-):
-types.append('oresreview')
-
 known = types + ['!%s' % item for item in types]
 
-self._check_param_values(self.site, 'query+watchlist', 'show', known)
+self._check_param_subset(self.site, 'query+watchlist', 'show', known)
 
 def test_watchlist_type(self):
 """Test watchlist type."""

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c004bce83b2d09b7772da6029d3422959dac300
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Magul 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: I773fb4054f80a37bdf70890455e5c53793b52051
---
M includes/ApiSanitizeMapData.php
M tests/phpunit/ApiSanitizeMapDataTest.php
2 files changed, 18 insertions(+), 3 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ApiSanitizeMapData.php b/includes/ApiSanitizeMapData.php
index b0b1148..452da5e 100644
--- a/includes/ApiSanitizeMapData.php
+++ b/includes/ApiSanitizeMapData.php
@@ -29,8 +29,20 @@
 
$title = Title::newFromText( $params['title'] );
 
-   if ( !$title || !$title->userCan( 'read', $this->getUser() ) ) {
-   $this->dieUsage( 'Invalid title given', 'invalidtitle' 
);
+   if ( !$title ) {
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
+   } else {
+   $this->dieUsage( 'Invalid title given', 
'invalidtitle' );
+   }
+   }
+
+   if ( is_callable( [ $this, 'checkTitleUserPermissions' ] ) ) {
+   $this->checkTitleUserPermissions( $title, 'read' );
+   } else {
+   if ( !$title->userCan( 'read', $this->getUser() ) ) {
+   $this->dieUsage( "You don't have permission to 
view this page", 'permissiondenied' );
+   }
}
 
$this->sanitizeJson( $title, $params['text'] );
diff --git a/tests/phpunit/ApiSanitizeMapDataTest.php 
b/tests/phpunit/ApiSanitizeMapDataTest.php
index 7be7afb..9615ad0 100644
--- a/tests/phpunit/ApiSanitizeMapDataTest.php
+++ b/tests/phpunit/ApiSanitizeMapDataTest.php
@@ -6,6 +6,7 @@
 use FauxRequest;
 use MediaWikiTestCase;
 use RequestContext;
+use ApiUsageException;
 use UsageException;
 
 /**
@@ -44,9 +45,11 @@
 
/**
 * @dataProvider provideErrors
-* @expectedException UsageException
 */
public function testErrors( $title, $json ) {
+   $this->setExpectedException(
+   class_exists( ApiUsageException::class ) ? 
ApiUsageException::class : UsageException::class
+   );
$this->makeRequest( $title, $json );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I773fb4054f80a37bdf70890455e5c53793b52051
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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] mediawiki...JsonConfig[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: I3d9442a44d16278c3c40c5fe09b6f62d6f21840a
---
M i18n/en.json
M i18n/qqq.json
M includes/JCApi.php
M includes/JCDataApi.php
4 files changed, 58 insertions(+), 12 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index 069ecf6..4ebc989 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -41,6 +41,7 @@
"jsonconfig-license-CC0-1.0": "Creative Commons Zero v1.0 Universal or 
later version",
"jsonconfig-license-url-CC0-1.0": 
"https://creativecommons.org/publicdomain/zero/1.0/;,
"right-jsonconfig-flush": "Manipulate JsonConfig via API",
+   "action-jsonconfig-flush": "manipulate JsonConfig via API",
"apihelp-jsonconfig-description": "Allows direct access to JsonConfig 
subsystem.",
"apihelp-jsonconfig-param-command": "Which sub-action to perform on 
JsonConfig:\n;status:Shows JsonConfig configuration.\n;reset:Clears 
configurations from cache. Requires $1title parameter and jsonconfig-reset 
right.\n;reload:Reloads and caches configurations from config store. Requires 
$1title parameter and jsonconfig-reset right.",
"apihelp-jsonconfig-param-namespace": "Namespace number of the title to 
process.",
@@ -52,5 +53,7 @@
"apihelp-jsondata-description": "Retrieve localized JSON data.",
"apihelp-jsondata-param-title": "Title to get. By default assumes 
namespace to be \"Data:\"",
"apihelp-jsondata-example-1": "Get JSON content of the Sample.tab page, 
localized to user's language",
-   "apihelp-jsondata-example-2": "Get JSON content of the Sample.tab page 
localized to French"
+   "apihelp-jsondata-example-2": "Get JSON content of the Sample.tab page 
localized to French",
+   "apierror-jsonconfig-paramrequired": "Parameter $1 is 
required for this command.",
+   "apierror-jsonconfig-badtitle": "The page specified by 
namespace and title parameters is either invalid or is 
not registered in JsonConfig configuration."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 62edca8..98ccc3e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -49,6 +49,7 @@
"jsonconfig-license-CC0-1.0": "Name of the license",
"jsonconfig-license-url-CC0-1.0": "URL to the license description, 
localized if available",
"right-jsonconfig-flush": "{{doc-right|jsonconfig-flush}}",
+   "action-jsonconfig-flush": "{{doc-action|jsonconfig-flush}}",
"apihelp-jsonconfig-description": 
"{{doc-apihelp-description|jsonconfig}}",
"apihelp-jsonconfig-param-command": "The \"config store\" is the new 
way to store the MediaWiki configuration outside 
LocalSettings.php, namely in JSON files. 
\n\n{{doc-apihelp-param|jsonconfig|command}}",
"apihelp-jsonconfig-param-namespace": 
"{{doc-apihelp-param|jsonconfig|namespace}}",
@@ -60,5 +61,7 @@
"apihelp-jsondata-description": "{{doc-apihelp-description|jsondata}}",
"apihelp-jsondata-param-title": "{{doc-apihelp-param|jsondata|title}}",
"apihelp-jsondata-example-1": "{{doc-apihelp-example|jsondata}}",
-   "apihelp-jsondata-example-2": "{{doc-apihelp-example|jsondata}}"
+   "apihelp-jsondata-example-2": "{{doc-apihelp-example|jsondata}}",
+   "apierror-jsonconfig-badtitle": "{{doc-apierror}}",
+   "apierror-jsonconfig-paramrequired": 
"{{doc-apierror}}\n\nParameters:\n* $1 - Parameter name"
 }
diff --git a/includes/JCApi.php b/includes/JCApi.php
index bf369f5..1ae3087 100644
--- a/includes/JCApi.php
+++ b/includes/JCApi.php
@@ -82,26 +82,56 @@
$this->getMain()->setCacheMaxAge( 1 ); // 
seconds
$this->getMain()->setCacheMode( 'private' );
if ( !$this->getUser()->isAllowed( 
'jsonconfig-flush' ) ) {
-   $this->dieUsage( "Must be authenticated 
with jsonconfig-flush right to use this API",
-   'login', 401 );
+   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+   // Sigh. Can't use 
$this->checkUserRightsAny() because
+   // this has to break API 
conventions by returning 401
+   // (and violate the HTTP RFC by 
doing so without a
+   // WWW-Authenticate header).
+   $this->dieWithError(
+   [ 
'apierror-permissiondenied', $this->msg( "action-jsonconfig-flush" ) ],
+   'permissiondenied', [], 
401
+   

[MediaWiki-commits] [Gerrit] mediawiki...GlobalUsage[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

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

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApiQueryGlobalUsage.php b/ApiQueryGlobalUsage.php
index 15bf8a5..ae6a9a3 100644
--- a/ApiQueryGlobalUsage.php
+++ b/ApiQueryGlobalUsage.php
@@ -37,9 +37,7 @@
$pageIds = $pageIds[NS_FILE];
$query = new GlobalUsageQuery( array_keys( $pageIds ) );
if ( !is_null( $params['continue'] ) ) {
-   if ( !$query->setOffset( $params['continue'] ) 
) {
-   $this->dieUsage( 'Invalid continue 
parameter', 'badcontinue' );
-   }
+   $this->dieContinueUsageIf( !$query->setOffset( 
$params['continue'] ) );
}
$query->setLimit( $params['limit'] );
$query->filterLocal( $params['filterlocal'] );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad106cf27d6ee0ea85a55af6fc3c00e9b1c060c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUsage
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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]: mariadb: Added gtid_domain_id variable

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

Change subject: mariadb: Added gtid_domain_id variable
..


mariadb: Added gtid_domain_id variable

Adding the gtid_domain_id variable to labs hosts.
This variable is not used not, but it is harmless to have it enable in
this role.
It will be used in the future once we switch to GTID and multisource

Bug: T149418
Bug: T152194
Change-Id: Ia3a47e96d391f0e7742a271fcd800802ff10fd3e
---
M templates/mariadb/labsdb-replica.my.cnf.erb
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/mariadb/labsdb-replica.my.cnf.erb 
b/templates/mariadb/labsdb-replica.my.cnf.erb
index dfe8f39..21a44b3 100644
--- a/templates/mariadb/labsdb-replica.my.cnf.erb
+++ b/templates/mariadb/labsdb-replica.my.cnf.erb
@@ -25,6 +25,8 @@
 port   = 3306
 datadir= <%= @datadir %>
 tmpdir = <%= @tmpdir %>
+# needed for multisource replication + GTID.
+gtid_domain_id = <%= @server_id %>
 server_id  = <%= @server_id %>
 read_only  = 0
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3a47e96d391f0e7742a271fcd800802ff10fd3e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
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...FeaturedFeeds[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: Ie2c19c161c71949f0895245704b1f0b48e4742b3
---
M ApiFeaturedFeeds.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApiFeaturedFeeds.php b/ApiFeaturedFeeds.php
index d2c6d0b..0ce5651 100644
--- a/ApiFeaturedFeeds.php
+++ b/ApiFeaturedFeeds.php
@@ -20,7 +20,11 @@
global $wgFeedClasses;
 
if ( !isset( $wgFeedClasses[$params['feedformat']] ) ) {
-   $this->dieUsage( 'Invalid subscription feed type', 
'feed-invalid' );
+   if ( is_callable( array( $this, 'dieWithError' ) ) ) {
+   $this->dieWithError( 'feed-invalid' );
+   } else {
+   $this->dieUsage( 'Invalid subscription feed 
type', 'feed-invalid' );
+   }
}
 
$language = isset( $params['language'] ) ? $params['language'] 
: false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2c19c161c71949f0895245704b1f0b48e4742b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FeaturedFeeds
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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...Cite[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: I8f214dd95876e1eadc4a0463cba3d5a13d783014
---
M i18n/en.json
M i18n/qqq.json
M includes/ApiQueryReferences.php
3 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/en.json b/i18n/en.json
index ab99d18..d8559e8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,6 +17,7 @@
},
"apihelp-query+references-description": "Return a data representation 
of references associated with the given pages.",
"apihelp-query+references-example-1": "References associated with 
Albert Einstein.",
+   "apierror-citestoragedisabled": "Cite extension reference storage is 
not enabled.",
"cite-desc": "Adds  and 
 tags, for citations",
"cite_error": "Cite error: $1",
"cite_error_ref_numeric_key": "Invalid ref 
tag;\nname cannot be a simple integer. Use a descriptive title",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 06e4ab1..d268099 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,6 +17,7 @@
},
"apihelp-query+references-description": 
"{{doc-apihelp-description|query+references}}",
"apihelp-query+references-example-1": 
"{{doc-apihelp-example|query+references}}",
+   "apierror-citestoragedisabled": "{{doc-apierror}}",
"cite-desc": 
"{{desc|name=Cite|url=https://www.mediawiki.org/wiki/Extension:Cite}};,
"cite_error": "Cite extension.\n\nUsed when there are errors in ref or 
references tags.\n\nParameters:\n* $1 - an error message",
"cite_error_ref_numeric_key": "Cite extension. Error message shown if 
the name of a ref tag only contains digits. Examples that cause this error are 
 or input",
diff --git a/includes/ApiQueryReferences.php b/includes/ApiQueryReferences.php
index f5baa07..2090159 100644
--- a/includes/ApiQueryReferences.php
+++ b/includes/ApiQueryReferences.php
@@ -30,7 +30,7 @@
public function getAllowedParams() {
return [
   'continue' => [
-  ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
+  ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
   ],
];
}
@@ -38,7 +38,11 @@
public function execute() {
$config = ConfigFactory::getDefaultInstance()->makeConfig( 
'cite' );
if ( !$config->get( 'CiteStoreReferencesData' ) ) {
-   $this->dieUsage( 'Cite extension reference storage is 
not enabled', 'citestoragedisabled' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( 
'apierror-citestoragedisabled' );
+   } else {
+   $this->dieUsage( 'Cite extension reference 
storage is not enabled', 'citestoragedisabled' );
+   }
}
$params = $this->extractRequestParams();
$titles = $this->getPageSet()->getGoodTitles();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f214dd95876e1eadc4a0463cba3d5a13d783014
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Jackmcbarn 
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] mediawiki...CheckUser[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: Ibb54647bde62af4d73a125371d392f699d0f13ee
---
M api/ApiQueryCheckUser.php
M api/ApiQueryCheckUserLog.php
M i18n/en.json
M i18n/qqq.json
4 files changed, 58 insertions(+), 17 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/api/ApiQueryCheckUser.php b/api/ApiQueryCheckUser.php
index e315adb..7f98eb6 100644
--- a/api/ApiQueryCheckUser.php
+++ b/api/ApiQueryCheckUser.php
@@ -18,18 +18,30 @@
$params['request'], $params['target'], 
$params['reason'],
$params['timecond'], $params['limit'], $params['xff'] );
 
-   if ( !$this->getUser()->isAllowed( 'checkuser' ) ) {
-   $this->dieUsage( 'You need the checkuser right', 
'permissionerror' );
+   if ( is_callable( [ $this, 'checkUserRightsAny' ] ) ) {
+   $this->checkUserRightsAny( 'checkuser' );
+   } else {
+   if ( !$this->getUser()->isAllowed( 'checkuser' ) ) {
+   $this->dieUsage( 'You need the checkuser 
right', 'permissionerror' );
+   }
}
 
if ( $wgCheckUserForceSummary && is_null( $reason ) ) {
-   $this->dieUsage( 'You must define reason for check', 
'missingdata' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( 
'apierror-checkuser-missingsummary', 'missingdata' );
+   } else {
+   $this->dieUsage( 'You must define reason for 
check', 'missingdata' );
+   }
}
 
$reason = $this->msg( 'checkuser-reason-api', $reason 
)->inContentLanguage()->text();
$timeCutoff = strtotime( $timecond ); // absolute time
if ( !$timeCutoff ) {
-   $this->dieUsage( 'You need use correct time limit (like 
"-2 weeks" or "2 weeks ago")', 'invalidtime' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( 
'apierror-checkuser-timelimit', 'invalidtime' );
+   } else {
+   $this->dieUsage( 'You need use correct time 
limit (like "-2 weeks" or "2 weeks ago")', 'invalidtime' );
+   }
}
 
$this->addTables( 'cu_changes' );
@@ -41,7 +53,11 @@
case 'userips':
$user_id = User::idFromName( $target );
if ( !$user_id ) {
-   $this->dieUsage( 'Target user does not 
exist', 'nosuchuser' );
+   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+   $this->dieWithError( [ 
'nosuchusershort', wfEscapeWikiText( $target ) ], 'nosuchuser' );
+   } else {
+   $this->dieUsage( 'Target user 
does not exist', 'nosuchuser' );
+   }
}
 
$this->addFields( array( 'cuc_timestamp', 
'cuc_ip', 'cuc_xff' ) );
@@ -80,7 +96,11 @@
if ( IP::isIPAddress( $target ) ) {
$cond = CheckUser::getIpConds( $db, 
$target, isset( $xff ) );
if ( !$cond ) {
-   $this->dieUsage( 'IP or range 
is invalid', 'invalidip' );
+   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+   $this->dieWithError( 
'apierror-badip', 'invalidip' );
+   } else {
+   $this->dieUsage( 'IP or 
range is invalid', 'invalidip' );
+   }
}
$this->addWhere( $cond );
$log_type = array();
@@ -93,7 +113,11 @@
} else {
$user_id = User::idFromName( $target );
if ( !$user_id ) {
-   $this->dieUsage( 'Target user 
does not exist', 'nosuchuser' );
+   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+   

[MediaWiki-commits] [Gerrit] mediawiki...RelatedLinks[master]: modified: SpecialRelatedLinks.php

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

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

Change subject: modified:   SpecialRelatedLinks.php
..

modified:   SpecialRelatedLinks.php

Change-Id: I646d0b04f8351da39223b2fa6d64b2bc23171892
---
M SpecialRelatedLinks.php
1 file changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/SpecialRelatedLinks.php b/SpecialRelatedLinks.php
index 0a3..9ba4276 100644
--- a/SpecialRelatedLinks.php
+++ b/SpecialRelatedLinks.php
@@ -37,7 +37,7 @@
if ($dbw -> 
tableExists('related_links')) {
$tbl_links = $dbw -> 
tableName('related_links');
} else {
-   $result = 
initiateSettingsForRelatedLinks();
+   $result = 
initiateSettingsForRelatedLinks();http://localhost:20010/index.php?title=%ED%8A%B9%EC%88%98%3A%EC%97%B0%EA%B4%80%EC%82%AC%EC%9D%B4%ED%8A%B8/Main_Page
if (!$result) {
die('Failed to create 
table Related Links');
}
@@ -75,7 +75,7 @@
 
// delete sidebar
if ($_POST['check']) {
-   $result = $dbw -> 
delete($tbl_links, array('endex' => $_POST['check']));
+   $result = $dbw -> 
delete($tbl_links, array('id' => $_POST['check']));
 
$output .= 'Deleted 
sidebar';
}
@@ -99,7 +99,7 @@
 
foreach ($_POST['order'] as $endex => 
$order) {
$data = array('links_order' => 
$order, 'links_subject' => $_POST['subject'][$endex], 'links_url' => 
$_POST['url'][$endex], 'links_enable' => ($_POST['enable'][$endex] == 'true' ? 
'true' : 'false'));
-   $dbw -> update($tbl_links, 
$data, array('endex' => $endex));
+   $dbw -> update($tbl_links, 
$data, array('id' => $endex));
$output .= '' . 
$_POST['subject'][$endex] . ' (' . $_POST['url'][$endex] . ')' . 
($_POST['enable'][$endex] == 'true' ? ' : enabled' : ' : disabled') . '';
}
$output .= '';
@@ -146,20 +146,20 @@



-   
-   
-   
-   
+   
+   
+   
+   



fetchObject( $result ) ) { ?>

-   
-   
-   
-   
-
links_enable == 'true' ? ' checked' : '') ?>>
+   
+   
+   
+   
+
links_enable == 'true' ? ' checked' : '') ?>>

freeResult( $result ); ?>


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I646d0b04f8351da39223b2fa6d64b2bc23171892

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] Fix format string

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

Change subject: [bugfix] Fix format string
..


[bugfix] Fix format string

- match.groups() gives a tuple. Passing to a format string gives a
  TypeError when the tuple contains more or less elements than 1.
- Use exception message directly and use str.format() method.

Bug: T152499
Change-Id: I3eef158317882f239ef3bc4bd499b31fd5bb25ce
---
M pywikibot/textlib.py
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, approved
  Dalba: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 48ca786..9f7782e 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -403,9 +403,9 @@
 replacement += new[last:group_match.start()]
 replacement += match.group(group_id) or ''
 except IndexError:
-pywikibot.output('\nInvalid group reference: %s' % 
group_id)
-pywikibot.output('Groups found:\n%s' % match.groups())
-raise IndexError
+raise IndexError(
+'Invalid group reference: {0}\nGroups found: {1}'
+''.format(group_id, match.groups()))
 last = group_match.end()
 replacement += new[last:]
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3eef158317882f239ef3bc4bd499b31fd5bb25ce
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Replace Linker::link() & Linker::linkKnown() with LinkRenderer

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

Change subject: Replace Linker::link() & Linker::linkKnown() with LinkRenderer
..


Replace Linker::link() & Linker::linkKnown() with LinkRenderer

Change-Id: I1350819165095d9be79aea8d9189760a4dbddd40
---
M includes/specials/pagers/AllMessagesTablePager.php
M includes/specials/pagers/BlockListPager.php
M includes/specials/pagers/ContribsPager.php
M includes/specials/pagers/DeletedContribsPager.php
M includes/specials/pagers/ImageListPager.php
5 files changed, 55 insertions(+), 44 deletions(-)

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



diff --git a/includes/specials/pagers/AllMessagesTablePager.php 
b/includes/specials/pagers/AllMessagesTablePager.php
index 5609310..efc51ef 100644
--- a/includes/specials/pagers/AllMessagesTablePager.php
+++ b/includes/specials/pagers/AllMessagesTablePager.php
@@ -25,6 +25,8 @@
  *
  * @ingroup Pager
  */
+use MediaWiki\MediaWikiServices;
+
 class AllMessagesTablePager extends TablePager {
 
protected $filter, $prefix, $langcode, $displayPrefix;
@@ -297,6 +299,7 @@
}
 
function formatValue( $field, $value ) {
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
switch ( $field ) {
case 'am_title' :
$title = Title::makeTitle( NS_MEDIAWIKI, $value 
. $this->suffix );
@@ -313,25 +316,19 @@
);
 
if ( $this->mCurrentRow->am_customised ) {
-   $title = Linker::linkKnown( $title, 
$this->getLanguage()->lcfirst( $value ) );
+   $title = $linkRenderer->makeKnownLink( 
$title, $this->getLanguage()->lcfirst( $value ) );
} else {
-   $title = Linker::link(
+   $title = $linkRenderer->makeBrokenLink(
$title,
-   $this->getLanguage()->lcfirst( 
$value ),
-   [],
-   [],
-   [ 'broken' ]
+   $this->getLanguage()->lcfirst( 
$value )
);
}
if ( $this->mCurrentRow->am_talk_exists ) {
-   $talk = Linker::linkKnown( $talk, 
$this->talk );
+   $talk = $linkRenderer->makeKnownLink( 
$talk, $this->talk );
} else {
-   $talk = Linker::link(
+   $talk = $linkRenderer->makeBrokenLink(
$talk,
-   $this->talk,
-   [],
-   [],
-   [ 'broken' ]
+   $this->talk
);
}
 
diff --git a/includes/specials/pagers/BlockListPager.php 
b/includes/specials/pagers/BlockListPager.php
index d822976..a4124db 100644
--- a/includes/specials/pagers/BlockListPager.php
+++ b/includes/specials/pagers/BlockListPager.php
@@ -22,6 +22,8 @@
 /**
  * @ingroup Pager
  */
+use MediaWiki\MediaWikiServices;
+
 class BlockListPager extends TablePager {
 
protected $conds;
@@ -72,7 +74,7 @@
];
 
foreach ( $keys as $key ) {
-   $msg[$key] = $this->msg( $key )->escaped();
+   $msg[$key] = $this->msg( $key )->text();
}
}
 
@@ -82,6 +84,8 @@
$language = $this->getLanguage();
 
$formatted = '';
+
+   $linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
 
switch ( $name ) {
case 'ipb_timestamp':
@@ -117,18 +121,18 @@
) );
if ( $this->getUser()->isAllowed( 'block' ) ) {
if ( $row->ipb_auto ) {
-   $links[] = Linker::linkKnown(
+   $links[] = 
$linkRenderer->makeKnownLink(

SpecialPage::getTitleFor( 'Unblock' ),
$msg['unblocklink'],
[],
   

[MediaWiki-commits] [Gerrit] mediawiki...ApiFeatureUsage[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: I3b4aa182b8feaec7c659ab68bb0134e11fbd9fa9
---
M ApiQueryFeatureUsage.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 18 insertions(+), 8 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApiQueryFeatureUsage.php b/ApiQueryFeatureUsage.php
index 607e26a..a67fede 100644
--- a/ApiQueryFeatureUsage.php
+++ b/ApiQueryFeatureUsage.php
@@ -13,7 +13,11 @@
: $params['agent'];
if ( empty( $agent ) ) {
$encParamName = $this->encodeParamName( 'agent' );
-   $this->dieUsage( 'Cannot query an empty user agent', 
"bad_$encParamName" );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
+   $this->dieWithError( 
'apierror-apifeatureusage-emptyagent', "bad_$encParamName" );
+   } else {
+   $this->dieUsage( 'Cannot query an empty user 
agent', "bad_$encParamName" );
+   }
}
 
$conf = ConfigFactory::getDefaultInstance()->makeConfig( 
'ApiFeatureUsage' );
@@ -36,12 +40,16 @@
$this->dieStatus( $status );
}
 
-   foreach ( $status->getWarningsArray() as $warning ) {
-   if ( !$warning instanceof Message ) {
-   $key = array_shift( $warning );
-   $warning = $this->msg( $key, $warning );
+   if ( is_callable( [ $this, 'addMessagesFromStatus' ] ) ) {
+   $this->addMessagesFromStatus( $status );
+   } else {
+   foreach ( $status->getWarningsArray() as $warning ) {
+   if ( !$warning instanceof Message ) {
+   $key = array_shift( $warning );
+   $warning = $this->msg( $key, $warning );
+   }
+   $this->setWarning( $warning->inLanguage( 'en' 
)->useDatabase( false )->plain() );
}
-   $this->setWarning( $warning->inLanguage( 'en' 
)->useDatabase( false )->plain() );
}
 
$r = [
diff --git a/i18n/en.json b/i18n/en.json
index aca2aae..0ac3696 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -24,5 +24,6 @@
"apihelp-query+featureusage-param-end": "End of date range to query.",
"apihelp-query+featureusage-param-agent": "User agent to query. If not 
specified, the agent in the request will be queried.",
"apihelp-query+featureusage-param-features": "If specified, return 
details on only these features.",
-   "apihelp-query+featureusage-example-simple": "Query feature usage for 
the current user agent"
+   "apihelp-query+featureusage-example-simple": "Query feature usage for 
the current user agent",
+   "apierror-apifeatureusage-emptyagent": "Cannot query an empty user 
agent."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 389f6bd..be31c92 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -29,5 +29,6 @@
"apihelp-query+featureusage-param-end": 
"{{doc-apihelp-param|query+featureusage|end}}",
"apihelp-query+featureusage-param-agent": 
"{{doc-apihelp-param|query+featureusage|agent|info=See definition of [[w:User 
agent|user agent]] on Wikipedia.}}",
"apihelp-query+featureusage-param-features": 
"{{doc-apihelp-param|query+featureusage|features}}",
-   "apihelp-query+featureusage-example-simple": 
"{{doc-apihelp-example|query+featureusage|info=See definition of [[w:User 
agent|user agent]] on Wikipedia.}}"
+   "apihelp-query+featureusage-example-simple": 
"{{doc-apihelp-example|query+featureusage|info=See definition of [[w:User 
agent|user agent]] on Wikipedia.}}",
+   "apierror-apifeatureusage-emptyagent": "{{doc-apierror}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b4aa182b8feaec7c659ab68bb0134e11fbd9fa9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ApiFeatureUsage
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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] mediawiki...CategoryTree[master]: Update for API error i18n

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

Change subject: Update for API error i18n
..


Update for API error i18n

See Iae0e2ce3.

Change-Id: Ibd138ddfdb6b728e65f29939133b483500c850d1
---
M ApiCategoryTree.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 9 insertions(+), 3 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ApiCategoryTree.php b/ApiCategoryTree.php
index 3be6dc9..1462787 100644
--- a/ApiCategoryTree.php
+++ b/ApiCategoryTree.php
@@ -7,7 +7,11 @@
if ( isset( $params['options'] ) ) {
$options = FormatJson::decode( $params['options'] );
if ( !is_object( $options ) ) {
-   $this->dieUsage( 'Options must be valid a JSON 
object', 'invalidjson' );
+   if ( is_callable( [ $this, 'dieWithError' ] ) ) 
{
+   $this->dieWithError( 
'apierror-categorytree-invalidjson', 'invalidjson' );
+   } else {
+   $this->dieUsage( 'Options must be valid 
a JSON object', 'invalidjson' );
+   }
return;
}
$options = get_object_vars( $options );
diff --git a/i18n/en.json b/i18n/en.json
index 74aa7d1..90e4376 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -39,5 +39,6 @@
"categorytree-retry": "Please wait a moment and try again.",
"apihelp-categorytree-description": "Internal module for the 
CategoryTree extension.",
"apihelp-categorytree-param-category": "Title in the category 
namespace, prefix will be ignored if given.",
-   "apihelp-categorytree-param-options": "Options for the CategoryTree 
constructor as a JSON object. The depth option defaults to 
1."
+   "apihelp-categorytree-param-options": "Options for the CategoryTree 
constructor as a JSON object. The depth option defaults to 
1.",
+   "apierror-categorytree-invalidjson": "Options must be valid a JSON 
object."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index b6c11df..c7545da 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -57,5 +57,6 @@
"categorytree-retry": "Instruction to try again later",
"apihelp-categorytree-description": 
"{{doc-apihelp-description|categorytree}}",
"apihelp-categorytree-param-category": 
"{{doc-apihelp-param|categorytree|category}}",
-   "apihelp-categorytree-param-options": 
"{{doc-apihelp-param|categorytree|options}}"
+   "apihelp-categorytree-param-options": 
"{{doc-apihelp-param|categorytree|options}}",
+   "apierror-categorytree-invalidjson": "{{doc-apierror}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd138ddfdb6b728e65f29939133b483500c850d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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] operations/puppet[production]: install: add http & proxy roles on install2001

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

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

Change subject: install: add http & proxy roles on install2001
..

install: add http & proxy roles on install2001

Make install2001 match install1001 by including
the (new) http and proxy classes one subtask of T132757 says.

Bug: T132757
Change-Id: Ie1c89f96b7932fc6cfe5a3afc22b93e8dab2e24c
---
M manifests/site.pp
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 2881584..c334362 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1320,6 +1320,9 @@
 node 'install2001.wikimedia.org' {
 role(installserver::tftp,
 installserver::dhcp,
+installserver::http,
+installserver::proxy,
+installserver::preseed,
 aptrepo::wikimedia)
 
 $cluster = 'misc'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1c89f96b7932fc6cfe5a3afc22b93e8dab2e24c
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] mediawiki...SelectCategory[master]: Replace deprecated $j

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

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

Change subject: Replace deprecated $j
..

Replace deprecated $j

Change-Id: I8f6a74adc62080499ff9c0dfc983bf000b731328
---
M SelectCategory.js
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/SelectCategory.js b/SelectCategory.js
index 6dfaaec..58fd8a8 100644
--- a/SelectCategory.js
+++ b/SelectCategory.js
@@ -1,5 +1,5 @@
-$j( document ).ready( function() {
-   $j( "#SelectCategoryList" ).treeview( {
+$( document ).ready( function () {
+   $( "#SelectCategoryList" ).treeview( {
collapsed: true
-   });
+   } );
 } );
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f6a74adc62080499ff9c0dfc983bf000b731328
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SelectCategory
Gerrit-Branch: master
Gerrit-Owner: tosfos 

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


[MediaWiki-commits] [Gerrit] mediawiki...SelectCategory[master]: Bump version of TreeView plugin used to 1.4.2

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

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

Change subject: Bump version of TreeView plugin used to 1.4.2
..

Bump version of TreeView plugin used to 1.4.2

* This plugin is unmaintained and should be replaced.

Change-Id: I8193b60c8db5f6ce2467e0663df75936a2230886
---
M jquery.treeview.js
1 file changed, 29 insertions(+), 35 deletions(-)


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

diff --git a/jquery.treeview.js b/jquery.treeview.js
index 93c4504..d7ce1a9 100644
--- a/jquery.treeview.js
+++ b/jquery.treeview.js
@@ -1,23 +1,17 @@
 /*
- * Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree
+ * Treeview 1.4.2 - jQuery plugin to hide and show branches of a tree
  *
  * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
- * http://docs.jquery.com/Plugins/Treeview
  *
- * Copyright (c) 2007 Jörn Zaefferer
- *
- * Dual licensed under the MIT and GPL licenses:
+ * Copyright Jörn Zaefferer
+ * Released under the MIT license:
  *   http://www.opensource.org/licenses/mit-license.php
- *   http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer 
$
- *
  */
 
-;(function($j) {
+;(function($) {
 
// TODO rewrite as a widget, removing all the extra plugins
-   $j.extend($j.fn, {
+   $.extend($.fn, {
swapClass: function(c1, c2) {
var c1Elements = this.filter('.' + c1);
this.filter('.' + c2).removeClass(c2).addClass(c1);
@@ -30,9 +24,9 @@
hoverClass: function(className) {
className = className || "hover";
return this.hover(function() {
-   $j(this).addClass(className);
+   $(this).addClass(className);
}, function() {
-   $j(this).removeClass(className);
+   $(this).removeClass(className);
});
},
heightToggle: function(animated, callback) {
@@ -68,8 +62,8 @@

this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview",
 function(event) {
// don't handle click events on children, eg. 
checkboxes
if ( this == event.target )
-   toggler.apply($j(this).next());
-   }).add( $j("a", this) ).hoverClass();
+   toggler.apply($(this).next());
+   }).add( $("a", this) ).hoverClass();
 
if (!settings.prerendered) {
// handle closed ones first
@@ -88,10 +82,10 @@
hitarea = this.prepend("").find("div." + CLASSES.hitarea);

hitarea.removeClass().addClass(CLASSES.hitarea).each(function() {
var classes = "";
-   
$j.each($j(this).parent().attr("class").split(" "), function() {
+   
$.each($(this).parent().attr("class").split(" "), function() {
classes += this + "-hitarea ";
});
-   $j(this).addClass( classes );
+   $(this).addClass( classes );
})
}
 
@@ -100,14 +94,14 @@
},
treeview: function(settings) {
 
-   settings = $j.extend({
+   settings = $.extend({
cookieId: "treeview"
}, settings);
 
if ( settings.toggle ) {
var callback = settings.toggle;
settings.toggle = function() {
-   return 
callback.apply($j(this).parent()[0], arguments);
+   return 
callback.apply($(this).parent()[0], arguments);
};
}
 
@@ -118,24 +112,24 @@
return function() {
// reuse toggle event handler, 
applying the elements to toggle
// start searching for all 
hitareas
-   toggler.apply( $j("div." + 
CLASSES.hitarea, tree).filter(function() {
+   toggler.apply( $("div." + 
CLASSES.hitarea, tree).filter(function() {
  

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Whitelist TSG for account creation

2016-12-06 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Whitelist TSG for account creation
..

Whitelist TSG for account creation

Add an account creation whitelist entry for the office of The
Specialist Guild (contractors doing manual testing of the mobile apps).

throttle.php is not really meant for permanent exemptions, but we don't
seem to have any better one.

Bug: T152588
Change-Id: I585e4dc6c8fae6ecc11cdf1c0998667a9ae532a5
---
M wmf-config/throttle.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index e7b97b2..5c82489 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -28,6 +28,13 @@
 # ];
 ## Add throttling definitions below.
 
+$wmgThrottlingExceptions[] = [ // T152588 - TSG office
+   'from' => '2016-12-06T22:00-08:00',
+   'to' => '2018-01-01T00:00-08:00',
+   'ip' => '50.250.225.50',
+   'value' => 1000,
+];
+
 // December 2nd
 $wmgThrottlingExceptions[] = [ // T146600
'from' => '2016-12-02T12:30 -6:00',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I585e4dc6c8fae6ecc11cdf1c0998667a9ae532a5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: add http & proxy roles on install1001

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

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

Change subject: install: add http & proxy roles on install1001
..

install: add http & proxy roles on install1001

Bug: T132757
Change-Id: I757cc26a880fb7a82c6eb1d1ca12003fd67a34dc
---
M manifests/site.pp
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 7e82263..2881584 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1305,6 +1305,8 @@
 node 'install1001.wikimedia.org' {
 role(installserver::tftp,
 installserver::dhcp,
+installserver::http,
+installserver::proxy,
 installserver::preseed,
 aptrepo::wikimedia)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I757cc26a880fb7a82c6eb1d1ca12003fd67a34dc
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] mediawiki...SelectCategory[master]: Use ResourceLoader

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

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

Change subject: Use ResourceLoader
..

Use ResourceLoader

* Current method was resulting in JS errors
* We should really be using an extension.json

Change-Id: I6f8687ba9696c0a285e74201e75308ca81366b13
---
M SelectCategory.php
M SelectCategory_body.php
2 files changed, 18 insertions(+), 4 deletions(-)


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

diff --git a/SelectCategory.php b/SelectCategory.php
index c0d3b6b..2686cec 100644
--- a/SelectCategory.php
+++ b/SelectCategory.php
@@ -92,3 +92,20 @@
 $wgHooks['EditPage::attemptSave'][] = array( 'SelectCategory::saveHook', false 
);
 # Hook when saving the upload
 $wgHooks['UploadForm:BeforeProcessing'][] = array( 'SelectCategory::saveHook', 
true );
+
+$wgResourceModules['ext.SelectCategory'] = array(
+   'position' => 'top',
+   'scripts' => 'SelectCategory.js',
+   'styles' => 'SelectCategory.css',
+   'dependencies' => 'ext.SelectCategory.treeview',
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'SelectCategory'
+);
+
+$wgResourceModules['ext.SelectCategory.treeview'] = array(
+   'position' => 'top',
+   'scripts' => 'jquery.treeview.js',
+   'styles' => 'jquery.treeview.css',
+   'localBasePath' => __DIR__,
+   'remoteExtPath' => 'SelectCategory'
+);
diff --git a/SelectCategory_body.php b/SelectCategory_body.php
index 1a92e0d..d2e160b 100644
--- a/SelectCategory_body.php
+++ b/SelectCategory_body.php
@@ -31,10 +31,7 @@
global $wgSelectCategoryMaxLevel;
global $wgSelectCategoryToplevelAllowed;
 
-   $wgOut->addExtensionStyle( 
"{$wgExtensionAssetsPath}/SelectCategory/SelectCategory.css" );
-   $wgOut->addExtensionStyle( 
"{$wgExtensionAssetsPath}/SelectCategory/jquery.treeview.css" );
-   $wgOut->addScriptFile( 
"{$wgExtensionAssetsPath}/SelectCategory/jquery.treeview.js" );
-   $wgOut->addScriptFile( 
"{$wgExtensionAssetsPath}/SelectCategory/SelectCategory.js" );
+   $wgOut->addModules( 'ext.SelectCategory' );
 
# Get all categories from wiki
$allCats = self::getAllCategories( $isUpload ? NS_IMAGE 
: $pageObj->mTitle->getNamespace() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f8687ba9696c0a285e74201e75308ca81366b13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SelectCategory
Gerrit-Branch: master
Gerrit-Owner: tosfos 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: add 'preseed'-role to install1001

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

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

Change subject: install: add 'preseed'-role to install1001
..

install: add 'preseed'-role to install1001

Now that the old general "role::installserver" is gone,
and all split up, we can easily add just the preseed
role to install1001 (as the ticket asked for), which
will just sets up /srv/autoinstall with "recurse => true".

Bug: T132757
Change-Id: I4069118447d6161dca28c667d62a4720a14f805e
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/325737/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 0083b03..7e82263 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1305,6 +1305,7 @@
 node 'install1001.wikimedia.org' {
 role(installserver::tftp,
 installserver::dhcp,
+installserver::preseed,
 aptrepo::wikimedia)
 
 $cluster = 'misc'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4069118447d6161dca28c667d62a4720a14f805e
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] mediawiki/core[master]: Replace Linker::link() with LinkRenderer in all revisiondele...

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

Change subject: Replace Linker::link() with LinkRenderer in all revisiondelete 
pages
..


Replace Linker::link() with LinkRenderer in all revisiondelete pages

* RevDelArchiveItem
* RevDelArchivedFileItem
* RevDelFileItem
* RevDelLogItem
* RevDelRevisionItem

Bug: T149346
Change-Id: I96f83d06b4d3ccf3f76ccfca843a6aaf76d89063
---
M includes/RevisionList.php
M includes/revisiondelete/RevDelArchiveItem.php
M includes/revisiondelete/RevDelArchivedFileItem.php
M includes/revisiondelete/RevDelFileItem.php
M includes/revisiondelete/RevDelLogItem.php
M includes/revisiondelete/RevDelRevisionItem.php
6 files changed, 33 insertions(+), 23 deletions(-)

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



diff --git a/includes/RevisionList.php b/includes/RevisionList.php
index fb444bd..052fd16 100644
--- a/includes/RevisionList.php
+++ b/includes/RevisionList.php
@@ -20,6 +20,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * List for revision table items for a single page
  */
@@ -268,6 +270,14 @@
 * This is used to show the list in HTML form, by the special page.
 */
abstract public function getHTML();
+
+   /**
+* Returns an instance of LinkRenderer
+* @return \MediaWiki\Linker\LinkRenderer
+*/
+   protected function getLinkRenderer() {
+   return MediaWikiServices::getInstance()->getLinkRenderer();
+   }
 }
 
 class RevisionList extends RevisionListBase {
diff --git a/includes/revisiondelete/RevDelArchiveItem.php 
b/includes/revisiondelete/RevDelArchiveItem.php
index 2d0d690..ab74dbd 100644
--- a/includes/revisiondelete/RevDelArchiveItem.php
+++ b/includes/revisiondelete/RevDelArchiveItem.php
@@ -68,14 +68,14 @@
}
 
protected function getRevisionLink() {
-   $date = htmlspecialchars( 
$this->list->getLanguage()->userTimeAndDate(
-   $this->revision->getTimestamp(), $this->list->getUser() 
) );
+   $date = $this->list->getLanguage()->userTimeAndDate(
+   $this->revision->getTimestamp(), $this->list->getUser() 
);
 
if ( $this->isDeleted() && !$this->canViewContent() ) {
-   return $date;
+   return htmlspecialchars( $date );
}
 
-   return Linker::link(
+   return $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor( 'Undelete' ),
$date,
[],
@@ -91,9 +91,9 @@
return $this->list->msg( 'diff' )->escaped();
}
 
-   return Linker::link(
+   return $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor( 'Undelete' ),
-   $this->list->msg( 'diff' )->escaped(),
+   $this->list->msg( 'diff' )->text(),
[],
[
'target' => 
$this->list->title->getPrefixedText(),
diff --git a/includes/revisiondelete/RevDelArchivedFileItem.php 
b/includes/revisiondelete/RevDelArchivedFileItem.php
index 52df2e3..decabba 100644
--- a/includes/revisiondelete/RevDelArchivedFileItem.php
+++ b/includes/revisiondelete/RevDelArchivedFileItem.php
@@ -69,16 +69,16 @@
}
 
protected function getLink() {
-   $date = htmlspecialchars( 
$this->list->getLanguage()->userTimeAndDate(
-   $this->file->getTimestamp(), $this->list->getUser() ) );
+   $date = $this->list->getLanguage()->userTimeAndDate(
+   $this->file->getTimestamp(), $this->list->getUser() );
 
# Hidden files...
if ( !$this->canViewContent() ) {
-   $link = $date;
+   $link = htmlspecialchars( $date );
} else {
$undelete = SpecialPage::getTitleFor( 'Undelete' );
$key = $this->file->getKey();
-   $link = Linker::link( $undelete, $date, [],
+   $link = $this->getLinkRenderer()->makeLink( $undelete, 
$date, [],
[
'target' => 
$this->list->title->getPrefixedText(),
'file' => $key,
diff --git a/includes/revisiondelete/RevDelFileItem.php 
b/includes/revisiondelete/RevDelFileItem.php
index ff01cee..06b596e 100644
--- a/includes/revisiondelete/RevDelFileItem.php
+++ b/includes/revisiondelete/RevDelFileItem.php
@@ -116,19 +116,19 @@
 * @return string
 */
protected function getLink() {
-   $date = htmlspecialchars( 
$this->list->getLanguage()->userTimeAndDate(
-   $this->file->getTimestamp(), 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: HtmlArmor: Document that null is an acceptable value

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

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

Change subject: HtmlArmor: Document that null is an acceptable value
..

HtmlArmor: Document that null is an acceptable value

And that you'll get null back.

Change-Id: Ibd74e6af16b51796b46c2e23b7442740f5f69a0f
---
M includes/libs/HtmlArmor.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/325736/1

diff --git a/includes/libs/HtmlArmor.php b/includes/libs/HtmlArmor.php
index 4ba1bc3..1dc55dc 100644
--- a/includes/libs/HtmlArmor.php
+++ b/includes/libs/HtmlArmor.php
@@ -33,7 +33,7 @@
private $value;
 
/**
-* @param string $value
+* @param string|null $value
 */
public function __construct( $value ) {
$this->value = $value;
@@ -44,7 +44,8 @@
 * and get safe HTML back
 *
 * @param string|HtmlArmor $input
-* @return string safe for usage in HTML
+* @return string|null safe for usage in HTML, or null
+* if the HtmlArmor instance was wrapping null.
 */
public static function getHtml( $input ) {
if ( $input instanceof HtmlArmor ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd74e6af16b51796b46c2e23b7442740f5f69a0f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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...AdvancedMeta[master]: Replaced deprecated hooks

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

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

Change subject: Replaced deprecated hooks
..

Replaced deprecated hooks

* ArticleInsertComplete with PageContentInsertComplete
* ArticleSave with PageContentSave

Bug: T151973
Change-Id: Ia1cf2c80b366ee0185db1df7f3eb5cf53fcac965
---
M AdvancedMeta.class.php
1 file changed, 35 insertions(+), 24 deletions(-)


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

diff --git a/AdvancedMeta.class.php b/AdvancedMeta.class.php
index 85369f8..85bc7d1 100644
--- a/AdvancedMeta.class.php
+++ b/AdvancedMeta.class.php
@@ -32,13 +32,13 @@
// Inserts HTML for meta input fields into the edit page.
$wgHooks['ParserBeforeTidy'][] = $this;
 
-   // Before the updated text and properties of an article are 
saved to the database
+   // Before the updated text and properties of a wikiPage are 
saved to the database
// the new meta info is saved too
-   $wgHooks['ArticleSave'][] = $this;
+   $wgHooks['PageContentSave'][] = $this;
 
-   // If a new article is created the meta is temporarily saved as 
article ID '0'
-   // Move it to the newly created article now
-   $wgHooks['ArticleInsertComplete'][] = $this;
+   // If a new wikiPage is created the meta is temporarily saved 
as article ID '0'
+   // Move it to the newly created wikiPage now
+   $wgHooks['PageContentInsertComplete'][] = $this;
 
// Insert meta into article
$wgHooks['OutputPageBeforeHTML'][] = $this;
@@ -187,18 +187,28 @@
}
 
/**
-* Hook 2: Called during function doEdit() in /includes/Article.php
+* Hook 2: Called during function doEditContent() in 
/includes/page/WikiPage.php
 * Adds the new meta information to the database when an article is 
saved
 *
-* @param object $article The entire article and it's properties
-* @param object $user The user updating the article
+* @param object $wikiPage The entire Wikipage and its properties
+* @param object $user The User saving the article
+* @param object $content The new article content, as a Content object
+* @param string $summary The article summary, as a comment
+* @param boolean $isMinor Minor flag
+* @param boolean $isWatch Watch flag (not used, always null)
+* @param boolean $section section number (not used, always null)
+* @param unknown $flags Flags passed to Wikipage::doEditContent()
+* @param object $status
+*
 * @return true
 *
-* @global indexedpages , array of namespaces that should be indexed
+* @global indexedpages, array of namespaces that should be indexed
 *
 */
-   public function onArticleSave( &$article, &$user ) {
-   $id = $article->mTitle->getArticleID();
+   public function onPageContentSave( &$wikiPage, &$user, &$content, 
&$summary, $isMinor,
+   $isWatch, $section, &$flags, &$status ) {
+
+   $id = $wikiPage->mTitle->getArticleID();
 
// can this user edit meta for this page?
if ( !$this->canEditMeta() ) {
@@ -238,27 +248,28 @@
 * Hook 3: Called during function doEdit() in /includes/Article.php
 * Move the new meta information from a temporary id='0' to the new 
article's id
 *
-* @param object $article : the article (object) saved
-* @param object $user : the user (object) who saved the article
-* @param string $text : the new article content
-* @param string $summary : the article summary (comment)
-* @param bool $minoredit : minor edit flag
-* @param bool $watchthis : not used as of 1.8 (automatically set to 
"null")
-* @param bool $sectionanchor : not used as of 1.8 (automatically set 
to "null")
-* @param unknown $flags : bitfield, see source code for details; 
passed to Article::doedit()
-* @param object $revision : The newly inserted revision object (as of 
1.11.0)
+* @param object $wikiPage The entire Wikipage created and its 
properties
+* @param object $user The User creating the article
+* @param object $content The new article content, as a Content object
+* @param string $summary The edit summary, as a comment
+* @param boolean $isMinor Minor flag
+* @param boolean $isWatch Watch flag (not used, always null)
+* @param boolean $section section number (not used, always null)
+* @param unknown $flags Flags passed to Wikipage::doEditContent()
+* @param object $revision The newly inserted revision object
+*
 * @return true
 *
-   

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Fix: Inline template editor goes full screen width

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

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

Change subject: Fix: Inline template editor goes full screen width
..

Fix: Inline template editor goes full screen width

Bug: T152524
Change-Id: I2b84686fd314935b7198a2e5478d99c9a2e04d4d
---
M modules/tools/ext.cx.tools.template.js
M modules/tools/styles/ext.cx.tools.template.editor.less
2 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/modules/tools/ext.cx.tools.template.js 
b/modules/tools/ext.cx.tools.template.js
index 13fe349..692d1e3 100644
--- a/modules/tools/ext.cx.tools.template.js
+++ b/modules/tools/ext.cx.tools.template.js
@@ -289,7 +289,7 @@
 
if ( this.options.inline ) {
this.$parentSection = this.$parentSection ||
-   this.$template.parents( 
mw.cx.getSectionSelector() );
+   this.$template.closest( 
mw.cx.getSectionSelector() );
$container = this.$parentSection;
} else {
$container = this.getFirstVisibleFragment() || 
this.$template;
diff --git a/modules/tools/styles/ext.cx.tools.template.editor.less 
b/modules/tools/styles/ext.cx.tools.template.editor.less
index 7f9c902..2ed505f 100644
--- a/modules/tools/styles/ext.cx.tools.template.editor.less
+++ b/modules/tools/styles/ext.cx.tools.template.editor.less
@@ -4,11 +4,17 @@
 .cx-template-editor-source-container,
 .cx-template-editor-target-container {
.mw-ui-one-whole;
+   float: none;
height: 100%;
padding: 0 10px;
background-color: @gray-light;
border: 1px solid #ccc;
z-index: 9; // The sticky header on the top of page is with z-index 10
+   &::after {
+  content: '';
+  display: block;
+  clear: both;
+   }
 }
 
 // close button

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b84686fd314935b7198a2e5478d99c9a2e04d4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Support extension tags which shadows block level elements

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

Change subject: Support extension tags which shadows block level elements
..


Support extension tags which shadows block level elements

Change-Id: Ieadcc21966dc30511fd9c56365b1abfcdadee3fe
---
M lib/config/WikitextConstants.js
M lib/html2wt/WikitextSerializer.js
M lib/utils/Util.js
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests-blacklist.js
5 files changed, 158 insertions(+), 142 deletions(-)

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



diff --git a/lib/config/WikitextConstants.js b/lib/config/WikitextConstants.js
index 430cc28..b39a872 100644
--- a/lib/config/WikitextConstants.js
+++ b/lib/config/WikitextConstants.js
@@ -174,8 +174,7 @@
"METER", "NAV", "NOSCRIPT", "OBJECT", "OL", "OPTGROUP", 
"OPTION",
"OUTPUT", "P", "PARAM", "PRE", "PROGRESS", "Q", "RB", 
"RP", "RT",
"RTC", "RUBY", "S", "SAMP", "SCRIPT", "SECTION", 
"SELECT", "SMALL",
-   // "SOURCE", Support the deprecated  alias for 
syntaxhighlight
-   "SPAN", "STRONG", "STYLE", "SUB", "SUMMARY", "SUP",
+   "SOURCE", "SPAN", "STRONG", "STYLE", "SUB", "SUMMARY", 
"SUP",
"TABLE", "TBODY", "TD", "TEXTAREA", "TFOOT", "TH", 
"THEAD", "TIME",
"TITLE", "TR", "TRACK", "U", "UL", "VAR", "VIDEO", 
"WBR",
]),
diff --git a/lib/html2wt/WikitextSerializer.js 
b/lib/html2wt/WikitextSerializer.js
index 3fd9f84..d8c2882 100644
--- a/lib/html2wt/WikitextSerializer.js
+++ b/lib/html2wt/WikitextSerializer.js
@@ -1128,6 +1128,8 @@
reqd = true;
break;
} else if (Consts.HTML.BlockTags.has(tagName)) {
+   // FIXME: Extension tags shadowing 
html5 tags might not
+   // have block semantics.
// Block tags on a line suppress nowikis
reqd = false;
}
diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index b285c15..d86a459 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -1383,11 +1383,6 @@
}).join('');
 };
 
-Util.isHTMLElementName = function(name) {
-   name = name.toUpperCase();
-   return Consts.HTML.HTML5Tags.has(name) || 
Consts.HTML.OlderHTMLTags.has(name);
-};
-
 /**
  * Determine whether the protocol of a link is potentially valid. Use the
  * environment's per-wiki config to do so.
diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 60d6e4f..68fd213 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -72,6 +72,148 @@
 }
 };
 
+var isXMLTag = function(name, block) {
+var lName = name.toLowerCase();
+var uName = name.toUpperCase();
+
+// FIXME: These are installed extension tags which we, for some
+// historical reason, are special casing in the grammar.  Ignore them
+// here, they have their own rules.
+//
+// For , see https://gerrit.wikimedia.org/r/#/c/281076/
+// where we'll clean this up.  Notice how much we can remove!
+//
+// For , see https://gerrit.wikimedia.org/r/#/c/232313/
+// which has some relevant info for serialization.
+var ignoredExtTag = lName === 'pre' || lName === 'nowiki';
+
+var isInstalledExt = env.conf.wiki.extensionTags.has(lName) && 
!ignoredExtTag;
+var isIncludeTag = lName === 'includeonly' ||
+lName === 'noinclude' || lName === 'onlyinclude';
+
+var isHtmlTag = block ?
+// We need to ignore them here too because block tags have
+// higher precedence than our questionable rules.
+constants.HTML.BlockTags.has(uName) && !ignoredExtTag :
+constants.HTML.HTML5Tags.has(uName) || 
constants.HTML.OlderHTMLTags.has(uName);
+
+return isHtmlTag || isInstalledExt || isIncludeTag;
+};
+
+var maybeExtensionTag = function(t) {
+var tagName = t.name.toLowerCase();
+
+var isInstalledExt = env.conf.wiki.extensionTags.has(tagName);
+var isIncludeTag = tagName === 'includeonly' ||
+tagName === 'noinclude' || tagName === 'onlyinclude';
+
+// Extensions have higher precedence when they shadow html tags.
+if (!(isInstalledExt || isIncludeTag)) {
+return t;
+}
+
+var dp = t.dataAttribs;
+var skipLen = 0;
+
+switch (t.constructor) {
+case EndTagTk:
+return t;
+case SelfclosingTagTk:
+dp.src = input.substring(dp.tsr[0], dp.tsr[1]);
+dp.tagWidths = 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[wmf/1.29.0-wmf.5]: Modify the populateLocalAndGlobalIds maintenance script to:

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

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

Change subject: Modify the populateLocalAndGlobalIds maintenance script to:
..

Modify the populateLocalAndGlobalIds maintenance script to:

* Exclude renames while populating records to avoid conflicts
* Run per wiki (using the foreachwiki shell script)
* Don't run if the wiki is non-SUL wiki

Change-Id: I7ed2c3880b92b0d8882c8a3cba2435945ad6142f
(cherry picked from commit a7fd44011c4b7d8f434bee469fc5f06f6d8a4e6f)
---
M maintenance/populateLocalAndGlobalIds.php
1 file changed, 29 insertions(+), 12 deletions(-)


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

diff --git a/maintenance/populateLocalAndGlobalIds.php 
b/maintenance/populateLocalAndGlobalIds.php
index 3fba4ab..0e2a756 100644
--- a/maintenance/populateLocalAndGlobalIds.php
+++ b/maintenance/populateLocalAndGlobalIds.php
@@ -14,18 +14,26 @@
}
 
public function execute() {
-   global $wgLocalDatabases;
-   $dbr = CentralAuthUtils::getCentralSlaveDB();
-   $dbw = CentralAuthUtils::getCentralDB();
-   foreach( $wgLocalDatabases as $wiki ) {
-   // Temporarily skipping large wikis, 5 mil seems like a 
safe number (skips en, meta, mediawiki & login wikis)
-   $size = $dbr->estimateRowCount( 'localuser', '*', [ 
'lu_wiki' => $wiki ] );
-   if ( $size > 500 ) {
-   continue;
-   }
+   if ( class_exists( 'CentralAuthUtils' ) ) {
+   $dbr = CentralAuthUtils::getCentralSlaveDB();
+   $dbw = CentralAuthUtils::getCentralDB();
$lastGlobalId = -1;
+
+   // Skip people in global rename queue
+   $wiki = wfWikiID();
+   $globalRenames = [];
+   $rows = $dbr->select(
+   'renameuser_status',
+   'ru_oldname'
+   );
+   foreach ( $rows as $row ) {
+   $globalRenames[] = $row->ru_oldname;
+   }
+
$lb = wfGetLB( $wiki );
$ldbr = $lb->getConnection( DB_SLAVE, [], $wiki );
+
+   $this->output( "Populating fields for wiki $wiki... \n" 
);
do {
$rows = $dbr->select(
[ 'localuser', 'globaluser' ],
@@ -45,10 +53,13 @@
 
$globalUidToLocalName = [];
foreach ( $rows as $row ) {
+   if ( in_array( $row->lu_name, 
$globalRenames ) ) {
+   $this->output( "User " . 
$row->lu_name . " not migrated (pending rename)\n" );
+   continue;
+   }
$globalUidToLocalName[$row->gu_id] = 
$row->lu_name;
}
if ( !$globalUidToLocalName ) {
-   $this->output( "All users migrated; 
Wiki: $wiki \n" );
continue;
}
 
@@ -61,6 +72,7 @@
foreach ( $localIds as $lid ) {
$localNameToUid[$lid->user_name] = 
$lid->user_id;
}
+   $updated = 0;
foreach ( $globalUidToLocalName as $gid => 
$uname ) {
// Save progress so we know where to 
start our next batch
$lastGlobalId = $gid;
@@ -74,14 +86,19 @@
);
if ( !$result ) {
$this->output( "Update failed 
for global user $lastGlobalId for wiki $wiki \n" );
+   } else {
+   // Count number of records 
actually updated
+   $updated++;
}
}
-   $this->output( "Updated $numRows records. Last 
user: $lastGlobalId; Wiki: $wiki \n" );
+   $this->output( "Updated $updated records. Last 
user: $lastGlobalId; Wiki: $wiki \n" );
CentralAuthUtils::waitForSlaves();
} while ( $numRows >= $this->mBatchSize );

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Modify the populateLocalAndGlobalIds maintenance script to:

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

Change subject: Modify the populateLocalAndGlobalIds maintenance script to:
..


Modify the populateLocalAndGlobalIds maintenance script to:

* Exclude renames while populating records to avoid conflicts
* Run per wiki (using the foreachwiki shell script)
* Don't run if the wiki is non-SUL wiki

Change-Id: I7ed2c3880b92b0d8882c8a3cba2435945ad6142f
---
M maintenance/populateLocalAndGlobalIds.php
1 file changed, 29 insertions(+), 12 deletions(-)

Approvals:
  Kaldari: Looks good to me, approved
  Gergő Tisza: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/maintenance/populateLocalAndGlobalIds.php 
b/maintenance/populateLocalAndGlobalIds.php
index 3fba4ab..0e2a756 100644
--- a/maintenance/populateLocalAndGlobalIds.php
+++ b/maintenance/populateLocalAndGlobalIds.php
@@ -14,18 +14,26 @@
}
 
public function execute() {
-   global $wgLocalDatabases;
-   $dbr = CentralAuthUtils::getCentralSlaveDB();
-   $dbw = CentralAuthUtils::getCentralDB();
-   foreach( $wgLocalDatabases as $wiki ) {
-   // Temporarily skipping large wikis, 5 mil seems like a 
safe number (skips en, meta, mediawiki & login wikis)
-   $size = $dbr->estimateRowCount( 'localuser', '*', [ 
'lu_wiki' => $wiki ] );
-   if ( $size > 500 ) {
-   continue;
-   }
+   if ( class_exists( 'CentralAuthUtils' ) ) {
+   $dbr = CentralAuthUtils::getCentralSlaveDB();
+   $dbw = CentralAuthUtils::getCentralDB();
$lastGlobalId = -1;
+
+   // Skip people in global rename queue
+   $wiki = wfWikiID();
+   $globalRenames = [];
+   $rows = $dbr->select(
+   'renameuser_status',
+   'ru_oldname'
+   );
+   foreach ( $rows as $row ) {
+   $globalRenames[] = $row->ru_oldname;
+   }
+
$lb = wfGetLB( $wiki );
$ldbr = $lb->getConnection( DB_SLAVE, [], $wiki );
+
+   $this->output( "Populating fields for wiki $wiki... \n" 
);
do {
$rows = $dbr->select(
[ 'localuser', 'globaluser' ],
@@ -45,10 +53,13 @@
 
$globalUidToLocalName = [];
foreach ( $rows as $row ) {
+   if ( in_array( $row->lu_name, 
$globalRenames ) ) {
+   $this->output( "User " . 
$row->lu_name . " not migrated (pending rename)\n" );
+   continue;
+   }
$globalUidToLocalName[$row->gu_id] = 
$row->lu_name;
}
if ( !$globalUidToLocalName ) {
-   $this->output( "All users migrated; 
Wiki: $wiki \n" );
continue;
}
 
@@ -61,6 +72,7 @@
foreach ( $localIds as $lid ) {
$localNameToUid[$lid->user_name] = 
$lid->user_id;
}
+   $updated = 0;
foreach ( $globalUidToLocalName as $gid => 
$uname ) {
// Save progress so we know where to 
start our next batch
$lastGlobalId = $gid;
@@ -74,14 +86,19 @@
);
if ( !$result ) {
$this->output( "Update failed 
for global user $lastGlobalId for wiki $wiki \n" );
+   } else {
+   // Count number of records 
actually updated
+   $updated++;
}
}
-   $this->output( "Updated $numRows records. Last 
user: $lastGlobalId; Wiki: $wiki \n" );
+   $this->output( "Updated $updated records. Last 
user: $lastGlobalId; Wiki: $wiki \n" );
CentralAuthUtils::waitForSlaves();
} while ( $numRows >= $this->mBatchSize );
$lb->reuseConnection( $ldbr );
+   $this->output( "Completed 

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Override license messages for edit

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

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

Change subject: Override license messages for edit
..

Override license messages for edit

* Add store->license config string field to specify default content license
* Add jsonconfig-license-edit-CC0-1.0 message

Bug: T152553
Change-Id: Ife272fbdd4b67a040f8c7753e82f4d461129fa70
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/JCSingleton.php
4 files changed, 28 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/JsonConfig 
refs/changes/32/325732/1

diff --git a/extension.json b/extension.json
index 292610b..38a5ef3 100644
--- a/extension.json
+++ b/extension.json
@@ -112,6 +112,9 @@
"EditFilterMergedContent": [
"JsonConfig\\JCSingleton::onEditFilterMergedContent"
],
+   "EditPageCopyrightWarning": [
+   "JsonConfig\\JCSingleton::onEditPageCopyrightWarning"
+   ],
"MovePageIsValidMove": [
"JsonConfig\\JCSingleton::onMovePageIsValidMove"
],
diff --git a/i18n/en.json b/i18n/en.json
index e4e452f..521ae5d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -42,6 +42,7 @@
"jsonconfig-license": "Data available under $1",
"jsonconfig-license-or-later": "$1, or (at your option) any later 
version",
"jsonconfig-license-CC0-1.0": "Creative Commons Zero",
+   "jsonconfig-license-edit-CC0-1.0": "By saving changes, you agree to the 
[https://wikimediafoundation.org/wiki/Terms_of_Use Terms of Use], and you 
irrevocably agree to release your contribution to the public domain under 
[https://creativecommons.org/publicdomain/zero/1.0/ CC0].",
"jsonconfig-license-url-CC0-1.0": 
"https://creativecommons.org/publicdomain/zero/1.0/;,
"right-jsonconfig-flush": "Manipulate JsonConfig via API",
"apihelp-jsonconfig-description": "Allows direct access to JsonConfig 
subsystem.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c6aea8e..f8da2b5 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -50,6 +50,7 @@
"jsonconfig-license": "Shows license text prefix before giving the 
specific license.\n\nParameters:\n* $1 - * 
{{msg-mw|jsonconfig-license-or-later}} or {{msg-mw|jsonconfig-license-CC0-1.0}} 
or other similar license messages",
"jsonconfig-license-or-later": "In case the data can be used with any 
future versions of a license, this string will be used instead of 
'jsonconfig-license-*' message.\n\nParameters:\n* $1 - license name, as defined 
in the {{msg-mw|jsonconfig-license-CC0-1.0}} and similar messages",
"jsonconfig-license-CC0-1.0": "Name of the license",
+   "jsonconfig-license-edit-CC0-1.0": "Wiki markup of the message to show 
instead of {{msg-mw|Wikimedia-copyrightwarning}}",
"jsonconfig-license-url-CC0-1.0": "URL to the license description, 
localized if available",
"right-jsonconfig-flush": "{{doc-right|jsonconfig-flush}}",
"apihelp-jsonconfig-description": 
"{{doc-apihelp-description|jsonconfig}}",
diff --git a/includes/JCSingleton.php b/includes/JCSingleton.php
index 555b1fc..1b4efec 100644
--- a/includes/JCSingleton.php
+++ b/includes/JCSingleton.php
@@ -165,6 +165,7 @@
self::getConfVal( $store, 'notifyUrl', '' );
self::getConfVal( $store, 'notifyUsername', '' 
);
self::getConfVal( $store, 'notifyPassword', '' 
);
+   self::getConfVal( $store, 'license', false );
}
 
// Too lazy to write proper error messages for all 
parameters.
@@ -667,6 +668,28 @@
}
 
/**
+* Override with per-page specific edit message
+*
+* @param Title $title
+* @param string[] $msg
+*
+* @return bool
+*/
+   public static function onEditPageCopyrightWarning( $title, &$msg ) {
+
+   if ( self::jsonConfigIsStorage() ) {
+   $jct = self::parseTitle( $title );
+   if ( $jct && $jct->getConfig()->store && 
$jct->getConfig()->store->license ) {
+   $code = $jct->getConfig()->store->license;
+   $code = substr( $code, -1 ) === '+' ? substr( 
$code, 0, - 1 ) : $code;
+   $msg = [ 'jsonconfig-license-edit-' . $code ];
+   return false; // Do not allow any other hook 
handler to override this
+   }
+   }
+   return true;
+   }
+
+   /**
 * Adds CSS for pretty-printing configuration on NS_CONFIG pages.
 * @param \OutputPage &$out
 * @param \Skin &$skin

-- 
To view, visit https://gerrit.wikimedia.org/r/325732

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: linter: Don't provide 'src'

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

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

Change subject: linter: Don't provide 'src'
..

linter: Don't provide 'src'

This isn't used by the Linter extension, so there's no need to increase
the request size by including it.

Change-Id: I9bbd5b743a9ef5146f03d9ea159387f822eda937
---
M lib/logger/linter.js
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/lintertest.js
3 files changed, 5 insertions(+), 35 deletions(-)


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

diff --git a/lib/logger/linter.js b/lib/logger/linter.js
index a594df9..e525717 100644
--- a/lib/logger/linter.js
+++ b/lib/logger/linter.js
@@ -68,7 +68,6 @@
try {
var logType = logData.logType;
var lintObj = logData.logObject[0];
-   var src = lintObj.src;
var dsr = lintObj.dsr;
var templateInfo = lintObj.templateInfo;
var msg = {};
@@ -91,11 +90,6 @@
 
if (templateInfo) {
msg.templateInfo = templateInfo;
-   }
-   if (logType === 'lint/fostered' || logType === 
'lint/multi-template' || logType === 'lint/mixed-content') {
-   msg.src = src;
-   } else if (dsr) {
-   msg.src = src.substring(dsr[0], dsr[1]);
}
 
this.buffer.push(msg);
diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index e5cf66d..82bab74 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -35,7 +35,7 @@
var parts = dmw.parts;
var lintObj;
if (typeof parts[0] === 'string' || typeof 
parts[parts.length - 1] === 'string') {
-   lintObj = {src: env.page.src, dsr: dsr };
+   lintObj = { dsr: dsr };
env.log('lint/mixed-content', lintObj);
} else if (parts.length > 1) {
var targets = [];
@@ -45,7 +45,7 @@
}
});
if (targets.length > 1) {
-   lintObj = { src: targets, dsr: dsr };
+   lintObj = { dsr: dsr };
env.log('lint/multi-template', lintObj);
}
}
@@ -77,7 +77,7 @@
if (DU.hasNodeName(c, 'meta')) {
var type = c.getAttribute('typeof');
if (type === 'mw:Placeholder/StrippedTag') {
-   lintObj = { src: env.page.src, dsr: dsr, templateInfo: 
templateInfo };
+   lintObj = { dsr: dsr, templateInfo: templateInfo };
env.log('lint/stripped-tag', lintObj);
}
}
@@ -93,7 +93,6 @@
 
if (dp.selfClose) {
lintObj = {
-   src: env.page.src,
dsr: dsr,
templateInfo: templateInfo,
params: { name: cNodeName },
@@ -105,7 +104,6 @@
 
if (dp.autoInsertedEnd === true && (tplInfo || dsr[2] > 0)) {
lintObj = {
-   src: env.page.src,
dsr: dsr,
templateInfo: templateInfo,
params: { name: cNodeName },
@@ -115,7 +113,6 @@
 
if (dp.autoInsertedStart === true && (tplInfo ||  dsr[3] > 0)) {
lintObj = {
-   src: env.page.src,
dsr: dsr,
templateInfo: templateInfo,
};
@@ -164,7 +161,7 @@
} else {
dsr = 
dp.dsr;
}
-   var lintObj = { 
src: env.page.src, dsr: dsr, templateInfo: templateInfo };
+   var lintObj = { 
dsr: dsr, templateInfo: templateInfo };

env.log('lint/ignored-table-attr', lintObj);
}
}
@@ -190,10 +187,8 @@
 * Here 'foo' gets fostered out.
 */
 function logFosteredContent(env, node, dp, tplInfo) {
-   var fosteredSRC = node.innerHTML;
var nextSibling = 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: FlowFixInconsistentBoards: Don't output non-critical error info

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

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

Change subject: FlowFixInconsistentBoards: Don't output non-critical error info
..

FlowFixInconsistentBoards: Don't output non-critical error info

Only output diagnostic info re $workflowByPageId if it prevents
us from fixing an inconsistent board.

Bug: T148057
Change-Id: I42872d8784298936144c23c6801843a67b2b1bbd
---
M maintenance/FlowFixInconsistentBoards.php
1 file changed, 13 insertions(+), 13 deletions(-)


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

diff --git a/maintenance/FlowFixInconsistentBoards.php 
b/maintenance/FlowFixInconsistentBoards.php
index 08f6a8f..de3ebb8 100644
--- a/maintenance/FlowFixInconsistentBoards.php
+++ b/maintenance/FlowFixInconsistentBoards.php
@@ -121,24 +121,24 @@
continue;
}
 
-   $pageId = (int)$row->page_id;
-
-   // Sanity check, or this will fail in BoardMover
-   $workflowByPageId = $this->storage->find( 
'Workflow', array(
-   'workflow_wiki' => wfWikiID(),
-   'workflow_page_id' => $pageId,
-   ) );
-
-   if ( !$workflowByPageId ) {
-   $this->error( "ERROR: '$coreTitle' has 
page ID '$pageId', but no workflow is linked to this page ID" );
-   continue;
-   }
-
if ( !$workflow->matchesTitle( $coreTitle ) ) {
$workflowTitle = 
$workflow->getOwnerTitle();
$this->output( "INCONSISTENT: Core 
title for '$workflowIdAlphadecimal' is '$coreTitle', but Flow title is 
'$workflowTitle'\n" );
 
if ( !$dryRun ) {
+   $pageId = (int)$row->page_id;
+
+   // Sanity check, or this will 
fail in BoardMover
+   $workflowByPageId = 
$this->storage->find( 'Workflow', array(
+   'workflow_wiki' => 
wfWikiID(),
+   'workflow_page_id' => 
$pageId,
+   ) );
+
+   if ( !$workflowByPageId ) {
+   $this->error( "ERROR: 
'$coreTitle' has page ID '$pageId', but no workflow is linked to this page ID" 
);
+   continue;
+   }
+
$this->boardMover->move( 
$pageId, $coreTitle );
$this->boardMover->commit();
$this->output( "FIXED: Updated 
'$workflowIdAlphadecimal' to match core title, '$coreTitle'\n" );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Special:RC filter: hideunpatrolled

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

Change subject: Special:RC filter: hideunpatrolled
..


Special:RC filter: hideunpatrolled

Allows hiding edits that have not been patrolled.
In other words, showing only edits that have been patrolled.

Will be used by the new Special:RC filters (ERI project).

Bug: T152061
Change-Id: I3cd896812c5af87bc4be53d493055c37298c712f
---
M includes/specialpage/ChangesListSpecialPage.php
M tests/phpunit/includes/specials/SpecialRecentchangesTest.php
2 files changed, 101 insertions(+), 13 deletions(-)

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



diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 5add448..2051948 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -145,6 +145,7 @@
$opts->add( 'hideanons', false );
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
+   $opts->add( 'hideunpatrolled', false );
$opts->add( 'hidemyself', false );
$opts->add( 'hidebyothers', false );
 
@@ -242,8 +243,13 @@
if ( $opts['hidehumans'] ) {
$conds[] = 'rc_bot = 1';
}
-   if ( $user->useRCPatrol() && $opts['hidepatrolled'] ) {
-   $conds['rc_patrolled'] = 0;
+   if ( $user->useRCPatrol() ) {
+   if ( $opts['hidepatrolled'] ) {
+   $conds[] = 'rc_patrolled = 0';
+   }
+   if ( $opts['hideunpatrolled'] ) {
+   $conds[] = 'rc_patrolled = 1';
+   }
}
if ( $botsonly ) {
$conds['rc_bot'] = 1;
diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php 
b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
index 0cd1b34..03e9c8f 100644
--- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
+++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -153,8 +153,8 @@
$this->assertConditions(
[ # expected
'rc_bot' => 0,
-   0 => "rc_user != '{$user->getId()}'",
-   1 => "rc_type != '6'",
+   "rc_user != '{$user->getId()}'",
+   "rc_type != '6'",
],
[
'hidemyself' => 1,
@@ -167,8 +167,8 @@
$this->assertConditions(
[ # expected
'rc_bot' => 0,
-   0 => "rc_user_text != '10.11.12.13'",
-   1 => "rc_type != '6'",
+   "rc_user_text != '10.11.12.13'",
+   "rc_type != '6'",
],
[
'hidemyself' => 1,
@@ -183,8 +183,8 @@
$this->assertConditions(
[ # expected
'rc_bot' => 0,
-   0 => "rc_user = '{$user->getId()}'",
-   1 => "rc_type != '6'",
+   "rc_user = '{$user->getId()}'",
+   "rc_type != '6'",
],
[
'hidebyothers' => 1,
@@ -197,8 +197,8 @@
$this->assertConditions(
[ # expected
'rc_bot' => 0,
-   0 => "rc_user_text = '10.11.12.13'",
-   1 => "rc_type != '6'",
+   "rc_user_text = '10.11.12.13'",
+   "rc_type != '6'",
],
[
'hidebyothers' => 1,
@@ -213,9 +213,9 @@
$this->assertConditions(
[ # expected
'rc_bot' => 0,
-   0 => "rc_user != '{$user->getId()}'",
-   1 => "rc_user = '{$user->getId()}'",
-   2 => "rc_type != '6'",
+   "rc_user != '{$user->getId()}'",
+   "rc_user = '{$user->getId()}'",
+   "rc_type != '6'",
],
[
'hidemyself' => 1,
@@ -281,4 +281,86 @@
"rc conditions: hidebots=0 hidehumans=1"
);
}
+
+   public 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Move socket.io-client into lib

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

Change subject: Move socket.io-client into lib
..


Move socket.io-client into lib

Change-Id: If83a2ab094b7497b3c71e6915dd35912ebcbdaf9
---
M AUTHORS.txt
M build/modules.json
A lib/socket.io-client/LICENSE
A lib/socket.io-client/socket.io.min.js
M tests/index.html
5 files changed, 32 insertions(+), 2 deletions(-)

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



diff --git a/AUTHORS.txt b/AUTHORS.txt
index e0568a4..417d4e5 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -127,6 +127,11 @@
  – MIT license
  – Ed Sanders and other contributors
 
+socket.io-client
+ — https://github.com/socketio/socket.io-client
+ – MIT License
+ – Guillermo Rauch and other contributors
+
 Tree Differ
  – https://github.com/tchanders/treeDiffer.js
  – MIT license
diff --git a/build/modules.json b/build/modules.json
index f07920f..40c33a2 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -1,7 +1,7 @@
 {
"socket.io": {
"scripts": [
-   
"rebaser/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.min.js"
+   "lib/socket.io-client/socket.io.min.js"
]
},
"jquery": {
diff --git a/lib/socket.io-client/LICENSE b/lib/socket.io-client/LICENSE
new file mode 100644
index 000..9338df1
--- /dev/null
+++ b/lib/socket.io-client/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Guillermo Rauch
+
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
diff --git a/lib/socket.io-client/socket.io.min.js 
b/lib/socket.io-client/socket.io.min.js
new file mode 100644
index 000..0be06f2
--- /dev/null
+++ b/lib/socket.io-client/socket.io.min.js
@@ -0,0 +1,3 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof 
module?module.exports=e():"function"==typeof 
define&?define([],e):"object"==typeof 
exports?exports.io=e():t.io=e()}(this,function(){return function(t){function 
e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return 
t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return 
e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function 
n(t,e){"object"===("undefined"==typeof t?"undefined":i(t))&&(e=t,t=void 
0),e=e||{};var r,n=s(t),a=n.source,p=n.id,f=n.path,l=h[p]& in 
h[p].nsps,d=e.forceNew||e["force new connection"]||!1===e.multiplex||l;return 
d?(u("ignoring socket cache for %s",a),r=c(a,e)):(h[p]||(u("new io instance for 
%s",a),h[p]=c(a,e)),r=h[p]),n.query&&!e.query?e.query=n.query:e&&"object"===i(e.query)&&(e.query=o(e.query)),r.socket(n.path,e)}function
 o(t){var e=[];for(var r in 
t)t.hasOwnProperty(r)&(encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return
 e.join("&")}var i="function"==typeof Symbol&&"symbol"==typeof 
Symbol.iterator?function(t){return typeof t}:function(t){return 
t&&"function"==typeof 
Symbol&===Symbol&!==Symbol.prototype?"symbol":typeof 
t},s=r(1),a=r(7),c=r(17),u=r(3)("socket.io-client");t.exports=e=n;var 
h=e.managers={};e.protocol=a.protocol,e.connect=n,e.Manager=r(17),e.Socket=r(45)},function(t,e,r){(function(e){"use
 strict";function n(t,r){var 
n=t;r=r||e.location,null==t&&(t=r.protocol+"//"+r.host),"string"==typeof 
t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?r.protocol+t:r.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less
 url %s",t),t="undefined"!=typeof r?r.protocol+"//"+t:"https://"+t),i("parse 
%s",t),n=o(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var
 s=n.host.indexOf(":")!==-1,a=s?"["+n.host+"]":n.host;return 
n.id=n.protocol+"://"+a+":"+n.port,n.href=n.protocol+"://"+a+(r&===n.port?"":":"+n.port),n}var
 o=r(2),i=r(3)("socket.io-client:url");t.exports=n}).call(e,function(){return 
this}())},function(t,e){var 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: (re)move remaining "role::installserver"

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

Change subject: install: (re)move remaining "role::installserver"
..


install: (re)move remaining "role::installserver"

Now that all other things have been split out of
role::installserver and moved, all that remains is
the preseed stuff. Creating the directory, populating
it and adding backup for it. Move that into ::preseed.

Add the "include standard" in all subclasses and finally be
done and the old class that did everything at once is now gone,
while still no-op on carbon etc and classes can be moved around.

Bug: T132757
Change-Id: I520e29c9a89f138d1a7650179725156c82fb8243
---
M manifests/site.pp
M modules/role/manifests/installserver/dhcp.pp
M modules/role/manifests/installserver/http.pp
R modules/role/manifests/installserver/preseed.pp
M modules/role/manifests/installserver/proxy.pp
M modules/role/manifests/installserver/tftp.pp
6 files changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 8b62305..0083b03 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -227,11 +227,11 @@
 
 # DHCP / TFTP
 node 'carbon.wikimedia.org' {
-role(installserver,
-installserver::tftp,
+role(installserver::tftp,
 installserver::dhcp,
 installserver::http,
 installserver::proxy,
+installserver::preseed,
 aptrepo::wikimedia)
 
 $cluster = 'misc'
diff --git a/modules/role/manifests/installserver/dhcp.pp 
b/modules/role/manifests/installserver/dhcp.pp
index d76db32..2112d1e 100644
--- a/modules/role/manifests/installserver/dhcp.pp
+++ b/modules/role/manifests/installserver/dhcp.pp
@@ -7,6 +7,7 @@
 
 include install_server::dhcp_server
 
+include standard
 include base::firewall
 
 ferm::rule { 'dhcp':
diff --git a/modules/role/manifests/installserver/http.pp 
b/modules/role/manifests/installserver/http.pp
index 271cb3e..1ae4fa4 100644
--- a/modules/role/manifests/installserver/http.pp
+++ b/modules/role/manifests/installserver/http.pp
@@ -7,6 +7,7 @@
 
 include install_server::web_server
 
+include standard
 include base::firewall
 
 ferm::service { 'install_http':
diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver/preseed.pp
similarity index 66%
rename from modules/role/manifests/installserver.pp
rename to modules/role/manifests/installserver/preseed.pp
index 0cf77e7..66a80ca 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver/preseed.pp
@@ -1,4 +1,5 @@
-class role::installserver {
+# sets up preseeding dir and config on an install server
+class role::installserver::preseed {
 
 include standard
 include role::backup::host
diff --git a/modules/role/manifests/installserver/proxy.pp 
b/modules/role/manifests/installserver/proxy.pp
index a5c5dd4..08533a5 100644
--- a/modules/role/manifests/installserver/proxy.pp
+++ b/modules/role/manifests/installserver/proxy.pp
@@ -19,6 +19,7 @@
 minute  => '15',
 }
 
+include standard
 include base::firewall
 
 ferm::service { 'proxy':
diff --git a/modules/role/manifests/installserver/tftp.pp 
b/modules/role/manifests/installserver/tftp.pp
index ce21e0b..d81d0b2 100644
--- a/modules/role/manifests/installserver/tftp.pp
+++ b/modules/role/manifests/installserver/tftp.pp
@@ -22,6 +22,7 @@
 description => 'WMF TFTP server',
 }
 
+include standard
 include base::firewall
 include role::backup::host
 include install_server::tftp_server

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I520e29c9a89f138d1a7650179725156c82fb8243
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] mediawiki...ORES[master]: 'goodfaith' filter on Special:RC / Special:Watchlist

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

Change subject: 'goodfaith' filter on Special:RC / Special:Watchlist
..


'goodfaith' filter on Special:RC / Special:Watchlist

This filter is a not a typical show/hide toggle.
It is url-driven only for the moment and will be used
by the new RC filters (ERI project).

It accepts one or many of the following values:
  good, maybebad, bad
Values are separated by a comma.

Each value is associated with a range of probabilities
that are compared against the goodfaith test. They
can be configured using $wgOresGoodfaithLevels.

Bug: T149853
Depends-On: If47842f3d91c5999a7c5bf25666b967e9b30a6d7
Change-Id: I28c593f34145d566f803d96ff8220fd685c2f695
---
M extension.json
M includes/Hooks.php
A includes/Range.php
M tests/phpunit/includes/HooksTest.php
A tests/phpunit/includes/RangeTest.php
5 files changed, 452 insertions(+), 53 deletions(-)

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



diff --git a/extension.json b/extension.json
index c8c143d..d9e7428 100644
--- a/extension.json
+++ b/extension.json
@@ -13,6 +13,7 @@
"ORES\\Cache": "includes/Cache.php",
"ORES\\Hooks": "includes/Hooks.php",
"ORES\\FetchScoreJob": "includes/FetchScoreJob.php",
+   "ORES\\Range": "includes/Range.php",
"ORES\\Scoring": "includes/Scoring.php",
"ORES\\ApiQueryORES": "includes/ApiQueryORES.php",
"ORES\\ApiHooks": "includes/ApiHooks.php",
@@ -147,6 +148,11 @@
"soft": 0.70,
"hard": 0.50
},
+   "OresGoodfaithLevels": {
+   "good" : { "min": 0.35, "max": 1 },
+   "maybebad" : { "min": 0, "max": 0.65 },
+   "bad" : { "min": 0, "max": 0.15 }
+   },
"OresEnabledNamespaces": {},
"OresWikiId": null,
"OresRevisionsPerBatch": 50,
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 31f5de9..979ad18 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -93,25 +93,31 @@
ChangesListSpecialPage $clsp,
&$filters
) {
-   if ( !self::oresEnabled( $clsp->getUser() ) || 
!self::isModelEnabled( 'damaging' ) ) {
+   if ( !self::oresEnabled( $clsp->getUser() ) ) {
return true;
}
 
-   switch ( $clsp->getName() ) {
-   case 'Watchlist':
-   $default = $clsp->getUser()->getOption( 
'oresWatchlistHideNonDamaging' );
-   break;
-   case 'Recentchanges':
-   $default = $clsp->getUser()->getOption( 
'oresRCHideNonDamaging' );
-   break;
-   default:
-   $default = false;
+   if ( self::isModelEnabled( 'damaging' ) ) {
+   switch ( $clsp->getName() ) {
+   case 'Watchlist':
+   $default = $clsp->getUser()->getOption( 
'oresWatchlistHideNonDamaging' );
+   break;
+   case 'Recentchanges':
+   $default = $clsp->getUser()->getOption( 
'oresRCHideNonDamaging' );
+   break;
+   default:
+   $default = false;
+   }
+
+   $filters['hidenondamaging'] = [
+   'msg' => 'ores-damaging-filter',
+   'default' => $default,
+   ];
}
 
-   $filters['hidenondamaging'] = [
-   'msg' => 'ores-damaging-filter',
-   'default' => $default,
-   ];
+   if ( self::isModelEnabled( 'goodfaith' ) ) {
+   $filters['goodfaith'] = [ 'msg' => false, 'default' => 
'all' ];
+   }
 
return true;
}
@@ -138,24 +144,34 @@
}
 
if ( self::isModelEnabled( 'damaging' ) ) {
-   $hidenondamaging = $opts->getValue( 'hidenondamaging' );
-   self::manipulateQuery(
-   'damaging',
-   $wgUser,
-   'rc_this_oldid',
-   $hidenondamaging,
+   $hideNonDamaging = $opts->getValue( 'hidenondamaging' );
+
+   self::hideNonDamagingFilter(
$tables,
$fields,
$conds,
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Special:RC filter: hidehumans

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

Change subject: Special:RC filter: hidehumans
..


Special:RC filter: hidehumans

Allows showing only bot edits

Will be used by the ERI project.

Bug: T149862
Change-Id: I748eb3c614abd7b8b228efe3da5e9cb569a8618f
---
M includes/specialpage/ChangesListSpecialPage.php
M tests/phpunit/includes/specials/SpecialRecentchangesTest.php
2 files changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index c1c1685..5add448 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -141,6 +141,7 @@
 
$opts->add( 'hideminor', false );
$opts->add( 'hidebots', false );
+   $opts->add( 'hidehumans', false );
$opts->add( 'hideanons', false );
$opts->add( 'hideliu', false );
$opts->add( 'hidepatrolled', false );
@@ -238,6 +239,9 @@
if ( $opts['hidebots'] ) {
$conds['rc_bot'] = 0;
}
+   if ( $opts['hidehumans'] ) {
+   $conds[] = 'rc_bot = 1';
+   }
if ( $user->useRCPatrol() && $opts['hidepatrolled'] ) {
$conds['rc_patrolled'] = 0;
}
diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php 
b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
index 388e2fd..0cd1b34 100644
--- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
+++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -267,4 +267,18 @@
"rc conditions: hidelog=1"
);
}
+
+   public function testRcHidehumans() {
+   $this->assertConditions(
+   [ # expected
+   'rc_bot' => 1,
+   "rc_type != '6'",
+   ],
+   [
+   'hidebots' => 0,
+   'hidehumans' => 1,
+   ],
+   "rc conditions: hidebots=0 hidehumans=1"
+   );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I748eb3c614abd7b8b228efe3da5e9cb569a8618f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: Sbisson 
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]: Special:RC filters: hide page edits, new pages, log entries

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

Change subject: Special:RC filters: hide page edits, new pages, log entries
..


Special:RC filters: hide page edits, new pages, log entries

New RC filters for ERI project:
  hidepageedits
  hidenewpages
  hidelog

Bug: T150060
Change-Id: I6fe852fb0f5386c3385ada5189ceaf0d9bbc979d
---
M includes/specialpage/ChangesListSpecialPage.php
M tests/phpunit/includes/specials/SpecialRecentchangesTest.php
2 files changed, 54 insertions(+), 0 deletions(-)

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



diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 9e3e3df..c1c1685 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -150,6 +150,9 @@
if ( $config->get( 'RCWatchCategoryMembership' ) ) {
$opts->add( 'hidecategorization', false );
}
+   $opts->add( 'hidepageedits', false );
+   $opts->add( 'hidenewpages', false );
+   $opts->add( 'hidelog', false );
 
$opts->add( 'namespace', '', FormOptions::INTNULL );
$opts->add( 'invert', false );
@@ -269,6 +272,15 @@
) {
$conds[] = 'rc_type != ' . $dbr->addQuotes( 
RC_CATEGORIZE );
}
+   if ( $opts['hidepageedits'] ) {
+   $conds[] = 'rc_type != ' . $dbr->addQuotes( RC_EDIT );
+   }
+   if ( $opts['hidenewpages'] ) {
+   $conds[] = 'rc_type != ' . $dbr->addQuotes( RC_NEW );
+   }
+   if ( $opts['hidelog'] ) {
+   $conds[] = 'rc_type != ' . $dbr->addQuotes( RC_LOG );
+   }
 
// Namespace filtering
if ( $opts['namespace'] !== '' ) {
diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php 
b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
index 6fb0d23..388e2fd 100644
--- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
+++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -225,4 +225,46 @@
$user
);
}
+
+   public function testRcHidepageedits() {
+   $this->assertConditions(
+   [ # expected
+   'rc_bot' => 0,
+   "rc_type != '6'",
+   "rc_type != '0'",
+   ],
+   [
+   'hidepageedits' => 1,
+   ],
+   "rc conditions: hidepageedits=1"
+   );
+   }
+
+   public function testRcHidenewpages() {
+   $this->assertConditions(
+   [ # expected
+   'rc_bot' => 0,
+   "rc_type != '6'",
+   "rc_type != '1'",
+   ],
+   [
+   'hidenewpages' => 1,
+   ],
+   "rc conditions: hidenewpages=1"
+   );
+   }
+
+   public function testRcHidelog() {
+   $this->assertConditions(
+   [ # expected
+   'rc_bot' => 0,
+   "rc_type != '6'",
+   "rc_type != '3'",
+   ],
+   [
+   'hidelog' => 1,
+   ],
+   "rc conditions: hidelog=1"
+   );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fe852fb0f5386c3385ada5189ceaf0d9bbc979d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
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]: Move wikimedia-logo.svg to role module

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

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

Change subject: Move wikimedia-logo.svg to role module
..

Move wikimedia-logo.svg to role module

Change-Id: I5c03b9a179841b5dd2f834f95266b9c4b10078df
---
R modules/role/files/grafana/wikimedia-logo.svg
M modules/role/manifests/grafana/base.pp
2 files changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/325729/1

diff --git a/files/misc/wikimedia-logo.svg 
b/modules/role/files/grafana/wikimedia-logo.svg
similarity index 100%
rename from files/misc/wikimedia-logo.svg
rename to modules/role/files/grafana/wikimedia-logo.svg
diff --git a/modules/role/manifests/grafana/base.pp 
b/modules/role/manifests/grafana/base.pp
index d4f2e58..746f969 100644
--- a/modules/role/manifests/grafana/base.pp
+++ b/modules/role/manifests/grafana/base.pp
@@ -123,16 +123,13 @@
 notify  => Service['grafana-server'],
 }
 
-# move file to module?
-# lint:ignore:puppet_url_without_modules
 file { '/usr/share/grafana/public/img/grafana_icon.svg':
-source  => 'puppet:///files/misc/wikimedia-logo.svg',
+source  => 'puppet:///modules/role/grafana/wikimedia-logo.svg',
 owner   => 'root',
 group   => 'root',
 mode=> '0444',
 require => Package['grafana'],
 }
-# lint:endignore
 
 # We disable account creation, because accounts are created
 # automagically based on the X-WEBAUTH-USER, which is either set

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c03b9a179841b5dd2f834f95266b9c4b10078df
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install: (re)move remaining "role::installserver"

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

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

Change subject: install: (re)move remaining "role::installserver"
..

install: (re)move remaining "role::installserver"

Now that all other things have been split out of
role::installserver and moved, all that remains is
the preseed stuff. Creating the directory, populating
it and adding backup for it. Move that into ::preseed.

Add the "include standard" in all subclasses and finally be
done and the old class that did everything at once is now gone,
while still no-op on carbon etc and classes can be moved around.

Bug: T132757
Change-Id: I520e29c9a89f138d1a7650179725156c82fb8243
---
M manifests/site.pp
M modules/role/manifests/installserver/dhcp.pp
M modules/role/manifests/installserver/http.pp
R modules/role/manifests/installserver/preseed.pp
M modules/role/manifests/installserver/proxy.pp
M modules/role/manifests/installserver/tftp.pp
6 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/325728/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 8b62305..0083b03 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -227,11 +227,11 @@
 
 # DHCP / TFTP
 node 'carbon.wikimedia.org' {
-role(installserver,
-installserver::tftp,
+role(installserver::tftp,
 installserver::dhcp,
 installserver::http,
 installserver::proxy,
+installserver::preseed,
 aptrepo::wikimedia)
 
 $cluster = 'misc'
diff --git a/modules/role/manifests/installserver/dhcp.pp 
b/modules/role/manifests/installserver/dhcp.pp
index d76db32..2112d1e 100644
--- a/modules/role/manifests/installserver/dhcp.pp
+++ b/modules/role/manifests/installserver/dhcp.pp
@@ -7,6 +7,7 @@
 
 include install_server::dhcp_server
 
+include standard
 include base::firewall
 
 ferm::rule { 'dhcp':
diff --git a/modules/role/manifests/installserver/http.pp 
b/modules/role/manifests/installserver/http.pp
index 271cb3e..1ae4fa4 100644
--- a/modules/role/manifests/installserver/http.pp
+++ b/modules/role/manifests/installserver/http.pp
@@ -7,6 +7,7 @@
 
 include install_server::web_server
 
+include standard
 include base::firewall
 
 ferm::service { 'install_http':
diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver/preseed.pp
similarity index 66%
rename from modules/role/manifests/installserver.pp
rename to modules/role/manifests/installserver/preseed.pp
index 0cf77e7..66a80ca 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver/preseed.pp
@@ -1,4 +1,5 @@
-class role::installserver {
+# sets up preseeding dir and config on an install server
+class role::installserver::preseed {
 
 include standard
 include role::backup::host
diff --git a/modules/role/manifests/installserver/proxy.pp 
b/modules/role/manifests/installserver/proxy.pp
index a5c5dd4..08533a5 100644
--- a/modules/role/manifests/installserver/proxy.pp
+++ b/modules/role/manifests/installserver/proxy.pp
@@ -19,6 +19,7 @@
 minute  => '15',
 }
 
+include standard
 include base::firewall
 
 ferm::service { 'proxy':
diff --git a/modules/role/manifests/installserver/tftp.pp 
b/modules/role/manifests/installserver/tftp.pp
index ce21e0b..d81d0b2 100644
--- a/modules/role/manifests/installserver/tftp.pp
+++ b/modules/role/manifests/installserver/tftp.pp
@@ -22,6 +22,7 @@
 description => 'WMF TFTP server',
 }
 
+include standard
 include base::firewall
 include role::backup::host
 include install_server::tftp_server

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I520e29c9a89f138d1a7650179725156c82fb8243
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] operations/puppet[production]: ipmi: Fix puppet URL in comment

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

Change subject: ipmi: Fix puppet URL in comment
..


ipmi: Fix puppet URL in comment

Change-Id: I8f7bccea337c6a9d27dfdd00fdf685cae74c89be
---
M modules/ipmi/files/ipmi_mgmt.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ipmi/files/ipmi_mgmt.sh b/modules/ipmi/files/ipmi_mgmt.sh
index 1a29cac..781a977 100644
--- a/modules/ipmi/files/ipmi_mgmt.sh
+++ b/modules/ipmi/files/ipmi_mgmt.sh
@@ -2,7 +2,7 @@
 
 #
 ### THIS FILE IS MANAGED BY PUPPET
-### puppet:///modules/ipmi/files/ipmi_mgmt
+### puppet:///modules/ipmi/ipmi_mgmt.sh
 #
 
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f7bccea337c6a9d27dfdd00fdf685cae74c89be
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Tim Landscheidt 
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]: icinga: Fix puppet URL in comment

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

Change subject: icinga: Fix puppet URL in comment
..


icinga: Fix puppet URL in comment

Change-Id: Ia499197a25518389d140ea93709ab675e52919e1
---
M modules/icinga/files/logrotate.conf
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/icinga/files/logrotate.conf 
b/modules/icinga/files/logrotate.conf
index a3cab58..ebb3d21 100644
--- a/modules/icinga/files/logrotate.conf
+++ b/modules/icinga/files/logrotate.conf
@@ -1,6 +1,6 @@
 #
 ### THIS FILE IS MANAGED BY PUPPET
-### puppet:///files/logrotate/icinga
+### puppet:///modules/icinga/logrotate.conf
 #
 
 /var/log/icinga/icinga.log {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia499197a25518389d140ea93709ab675e52919e1
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 
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] operations/puppet[production]: install: rename tftp_server role to just tftp and further cl...

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

Change subject: install: rename tftp_server role to just tftp and further 
cleanup
..


install: rename tftp_server role to just tftp and further cleanup

Bug: T132757
Change-Id: I765ea969c5057bc82cdb213fa120bdd0b2f83bae
---
M manifests/site.pp
M modules/role/manifests/installserver.pp
R modules/role/manifests/installserver/tftp.pp
3 files changed, 20 insertions(+), 14 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index ee26ed8..8b62305 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -178,7 +178,9 @@
 
 # Bastion in the Netherlands
 node 'bast3001.wikimedia.org' {
-role(bastionhost::general, installserver::tftp_server, prometheus::ops)
+role(bastionhost::general,
+installserver::tftp,
+prometheus::ops)
 
 interface::add_ip6_mapped { 'main': interface => 'eth0', }
 
@@ -189,7 +191,9 @@
 
 # Bastion in California
 node 'bast4001.wikimedia.org' {
-role(bastionhost::general, ipmi::mgmt, installserver::tftp_server,
+role(bastionhost::general,
+ipmi::mgmt,
+installserver::tftp,
 prometheus::ops)
 
 interface::add_ip6_mapped { 'main': interface => 'eth0', }
@@ -224,7 +228,7 @@
 # DHCP / TFTP
 node 'carbon.wikimedia.org' {
 role(installserver,
-installserver::tftp_server,
+installserver::tftp,
 installserver::dhcp,
 installserver::http,
 installserver::proxy,
@@ -1299,7 +1303,10 @@
 
 # partially replaces carbon (T132757)
 node 'install1001.wikimedia.org' {
-role(installserver::tftp_server, installserver::dhcp, aptrepo::wikimedia)
+role(installserver::tftp,
+installserver::dhcp,
+aptrepo::wikimedia)
+
 $cluster = 'misc'
 
 interface::add_ip6_mapped { 'main':
@@ -1308,7 +1315,10 @@
 }
 
 node 'install2001.wikimedia.org' {
-role(installserver::tftp_server, installserver::dhcp, aptrepo::wikimedia)
+role(installserver::tftp,
+installserver::dhcp,
+aptrepo::wikimedia)
+
 $cluster = 'misc'
 
 interface::add_ip6_mapped { 'main':
diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver.pp
index e80d974..0cf77e7 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver.pp
@@ -1,8 +1,4 @@
 class role::installserver {
-system::role { 'role::install_server':
-description => 'WMF Install server. APT repo, Forward Caching, TFTP, \
-DHCP and Web server',
-}
 
 include standard
 include role::backup::host
diff --git a/modules/role/manifests/installserver/tftp_server.pp 
b/modules/role/manifests/installserver/tftp.pp
similarity index 71%
rename from modules/role/manifests/installserver/tftp_server.pp
rename to modules/role/manifests/installserver/tftp.pp
index e689662..ce21e0b 100644
--- a/modules/role/manifests/installserver/tftp_server.pp
+++ b/modules/role/manifests/installserver/tftp.pp
@@ -1,4 +1,4 @@
-# Class: role::install_server::tftp_server
+# Class: role::installserver::tftp
 #
 # A WMF role class used to install all the install_server TFTP stuff
 #
@@ -10,15 +10,15 @@
 #
 # Requires:
 #
-#   Class['install-_server::tftp_server']
+#   Class['install_server::tftp_server']
 #   Class['base::firewall']
 #   Define['ferm::rule']
 #
 # Sample Usage:
-#   include role::installserver::tftp_server
+#   role(installserver::tftp)
 
-class role::installserver::tftp_server {
-system::role { 'role::install_server::tftp_server':
+class role::installserver::tftp {
+system::role { 'role::installserver::tftp':
 description => 'WMF TFTP server',
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I765ea969c5057bc82cdb213fa120bdd0b2f83bae
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] mediawiki...deploy[master]: Update timeout values

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

Change subject: Update timeout values
..


Update timeout values

* Reduce Parsoid request timeout to 110s.
* Bump down heartbeat timeout to 115s as well.
* Increase batch API timeout to 65s.

Bug: T152073
Change-Id: I8e83dd16c4ad0fe9b617899be97e3571f8b4bdfb
---
M scap/templates/config.yaml.j2
1 file changed, 14 insertions(+), 8 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5e36d4c..1c64b4a 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -8,8 +8,12 @@
 worker_heap_limit_mb: 800
 
 # The maximum interval in ms that can pass between two beat messages
-# sent by each worker to the master before it is killed
-worker_heartbeat_timeout: 18
+# sent by each worker to the master before it is killed.
+#
+# This is slightly larger than the request timeout so the request is
+# guaranteed to use its full 110s time allocation to complete its
+# parse while contending for cpu time with other concurrent requests.
+worker_heartbeat_timeout: 115000
 
 # Logger info
 logging:
@@ -44,10 +48,12 @@
   useBatchAPI: true
   usePHPPreProcessor: true
 
-  # RESTBase uses 2 minutes timeouts for the first request
-  # and a higher value subsequently.
-  #
-  # Set a 3 minute timeout so that RESTBase retries have
-  # a chance of succeeding.
   timeouts:
-request: 18  # 3 minutes
+# RESTBase uses a 2 minute timeout for the first request.
+#
+# Set ours to 110s so we time out before RB times out and retries.
+# This prevents RB from retrying slow requests altogether.
+request: 11
+mwApi:
+  # Bump batch timeout to 65s (higher than MW API timeout of 60s)
+  batch: 65000

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e83dd16c4ad0fe9b617899be97e3571f8b4bdfb
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: build: Replace jshint+jscs with eslint

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

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

Change subject: build: Replace jshint+jscs with eslint
..

build: Replace jshint+jscs with eslint

Bug: T152579
Change-Id: Ifbbb2100ee9cfdf4c01793559df5e1ebc139617c
---
A .eslintrc.json
D .jscsrc
D .jshintrc
M dev/wikipedia.org/assets/js/event-logging-lite.js
M dev/wikipedia.org/assets/js/lang-dropdown.js
M dev/wikipedia.org/assets/js/mediawiki.lite.js
M dev/wikipedia.org/assets/js/polyfills.js
M dev/wikipedia.org/assets/js/search-language-picker.js
M dev/wikipedia.org/assets/js/seedrandom.js
M dev/wikipedia.org/assets/js/topten-localized.js
M dev/wikipedia.org/assets/js/underscore.partial.js
M dev/wikipedia.org/assets/js/wikipedia-org-event-logging.js
M dev/wikipedia.org/assets/js/wm-portal.js
M dev/wikipedia.org/assets/js/wm-test.js
M dev/wikipedia.org/assets/js/wm-typeahead.js
M gulpfile.js
M hbs-helpers.global.js
M package.json
18 files changed, 186 insertions(+), 163 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/27/325727/1

diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..fc98626
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,17 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true,
+   "qunit": true
+   },
+   "globals": {
+   "mw": true,
+   "mediaWiki": false
+   },
+   "rules": {
+   "vars-on-top": 1,
+   "one-var": 1,
+   "dot-notation": [ "error", { "allowKeywords": true } ]
+   }
+}
diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index c9db9ba..000
--- a/.jscsrc
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-  // taken from core
-  "preset": "wikimedia",
-  "es3": true,
-
-  "requireVarDeclFirst": false,
-  "requireMultipleVarDecl": {"allExcept": ["require"]}, // added
-
-  "disallowQuotedKeysInObjects": "allButReserved",
-  "requireDotNotation": { "allExcept": [ "keywords" ] },
-  "jsDoc": {
-   "checkParamNames": true,
-   "checkRedundantReturns": true,
-   "checkTypes": "strictNativeCase",
-   "requireNewlineAfterDescription": true,
-   "requireParamTypes": true,
-   "requireReturnTypes": true
-  }
-}
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 0d23568..000
--- a/.jshintrc
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "esversion": "6",
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-
-   // Relaxing
-   "laxbreak": true,
-   "multistr": true,
-
-   // Environment
-   "browser": true,
-
-   "globals": {
-   "JSON": false
-   }
-}
diff --git a/dev/wikipedia.org/assets/js/event-logging-lite.js 
b/dev/wikipedia.org/assets/js/event-logging-lite.js
index 8918794..06761fd 100644
--- a/dev/wikipedia.org/assets/js/event-logging-lite.js
+++ b/dev/wikipedia.org/assets/js/event-logging-lite.js
@@ -1,29 +1,28 @@
-/*global
-JSON, console
-*/
+/* global Uint8Array */
 
+/* eslint dot-notation: ["error", { "allowKeywords": false }] */
 /**
-*
-* A slimmed down version of the event logging API.
-* Mostly copy & pasted from:
-* 
https://github.com/wikimedia/mediawiki-extensions-EventLogging/blob/master/modules/ext.eventLogging.core.js
-* without dependencies on jQuery or mediawiki.js. For use on wikipedia.org 
portal page.
-*
-*/
+ *
+ * A slimmed down version of the event logging API.
+ * Mostly copy & pasted from:
+ * 
https://github.com/wikimedia/mediawiki-extensions-EventLogging/blob/master/modules/ext.eventLogging.core.js
+ * without dependencies on jQuery or mediawiki.js. For use on wikipedia.org 
portal page.
+ *
+ */
 
 ( function () {
 
'use strict';
 
var baseUrl = '/beacon/event',
-   byteToHex = [],
-   self, helpers;
+   byteToHex = [],
+   self, helpers;
 
helpers = {
// replaces $.extend
extend: function ( defaults, options ) {
var extended = {},
-   prop;
+   prop;
 
for ( prop in defaults ) {
if ( Object.prototype.hasOwnProperty.call( 
defaults, prop ) && defaults[ prop ] ) {
@@ -38,7 +37,8 @@
return extended;
},
// replaces $.noop
-   noop: function () {}
+   noop: function () {
+   }
};
 
// byte to hex from
@@ -94,11 +94,11 @@
 */
generateRandomSessionId: function () {
 
-   /*jshint bitwise:false */
+   /* eslint-disable no-bitwise */
var 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RC/Watchlist: Filter out parameters that cannot be displayed

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

Change subject: RC/Watchlist: Filter out parameters that cannot be displayed
..


RC/Watchlist: Filter out parameters that cannot be displayed

Some parameters added by the ORES extension work with
the URL and the new ERI UI but not with the old toggle
(hide*) filter UI.

Specifying 'msg' => false when adding them from
the hook registers them correctly but they won't
be displayed.

Bug: T149853
Change-Id: If47842f3d91c5999a7c5bf25666b967e9b30a6d7
---
M includes/specialpage/ChangesListSpecialPage.php
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
3 files changed, 25 insertions(+), 4 deletions(-)

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



diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index cb13840..9e3e3df 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -495,4 +495,23 @@
protected function getGroupName() {
return 'changes';
}
+
+   /**
+* Get filters that can be rendered.
+*
+* Filters with 'msg' => false can be used to filter data but won't
+* be presented as show/hide toggles in the UI. They are not returned
+* by this function.
+*
+* @param array $allFilters Map of filter URL param names to properties 
(msg/default)
+* @return array Map of filter URL param names to properties 
(msg/default)
+*/
+   protected function getRenderableCustomFilters( $allFilters ) {
+   return array_filter(
+   $allFilters,
+   function( $filter ) {
+   return isset( $filter['msg'] ) && ( 
$filter['msg'] !== false );
+   }
+   );
+   }
 }
diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index cd3299c..4569dd2 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -95,7 +95,7 @@
}
 
/**
-* Get custom show/hide filters
+* Get all custom filters
 *
 * @return array Map of filter URL param names to properties 
(msg/default)
 */
@@ -747,9 +747,10 @@
 
$showhide = [ 'show', 'hide' ];
 
-   foreach ( $this->getCustomFilters() as $key => $params ) {
+   foreach ( $this->getRenderableCustomFilters( 
$this->getCustomFilters() ) as $key => $params ) {
$filters[$key] = $params['msg'];
}
+
// Disable some if needed
if ( !$user->useRCPatrol() ) {
unset( $filters['hidepatrolled'] );
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 4824961..55400d3 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -130,7 +130,7 @@
}
 
/**
-* Get custom show/hide filters
+* Get all custom filters
 *
 * @return array Map of filter URL param names to properties 
(msg/default)
 */
@@ -465,9 +465,10 @@
$filters['hidecategorization'] = 
'wlshowhidecategorization';
}
 
-   foreach ( $this->getCustomFilters() as $key => $params ) {
+   foreach ( $this->getRenderableCustomFilters( 
$this->getCustomFilters() ) as $key => $params ) {
$filters[$key] = $params['msg'];
}
+
// Disable some if needed
if ( !$user->useRCPatrol() ) {
unset( $filters['hidepatrolled'] );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If47842f3d91c5999a7c5bf25666b967e9b30a6d7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/uprightdiff[debian]: Initial debianization

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

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

Change subject: Initial debianization
..

Initial debianization

Bug: T152577
Change-Id: Id5a1021789892141a4e9d41ee535ee0bb348e4f4
---
A debian/changelog
A debian/compat
A debian/control
A debian/copyright
A debian/gbp.conf
A debian/rules
A debian/source/format
7 files changed, 96 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/uprightdiff 
refs/changes/26/325726/1

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 000..3b3698e
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+uprightdiff (1.0) unstable; urgency=medium
+
+  * Initial Release.
+
+ -- Kunal Mehta   Tue, 06 Dec 2016 16:01:21 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 000..8438a90
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,22 @@
+Source: uprightdiff
+Section: devel
+Priority: optional
+Maintainer: Kunal Mehta 
+Build-Depends: debhelper (>= 9), libopencv-highgui-dev, 
libboost-program-options-dev
+Standards-Version: 3.9.8
+Homepage: https://phabricator.wikimedia.org/diffusion/IURD/
+#Vcs-Git: https://anonscm.debian.org/collab-maint/uprightdiff.git
+Vcs-Browser: https://phabricator.wikimedia.org/diffusion/IURD/
+
+Package: uprightdiff
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: utility examines the differences between two images
+ This utility examines the differences between two images.
+ It produces a visual annotation and reports statistics.
+ .
+ It is optimised for images which come from browser screenshots.
+ It analyses the image for vertical motion, and annotates connected
+ regions that have the same vertical displacement. Then it highlights
+ any remaining ("residual") differences which are not explained by
+ vertical motion on a pixel-by-pixel basis.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 000..6266b9e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,43 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: uprightdiff
+Source: https://phabricator.wikimedia.org/diffusion/IURD/
+
+Files: *
+Copyright: 2000-2015, Intel Corporation, all rights reserved.
+   2009-2011, Willow Garage Inc., all rights reserved.
+   2009-2015, NVIDIA Corporation, all rights reserved.
+   2010-2013, Advanced Micro Devices, Inc., all rights reserved.
+   2015, OpenCV Foundation, all rights reserved.
+   2015, Itseez Inc., all rights reserved.
+   2016, Tim Starling
+License: BSD-3-Clause
+
+Files: debian/*
+Copyright: 2016 Kunal Mehta 
+License: BSD-3-Clause
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+may be used to endorse or promote products derived from this software
+without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
+ A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE HOLDERS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 000..424194d
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+debian-branch = debian
+sign-tags = true
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 000..0d6f53e
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see 

[MediaWiki-commits] [Gerrit] integration/uprightdiff[master]: Support DESTDIR in Makefile

2016-12-06 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Support DESTDIR in Makefile
..


Support DESTDIR in Makefile

This is used by Debian packaging to install in a separate directory
until it is ready to install it.

If not set, it will still install in the same location as previously.

Change-Id: I9bc50b3d8bc82aa56e1459917e68b4978e80d02a
---
M Makefile
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/Makefile b/Makefile
index 8047485..5f3ce14 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,8 @@
 all: uprightdiff
 
 install: all
-   install -d $(PREFIX)/bin
-   install -s uprightdiff $(PREFIX)/bin/uprightdiff
+   install -d $(DESTDIR)$(PREFIX)/bin
+   install -s uprightdiff $(DESTDIR)$(PREFIX)/bin/uprightdiff
 
 uprightdiff:
g++ $(CFLAGS) main.cpp BlockMotionSearch.cpp UprightDiff.cpp \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bc50b3d8bc82aa56e1459917e68b4978e80d02a
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] integration/uprightdiff[master]: Add 'make clean'

2016-12-06 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Add 'make clean'
..


Add 'make clean'

Change-Id: I3056b64b48e3b11dfbb2fe2f79a93d5204045b84
---
M Makefile
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved



diff --git a/Makefile b/Makefile
index 5f3ce14..13213fa 100644
--- a/Makefile
+++ b/Makefile
@@ -29,3 +29,6 @@
-lopencv_video \
-lopencv_imgproc \
-o fback
+
+clean:
+   rm -f uprightdiff

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3056b64b48e3b11dfbb2fe2f79a93d5204045b84
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: installserver: move firewall include to http/proxy classes

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

Change subject: installserver: move firewall include to http/proxy classes
..


installserver: move firewall include to http/proxy classes

Remove the "base::firewall" include from the old global
installserver role that we are removing.

Add it instead to all the classes that we split out from that.

This is the most flexible. Roles can be moved around without breaking
firewalling/ferm.

The other 2 installserver roles for dhcp and tftp already have it,
just also adding it in http and proxy.

Also removing outdated comment section entirely, goal is to kill this class.

Bug: T132757
Change-Id: If06d7c54a56ad53a87e8ff9db180864d7e5089d7
---
M modules/role/manifests/installserver.pp
M modules/role/manifests/installserver/http.pp
M modules/role/manifests/installserver/proxy.pp
3 files changed, 4 insertions(+), 22 deletions(-)

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



diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver.pp
index 1b41bed..e80d974 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver.pp
@@ -1,24 +1,3 @@
-# Class: role::installserver
-#
-# A WMF role class used to install all the install_server stuff
-#
-# Parameters:
-#
-# Actions:
-#   Install and configure all needed software to have an installation 
server
-#   ready
-#
-# Requires:
-#
-#   Class['install_server::preseed_server']
-#   Class['install_server::web_server']
-#   Define['backup::set']
-#   Class['base::firewall']
-#   Define['ferm::service']
-#
-# Sample Usage:
-#   include role::installserver
-
 class role::installserver {
 system::role { 'role::install_server':
 description => 'WMF Install server. APT repo, Forward Caching, TFTP, \
@@ -26,7 +5,6 @@
 }
 
 include standard
-include base::firewall
 include role::backup::host
 include install_server::preseed_server
 
diff --git a/modules/role/manifests/installserver/http.pp 
b/modules/role/manifests/installserver/http.pp
index 5645201..271cb3e 100644
--- a/modules/role/manifests/installserver/http.pp
+++ b/modules/role/manifests/installserver/http.pp
@@ -7,6 +7,8 @@
 
 include install_server::web_server
 
+include base::firewall
+
 ferm::service { 'install_http':
 proto => 'tcp',
 port  => '(http https)'
diff --git a/modules/role/manifests/installserver/proxy.pp 
b/modules/role/manifests/installserver/proxy.pp
index da9a3b1..a5c5dd4 100644
--- a/modules/role/manifests/installserver/proxy.pp
+++ b/modules/role/manifests/installserver/proxy.pp
@@ -19,6 +19,8 @@
 minute  => '15',
 }
 
+include base::firewall
+
 ferm::service { 'proxy':
 proto  => 'tcp',
 port   => '8080',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If06d7c54a56ad53a87e8ff9db180864d7e5089d7
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/puppet[production]: install: rename tftp_server role to just tftp and further cl...

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

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

Change subject: install: rename tftp_server role to just tftp and further 
cleanup
..

install: rename tftp_server role to just tftp and further cleanup

Change-Id: I765ea969c5057bc82cdb213fa120bdd0b2f83bae
---
M manifests/site.pp
M modules/role/manifests/installserver.pp
R modules/role/manifests/installserver/tftp.pp
3 files changed, 20 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/325725/1

diff --git a/manifests/site.pp b/manifests/site.pp
index ee26ed8..8b62305 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -178,7 +178,9 @@
 
 # Bastion in the Netherlands
 node 'bast3001.wikimedia.org' {
-role(bastionhost::general, installserver::tftp_server, prometheus::ops)
+role(bastionhost::general,
+installserver::tftp,
+prometheus::ops)
 
 interface::add_ip6_mapped { 'main': interface => 'eth0', }
 
@@ -189,7 +191,9 @@
 
 # Bastion in California
 node 'bast4001.wikimedia.org' {
-role(bastionhost::general, ipmi::mgmt, installserver::tftp_server,
+role(bastionhost::general,
+ipmi::mgmt,
+installserver::tftp,
 prometheus::ops)
 
 interface::add_ip6_mapped { 'main': interface => 'eth0', }
@@ -224,7 +228,7 @@
 # DHCP / TFTP
 node 'carbon.wikimedia.org' {
 role(installserver,
-installserver::tftp_server,
+installserver::tftp,
 installserver::dhcp,
 installserver::http,
 installserver::proxy,
@@ -1299,7 +1303,10 @@
 
 # partially replaces carbon (T132757)
 node 'install1001.wikimedia.org' {
-role(installserver::tftp_server, installserver::dhcp, aptrepo::wikimedia)
+role(installserver::tftp,
+installserver::dhcp,
+aptrepo::wikimedia)
+
 $cluster = 'misc'
 
 interface::add_ip6_mapped { 'main':
@@ -1308,7 +1315,10 @@
 }
 
 node 'install2001.wikimedia.org' {
-role(installserver::tftp_server, installserver::dhcp, aptrepo::wikimedia)
+role(installserver::tftp,
+installserver::dhcp,
+aptrepo::wikimedia)
+
 $cluster = 'misc'
 
 interface::add_ip6_mapped { 'main':
diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver.pp
index e80d974..0cf77e7 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver.pp
@@ -1,8 +1,4 @@
 class role::installserver {
-system::role { 'role::install_server':
-description => 'WMF Install server. APT repo, Forward Caching, TFTP, \
-DHCP and Web server',
-}
 
 include standard
 include role::backup::host
diff --git a/modules/role/manifests/installserver/tftp_server.pp 
b/modules/role/manifests/installserver/tftp.pp
similarity index 71%
rename from modules/role/manifests/installserver/tftp_server.pp
rename to modules/role/manifests/installserver/tftp.pp
index e689662..ce21e0b 100644
--- a/modules/role/manifests/installserver/tftp_server.pp
+++ b/modules/role/manifests/installserver/tftp.pp
@@ -1,4 +1,4 @@
-# Class: role::install_server::tftp_server
+# Class: role::installserver::tftp
 #
 # A WMF role class used to install all the install_server TFTP stuff
 #
@@ -10,15 +10,15 @@
 #
 # Requires:
 #
-#   Class['install-_server::tftp_server']
+#   Class['install_server::tftp_server']
 #   Class['base::firewall']
 #   Define['ferm::rule']
 #
 # Sample Usage:
-#   include role::installserver::tftp_server
+#   role(installserver::tftp)
 
-class role::installserver::tftp_server {
-system::role { 'role::install_server::tftp_server':
+class role::installserver::tftp {
+system::role { 'role::installserver::tftp':
 description => 'WMF TFTP server',
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I765ea969c5057bc82cdb213fa120bdd0b2f83bae
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]: Generalize Announcement cards a bit.

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

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

Change subject: Generalize Announcement cards a bit.
..

Generalize Announcement cards a bit.

The previous (first) version of announcement cards didn't actually make
use of the "caption_HTML" or "image" parameters that are part of the
announcement endpoint of the Content Service, which are meant to represent
the footer verbiage and the header image, respectively.

This patch updates our logic to make use of these fields, which means that
we no longer need to maintain any hard-coded images or strings for this
purpose.

We will still, however, keep around the separate classes of SurveyCard and
FundraisingCard, since this distinction is necessary for analytics
purposes, as well as enabling the "negative" action button in the
announcement card. But aside from that, the card is now fully customizable
by the endpoint content.

Change-Id: I8e77fc7bcbdd9ed020127f40c1996ff772fff097
---
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testFocus-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testLayoutDirection-320dp-en-rtl-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testTheme-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-320dp-en-ltr-font1.5x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.feed.announcement.SurveyCardViewTest.testWidth-480dp-en-ltr-font1.5x-light.png
M 
app/src/androidTest/java/org/wikipedia/feed/announcement/FundraisingCardViewTest.java
M 
app/src/androidTest/java/org/wikipedia/feed/announcement/SurveyCardViewTest.java
M app/src/main/java/org/wikipedia/feed/announcement/Announcement.java
M app/src/main/java/org/wikipedia/feed/announcement/AnnouncementCard.java
M app/src/main/java/org/wikipedia/feed/announcement/AnnouncementCardView.java
M app/src/main/java/org/wikipedia/feed/announcement/FundraisingCardView.java
M app/src/main/java/org/wikipedia/feed/announcement/SurveyCardView.java
D app/src/main/res/drawable/ic_fundraising_header_2016.xml
M app/src/main/res/layout/view_card_announcement.xml
M app/src/test/java/org/wikipedia/feed/announcement/AnnouncementClientTest.java
M app/src/test/res/raw/announce_2016_11_21.json
31 files changed, 110 insertions(+), 107 deletions(-)


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

diff --git 
a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png
index 7d531cd..c29aa17 100644
--- 
a/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png
+++ 
b/app/screenshots-ref/org.wikipedia.feed.announcement.FundraisingCardViewTest.testFocus-320dp-en-ltr-font1.0x-dark.png
Binary files differ
diff --git 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Make `box-shadow` LESS vars follow naming s...

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

Change subject: MediaWiki theme: Make `box-shadow` LESS vars follow naming 
scheme
..


MediaWiki theme: Make `box-shadow` LESS vars follow naming scheme

Change the `box-shadow` LESS variables to follow the general naming
scheme with a state modifier `-focus` at the end of the variable name.
Also, remove an obsolete variable, and introducing a general widget one
for transition purposes.

Change-Id: Icfd621b81453b03a40cdcb89e9568461ea76eb24
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
3 files changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 3553a94..1314c29 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -98,12 +98,12 @@
 
 @box-shadow-dialog: 0 0.15em 0 0 rgba( 0, 0, 0, 0.15 );
 @box-shadow-menu: @box-shadow-dialog;
-@box-shadow-active: inset 0 0 0 1px @color-progressive-active;
-@box-shadow-focus-default: inset 0 0 0 1px @color-progressive;
-@box-shadow-focus-inset: inset 0 0 0 1px @color-progressive, inset 0 0 0 2px 
@color-default-light;
-@box-shadow-focus-readonly: inset 0 0 0 1px #c8ccd1;
+@box-shadow-widget: inset 0 0 0 1px @background-color-default;
+@box-shadow-widget-focus: inset 0 0 0 1px @color-progressive;
+@box-shadow-progressive-focus: inset 0 0 0 1px @color-progressive, inset 0 0 0 
2px @color-default-light;
+@box-shadow-input-binary-active: inset 0 0 0 1px @color-progressive-active;
+@box-shadow-readonly-focus: inset 0 0 0 1px #c8ccd1;
 @box-shadow-disabled-filled: inset 0 0 0 1px @color-disabled-filled;
-@box-shadow-light-inset: inset 0 0 0 1px @color-default-light;
 
 @line-height-default: 1.4;
 
diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index fccc6e0..4c39e8b 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -102,7 +102,7 @@
color: @color-default-hover;
}
&:focus {
-   box-shadow: @box-shadow-focus-default, 
0 0 0 1px @color-progressive-focus;
+   box-shadow: @box-shadow-widget-focus, 0 
0 0 1px @color-progressive-focus;
}
}
 
@@ -232,8 +232,8 @@
}
 
&:focus {
-   border-color: @color-progressive-focus;
-   box-shadow: @box-shadow-focus-default;
+   border-color: 
@border-color-default-focus;
+   box-shadow: @box-shadow-widget-focus;
}
}
 
@@ -251,7 +251,7 @@
 
&:focus {
border-color: @color-progressive-focus;
-   box-shadow: inset 0 0 0 1px 
@color-progressive-focus, inset 0 0 0 2px @color-default-light;
+   box-shadow: 
@box-shadow-progressive-focus;
}
}
 
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 3311f90..60ff9e6 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -179,7 +179,7 @@
&:focus {
border-color: @border-color-default-focus;
outline: 0;
-   box-shadow: @box-shadow-focus-default;
+   box-shadow: @box-shadow-widget-focus;
}
 
.oo-ui-iconElement-icon,
@@ -471,12 +471,12 @@
&:active:focus + span {
background-color: @color-progressive-active;
border-color: @border-color-input-binary-active;
-   box-shadow: @box-shadow-active;
+   box-shadow: @box-shadow-input-binary-active;
}
 
&:focus + span {
border-color: @color-progressive;
-   box-shadow: @box-shadow-focus-default;
+   box-shadow: @box-shadow-widget-focus;
}
 
&:checked {
@@ -496,13 +496,13 @@
&:active:focus + span {
background-color: 
@background-color-input-binary-active;
border-color: @border-color-input-binary-active;
-   box-shadow: @box-shadow-active;

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Simplify frameless ButtonWidget selectors

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

Change subject: MediaWiki theme: Simplify frameless ButtonWidget selectors
..


MediaWiki theme: Simplify frameless ButtonWidget selectors

Simplifying frameless ButtonWidget selectors and aligning with
framed ButtonWidget logic.

Change-Id: I5e239070fed6691094f3881d0de9e331b5f8779a
---
M src/themes/mediawiki/elements.less
1 file changed, 4 insertions(+), 10 deletions(-)

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



diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index 6665a19..cdd4481 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -302,24 +302,18 @@
 
 .mw-frameless-button-colored( @link, @hover, @active, @focus ) { // following 
CSS Pseudo Classes
> .oo-ui-buttonElement-button {
-   > .oo-ui-labelElement-label {
-   color: @link;
-   }
+   color: @link;
}
 
> .oo-ui-buttonElement-button:hover {
-   > .oo-ui-labelElement-label {
-   color: @hover;
-   }
+   color: @hover;
}
 
> .oo-ui-buttonElement-button:active,
> .oo-ui-buttonElement-button:active:focus,
&.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-   > .oo-ui-labelElement-label {
-   color: @active;
-   box-shadow: none;
-   }
+   color: @active;
+   box-shadow: none;
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e239070fed6691094f3881d0de9e331b5f8779a
Gerrit-PatchSet: 3
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
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...crm[deployment]: Merge branch 'master' into deployment

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

Change subject: Merge branch 'master' into deployment
..


Merge branch 'master' into deployment

8d7c42d Update SmashPig library

Change-Id: Ie8fba1b5369dcd30d0e30eec47e5948b4753dded
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index 36f9e5b..b861ec0 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 36f9e5b9d0e7cfe125dbc18ccf479ef6d7847edd
+Subproject commit b861ec091301115a10c0efb5969b869f861e6ef7

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8fba1b5369dcd30d0e30eec47e5948b4753dded
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
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] wikimedia...crm[deployment]: Merge branch 'master' into deployment

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

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

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

8d7c42d Update SmashPig library

Change-Id: Ie8fba1b5369dcd30d0e30eec47e5948b4753dded
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/23/325723/1

diff --git a/vendor b/vendor
index 36f9e5b..b861ec0 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 36f9e5b9d0e7cfe125dbc18ccf479ef6d7847edd
+Subproject commit b861ec091301115a10c0efb5969b869f861e6ef7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8fba1b5369dcd30d0e30eec47e5948b4753dded
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
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] mediawiki...UploadWizard[wmf/1.29.0-wmf.5]: Update checks for .fromURL for Flickr upload to fix automati...

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

Change subject: Update checks for .fromURL for Flickr upload to fix automatic 
deeds
..


Update checks for .fromURL for Flickr upload to fix automatic deeds

Follow-up to 1c20a1a1ebbca71f69edf876cc4848aeac4272b8.

Change-Id: Ife2c774272909bb428f64ef09ff7b00499ce187b
(cherry picked from commit c1755c08fca515a934a70691cd7678a0b74c5b36)
---
M resources/controller/uw.controller.Deed.js
M resources/controller/uw.controller.Details.js
M resources/details/uw.DeedChooserDetailsWidget.js
M tests/qunit/controller/uw.controller.Deed.test.js
M tests/qunit/controller/uw.controller.Details.test.js
5 files changed, 10 insertions(+), 8 deletions(-)

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



diff --git a/resources/controller/uw.controller.Deed.js 
b/resources/controller/uw.controller.Deed.js
index f6474bc..bd59876 100644
--- a/resources/controller/uw.controller.Deed.js
+++ b/resources/controller/uw.controller.Deed.js
@@ -85,7 +85,7 @@
 
$.each( uploads, function ( i, upload ) {
fromStepName = upload.state;
-   if ( !upload.fromURL ) {
+   if ( !upload.file.fromURL ) {
showDeed = true;
return false;
}
@@ -136,7 +136,7 @@
 
$.each( uploads, function ( i, upload ) {
// Add previews and details to the DOM
-   if ( !upload.fromURL ) {
+   if ( !upload.file.fromURL ) {
upload.deedPreview = new uw.ui.DeedPreview( 
upload, step.config );
}
} );
diff --git a/resources/controller/uw.controller.Details.js 
b/resources/controller/uw.controller.Details.js
index 3c95548..3561802 100644
--- a/resources/controller/uw.controller.Details.js
+++ b/resources/controller/uw.controller.Details.js
@@ -67,7 +67,7 @@
 
upload.createDetails();
 
-   if ( upload.fromURL || ( upload.deedChooser && 
upload.deedChooser.deed.name === 'custom' ) ) {
+   if ( upload.file.fromURL || ( upload.deedChooser && 
upload.deedChooser.deed.name === 'custom' ) ) {
upload.details.useCustomDeedChooser();
}
 
diff --git a/resources/details/uw.DeedChooserDetailsWidget.js 
b/resources/details/uw.DeedChooserDetailsWidget.js
index 928e250..3f890fa 100644
--- a/resources/details/uw.DeedChooserDetailsWidget.js
+++ b/resources/details/uw.DeedChooserDetailsWidget.js
@@ -20,7 +20,7 @@
var config, deed, deedDiv;
 
// Defining own deedChooser for uploads coming from external 
service
-   if ( upload.fromURL ) {
+   if ( upload.file.fromURL ) {
// XXX can be made a seperate class as 
mw.UploadFromUrlDeedChooser
this.deedChooser = upload.deedChooser = {
deed: {},
diff --git a/tests/qunit/controller/uw.controller.Deed.test.js 
b/tests/qunit/controller/uw.controller.Deed.test.js
index 5242249..622be2d 100644
--- a/tests/qunit/controller/uw.controller.Deed.test.js
+++ b/tests/qunit/controller/uw.controller.Deed.test.js
@@ -32,10 +32,10 @@
),
ststub = this.sandbox.stub().returns( 
$.Deferred().promise() ),
uploads = [
-   { fromURL: true, getThumbnail: ststub },
-   { getThumbnail: ststub },
-   { fromURL: true, getThumbnail: ststub },
-   { getThumbnail: ststub }
+   { file: { fromURL: true }, getThumbnail: ststub 
},
+   { file: {}, getThumbnail: ststub },
+   { file: { fromURL: true }, getThumbnail: ststub 
},
+   { file: {}, getThumbnail: ststub }
];
 
this.sandbox.stub( step.ui, 'load' );
diff --git a/tests/qunit/controller/uw.controller.Details.test.js 
b/tests/qunit/controller/uw.controller.Details.test.js
index 3a5b607..af7f330 100644
--- a/tests/qunit/controller/uw.controller.Details.test.js
+++ b/tests/qunit/controller/uw.controller.Details.test.js
@@ -27,6 +27,8 @@
};
 
return {
+   file: { fromUrl: false },
+
deedChooser: { deed: { name: customDeedChooser ? 
'custom' : 'cc-by-sa-4.0' } },
 
on: $.noop,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife2c774272909bb428f64ef09ff7b00499ce187b
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Cleanup static analysis errors

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

Change subject: Cleanup static analysis errors
..


Cleanup static analysis errors

While prepping the code base for using etsy/phan i found a few problems.
A couple are real problems, while others are just places etsy couldn't
figure out the types.

* AuthPlugin referenced UserLoginTemplate which doesn't exist. Tracing
  back usages this accepts classes that extend from BaseTemplate.
* DatabaseSqlite had an invalid @var annotation.
* LoadBalancer had some missing or under-defined annotations. Make them
  more specific where possible.
* SqlBagOStuff didn't have the appropriate use statement for
  WaitConditionLoop and probably doesn't work. Also updated annotations
  that point to non-existent DatabaseBase to use IDatabase.

Change-Id: Iff2270b418ad2f8f97cfdb6df646c435d3283536
---
M includes/AuthPlugin.php
M includes/libs/rdbms/database/DatabaseSqlite.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M includes/objectcache/SqlBagOStuff.php
M maintenance/backup.inc
5 files changed, 19 insertions(+), 6 deletions(-)

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



diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php
index 0b65593..b85e1d6 100644
--- a/includes/AuthPlugin.php
+++ b/includes/AuthPlugin.php
@@ -73,7 +73,7 @@
/**
 * Modify options in the login template.
 *
-* @param UserLoginTemplate $template
+* @param BaseTemplate $template
 * @param string $type 'signup' or 'login'. Added in 1.16.
 */
public function modifyUITemplate( &$template, &$type ) {
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php 
b/includes/libs/rdbms/database/DatabaseSqlite.php
index 7317d54..a06aad2 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -41,7 +41,7 @@
/** @var resource */
protected $mLastResult;
 
-   /** @var $mConn PDO */
+   /** @var PDO */
protected $mConn;
 
/** @var FSLockManager (hopefully on the same server as the DB) */
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index d42fed9..634993a 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -31,7 +31,7 @@
 class LoadBalancer implements ILoadBalancer {
/** @var array[] Map of (server index => server config array) */
private $mServers;
-   /** @var array[] Map of (local/foreignUsed/foreignFree => server index 
=> IDatabase array) */
+   /** @var IDatabase[][] Map of (local/foreignUsed/foreignFree => server 
index => IDatabase array) */
private $mConns;
/** @var float[] Map of (server index => weight) */
private $mLoads;
@@ -390,6 +390,9 @@
return $i;
}
 
+   /**
+* @param DBMasterPos|false $pos
+*/
public function waitFor( $pos ) {
$this->mWaitForPos = $pos;
$i = $this->mReadIndex;
@@ -436,6 +439,10 @@
return $ok;
}
 
+   /**
+* @param int $i
+* @return IDatabase
+*/
public function getAnyOpenConnection( $i ) {
foreach ( $this->mConns as $connsByServer ) {
if ( !empty( $connsByServer[$i] ) ) {
@@ -1447,6 +1454,11 @@
}
}
 
+   /**
+* @param IDatabase $conn
+* @param DBMasterPos|false $pos
+* @param int $timeout
+*/
public function safeWaitForMasterPos( IDatabase $conn, $pos = false, 
$timeout = 10 ) {
if ( $this->getServerCount() <= 1 || !$conn->getLBInfo( 
'replica' ) ) {
return true; // server is not a replica DB
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 47dae78..de49fc3 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -22,6 +22,7 @@
  */
 
 use \MediaWiki\MediaWikiServices;
+use \Wikimedia\WaitConditionLoop;
 
 /**
  * Class to store objects in the database
diff --git a/maintenance/backup.inc b/maintenance/backup.inc
index 38daf64..18c7f11 100644
--- a/maintenance/backup.inc
+++ b/maintenance/backup.inc
@@ -60,7 +60,7 @@
/**
 * The dependency-injected database to use.
 *
-* @var DatabaseBase|null
+* @var IDatabase|null
 *
 * @see self::setDB
 */
@@ -314,7 +314,7 @@
 * @todo Fixme: the --server parameter is currently not respected, as it
 * doesn't seem terribly easy to ask the load balancer for a particular
 * connection by name.
-* @return DatabaseBase
+* @return IDatabase
 */
function backupDb() {
if ( 

[MediaWiki-commits] [Gerrit] mediawiki...TemplateData[master]: Follow-up I9ba06bb3a: Use separate window manager for dialog

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

Change subject: Follow-up I9ba06bb3a: Use separate window manager for dialog
..


Follow-up I9ba06bb3a: Use separate window manager for dialog

The dialog wants to show a confirm dialog inside it, so we
need two separate managers.

Change-Id: Ib27b9348d73d15d353ad906fc33cc374ad66
---
M modules/ext.templateDataGenerator.target.js
1 file changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/modules/ext.templateDataGenerator.target.js 
b/modules/ext.templateDataGenerator.target.js
index c9b941c..30d9072 100644
--- a/modules/ext.templateDataGenerator.target.js
+++ b/modules/ext.templateDataGenerator.target.js
@@ -41,7 +41,8 @@
.addClass( 'tdg-editscreen-main-helplink' )
.text( mw.msg( 'templatedata-helplink' ) );
 
-   this.windowManager = OO.ui.getWindowManager();
+   this.windowManager = new OO.ui.WindowManager();
+   $( 'body' ).append( this.windowManager.$element );
 
// Dialog
this.tdgDialog = new mw.TemplateData.Dialog( config );
@@ -124,6 +125,14 @@
 mw.TemplateData.Target.prototype.setWikitext = null;
 
 /**
+ * Destroy the target
+ */
+mw.TemplateData.Target.prototype.destroy = function () {
+   this.windowManager.destroy();
+   this.$element.remove();
+};
+
+/**
  * Display error message in the edit window
  *
  * @method setNoticeMessage
@@ -194,7 +203,7 @@
// Failure
function () {
// Open a message dialog
-   target.windowManager.openWindow( 
'messageDialog', {
+   OO.ui.getWindowManager().openWindow( 
'messageDialog', {
title: mw.msg( 
'templatedata-modal-title' ),
message: mw.msg( 
'templatedata-errormsg-jsonbadformat' ),
verbose: true,
@@ -290,7 +299,7 @@
this.setWikitext( this.replaceTemplateData( templateData ) );
} else {
this.windowManager.closeWindow( 
this.windowManager.getCurrentWindow() );
-   this.windowManager.openWindow( 'messageDialog', {
+   OO.ui.getWindowManager().openWindow( 'messageDialog', {
title: mw.msg( 'templatedata-modal-title' ),
message: mw.msg( 'templatedata-errormsg-insertblank' ),
actions: [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib27b9348d73d15d353ad906fc33cc374ad66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
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] integration/uprightdiff[master]: Add 'make clean'

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

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

Change subject: Add 'make clean'
..

Add 'make clean'

Change-Id: I3056b64b48e3b11dfbb2fe2f79a93d5204045b84
---
M Makefile
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/uprightdiff 
refs/changes/22/325722/1

diff --git a/Makefile b/Makefile
index 5f3ce14..13213fa 100644
--- a/Makefile
+++ b/Makefile
@@ -29,3 +29,6 @@
-lopencv_video \
-lopencv_imgproc \
-o fback
+
+clean:
+   rm -f uprightdiff

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3056b64b48e3b11dfbb2fe2f79a93d5204045b84
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
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] integration/uprightdiff[master]: Support DESTDIR in Makefile

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

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

Change subject: Support DESTDIR in Makefile
..

Support DESTDIR in Makefile

This is used by Debian packaging to install in a separate directory
until it is ready to install it.

If not set, it will still install in the same location as previously.

Change-Id: I9bc50b3d8bc82aa56e1459917e68b4978e80d02a
---
M Makefile
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/uprightdiff 
refs/changes/21/325721/1

diff --git a/Makefile b/Makefile
index 8047485..5f3ce14 100644
--- a/Makefile
+++ b/Makefile
@@ -4,8 +4,8 @@
 all: uprightdiff
 
 install: all
-   install -d $(PREFIX)/bin
-   install -s uprightdiff $(PREFIX)/bin/uprightdiff
+   install -d $(DESTDIR)$(PREFIX)/bin
+   install -s uprightdiff $(DESTDIR)$(PREFIX)/bin/uprightdiff
 
 uprightdiff:
g++ $(CFLAGS) main.cpp BlockMotionSearch.cpp UprightDiff.cpp \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bc50b3d8bc82aa56e1459917e68b4978e80d02a
Gerrit-PatchSet: 1
Gerrit-Project: integration/uprightdiff
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/puppet[production]: installserver: move firewall include to http/proxy classes

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

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

Change subject: installserver: move firewall include to http/proxy classes
..

installserver: move firewall include to http/proxy classes

Remove the "base::firewall" include from the old global
installserver role that we are removing.

Add it instead to all the classes that we split out from that.

This is the most flexible. Roles can be moved around without breaking
firewalling/ferm.

The other 2 installserver roles for dhcp and tftp already have it,
just also adding it in http and proxy.

Bug: T132757
Change-Id: If06d7c54a56ad53a87e8ff9db180864d7e5089d7
---
M modules/role/manifests/installserver.pp
M modules/role/manifests/installserver/http.pp
M modules/role/manifests/installserver/proxy.pp
3 files changed, 4 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/20/325720/1

diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver.pp
index 1b41bed..e80d974 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver.pp
@@ -1,24 +1,3 @@
-# Class: role::installserver
-#
-# A WMF role class used to install all the install_server stuff
-#
-# Parameters:
-#
-# Actions:
-#   Install and configure all needed software to have an installation 
server
-#   ready
-#
-# Requires:
-#
-#   Class['install_server::preseed_server']
-#   Class['install_server::web_server']
-#   Define['backup::set']
-#   Class['base::firewall']
-#   Define['ferm::service']
-#
-# Sample Usage:
-#   include role::installserver
-
 class role::installserver {
 system::role { 'role::install_server':
 description => 'WMF Install server. APT repo, Forward Caching, TFTP, \
@@ -26,7 +5,6 @@
 }
 
 include standard
-include base::firewall
 include role::backup::host
 include install_server::preseed_server
 
diff --git a/modules/role/manifests/installserver/http.pp 
b/modules/role/manifests/installserver/http.pp
index 5645201..271cb3e 100644
--- a/modules/role/manifests/installserver/http.pp
+++ b/modules/role/manifests/installserver/http.pp
@@ -7,6 +7,8 @@
 
 include install_server::web_server
 
+include base::firewall
+
 ferm::service { 'install_http':
 proto => 'tcp',
 port  => '(http https)'
diff --git a/modules/role/manifests/installserver/proxy.pp 
b/modules/role/manifests/installserver/proxy.pp
index da9a3b1..a5c5dd4 100644
--- a/modules/role/manifests/installserver/proxy.pp
+++ b/modules/role/manifests/installserver/proxy.pp
@@ -19,6 +19,8 @@
 minute  => '15',
 }
 
+include base::firewall
+
 ferm::service { 'proxy':
 proto  => 'tcp',
 port   => '8080',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If06d7c54a56ad53a87e8ff9db180864d7e5089d7
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] mediawiki...CirrusSearch[master]: icu_tokenizer: add a default set of language codes

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

Change subject: icu_tokenizer: add a default set of language codes
..


icu_tokenizer: add a default set of language codes

Adds the list of languages identified in
https://www.mediawiki.org/wiki/User:TJones_(WMF)/Notes/Spaceless_Writing_Systems_and_Wiki-Projects

Change-Id: I2e3a13b12cb5cf9ebc3d7c98486c346e03acab2a
---
M includes/Maintenance/AnalysisConfigBuilder.php
1 file changed, 24 insertions(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  Tjones: Looks good to me, approved
  EBernhardson: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 00aec8f..aade8d1 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -922,7 +922,30 @@
 * @var bool[] indexed by language code, languages where ICU 
tokenization
 * can be enabled by default
 */
-   private $languagesWithIcuTokenization = [];
+   private $languagesWithIcuTokenization = [
+   "bo" => true,
+   "dz" => true,
+   "gan" => true,
+   "ja" => true,
+   "km" => true,
+   "lo" => true,
+   "my" => true,
+   "th" => true,
+   "wuu" => true,
+   "zh" => true,
+   "lzh" => true, // zh-classical
+   "zh-classical" => true, // deprecated code fo lzh
+   "yue" => true, // zh-yue
+   "zh-yue" => true, // deprecated code for yue
+   // This list below are languages that may use use mixed scripts
+   "bug" => true,
+   "cdo" => true,
+   "cr" => true,
+   "hak" => true,
+   "jv" => true,
+   "nan" => true, // zh-min-nan
+   "zh-min-nan" => true, // deprecated code for nan
+   ];
 
/**
 * @var array[]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e3a13b12cb5cf9ebc3d7c98486c346e03acab2a
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
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
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] analytics/discovery-stats[master]: Add another schema version

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

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

Change subject: Add another schema version
..

Add another schema version

Just keeps existing data flowing, new parameter will be taken into
account as part of T152559.

Bug: T152513

Change-Id: Iff4cab884cc2a318e3f521ba3ba45e926a568881
Depends-On: Ieb757994f91d4f2760dc4919c322abca5200fc0a
---
M interactive/events.sql
1 file changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/discovery-stats 
refs/changes/19/325719/1

diff --git a/interactive/events.sql b/interactive/events.sql
index e915b15..5e93a00 100644
--- a/interactive/events.sql
+++ b/interactive/events.sql
@@ -15,4 +15,24 @@
 'hashopen'
 )
 GROUP BY event_action, event_feature
+
+UNION ALL
+
+SELECT
+DATE(timestamp) AS day,
+event_action AS action,
+event_feature AS feature,
+SUM(event_sampling) AS events
+FROM Kartographer_16132745
+WHERE
+('{wiki}' = 'all' OR wiki = '{wiki}')
+AND timestamp >= '{from_timestamp}'
+AND timestamp < '{to_timestamp}'
+AND event_action IN (
+'view',
+'open',
+'close',
+'hashopen'
+)
+GROUP BY event_action, event_feature
 ;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff4cab884cc2a318e3f521ba3ba45e926a568881
Gerrit-PatchSet: 1
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Add support for ICU tokenization

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

Change subject: Add support for ICU tokenization
..


Add support for ICU tokenization

The icu tokenizer uses an approach based on dictionnaries to break
words.
For chinese: 灯笼 is properly tokenized as a single token while the
standard tokenizer would emit two separate tokens.

Change-Id: I930e34b24db825b21c1a7eca5bf28cc09a76c152
---
M CirrusSearch.php
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/SuggesterAnalysisConfigBuilder.php
M tests/unit/Maintenance/AnalysisConfigBuilderTest.php
4 files changed, 135 insertions(+), 7 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  Tjones: 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 258c3ca..5e60b7a 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -795,6 +795,21 @@
 $wgCirrusSearchICUFoldingUnicodeSetFilter = null;
 
 /**
+ * Enable the ICU Tokenizer instead of the standard filter
+ * for plain fields.
+ * It may be more suited for languages that do not use spaces
+ * to break words.
+ * Requires the ICU plugin installed
+ * Set to:
+ * - default: let cirrus decides if the ICU tokenizer can be enabled according 
to wiki language
+ * - yes: force the use of ICU tokenizer
+ * - no: disable the ICU tokenizer even if cirrus thinks it can be enabled
+ * NOTE: Experimental
+ */
+$wgCirrusSearchUseIcuTokenizer = 'default';
+
+
+/**
  * Set the default scoring function to be used by 
maintenance/updateSuggesterIndex.php
  * @see includes/BuildDocument/SuggestScoring.php for more details about 
scoring functions
  * NOTE: if you change the scoring method you'll have to rebuild the suggester 
index.
diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index f489f05..831d34a 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -48,7 +48,12 @@
/**
 * @var boolean true if icu folding is requested and available
 */
-   private $icuFolding;
+   protected $icuFolding;
+
+   /**
+* @var boolean true if the icu tokenizer is requested and available
+*/
+   protected $icuTokenizer;
 
/**
 * @var array Similarity algo (tf/idf, bm25, etc) configuration
@@ -85,6 +90,7 @@
 
$this->config = $config;
$this->icuFolding = $this->shouldActivateIcuFolding( $plugins );
+   $this->icuTokenizer = $this->shouldActivateIcuTokenization();
}
 
/**
@@ -117,6 +123,27 @@
}
 
/**
+* Determine if the icu tokenizer can be enabled
+* @return bool
+*/
+   private function shouldActivateIcuTokenization() {
+   if ( !$this->icu ) {
+   // requires the icu plugin
+   return false;
+   }
+   $in_config = $this->config->get( 'CirrusSearchUseIcuTokenizer' 
);
+   switch( $in_config ) {
+   case 'yes': return true;
+   case 'no': return false;
+   case 'default':
+   if ( isset( 
$this->languagesWithIcuTokenization[$this->language] ) ) {
+   return 
$this->languagesWithIcuTokenization[$this->language];
+   }
+   default: return false;
+   }
+   }
+
+   /**
 * Build the analysis config.
 *
 * @return array the analysis config
@@ -124,6 +151,9 @@
public function buildConfig() {
$config = $this->customize( $this->defaults() );
Hooks::run( 'CirrusSearchAnalysisConfig', [ &$config ] );
+   if ( $this->icuTokenizer ) {
+   $config = $this->enableICUTokenizer( $config );
+   }
if ( $this->icuFolding ) {
$config = $this->enableICUFolding( $config );
}
@@ -141,6 +171,22 @@
return $this->similarity['similarity'];
}
return null;
+   }
+   /**
+* replace the standard tokenizer with icu_tokenizer
+* @param mixed[] $config
+* @return mixed[] update config
+*/
+   public function enableICUTokenizer( array $config ) {
+   foreach( $config['analyzer'] as $name => &$value ) {
+   if ( isset( $value['type'] ) && $value['type'] != 
'custom' ) {
+   continue;
+   }
+   if ( isset( $value['tokenizer'] ) && 'standard' === 
$value['tokenizer'] ) {
+   $value['tokenizer'] = 'icu_tokenizer';
+  

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Enable ICU folding for en, fr and greek by default

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

Change subject: Enable ICU folding for en, fr and greek by default
..


Enable ICU folding for en, fr and greek by default

Bug: T146402
Change-Id: I2670d4130db351fc6b8f7c84172a8c9c6d07a181
---
M includes/Maintenance/AnalysisConfigBuilder.php
M tests/unit/Maintenance/AnalysisConfigBuilderTest.php
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  Tjones: Looks good to me, approved
  EBernhardson: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 831d34a..00aec8f 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -909,7 +909,14 @@
 * @var bool[] indexed by language code, languages where ICU folding
 * can be enabled by default
 */
-   private $languagesWithIcuFolding = [];
+   private $languagesWithIcuFolding = [
+   'el' => true,
+   'en' => true,
+   'en-ca' => true,
+   'en-gb' => true,
+   'simple' => true,
+   'fr' => true,
+   ];
 
/**
 * @var bool[] indexed by language code, languages where ICU 
tokenization
diff --git a/tests/unit/Maintenance/AnalysisConfigBuilderTest.php 
b/tests/unit/Maintenance/AnalysisConfigBuilderTest.php
index f464a45..b982dbd 100644
--- a/tests/unit/Maintenance/AnalysisConfigBuilderTest.php
+++ b/tests/unit/Maintenance/AnalysisConfigBuilderTest.php
@@ -30,6 +30,13 @@
public function testICUFolding( array $input, array $expected ) {
$config = new HashSearchConfig( ['CirrusSearchUseIcuFolding' => 
'yes' ] );
$plugins = ['extra', 'analysis-icu'];
+   $builder = new AnalysisConfigBuilder( 'unknown_language', 
$plugins, $config );
+   $result = $builder->enableICUFolding( $input );
+   $this->assertEquals( $expected['analyzer'], $result['analyzer'] 
);
+
+   // Test default
+   $config = new HashSearchConfig( ['CirrusSearchUseIcuFolding' => 
'default' ] );
+   $plugins = ['extra', 'analysis-icu'];
$builder = new AnalysisConfigBuilder( 'en', $plugins, $config );
$result = $builder->enableICUFolding( $input );
$this->assertEquals( $expected['analyzer'], $result['analyzer'] 
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2670d4130db351fc6b8f7c84172a8c9c6d07a181
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
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
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...dash[master]: CSS fixes for new c3 version

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

Change subject: CSS fixes for new c3 version
..


CSS fixes for new c3 version

IONO exactly what changed, but this makes the Big English chart
fit inside the white background again.

Change-Id: Ie81a2e3e7595cbd73579b34b5edbd179b3e3a530
---
M src/css/style.css
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/src/css/style.css b/src/css/style.css
index 81d6bcd..0b2645b 100644
--- a/src/css/style.css
+++ b/src/css/style.css
@@ -284,9 +284,17 @@
margin-top: 10px;
 }
 
+.bigEnglish-updates {
+   overflow: hidden; /* gives it the height of floating kids */
+}
+
 .bigEnglish-updates .row {
margin: 0 0 10px 0;
border-bottom: 1px #ccc solid;
+}
+
+#totalsEarnedChart svg {
+   margin-left: -15px;
 }
 
 .transparent {
@@ -655,4 +663,4 @@
 
 #newBoard {
text-align: right;
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie81a2e3e7595cbd73579b34b5edbd179b3e3a530
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Cdentinger 
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] mediawiki...JsonConfig[master]: Per legal, add "license prompt"

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

Change subject: Per legal, add "license prompt"
..


Per legal, add "license prompt"

Add extra license prefix text in front of the
license name:

   Data available under Creative Commons Zero

where the license name is a URL link

Bug: T152553
Change-Id: If5c149aeac55c820772e89512e9f3ee37d8292be
---
M i18n/en.json
M i18n/qqq.json
M includes/JCDataContent.php
3 files changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 7f73a52..e4e452f 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -39,8 +39,9 @@
"jsonconfig-type-name-number": "number",
"jsonconfig-type-abbr-boolean": "(B)",
"jsonconfig-type-name-boolean": "boolean",
+   "jsonconfig-license": "Data available under $1",
"jsonconfig-license-or-later": "$1, or (at your option) any later 
version",
-   "jsonconfig-license-CC0-1.0": "Creative Commons Zero v1.0 Universal",
+   "jsonconfig-license-CC0-1.0": "Creative Commons Zero",
"jsonconfig-license-url-CC0-1.0": 
"https://creativecommons.org/publicdomain/zero/1.0/;,
"right-jsonconfig-flush": "Manipulate JsonConfig via API",
"apihelp-jsonconfig-description": "Allows direct access to JsonConfig 
subsystem.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a40a222..c6aea8e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -47,7 +47,8 @@
"jsonconfig-type-name-number": "Description of the type of data 
contained in this column. Shown for columns that contain 
numbers\n{{Identical|Number}}",
"jsonconfig-type-abbr-boolean": "A very short indicator of the type of 
data contained in this column. Shown for columns that contain booleans (true or 
false)",
"jsonconfig-type-name-boolean": "Description of the type of data 
contained in this column. Shown for columns that contain booleans (true or 
false)\n{{Identical|Boolean}}",
-   "jsonconfig-license-or-later": "In case the data can be used with any 
future versions of a license, this string will be used instead of 
'jsonconfig-license-*' message.\n\nParameters:\n* $1 - license name, as defined 
in the 'jsonconfig-license-*' messages",
+   "jsonconfig-license": "Shows license text prefix before giving the 
specific license.\n\nParameters:\n* $1 - * 
{{msg-mw|jsonconfig-license-or-later}} or {{msg-mw|jsonconfig-license-CC0-1.0}} 
or other similar license messages",
+   "jsonconfig-license-or-later": "In case the data can be used with any 
future versions of a license, this string will be used instead of 
'jsonconfig-license-*' message.\n\nParameters:\n* $1 - license name, as defined 
in the {{msg-mw|jsonconfig-license-CC0-1.0}} and similar messages",
"jsonconfig-license-CC0-1.0": "Name of the license",
"jsonconfig-license-url-CC0-1.0": "URL to the license description, 
localized if available",
"right-jsonconfig-flush": "{{doc-right|jsonconfig-flush}}",
diff --git a/includes/JCDataContent.php b/includes/JCDataContent.php
index 0188d4f..b71fb02 100644
--- a/includes/JCDataContent.php
+++ b/includes/JCDataContent.php
@@ -72,10 +72,11 @@
$license = $this->getLicenseObject();
if ( $license ) {
$text = $license['text']->inLanguage( $lang )->plain();
-   if ( $license['laterVersion'] ) {
-   $text = wfMessage( 
'jsonconfig-license-or-later', $text )
-   ->inLanguage( $lang )->plain();
-   }
+   // Legal suggested we don't add this just yet
+// if ( $license['laterVersion'] ) {
+// $text = wfMessage( 
'jsonconfig-license-or-later', $text )
+// ->inLanguage( $lang )->plain();
+// }
$result->license = (object)[
'code' => $license['code'],
'text' => $text,
@@ -112,9 +113,12 @@
'href' => $license['url']->plain()
], $license['text']->plain() );
 
-   if ( $license['laterVersion'] ) {
-   $text = wfMessage( 
'jsonconfig-license-or-later', $text )->plain();
-   }
+   // Legal suggested we don't add this just yet
+// if ( $license['laterVersion'] ) {
+// $text = wfMessage( 
'jsonconfig-license-or-later', $text )->plain();
+// }
+
+   $text = wfMessage( 'jsonconfig-license' )->rawParams( 
$text )->parse();
 
$html = Html::rawElement( 'p', [ 'class' => 
'mw-jsonconfig-license' ], $text );
} else {

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Remove Special:Newsletter/id/delete forms completely from Ne...

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

Change subject: Remove Special:Newsletter/id/delete forms completely from 
Newsletter interface
..


Remove Special:Newsletter/id/delete forms completely from Newsletter interface

Bug: T152359
Bug: T152360
Bug: T152361
Change-Id: I8892b926c797a898d3a4d1190a730fdf5608454c
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/content/NewsletterContent.php
M includes/specials/SpecialNewsletter.php
D modules/ext.newsletter.delete.js
6 files changed, 7 insertions(+), 164 deletions(-)

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



diff --git a/extension.json b/extension.json
index f8bc24c..84ad10a 100644
--- a/extension.json
+++ b/extension.json
@@ -114,19 +114,6 @@
"newsletter-unsubscribe-success"
]
},
-   "ext.newsletter.delete": {
-   "scripts": "ext.newsletter.delete.js",
-   "position": "bottom",
-   "dependencies": [
-   "oojs-ui"
-   ],
-   "messages": [
-   "newsletter-delete-confirmation",
-   "newsletter-delete-confirm-details",
-   "newsletter-delete-confirm-cancel",
-   "newsletter-delete-confirm-delete"
-   ]
-   },
"ext.newsletter.newsletters.styles": {
"position": "top",
"styles": "ext.newsletter.newsletters.styles.css"
diff --git a/i18n/en.json b/i18n/en.json
index 026ae1e..fe8a51c 100755
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -28,7 +28,6 @@
"newsletter-subtitlelinks-subscribe": "subscribe",
"newsletter-subtitlelinks-announce": "announce",
"newsletter-subtitlelinks-manage": "manage",
-   "newsletter-subtitlelinks-delete": "delete",
"newsletters": "Newsletters",
"newsletter-subscribe-loginrequired": "Please log in to subscribe to 
[[Special:Newsletters|newsletters]].",
"newsletter-notfound": "Newsletter not found",
@@ -41,7 +40,6 @@
"newsletter-view-subscriber-count": "Subscriber count:",
"newsletter-view-no-publishers": "No publishers.",
"newsletter-view-issues-log": "Newsletter issue 
{{PLURAL:$1|announcement|announcements}}:",
-   "newsletter-delete-button": "Delete",
"newsletter-manage-button": "Manage",
"newsletter-unsubscribe-button": "Unsubscribe",
"newsletter-subscribe-button": "Subscribe",
@@ -69,10 +67,6 @@
"newsletter-manage-newsletter-nochanges": "No changes were made to the 
existing newsletter.",
"newsletter-manage-summary": "Summary of the change:",
"newsletter-delete": "Delete newsletter",
-   "newsletter-delete-text": "This interface can be used to delete the 
\"$1\" newsletter. Please confirm that you intend to do this. This 
action cannot be undone.",
-   "newsletter-delete-reason": "Reason",
-   "newsletter-deletenewsletter-button": "Delete this newsletter",
-   "newsletter-delete-success": "Newsletter \"$1\" has been deleted.",
"newsletter-delete-failure": "\"$1\" newsletter could not be deleted. 
Please try again.",
"newsletter-subscribe": "Newsletter subscription management",
"newsletter-subscribe-text": "This interface allows you to subscribe to 
\"$1\" newsletter. If you subscribe, you will receive notifications when new 
issues of this newsletter are announced.",
@@ -109,10 +103,6 @@
"newsletter-header-name": "Name",
"newsletter-header-description": "Description",
"newsletter-header-subscriber_count": "Subscribers",
-   "newsletter-delete-confirmation": "Are you sure you want to delete this 
newsletter?",
-   "newsletter-delete-confirm-details": "Note that this action is not 
reversible and data cannot be restored once it has been deleted.",
-   "newsletter-delete-confirm-cancel": "Cancel",
-   "newsletter-delete-confirm-delete": "Delete",
"right-newsletter-create": "Create newsletters",
"action-newsletter-create": "create newsletters",
"right-newsletter-delete": "Delete newsletters",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 0f1136c..eacaee0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -31,11 +31,10 @@
"newsletter-create-short-description-error": "Error message shown on 
[[Special:CreateNewsletter]] if the text entered in the description field is 
too short.",
"newsletter-subtitlelinks-list": "Label for link to 
[[Special:Newsletters]] shown under the header on Newsletter special 
pages.\n\nSee also:\n* {{msg-mw|newsletter-subtitlelinks-create}}",
"newsletter-subtitlelinks-create": "Label for link to 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update SmashPig library

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

Change subject: Update SmashPig library
..


Update SmashPig library

Get the simplified logging

Change-Id: I67b7be9d51c51e14030ff473a0865b917cce1f75
---
M composer.lock
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index d7b8ffc..cfdb04f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1140,7 +1140,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "da8e788fa090599d5df2c54abbf6d8a70460f740"
+"reference": "bbba45f67287ea94afd4eec5a982685ff33e23be"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -1191,7 +1191,7 @@
 "donations",
 "payments"
 ],
-"time": "2016-11-15 19:22:43"
+"time": "2016-12-06 19:40:49"
 },
 {
 "name": "zordius/lightncandy",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67b7be9d51c51e14030ff473a0865b917cce1f75
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
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] mediawiki/core[master]: Update OOjs UI to v0.18.2

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

Change subject: Update OOjs UI to v0.18.2
..


Update OOjs UI to v0.18.2

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.2

Change-Id: Id08147e9015fc68a882733268a2bf860dd1ccb27
---
M composer.json
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-core-apex.css
M resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-core.js
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
M resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-toolbars.js
M resources/lib/oojs-ui/oojs-ui-widgets-apex.css
M resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-widgets.js
M resources/lib/oojs-ui/oojs-ui-windows-apex.css
M resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-windows.js
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-invert.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-invert.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-progressive.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-progressive.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-invert.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-invert.svg
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-progressive.png
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-progressive.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-invert.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-invert.svg
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-progressive.png
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-progressive.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl.svg
33 files changed, 140 insertions(+), 148 deletions(-)

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



diff --git a/composer.json b/composer.json
index 19ca238..f57b9ce 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
-   "oojs/oojs-ui": "0.18.1",
+   "oojs/oojs-ui": "0.18.2",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js 
b/resources/lib/oojs-ui/oojs-ui-apex.js
index a96ae13..1acedf2 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.js
+++ b/resources/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.1
+ * OOjs UI v0.18.2
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-29T22:57:37Z
+ * Date: 2016-12-06T23:32:53Z
  */
 ( function ( OO ) {
 
diff --git a/resources/lib/oojs-ui/oojs-ui-core-apex.css 
b/resources/lib/oojs-ui/oojs-ui-core-apex.css
index e5e6252..72df673 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-apex.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.1
+ * OOjs UI v0.18.2
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-29T22:57:42Z
+ * Date: 2016-12-06T23:32:57Z
  */
 .oo-ui-element-hidden {
   display: none !important;
@@ -832,41 +832,20 @@
   display: none;
 }
 .oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-indicatorElement > 
.oo-ui-indicatorElement-indicator {
+.oo-ui-textInputWidget.oo-ui-indicatorElement > 
.oo-ui-indicatorElement-indicator,
+.oo-ui-textInputWidget > .oo-ui-labelElement-label {
   display: block;
   position: absolute;
   top: 0;
+}
+.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
+.oo-ui-textInputWidget.oo-ui-indicatorElement > 
.oo-ui-indicatorElement-indicator {
   height: 100%;
   -webkit-touch-callout: none;
   -webkit-user-select: none;
  -moz-user-select: none;
   -ms-user-select: none;
   user-select: none;
-}
-.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-widget-enabled > 

[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.18.2

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

Change subject: Update OOjs UI to v0.18.2
..


Update OOjs UI to v0.18.2

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.2

Change-Id: Id08147e9015fc68a882733268a2bf860dd1ccb27
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/package.json
5 files changed, 26 insertions(+), 15 deletions(-)

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



diff --git a/composer.json b/composer.json
index 094dd4f..6b4d69a 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
"mediawiki/at-ease": "1.1.0",
"monolog/monolog": "1.18.2",
"nmred/kafka-php": "0.1.5",
-   "oojs/oojs-ui": "0.18.1",
+   "oojs/oojs-ui": "0.18.2",
"oyejorge/less.php": "1.7.0.10",
"pear/console_getopt": "1.4.1",
"pear/mail": "1.3.0",
diff --git a/composer.lock b/composer.lock
index 193b6fe..b878558 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "11c4efda1918bd4f691dba69af2fff34",
-"content-hash": "2831edfb7a355781ca75751e650087d1",
+"hash": "397be71e6ee5f14bae4e3ffcd8912b6a",
+"content-hash": "847ea388961ccf4a15f5d546d302bc97",
 "packages": [
 {
 "name": "composer/semver",
@@ -466,16 +466,16 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.18.1",
+"version": "v0.18.2",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624"
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9;,
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9",
 "shasum": ""
 },
 "require": {
@@ -541,7 +541,7 @@
 ],
 "description": "Provides library of common widgets, layouts, and 
windows.",
 "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;,
-"time": "2016-11-29 22:02:31"
+"time": "2016-12-06 23:05:36"
 },
 {
 "name": "oyejorge/less.php",
diff --git a/composer/installed.json b/composer/installed.json
index 33a342f..205f360 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -2007,17 +2007,17 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.18.1",
-"version_normalized": "0.18.1.0",
+"version": "v0.18.2",
+"version_normalized": "0.18.2.0",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624"
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9;,
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9",
 "shasum": ""
 },
 "require": {
@@ -2029,7 +2029,7 @@
 "mediawiki/mediawiki-codesniffer": "0.6.0",
 "phpunit/phpunit": "4.8.21"
 },
-"time": "2016-11-29 22:02:31",
+"time": "2016-12-06 23:05:36",
 "type": "library",
 "installation-source": "dist",
 "autoload": {
diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md
index bed1b26..bd9dbe5 100644
--- a/oojs/oojs-ui/History.md
+++ b/oojs/oojs-ui/History.md
@@ -1,4 +1,15 @@
 # OOjs UI Release History
+## v0.18.2 / 2016-12-06
+### Styles
+* MediaWiki theme: Address sub-pixel rendering issues of RadioInputWidgets 
(Volker E)
+* MediaWiki theme: Improve `:active:focus` states on ButtonElements (Volker E)
+* MediaWiki theme: Reduce MapPin icons' hole for better recognisability 
(Volker E)
+
+### Code
+* FieldsetLayout: Temporarily remove use of `` due to Chrome 55 bug 
(Bartosz Dziewoński)
+* 

[MediaWiki-commits] [Gerrit] mediawiki...OpenStackManager[master]: Add $wgOpenStackHiddenUsernames global array

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

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

Change subject: Add $wgOpenStackHiddenUsernames global array
..

Add $wgOpenStackHiddenUsernames global array

This is because I'm going to add a utility users,
'novaobserver' to every project.  I don't want
users to have the ability to remove this user, and
the easiest way to do that is just not display it in
the project gui.

Bug: T150092
Change-Id: Ic1cdbbf06fa8b026a9a0a9131f8114377415b96c
---
M OpenStackManager.php
M nova/OpenStackNovaController.php
2 files changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/OpenStackManager.php b/OpenStackManager.php
index bd53514..e0ac6e1 100644
--- a/OpenStackManager.php
+++ b/OpenStackManager.php
@@ -89,6 +89,10 @@
 // %u is username, %p is $wgOpenStackManagerServiceGroupPrefix.
 $wgOpenStackManagerServiceGroupHomedirPattern = '/home/%p%u/';
 
+// Username for special observer user -- hidden
+//  from the OSM front end.
+$wgOpenStackHiddenUsernames = array('novaobserver');
+
 // Key/value pairs like array( 'region1' => '10.4.0.11', 'region2' => 
'10.68.1.35' )
 $wgOpenStackManagerProxyGateways = array();
 
diff --git a/nova/OpenStackNovaController.php b/nova/OpenStackNovaController.php
index 38a0c77..a02faba 100644
--- a/nova/OpenStackNovaController.php
+++ b/nova/OpenStackNovaController.php
@@ -345,6 +345,8 @@
 * @return array of user IDs => user names
 */
function getUsersInProject( $projectid ) {
+global $wgOpenStackHiddenUsernames;
+
$admintoken = $this->_getAdminToken();
$headers = array( "X-Auth-Token: $admintoken" );
 
@@ -357,7 +359,9 @@
foreach ( $users as $user ) {
$name = self::_get_property( $user, 'name' );
$id = self::_get_property( $user, 'id' );
-   $userarr[$id] = $name;
+   if ( ! in_array( $id, $wgOpenStackHiddenUsernames ) ) {
+   $userarr[$id] = $name;
+   }
}
return $userarr;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1cdbbf06fa8b026a9a0a9131f8114377415b96c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: master
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: DesktopArticleTarget: clear out originalCategories when they...

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

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

Change subject: DesktopArticleTarget: clear out originalCategories when they're 
updated
..

DesktopArticleTarget: clear out originalCategories when they're updated

Bug: T152571
Change-Id: I41b5d5aeea0a01cf922924fa1320369d54fef8cf
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 783ba95..da6622b 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -597,7 +597,6 @@
 
// Move original content back out of the target
target.$element.parent().append( 
target.$originalContent.children() );
-   $( '#catlinks' ).replaceWith( target.$originalCategories );
$( '.ve-init-mw-desktopArticleTarget-uneditableContent' )
.off( '.ve-target' )
.removeClass( 
've-init-mw-desktopArticleTarget-uneditableContent' );
@@ -1291,7 +1290,6 @@
this.$originalRedirectMsg = undefined;
this.$originalRedirectSub = undefined;
}
-
if ( this.$originalCategories ) {
$( '#catlinks' ).replaceWith( this.$originalCategories );
}
@@ -1419,9 +1417,12 @@
if ( displayTitle ) {
$( '#content #firstHeading' ).html( displayTitle );
}
+
$categories = $( $.parseHTML( categoriesHtml ) );
mw.hook( 'wikipage.categories' ).fire( $categories );
$( '#catlinks' ).replaceWith( $categories );
+   this.$originalCategories = undefined;
+
$( '#contentSub' ).html( contentSub );
 
if ( isRedirect ) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: installserver: split squid proxy to own class

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

Change subject: installserver: split squid proxy to own class
..


installserver: split squid proxy to own class

Split squid proxy part out of the old installserver role
and into a separate role.

Bug: T132757
Change-Id: Ib462d470277f6c1676ecd273b63d0e83be75a6ed
---
M manifests/site.pp
M modules/role/manifests/installserver.pp
A modules/role/manifests/installserver/proxy.pp
3 files changed, 34 insertions(+), 29 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 14ddba2..ee26ed8 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -227,6 +227,7 @@
 installserver::tftp_server,
 installserver::dhcp,
 installserver::http,
+installserver::proxy,
 aptrepo::wikimedia)
 
 $cluster = 'misc'
diff --git a/modules/role/manifests/installserver.pp 
b/modules/role/manifests/installserver.pp
index 3c93294..1b41bed 100644
--- a/modules/role/manifests/installserver.pp
+++ b/modules/role/manifests/installserver.pp
@@ -30,38 +30,9 @@
 include role::backup::host
 include install_server::preseed_server
 
-if os_version('ubuntu >= trusty') or os_version('debian >= jessie') {
-$config_content = template('role/caching-proxy/squid.conf.erb')
-} else {
-$config_content = template('role/squid3/precise_acls_conf.erb', 
'role/caching-proxy/squid.conf.erb')
-}
-
-class { 'squid3':
-config_content => $config_content,
-}
-
-cron { 'squid-logrotate':
-ensure  => 'present',
-command => '/usr/sbin/squid3 -k rotate',
-user=> 'root',
-hour=> '17',
-minute  => '15',
-}
-
-ferm::service { 'proxy':
-proto  => 'tcp',
-port   => '8080',
-srange => '$PRODUCTION_NETWORKS',
-}
-
 # Backup
 $sets = [ 'srv-autoinstall',
 ]
 backup::set { $sets : }
 
-# Monitoring
-monitoring::service { 'squid':
-description   => 'Squid',
-check_command => 'check_tcp!8080',
-}
 }
diff --git a/modules/role/manifests/installserver/proxy.pp 
b/modules/role/manifests/installserver/proxy.pp
new file mode 100644
index 000..da9a3b1
--- /dev/null
+++ b/modules/role/manifests/installserver/proxy.pp
@@ -0,0 +1,33 @@
+# Installs a proxy server for the install server
+class role::installserver::proxy {
+
+if os_version('ubuntu >= trusty') or os_version('debian >= jessie') {
+$config_content = template('role/caching-proxy/squid.conf.erb')
+} else {
+$config_content = template('role/squid3/precise_acls_conf.erb', 
'role/caching-proxy/squid.conf.erb')
+}
+
+class { 'squid3':
+config_content => $config_content,
+}
+
+cron { 'squid-logrotate':
+ensure  => 'present',
+command => '/usr/sbin/squid3 -k rotate',
+user=> 'root',
+hour=> '17',
+minute  => '15',
+}
+
+ferm::service { 'proxy':
+proto  => 'tcp',
+port   => '8080',
+srange => '$PRODUCTION_NETWORKS',
+}
+
+# Monitoring
+monitoring::service { 'squid':
+description   => 'Squid',
+check_command => 'check_tcp!8080',
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib462d470277f6c1676ecd273b63d0e83be75a6ed
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
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] operations/software[master]: Fix flake8 errors

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

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

Change subject: Fix flake8 errors
..

Fix flake8 errors

Bug: T152549
Change-Id: I4c8c2eb1eb3f19ff6f89ae913b3d0efe909f2d1c
---
M clouseau/clouseau/retention/utils/magic.py
M clouseau/scripts/retention/rulestore.py
M clouseau/setup.py
M salt-misc/parse_minion_output.py
M salt-misc/salt_fixups.py
M txt2yaml/txt2yaml.py
6 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/15/325715/1

diff --git a/clouseau/clouseau/retention/utils/magic.py 
b/clouseau/clouseau/retention/utils/magic.py
index c0b8393..3adbc1b 100644
--- a/clouseau/clouseau/retention/utils/magic.py
+++ b/clouseau/clouseau/retention/utils/magic.py
@@ -15,6 +15,7 @@
 """
 return ctypes.cdll.LoadLibrary(find_library('magic'))
 
+
 _libraries = {}
 _libraries['magic'] = _init()
 
@@ -49,6 +50,8 @@
 
 class magic_set(Structure):
 pass
+
+
 magic_set._fields_ = []
 magic_t = POINTER(magic_set)
 
diff --git a/clouseau/scripts/retention/rulestore.py 
b/clouseau/scripts/retention/rulestore.py
index eca902b..ad644b5 100644
--- a/clouseau/scripts/retention/rulestore.py
+++ b/clouseau/scripts/retention/rulestore.py
@@ -164,5 +164,6 @@
 hosts = client.cmd_expandminions(hosts, "test.ping", expr_form=htype)
 do_action(cdb, action, hosts, status, path, dryrun)
 
+
 if __name__ == '__main__':
 main()
diff --git a/clouseau/setup.py b/clouseau/setup.py
index 1bfbcd3..a5b7dc8 100644
--- a/clouseau/setup.py
+++ b/clouseau/setup.py
@@ -17,6 +17,7 @@
 else:
 return glob.glob(path + '*.' + extension)
 
+
 setup(
 name="clouseau",
 version="0.0.1",
diff --git a/salt-misc/parse_minion_output.py b/salt-misc/parse_minion_output.py
index 497bcaf..64b0320 100644
--- a/salt-misc/parse_minion_output.py
+++ b/salt-misc/parse_minion_output.py
@@ -307,5 +307,6 @@
 show_salt_too_many_processes(summaries)
 show_salt_no_keysize(summaries)
 
+
 if __name__ == "__main__":
 main()
diff --git a/salt-misc/salt_fixups.py b/salt-misc/salt_fixups.py
index 252853d..39fe9a8 100644
--- a/salt-misc/salt_fixups.py
+++ b/salt-misc/salt_fixups.py
@@ -569,5 +569,6 @@
 elif dryrun:
 print "wrong master encountered, stopping"
 
+
 if __name__ == "__main__":
 main()
diff --git a/txt2yaml/txt2yaml.py b/txt2yaml/txt2yaml.py
index dcf70c6..040fb8e 100755
--- a/txt2yaml/txt2yaml.py
+++ b/txt2yaml/txt2yaml.py
@@ -22,5 +22,6 @@
 # Write amended YAML to stdout.
 yaml.dump(y, sys.stdout)
 
+
 if __name__ == '__main__':
 main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c8c2eb1eb3f19ff6f89ae913b3d0efe909f2d1c
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update SmashPig library

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

Change subject: Update SmashPig library
..


Update SmashPig library

Change-Id: Ifa66a5822a66939cb0885bfbd9c4b501c1a12e6d
---
M composer/installed.json
M wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
M wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
M wikimedia/smash-pig/Core/QueueConsumers/BaseQueueConsumer.php
M wikimedia/smash-pig/Maintenance/ConsumePendingQueue.php
A wikimedia/smash-pig/Maintenance/DeleteExpiredPendingMessages.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Tests/config_test.yaml
M 
wikimedia/smash-pig/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
M wikimedia/smash-pig/PaymentProviders/Amazon/Actions/AssociateRefundParent.php
M wikimedia/smash-pig/PaymentProviders/Amazon/Actions/CloseOrderReference.php
A 
wikimedia/smash-pig/PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php
M wikimedia/smash-pig/PaymentProviders/Amazon/AmazonApi.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/ExpatriatedMessages/PaymentCapture.php
A wikimedia/smash-pig/PaymentProviders/Amazon/Tests/AmazonTestCase.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/Tests/Data/responses/getOrderReferenceDetails.json
A wikimedia/smash-pig/PaymentProviders/Amazon/Tests/phpunit/ActionsTest.php
M wikimedia/smash-pig/PaymentProviders/Amazon/Tests/phpunit/ApiTest.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Job.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Listener.php
M wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/MockPayPalPaymentsAPI.php
M 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
M wikimedia/smash-pig/SmashPig.yaml
25 files changed, 466 insertions(+), 116 deletions(-)

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



diff --git a/composer/installed.json b/composer/installed.json
index fedd4ca..9597ac1 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1224,7 +1224,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "da8e788fa090599d5df2c54abbf6d8a70460f740"
+"reference": "bbba45f67287ea94afd4eec5a982685ff33e23be"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -1241,7 +1241,7 @@
 "jakub-onderka/php-parallel-lint": "^0.9",
 "phpunit/phpunit": "^4.8"
 },
-"time": "2016-11-15 19:22:43",
+"time": "2016-12-06 19:11:55",
 "type": "library",
 "installation-source": "source",
 "autoload": {
diff --git a/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php 
b/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
index d40238c..857377e 100644
--- a/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
+++ b/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
@@ -75,6 +75,25 @@
$this->prepareAndExecute( $sql, $message );
}
 
+   public function updatePaymentStatus(
+   $gateway, $contributionTrackingId, $orderId, $status
+   ) {
+   $sql = 'UPDATE payments_initial
+   SET payments_final_status = :status
+   WHERE gateway = :gateway
+   AND contribution_tracking_id = :ct_id
+   AND order_id = :order_id';
+
+   $params = array(
+   'gateway' => $gateway,
+   'ct_id' => $contributionTrackingId,
+   'order_id' => $orderId,
+   'status' => $status
+   );
+
+   $this->prepareAndExecute( $sql, $params );
+   }
+
protected function getConfigKey() {
return 'data-store/fredge-db';
}
diff --git a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php 
b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
index 4d9bcfc..c54e4b3 100644
--- a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
+++ b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
@@ -159,6 +159,26 @@
}
 
/**
+* Delete expired messages, optionally by gateway
+*
+* @param int $originalDate Oldest date to keep
+* @param string|null $gateway
+* @return int Number of rows deleted
+*/
+   public function deleteOldMessages( $originalDate, $gateway = null ) {
+   $sql = 'DELETE FROM pending WHERE date < :date';
+   $params = array(
+   'date' => UtcDate::getUtcDatabaseString( $originalDate 
),

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Cleanup static analysis errors

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

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

Change subject: Cleanup static analysis errors
..

Cleanup static analysis errors

While prepping the code base for using etsy/phan i found a few problems.
A couple are real problems, while others are just places etsy couldn't
figure out the types.

* AuthPlugin referenced UserLoginTemplate which doesn't exist. Tracing
  back usages this accepts classes that extend from BaseTemplate.
* DatabaseSqlite had an invalid @var annotation.
* LoadBalancer had some missing or under-defined annotations. Make them
  more specific where possible.
* SqlBagOStuff didn't have the appropriate use statement for
  WaitConditionLoop and probably doesn't work. Also updated annotations
  that point to non-existent DatabaseBase to use IDatabase.

Change-Id: Iff2270b418ad2f8f97cfdb6df646c435d3283536
---
M includes/AuthPlugin.php
M includes/libs/rdbms/database/DatabaseSqlite.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
M includes/objectcache/SqlBagOStuff.php
M maintenance/backup.inc
5 files changed, 19 insertions(+), 6 deletions(-)


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

diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php
index 0b65593..b85e1d6 100644
--- a/includes/AuthPlugin.php
+++ b/includes/AuthPlugin.php
@@ -73,7 +73,7 @@
/**
 * Modify options in the login template.
 *
-* @param UserLoginTemplate $template
+* @param BaseTemplate $template
 * @param string $type 'signup' or 'login'. Added in 1.16.
 */
public function modifyUITemplate( &$template, &$type ) {
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php 
b/includes/libs/rdbms/database/DatabaseSqlite.php
index 7317d54..a06aad2 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -41,7 +41,7 @@
/** @var resource */
protected $mLastResult;
 
-   /** @var $mConn PDO */
+   /** @var PDO */
protected $mConn;
 
/** @var FSLockManager (hopefully on the same server as the DB) */
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index d42fed9..634993a 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -31,7 +31,7 @@
 class LoadBalancer implements ILoadBalancer {
/** @var array[] Map of (server index => server config array) */
private $mServers;
-   /** @var array[] Map of (local/foreignUsed/foreignFree => server index 
=> IDatabase array) */
+   /** @var IDatabase[][] Map of (local/foreignUsed/foreignFree => server 
index => IDatabase array) */
private $mConns;
/** @var float[] Map of (server index => weight) */
private $mLoads;
@@ -390,6 +390,9 @@
return $i;
}
 
+   /**
+* @param DBMasterPos|false $pos
+*/
public function waitFor( $pos ) {
$this->mWaitForPos = $pos;
$i = $this->mReadIndex;
@@ -436,6 +439,10 @@
return $ok;
}
 
+   /**
+* @param int $i
+* @return IDatabase
+*/
public function getAnyOpenConnection( $i ) {
foreach ( $this->mConns as $connsByServer ) {
if ( !empty( $connsByServer[$i] ) ) {
@@ -1447,6 +1454,11 @@
}
}
 
+   /**
+* @param IDatabase $conn
+* @param DBMasterPos|false $pos
+* @param int $timeout
+*/
public function safeWaitForMasterPos( IDatabase $conn, $pos = false, 
$timeout = 10 ) {
if ( $this->getServerCount() <= 1 || !$conn->getLBInfo( 
'replica' ) ) {
return true; // server is not a replica DB
diff --git a/includes/objectcache/SqlBagOStuff.php 
b/includes/objectcache/SqlBagOStuff.php
index 47dae78..de49fc3 100644
--- a/includes/objectcache/SqlBagOStuff.php
+++ b/includes/objectcache/SqlBagOStuff.php
@@ -22,6 +22,7 @@
  */
 
 use \MediaWiki\MediaWikiServices;
+use \Wikimedia\WaitConditionLoop;
 
 /**
  * Class to store objects in the database
diff --git a/maintenance/backup.inc b/maintenance/backup.inc
index 38daf64..18c7f11 100644
--- a/maintenance/backup.inc
+++ b/maintenance/backup.inc
@@ -60,7 +60,7 @@
/**
 * The dependency-injected database to use.
 *
-* @var DatabaseBase|null
+* @var IDatabase|null
 *
 * @see self::setDB
 */
@@ -314,7 +314,7 @@
 * @todo Fixme: the --server parameter is currently not respected, as it
 * doesn't seem terribly easy to ask the load balancer for a particular
 * connection by name.
-* @return DatabaseBase
+* @return IDatabase
 */

[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update SmashPig library

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

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

Change subject: Update SmashPig library
..

Update SmashPig library

Change-Id: Ifa66a5822a66939cb0885bfbd9c4b501c1a12e6d
---
M composer/installed.json
M wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
M wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
M wikimedia/smash-pig/Core/QueueConsumers/BaseQueueConsumer.php
M wikimedia/smash-pig/Maintenance/ConsumePendingQueue.php
A wikimedia/smash-pig/Maintenance/DeleteExpiredPendingMessages.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Tests/config_test.yaml
M 
wikimedia/smash-pig/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
M wikimedia/smash-pig/PaymentProviders/Amazon/Actions/AssociateRefundParent.php
M wikimedia/smash-pig/PaymentProviders/Amazon/Actions/CloseOrderReference.php
A 
wikimedia/smash-pig/PaymentProviders/Amazon/Actions/ReconstructMerchantReference.php
M wikimedia/smash-pig/PaymentProviders/Amazon/AmazonApi.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/ExpatriatedMessages/AmazonMessage.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/ExpatriatedMessages/PaymentCapture.php
A wikimedia/smash-pig/PaymentProviders/Amazon/Tests/AmazonTestCase.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/Tests/Data/responses/getOrderReferenceDetails.json
A wikimedia/smash-pig/PaymentProviders/Amazon/Tests/phpunit/ActionsTest.php
M wikimedia/smash-pig/PaymentProviders/Amazon/Tests/phpunit/ApiTest.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Job.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Listener.php
M wikimedia/smash-pig/PaymentProviders/PayPal/PayPalPaymentsAPI.php
M wikimedia/smash-pig/PaymentProviders/PayPal/Tests/MockPayPalPaymentsAPI.php
M 
wikimedia/smash-pig/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
M wikimedia/smash-pig/SmashPig.yaml
25 files changed, 466 insertions(+), 116 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/vendor 
refs/changes/13/325713/1

diff --git a/composer/installed.json b/composer/installed.json
index fedd4ca..9597ac1 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1224,7 +1224,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "da8e788fa090599d5df2c54abbf6d8a70460f740"
+"reference": "bbba45f67287ea94afd4eec5a982685ff33e23be"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -1241,7 +1241,7 @@
 "jakub-onderka/php-parallel-lint": "^0.9",
 "phpunit/phpunit": "^4.8"
 },
-"time": "2016-11-15 19:22:43",
+"time": "2016-12-06 19:11:55",
 "type": "library",
 "installation-source": "source",
 "autoload": {
diff --git a/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php 
b/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
index d40238c..857377e 100644
--- a/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
+++ b/wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
@@ -75,6 +75,25 @@
$this->prepareAndExecute( $sql, $message );
}
 
+   public function updatePaymentStatus(
+   $gateway, $contributionTrackingId, $orderId, $status
+   ) {
+   $sql = 'UPDATE payments_initial
+   SET payments_final_status = :status
+   WHERE gateway = :gateway
+   AND contribution_tracking_id = :ct_id
+   AND order_id = :order_id';
+
+   $params = array(
+   'gateway' => $gateway,
+   'ct_id' => $contributionTrackingId,
+   'order_id' => $orderId,
+   'status' => $status
+   );
+
+   $this->prepareAndExecute( $sql, $params );
+   }
+
protected function getConfigKey() {
return 'data-store/fredge-db';
}
diff --git a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php 
b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
index 4d9bcfc..c54e4b3 100644
--- a/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
+++ b/wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
@@ -159,6 +159,26 @@
}
 
/**
+* Delete expired messages, optionally by gateway
+*
+* @param int $originalDate Oldest date to keep
+* @param string|null $gateway
+* @return int Number of rows deleted
+*/
+   public function deleteOldMessages( $originalDate, $gateway = null ) {
+   $sql = 'DELETE FROM pending WHERE date < :date';
+   $params = array(
+

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update SmashPig library

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

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

Change subject: Update SmashPig library
..

Update SmashPig library

Get the simplified logging

Change-Id: I67b7be9d51c51e14030ff473a0865b917cce1f75
---
M composer.lock
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/12/325712/1

diff --git a/composer.lock b/composer.lock
index d7b8ffc..cfdb04f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1140,7 +1140,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git;,
-"reference": "da8e788fa090599d5df2c54abbf6d8a70460f740"
+"reference": "bbba45f67287ea94afd4eec5a982685ff33e23be"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -1191,7 +1191,7 @@
 "donations",
 "payments"
 ],
-"time": "2016-11-15 19:22:43"
+"time": "2016-12-06 19:40:49"
 },
 {
 "name": "zordius/lightncandy",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67b7be9d51c51e14030ff473a0865b917cce1f75
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
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] mediawiki/vendor[master]: Update OOjs UI to v0.18.2

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

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

Change subject: Update OOjs UI to v0.18.2
..

Update OOjs UI to v0.18.2

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.2

Change-Id: Id08147e9015fc68a882733268a2bf860dd1ccb27
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/package.json
5 files changed, 26 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/11/325711/1

diff --git a/composer.json b/composer.json
index 094dd4f..6b4d69a 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
"mediawiki/at-ease": "1.1.0",
"monolog/monolog": "1.18.2",
"nmred/kafka-php": "0.1.5",
-   "oojs/oojs-ui": "0.18.1",
+   "oojs/oojs-ui": "0.18.2",
"oyejorge/less.php": "1.7.0.10",
"pear/console_getopt": "1.4.1",
"pear/mail": "1.3.0",
diff --git a/composer.lock b/composer.lock
index 193b6fe..b878558 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"hash": "11c4efda1918bd4f691dba69af2fff34",
-"content-hash": "2831edfb7a355781ca75751e650087d1",
+"hash": "397be71e6ee5f14bae4e3ffcd8912b6a",
+"content-hash": "847ea388961ccf4a15f5d546d302bc97",
 "packages": [
 {
 "name": "composer/semver",
@@ -466,16 +466,16 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.18.1",
+"version": "v0.18.2",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624"
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9;,
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9",
 "shasum": ""
 },
 "require": {
@@ -541,7 +541,7 @@
 ],
 "description": "Provides library of common widgets, layouts, and 
windows.",
 "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;,
-"time": "2016-11-29 22:02:31"
+"time": "2016-12-06 23:05:36"
 },
 {
 "name": "oyejorge/less.php",
diff --git a/composer/installed.json b/composer/installed.json
index 33a342f..205f360 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -2007,17 +2007,17 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.18.1",
-"version_normalized": "0.18.1.0",
+"version": "v0.18.2",
+"version_normalized": "0.18.2.0",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624"
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624;,
-"reference": "4f8a906bac3a2fb7e1df5bcf184c96c7f79c6624",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9;,
+"reference": "f33b9cf3de7b9ef0aa66a27c93643ccdcc05d0a9",
 "shasum": ""
 },
 "require": {
@@ -2029,7 +2029,7 @@
 "mediawiki/mediawiki-codesniffer": "0.6.0",
 "phpunit/phpunit": "4.8.21"
 },
-"time": "2016-11-29 22:02:31",
+"time": "2016-12-06 23:05:36",
 "type": "library",
 "installation-source": "dist",
 "autoload": {
diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md
index bed1b26..bd9dbe5 100644
--- a/oojs/oojs-ui/History.md
+++ b/oojs/oojs-ui/History.md
@@ -1,4 +1,15 @@
 # OOjs UI Release History
+## v0.18.2 / 2016-12-06
+### Styles
+* MediaWiki theme: Address sub-pixel rendering issues of RadioInputWidgets 
(Volker E)
+* MediaWiki theme: Improve `:active:focus` states on ButtonElements (Volker E)
+* MediaWiki theme: Reduce MapPin icons' hole for better recognisability 
(Volker E)
+
+### Code
+* FieldsetLayout: Temporarily remove use of `` due to Chrome 55 

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Validate $type variable to prevent accidental injection

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

Change subject: Validate $type variable to prevent accidental injection
..


Validate $type variable to prevent accidental injection

Change-Id: I97bd6344580831057fe0b4bc44f7ee9fd978dc76
---
M includes/Hooks.php
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index 1a23775..31f5de9 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -561,6 +561,13 @@
return;
}
 
+   if ( !ctype_lower( $type ) ) {
+   throw new Exception(
+   "Invalid value for parameter 'type': '$type'. " 
.
+   'Restricted to one lower case word to prevent 
accidental injection.'
+   );
+   }
+
$dbr = \wfGetDB( DB_REPLICA );
$threshold = self::getThreshold( $type, $user );
$tables["ores_${type}_mdl"] = 'ores_model';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97bd6344580831057fe0b4bc44f7ee9fd978dc76
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
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/core[master]: profiler: Support tideways for PHP7 profiling

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

Change subject: profiler: Support tideways for PHP7 profiling
..


profiler: Support tideways for PHP7 profiling

xhprof does not support PHP7, and it doesn't seem like upstream will be
working on that any time soon.

Tideways is a profiler that is basically a drop-in replacement for
xhprof with functions renamed. So Xhprof::enable() and Xhprof::disable()
will now try to use tideways if that is installed and xhprof is not.

Bug: T152186
Change-Id: I0d7d2de56ac638ca2851c662f527049bd620c0e9
---
M includes/libs/Xhprof.php
M includes/profiler/ProfilerXhprof.php
2 files changed, 23 insertions(+), 3 deletions(-)

Approvals:
  Tim Starling: Looks good to me, approved
  BryanDavis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/libs/Xhprof.php b/includes/libs/Xhprof.php
index 9c1ec8e..016c9b1 100644
--- a/includes/libs/Xhprof.php
+++ b/includes/libs/Xhprof.php
@@ -23,6 +23,10 @@
  * . XHProf can be installed as a PECL
  * package for use with PHP5 (Zend PHP) and is built-in to HHVM 3.3.0.
  *
+ * This also supports using the Tideways profiler
+ * , which additionally
+ * has support for PHP7.
+ *
  * @since 1.28
  */
 class Xhprof {
@@ -43,10 +47,16 @@
 */
public static function enable( $flags = 0, $options = [] ) {
if ( self::isEnabled() ) {
-   throw new Exception( 'Xhprof profiling is already 
enabled.' );
+   throw new Exception( 'Profiling is already enabled.' );
}
self::$enabled = true;
-   xhprof_enable( $flags, $options );
+   if ( function_exists( 'xhprof_enable' ) ) {
+   xhprof_enable( $flags, $options );
+   } elseif ( function_exists( 'tideways_enable' ) ) {
+   tideways_enable( $flags, $options );
+   } else {
+   throw new Exception( "Neither xhprof nor tideways are 
installed" );
+   }
}
 
/**
@@ -57,7 +67,12 @@
public static function disable() {
if ( self::isEnabled() ) {
self::$enabled = false;
-   return xhprof_disable();
+   if ( function_exists( 'xhprof_disable' ) ) {
+   return xhprof_disable();
+   } else {
+   // tideways
+   return tideways_disable();
+   }
}
}
 }
diff --git a/includes/profiler/ProfilerXhprof.php 
b/includes/profiler/ProfilerXhprof.php
index 8fc0b77..1bf4f54 100644
--- a/includes/profiler/ProfilerXhprof.php
+++ b/includes/profiler/ProfilerXhprof.php
@@ -43,12 +43,17 @@
  * ($wgProfiler['exclude']) containing an array of function names.
  * Shell-style patterns are also accepted.
  *
+ * It is also possible to use the Tideways PHP extension, which is mostly
+ * a drop-in replacement for Xhprof. Just change the XHPROF_FLAGS_* constants
+ * to TIDEWAYS_FLAGS_*.
+ *
  * @author Bryan Davis 
  * @copyright © 2014 Bryan Davis and Wikimedia Foundation.
  * @ingroup Profiler
  * @see Xhprof
  * @see https://php.net/xhprof
  * @see https://github.com/facebook/hhvm/blob/master/hphp/doc/profiling.md
+ * @see https://github.com/tideways/php-profiler-extension
  */
 class ProfilerXhprof extends Profiler {
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d7d2de56ac638ca2851c662f527049bd620c0e9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Legoktm 
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...GlobalUserPage[master]: Subclass WikiPage and implement remote content functions

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

Change subject: Subclass WikiPage and implement remote content functions
..


Subclass WikiPage and implement remote content functions

This makes tabs like those on foreign file repos show up, as well as
signalling to other code that the content is remote.

Bug: T94126
Change-Id: Ic792120a06a0bc657577c5e94f3b0c4c3e454156
Depends-On: Ib3d7dcbefe95da351872e63f306799eef83e00a7
---
M GlobalUserPage.body.php
M GlobalUserPage.hooks.php
A GlobalUserPagePage.php
M extension.json
4 files changed, 149 insertions(+), 80 deletions(-)

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



diff --git a/GlobalUserPage.body.php b/GlobalUserPage.body.php
index 32e38bf..1538cdd 100644
--- a/GlobalUserPage.body.php
+++ b/GlobalUserPage.body.php
@@ -30,9 +30,9 @@
 
public function __construct( Title $title, Config $config ) {
global $wgMemc;
-   parent::__construct( $title );
$this->config = $config;
$this->cache = $wgMemc;
+   parent::__construct( $title );
}
 
public function showMissingArticle() {
@@ -61,7 +61,7 @@
if ( $footerKey ) {
$out->addHTML( '' .
"\n" . $out->msg( $footerKey )
-   ->params( $this->getUsername(), 
$this->getRemoteURL() )->parse() .
+   ->params( $this->getUsername(), 
$this->mPage->getSourceURL() )->parse() .
"\n"
);
}
@@ -222,7 +222,7 @@
 * @return string
 */
public function getUsername() {
-   return $this->getTitle()->getText();
+   return $this->mPage->getUsername();
}
 
/**
@@ -278,81 +278,11 @@
}
 
/**
-* Makes an API request to the central wiki
-*
-* @param $params array
-* @return array|bool false if the request failed
+* @param Title $title
+* @return GlobalUserPagePage
 */
-   protected function makeAPIRequest( $params ) {
-   $params['format'] = 'json';
-   $url = wfAppendQuery( $this->config->get( 
'GlobalUserPageAPIUrl' ), $params );
-   wfDebugLog( 'GlobalUserPage', "Making a request to $url" );
-   $req = MWHttpRequest::factory(
-   $url,
-   array( 'timeout' => $this->config->get( 
'GlobalUserPageTimeout' ) )
-   );
-   $status = $req->execute();
-   if ( !$status->isOK() ) {
-   wfDebugLog( 'GlobalUserPage', __METHOD__ . " Error: 
{$status->getWikitext()}" );
-   return false;
-   }
-   $json = $req->getContent();
-   $decoded = FormatJson::decode( $json, true );
-   return $decoded;
-   }
-
-   /**
-* Returns a URL to the user page on the central wiki,
-* attempts to use SiteConfiguration if possible, else
-* falls back to using an API request
-*
-* @return string
-*/
-   protected function getRemoteURL() {
-   $url = WikiMap::getForeignURL(
-   $this->config->get( 'GlobalUserPageDBname' ),
-   'User:' . $this->getUsername()
-   );
-
-   if ( $url !== false ) {
-   return $url;
-   } else {
-   // Fallback to the API
-   return $this->getRemoteURLFromAPI();
-   }
-   }
-
-   /**
-* Returns a URL to the user page on the central wiki;
-* if MW >= 1.24, this will be the cannonical url, otherwise
-* it will be using whatever protocol was specified in
-* $wgGlobalUserPageAPIUrl.
-*
-* @return string
-*/
-   protected function getRemoteURLFromAPI() {
-   $key = 'globaluserpage:url:' . md5( $this->getUsername() );
-   $data = $this->cache->get( $key );
-   if ( $data === false ) {
-   $params = array(
-   'action' => 'query',
-   'titles' => 'User:' . $this->getUsername(),
-   'prop' => 'info',
-   'inprop' => 'url',
-   'formatversion' => '2',
-   );
-   $resp = $this->makeAPIRequest( $params );
-   if ( $resp === false ) {
-   // Don't cache upon failure
-   return '';
-   }
-   $data = $resp['query']['pages'][0]['canonicalurl'];
-   // 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make remote content skin tabs non-File specific

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

Change subject: Make remote content skin tabs non-File specific
..


Make remote content skin tabs non-File specific

This is one of the steps for implementing shadow namespaces -
generalizing foreign file specific code to be usable for any namespace.
This allows us to no-longer special case WikiFilePage in SkinTemplate
when building content_navigation, and will let GlobalUserPage to add
similar tabs just by overriding the same functions.

The new WikiPage::getWikiDisplayName() and WikiPage::getSourceURL()
functions will return expected values for both local and remote content.

Change-Id: Ib3d7dcbefe95da351872e63f306799eef83e00a7
---
M includes/page/WikiFilePage.php
M includes/page/WikiPage.php
M includes/skins/SkinTemplate.php
3 files changed, 50 insertions(+), 9 deletions(-)

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



diff --git a/includes/page/WikiFilePage.php b/includes/page/WikiFilePage.php
index 74566cb..1fa4bfa 100644
--- a/includes/page/WikiFilePage.php
+++ b/includes/page/WikiFilePage.php
@@ -224,4 +224,20 @@
 
return TitleArray::newFromResult( $res );
}
+
+   /**
+* @since 1.28
+* @return string
+*/
+   public function getWikiDisplayName() {
+   return $this->getFile()->getRepo()->getDisplayName();
+   }
+
+   /**
+* @since 1.28
+* @return string
+*/
+   public function getSourceURL() {
+   return $this->getFile()->getDescriptionUrl();
+   }
 }
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 284a343..924a395 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -3727,4 +3727,30 @@
public function isLocal() {
return true;
}
+
+   /**
+* The display name for the site this content
+* come from. If a subclass overrides isLocal(),
+* this could return something other than the
+* current site name
+*
+* @since 1.28
+* @return string
+*/
+   public function getWikiDisplayName() {
+   global $wgSitename;
+   return $wgSitename;
+   }
+
+   /**
+* Get the source URL for the content on this page,
+* typically the canonical URL, but may be a remote
+* link if the content comes from another site
+*
+* @since 1.28
+* @return string
+*/
+   public function getSourceURL() {
+   return $this->getTitle()->getCanonicalURL();
+   }
 }
diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index e6763ca..69f2e49 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -919,19 +919,18 @@

$content_navigation['views']['view']['redundant'] = true;
}
 
-   $isForeignFile = $title->inNamespace( NS_FILE ) 
&& $this->canUseWikiPage() &&
-   $this->getWikiPage() instanceof 
WikiFilePage && !$this->getWikiPage()->isLocal();
+   $page = $this->canUseWikiPage() ? 
$this->getWikiPage() : false;
+   $isRemoteContent = $page && !$page->isLocal();
 
// If it is a non-local file, show a link to 
the file in its own repository
// @todo abstract this for remote content that 
isn't a file
-   if ( $isForeignFile ) {
-   $file = $this->getWikiPage()->getFile();
+   if ( $isRemoteContent ) {

$content_navigation['views']['view-foreign'] = [
'class' => '',
'text' => wfMessageFallback( 
"$skname-view-foreign", 'view-foreign' )->
setContext( 
$this->getContext() )->
-   params( 
$file->getRepo()->getDisplayName() )->text(),
-   'href' => 
$file->getDescriptionUrl(),
+   params( 
$page->getWikiDisplayName() )->text(),
+   'href' => $page->getSourceURL(),
'primary' => false,
];
}
@@ -955,9 +954,9 @@
&& 
$title->getDefaultMessageText() !== false
)
) {
-  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.18.2

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

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

Change subject: Update OOjs UI to v0.18.2
..

Update OOjs UI to v0.18.2

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.18.2

Change-Id: Id08147e9015fc68a882733268a2bf860dd1ccb27
---
M composer.json
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-core-apex.css
M resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-core.js
M resources/lib/oojs-ui/oojs-ui-mediawiki.js
M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
M resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-toolbars.js
M resources/lib/oojs-ui/oojs-ui-widgets-apex.css
M resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-widgets.js
M resources/lib/oojs-ui/oojs-ui-windows-apex.css
M resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
M resources/lib/oojs-ui/oojs-ui-windows.js
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-invert.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-invert.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-progressive.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin-progressive.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPin.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-invert.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-invert.svg
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-progressive.png
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr-progressive.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-ltr.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-invert.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-invert.svg
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-progressive.png
M 
resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl-progressive.svg
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl.png
M resources/lib/oojs-ui/themes/mediawiki/images/icons/mapPinAdd-rtl.svg
33 files changed, 140 insertions(+), 148 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/325710/1

diff --git a/composer.json b/composer.json
index 19ca238..f57b9ce 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"ext-xml": "*",
"liuggio/statsd-php-client": "1.0.18",
"mediawiki/at-ease": "1.1.0",
-   "oojs/oojs-ui": "0.18.1",
+   "oojs/oojs-ui": "0.18.2",
"oyejorge/less.php": "1.7.0.10",
"php": ">=5.5.9",
"psr/log": "1.0.0",
diff --git a/resources/lib/oojs-ui/oojs-ui-apex.js 
b/resources/lib/oojs-ui/oojs-ui-apex.js
index a96ae13..1acedf2 100644
--- a/resources/lib/oojs-ui/oojs-ui-apex.js
+++ b/resources/lib/oojs-ui/oojs-ui-apex.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.1
+ * OOjs UI v0.18.2
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-29T22:57:37Z
+ * Date: 2016-12-06T23:32:53Z
  */
 ( function ( OO ) {
 
diff --git a/resources/lib/oojs-ui/oojs-ui-core-apex.css 
b/resources/lib/oojs-ui/oojs-ui-core-apex.css
index e5e6252..72df673 100644
--- a/resources/lib/oojs-ui/oojs-ui-core-apex.css
+++ b/resources/lib/oojs-ui/oojs-ui-core-apex.css
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.1
+ * OOjs UI v0.18.2
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-29T22:57:42Z
+ * Date: 2016-12-06T23:32:57Z
  */
 .oo-ui-element-hidden {
   display: none !important;
@@ -832,41 +832,20 @@
   display: none;
 }
 .oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
-.oo-ui-textInputWidget.oo-ui-indicatorElement > 
.oo-ui-indicatorElement-indicator {
+.oo-ui-textInputWidget.oo-ui-indicatorElement > 
.oo-ui-indicatorElement-indicator,
+.oo-ui-textInputWidget > .oo-ui-labelElement-label {
   display: block;
   position: absolute;
   top: 0;
+}
+.oo-ui-textInputWidget.oo-ui-iconElement > .oo-ui-iconElement-icon,
+.oo-ui-textInputWidget.oo-ui-indicatorElement > 
.oo-ui-indicatorElement-indicator {
   height: 100%;
   -webkit-touch-callout: none;
   -webkit-user-select: none;
  -moz-user-select: none;
   -ms-user-select: none;
   user-select: none;
-}
-.oo-ui-textInputWidget.oo-ui-widget-enabled > .oo-ui-iconElement-icon,

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: improve ESLint configuration

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

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

Change subject: Hygiene: improve ESLint configuration
..

Hygiene: improve ESLint configuration

• Lint everything not in .eslintignore
• Lint JSON files too (forbid invalid JSON files)
• Fix offenders
• Lint before running tests, not after, and remove mocha-eslint
• Forbid warnings
• Expose lint command
• Enable caching

Change-Id: I1f9c51ed6810a85245005f59aac08acf0edda39e
---
M .eslintrc.yml
M .gitignore
M app.js
M package.json
M test/index.js
M test/utils/assert.js
M test/utils/headers.js
M test/utils/logStream.js
M test/utils/server.js
9 files changed, 50 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/09/325709/1

diff --git a/.eslintrc.yml b/.eslintrc.yml
index 9e2c225..a372143 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -1 +1,2 @@
-extends: 'eslint-config-node-services'
\ No newline at end of file
+extends: 'eslint-config-node-services'
+plugins: ['json']
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 77ec4b4..df3a503 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 .DS_Store
 tmp/
 fixtures/
+/.eslintcache
diff --git a/app.js b/app.js
index d23eba6..17327f2 100644
--- a/app.js
+++ b/app.js
@@ -37,8 +37,8 @@
 if (app.conf.compression_level === undefined) { app.conf.compression_level 
= 3; }
 if (app.conf.cors === undefined) { app.conf.cors = '*'; }
 if (app.conf.csp === undefined) {
-app.conf.csp =
-"default-src 'self'; object-src 'none'; media-src *; img-src *; 
style-src *; frame-ancestors 'self'";
+// eslint-disable-next-line max-len
+app.conf.csp = "default-src 'self'; object-src 'none'; media-src *; 
img-src *; style-src *; frame-ancestors 'self'";
 }
 
 // set outgoing proxy
@@ -157,7 +157,8 @@
 return undefined;
 }
 // check that the route exports the object we need
-if (route.constructor !== Object || !route.path || !route.router 
|| !(route.api_version || route.skip_domain)) {
+if (route.constructor !== Object || !route.path || !route.router
+|| !(route.api_version || route.skip_domain)) {
 throw new TypeError(`routes/${fname} does not export the 
correct object!`);
 }
 // normalise the path to be used as the mount point
diff --git a/package.json b/package.json
index 4b30e76..bc59b6a 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,8 @@
   "main": "./app.js",
   "scripts": {
 "start": "service-runner",
-"test": "mocha && nsp check",
+"lint": "eslint --cache --max-warnings 0 --ext .js --ext .json .",
+"test": "npm run -s lint && mocha && nsp check",
 "docker-start": "service-runner docker-start",
 "docker-test": "service-runner docker-test",
 "coverage": "istanbul cover _mocha -- -R spec"
@@ -58,15 +59,16 @@
   "devDependencies": {
 "ajv": "^4.7.7",
 "csv-parse": "^1.1.7",
+"eslint": "^3.11.0",
+"eslint-config-node-services": "^1.0.6",
+"eslint-plugin-json": "^1.2.0",
 "extend": "^3.0.0",
 "istanbul": "^0.4.5",
 "mocha": "^3.1.2",
 "mocha-jshint": "^2.3.1",
 "mocha-lcov-reporter": "^1.2.0",
 "nsp": "^2.6.2",
-"sepia": "^2.0.1",
-"mocha-eslint": "^3.0.1",
-"eslint-config-node-services": "^1.0.6"
+"sepia": "^2.0.1"
   },
   "deploy": {
 "target": "debian",
diff --git a/test/index.js b/test/index.js
index 44a808a..a8c4173 100644
--- a/test/index.js
+++ b/test/index.js
@@ -1,14 +1,4 @@
 'use strict';
 
-
 // Run jshint as part of normal testing
 require('mocha-jshint')();
-require('mocha-eslint')([
-'etc',
-'lib',
-'routes',
-'test/features',
-'test/lib'
-], {
-timeout: 1
-});
diff --git a/test/utils/assert.js b/test/utils/assert.js
index 86b277a..3490e49 100644
--- a/test/utils/assert.js
+++ b/test/utils/assert.js
@@ -1,7 +1,25 @@
+/* eslint-disable no-console */
+
 'use strict';
 
-
 const assert = require('assert');
+
+
+function deepEqual(result, expected, message) {
+
+try {
+if (typeof expected === 'string') {
+assert.ok(result === expected || (new 
RegExp(expected).test(result)));
+} else {
+assert.deepEqual(result, expected, message);
+}
+} catch (e) {
+console.log(`Expected:\n${JSON.stringify(expected, null, 2)}`);
+console.log(`Result:\n${JSON.stringify(result, null, 2)}`);
+throw e;
+}
+
+}
 
 
 /**
@@ -43,23 +61,6 @@
 }
 
 
-function deepEqual(result, expected, message) {
-
-try {
-if (typeof expected === 'string') {
-assert.ok(result === expected || (new 
RegExp(expected).test(result)));
-} else {
-assert.deepEqual(result, expected, message);
-}
-} catch (e) {
-

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: reject some address_names

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

Change subject: reject some address_names
..


reject some address_names

If someone's business name is set to their name it looks weird in civi

Bug: T152510
Change-Id: Icedbdab8dd518e7e67016dd2d2b9755b8ce5c27b
---
M PaymentProviders/PayPal/Job.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index f253e0d..9f949c7 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -98,6 +98,15 @@
}
}
 
+   // If someone's PayPal account is set to their name we 
don't want
+   // it to go in the address box. They should put in a 
business name
+   // or something.
+   if ( isset( $new_msg->supplemental_address_1 )
+   && $new_msg->supplemental_address_1 ===
+   "{$new_msg->first_name} {$new_msg->last_name}" 
) {
+   unset( $new_msg->supplemental_address_1 );
+   }
+
// FIXME once recurring uses normalized msg it needs 
this too
$new_msg->date = strtotime( $new_msg->date );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icedbdab8dd518e7e67016dd2d2b9755b8ce5c27b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
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] wikimedia...SmashPig[deployment]: Less noisy queue consumer logging

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

Change subject: Less noisy queue consumer logging
..


Less noisy queue consumer logging

Bug: T151954
Change-Id: Ifc98c04c5778a7a1a63e084fb0f69a6707a6b1a8
---
M Core/QueueConsumers/BaseQueueConsumer.php
1 file changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/Core/QueueConsumers/BaseQueueConsumer.php 
b/Core/QueueConsumers/BaseQueueConsumer.php
index 5367c51..05b72b9 100644
--- a/Core/QueueConsumers/BaseQueueConsumer.php
+++ b/Core/QueueConsumers/BaseQueueConsumer.php
@@ -101,10 +101,18 @@
}
$timeOk = $this->timeLimit === 0 || time() <= 
$startTime + $this->timeLimit;
$countOk = $this->messageLimit === 0 || $processed < 
$this->messageLimit;
-   $debugMessage = 'Data is ' . ( $data === null ? '' : 
'not ' ) . 'null, ' .
-   "time limit ($this->timeLimit) is " . ( $timeOk 
? 'not ' : '' ) . 'elapsed, ' .
-   "message limit ($this->messageLimit) is " . ( 
$countOk ? 'not ' : '' ) . 'reached.';
-   Logger::debug( $debugMessage );
+
+   $debugMessages = array();
+   if ( $data === null ) {
+   $debugMessages[] = 'Queue is empty.';
+   } else if ( !$timeOk ) {
+   $debugMessages[] = "Time limit 
($this->timeLimit) is elapsed.";
+   } else if ( !$countOk ) {
+   $debugMessages[] = "Message limit 
($this->messageLimit) is reached.";
+   }
+   if ( !empty( $debugMessages ) ) {
+   Logger::debug( implode( ' ', $debugMessages ) );
+   }
}
while( $timeOk && $countOk && $data !== null );
return $processed;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc98c04c5778a7a1a63e084fb0f69a6707a6b1a8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
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] wikimedia...SmashPig[deployment]: Clean up a couple unused things

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

Change subject: Clean up a couple unused things
..


Clean up a couple unused things

Change-Id: I10694b94748ee22d3f3a901df6747f40b258b0e2
---
M Maintenance/ConsumePendingQueue.php
M PaymentProviders/PayPal/Listener.php
2 files changed, 0 insertions(+), 7 deletions(-)

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



diff --git a/Maintenance/ConsumePendingQueue.php 
b/Maintenance/ConsumePendingQueue.php
index 197e319..cabdd40 100644
--- a/Maintenance/ConsumePendingQueue.php
+++ b/Maintenance/ConsumePendingQueue.php
@@ -4,7 +4,6 @@
 require ( 'MaintenanceBase.php' );
 
 use SmashPig\Core\Logging\Logger;
-use SmashPig\Core\DataStores\PendingDatabase;
 use SmashPig\Core\QueueConsumers\PendingQueueConsumer;
 
 $maintClass = '\SmashPig\Maintenance\ConsumePendingQueue';
@@ -13,11 +12,6 @@
  * Reads messages out of the pending queue and inserts them into a db table
  */
 class ConsumePendingQueue extends MaintenanceBase {
-
-   /**
-* @var PendingDatabase
-*/
-   protected $pendingDatabase;
 
public function __construct() {
parent::__construct();
diff --git a/PaymentProviders/PayPal/Listener.php 
b/PaymentProviders/PayPal/Listener.php
index 54e3cd7..4148554 100644
--- a/PaymentProviders/PayPal/Listener.php
+++ b/PaymentProviders/PayPal/Listener.php
@@ -5,7 +5,6 @@
 use SmashPig\Core\Http\IHttpActionHandler;
 use SmashPig\Core\Http\Request;
 use SmashPig\Core\Http\Response;
-use SmashPig\Core\Listeners\ListenerSecurityException;
 use SmashPig\Core\Logging\Logger;
 
 class Listener implements IHttpActionHandler {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10694b94748ee22d3f3a901df6747f40b258b0e2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
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] mediawiki...deploy[master]: Reduce Parsoid request timeout to 110s

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

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

Change subject: Reduce Parsoid request timeout to 110s
..

Reduce Parsoid request timeout to 110s

Bug: T152073
Change-Id: I8e83dd16c4ad0fe9b617899be97e3571f8b4bdfb
---
M scap/templates/config.yaml.j2
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/08/325708/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5e36d4c..4692dd8 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -44,10 +44,9 @@
   useBatchAPI: true
   usePHPPreProcessor: true
 
-  # RESTBase uses 2 minutes timeouts for the first request
-  # and a higher value subsequently.
+  # RESTBase uses a 2 minute timeout for the first request.
   #
-  # Set a 3 minute timeout so that RESTBase retries have
-  # a chance of succeeding.
+  # Set ours to 110s so we time out before RB times out and retries.
+  # This prevents RB from retrying slow requests # altogether.
   timeouts:
-request: 18  # 3 minutes
+request: 11  # 110 sec

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e83dd16c4ad0fe9b617899be97e3571f8b4bdfb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Annotate class properties of SpecialRandomInCategory

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

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

Change subject: Annotate class properties of SpecialRandomInCategory
..

Annotate class properties of SpecialRandomInCategory

Change-Id: I44db84a0cf58a08b023e4091948e99b40f17fa60
---
M includes/specials/SpecialRandomInCategory.php
1 file changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/includes/specials/SpecialRandomInCategory.php 
b/includes/specials/SpecialRandomInCategory.php
index efb1748..90820e3 100644
--- a/includes/specials/SpecialRandomInCategory.php
+++ b/includes/specials/SpecialRandomInCategory.php
@@ -47,10 +47,15 @@
  * @ingroup SpecialPage
  */
 class SpecialRandomInCategory extends FormSpecialPage {
-   protected $extra = []; // Extra SQL statements
-   protected $category = false; // Title object of category
-   protected $maxOffset = 30; // Max amount to fudge randomness by.
+   /** @var array Extra SQL statements */
+   protected $extra = [];
+   /** @var Title|null Title object of category */
+   protected $category = null;
+   /** @var int Max amount to fudge randomness by */
+   protected $maxOffset = 30;
+   /** @var string|null */
private $maxTimestamp = null;
+   /** @var string|null */
private $minTimestamp = null;
 
public function __construct( $name = 'RandomInCategory' ) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: add donatetowikipedia.[com|org] as parked domain

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

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

Change subject: add donatetowikipedia.[com|org] as parked domain
..

add donatetowikipedia.[com|org] as parked domain

James Alexander registered these and just transferred
them to WMF per Charles of legal.

Fundraising doesn't have plans to use them.

Adding as parked domains that don't get any traffic.

Change-Id: I029077cbd7ac1ba04789bf1b25e28ee34cfe02de
---
A templates/donatetowikipedia.com
A templates/donatetowikipedia.org
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/06/325706/1

diff --git a/templates/donatetowikipedia.com b/templates/donatetowikipedia.com
new file mode 12
index 000..ff68d1c
--- /dev/null
+++ b/templates/donatetowikipedia.com
@@ -0,0 +1 @@
+parking
\ No newline at end of file
diff --git a/templates/donatetowikipedia.org b/templates/donatetowikipedia.org
new file mode 12
index 000..ff68d1c
--- /dev/null
+++ b/templates/donatetowikipedia.org
@@ -0,0 +1 @@
+parking
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I029077cbd7ac1ba04789bf1b25e28ee34cfe02de
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.18.2

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

Change subject: Tag v0.18.2
..


Tag v0.18.2

Change-Id: I23015ebc54a1de5814ac6bf2b2797c5127151e0d
---
M History.md
M package.json
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/History.md b/History.md
index bed1b26..bd9dbe5 100644
--- a/History.md
+++ b/History.md
@@ -1,4 +1,15 @@
 # OOjs UI Release History
+## v0.18.2 / 2016-12-06
+### Styles
+* MediaWiki theme: Address sub-pixel rendering issues of RadioInputWidgets 
(Volker E)
+* MediaWiki theme: Improve `:active:focus` states on ButtonElements (Volker E)
+* MediaWiki theme: Reduce MapPin icons' hole for better recognisability 
(Volker E)
+
+### Code
+* FieldsetLayout: Temporarily remove use of `` due to Chrome 55 bug 
(Bartosz Dziewoński)
+* TextInputWidget/MediaWiki theme: Improve Less code and align labels (Volker 
E)
+
+
 ## v0.18.1 / 2016-11-29
 ### Features
 * PopupElement: Allow $autoCloseIgnore to be overridden (Roan Kattouw)
diff --git a/package.json b/package.json
index 45e9815..0a67425 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.18.1",
+  "version": "0.18.2",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
 "oojs-plugin",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23015ebc54a1de5814ac6bf2b2797c5127151e0d
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
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] wikimedia...SmashPig[deployment]: reject some address_names

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

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

Change subject: reject some address_names
..

reject some address_names

If someone's business name is set to their name it looks weird in civi

Bug: T152510
Change-Id: Icedbdab8dd518e7e67016dd2d2b9755b8ce5c27b
---
M PaymentProviders/PayPal/Job.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/05/325705/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index f253e0d..9f949c7 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -98,6 +98,15 @@
}
}
 
+   // If someone's PayPal account is set to their name we 
don't want
+   // it to go in the address box. They should put in a 
business name
+   // or something.
+   if ( isset( $new_msg->supplemental_address_1 )
+   && $new_msg->supplemental_address_1 ===
+   "{$new_msg->first_name} {$new_msg->last_name}" 
) {
+   unset( $new_msg->supplemental_address_1 );
+   }
+
// FIXME once recurring uses normalized msg it needs 
this too
$new_msg->date = strtotime( $new_msg->date );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icedbdab8dd518e7e67016dd2d2b9755b8ce5c27b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Less noisy queue consumer logging

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

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

Change subject: Less noisy queue consumer logging
..

Less noisy queue consumer logging

Bug: T151954
Change-Id: Ifc98c04c5778a7a1a63e084fb0f69a6707a6b1a8
---
M Core/QueueConsumers/BaseQueueConsumer.php
1 file changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/04/325704/1

diff --git a/Core/QueueConsumers/BaseQueueConsumer.php 
b/Core/QueueConsumers/BaseQueueConsumer.php
index 5367c51..05b72b9 100644
--- a/Core/QueueConsumers/BaseQueueConsumer.php
+++ b/Core/QueueConsumers/BaseQueueConsumer.php
@@ -101,10 +101,18 @@
}
$timeOk = $this->timeLimit === 0 || time() <= 
$startTime + $this->timeLimit;
$countOk = $this->messageLimit === 0 || $processed < 
$this->messageLimit;
-   $debugMessage = 'Data is ' . ( $data === null ? '' : 
'not ' ) . 'null, ' .
-   "time limit ($this->timeLimit) is " . ( $timeOk 
? 'not ' : '' ) . 'elapsed, ' .
-   "message limit ($this->messageLimit) is " . ( 
$countOk ? 'not ' : '' ) . 'reached.';
-   Logger::debug( $debugMessage );
+
+   $debugMessages = array();
+   if ( $data === null ) {
+   $debugMessages[] = 'Queue is empty.';
+   } else if ( !$timeOk ) {
+   $debugMessages[] = "Time limit 
($this->timeLimit) is elapsed.";
+   } else if ( !$countOk ) {
+   $debugMessages[] = "Message limit 
($this->messageLimit) is reached.";
+   }
+   if ( !empty( $debugMessages ) ) {
+   Logger::debug( implode( ' ', $debugMessages ) );
+   }
}
while( $timeOk && $countOk && $data !== null );
return $processed;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc98c04c5778a7a1a63e084fb0f69a6707a6b1a8
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Clean up a couple unused things

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

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

Change subject: Clean up a couple unused things
..

Clean up a couple unused things

Change-Id: I10694b94748ee22d3f3a901df6747f40b258b0e2
---
M Maintenance/ConsumePendingQueue.php
M PaymentProviders/PayPal/Listener.php
2 files changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/03/325703/1

diff --git a/Maintenance/ConsumePendingQueue.php 
b/Maintenance/ConsumePendingQueue.php
index 197e319..cabdd40 100644
--- a/Maintenance/ConsumePendingQueue.php
+++ b/Maintenance/ConsumePendingQueue.php
@@ -4,7 +4,6 @@
 require ( 'MaintenanceBase.php' );
 
 use SmashPig\Core\Logging\Logger;
-use SmashPig\Core\DataStores\PendingDatabase;
 use SmashPig\Core\QueueConsumers\PendingQueueConsumer;
 
 $maintClass = '\SmashPig\Maintenance\ConsumePendingQueue';
@@ -13,11 +12,6 @@
  * Reads messages out of the pending queue and inserts them into a db table
  */
 class ConsumePendingQueue extends MaintenanceBase {
-
-   /**
-* @var PendingDatabase
-*/
-   protected $pendingDatabase;
 
public function __construct() {
parent::__construct();
diff --git a/PaymentProviders/PayPal/Listener.php 
b/PaymentProviders/PayPal/Listener.php
index 54e3cd7..4148554 100644
--- a/PaymentProviders/PayPal/Listener.php
+++ b/PaymentProviders/PayPal/Listener.php
@@ -5,7 +5,6 @@
 use SmashPig\Core\Http\IHttpActionHandler;
 use SmashPig\Core\Http\Request;
 use SmashPig\Core\Http\Response;
-use SmashPig\Core\Listeners\ListenerSecurityException;
 use SmashPig\Core\Logging\Logger;
 
 class Listener implements IHttpActionHandler {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10694b94748ee22d3f3a901df6747f40b258b0e2
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ejegg 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.18.2

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

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

Change subject: Tag v0.18.2
..

Tag v0.18.2

Change-Id: I23015ebc54a1de5814ac6bf2b2797c5127151e0d
---
M History.md
M package.json
2 files changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/02/325702/1

diff --git a/History.md b/History.md
index bed1b26..bd9dbe5 100644
--- a/History.md
+++ b/History.md
@@ -1,4 +1,15 @@
 # OOjs UI Release History
+## v0.18.2 / 2016-12-06
+### Styles
+* MediaWiki theme: Address sub-pixel rendering issues of RadioInputWidgets 
(Volker E)
+* MediaWiki theme: Improve `:active:focus` states on ButtonElements (Volker E)
+* MediaWiki theme: Reduce MapPin icons' hole for better recognisability 
(Volker E)
+
+### Code
+* FieldsetLayout: Temporarily remove use of `` due to Chrome 55 bug 
(Bartosz Dziewoński)
+* TextInputWidget/MediaWiki theme: Improve Less code and align labels (Volker 
E)
+
+
 ## v0.18.1 / 2016-11-29
 ### Features
 * PopupElement: Allow $autoCloseIgnore to be overridden (Roan Kattouw)
diff --git a/package.json b/package.json
index 45e9815..0a67425 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.18.1",
+  "version": "0.18.2",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
 "oojs-plugin",

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Move ve files to role module

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

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

Change subject: Move ve files to role module
..

Move ve files to role module

Change-Id: I4986612f0c33c63304b84d77ca9648ab10ed
---
R modules/role/files/ve/devwiki.conf
R modules/role/files/ve/vb
M modules/role/manifests/ve.pp
3 files changed, 2 insertions(+), 5 deletions(-)


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

diff --git a/files/ve/devwiki.conf b/modules/role/files/ve/devwiki.conf
similarity index 100%
rename from files/ve/devwiki.conf
rename to modules/role/files/ve/devwiki.conf
diff --git a/files/ve/vb b/modules/role/files/ve/vb
similarity index 100%
rename from files/ve/vb
rename to modules/role/files/ve/vb
diff --git a/modules/role/manifests/ve.pp b/modules/role/manifests/ve.pp
index d2e1ca4..dc88fbd 100644
--- a/modules/role/manifests/ve.pp
+++ b/modules/role/manifests/ve.pp
@@ -10,18 +10,15 @@
 include ::mediawiki::web::sites
 include ::mediawiki::web::prod_sites
 
-# move files to module?
-# lint:ignore:puppet_url_without_modules
 file { '/usr/local/bin/vb':
-source => 'puppet:///files/ve/vb',
+source => 'puppet:///modules/role/ve/vb',
 owner  => 'root',
 group  => 'root',
 mode   => '0555',
 }
 
 apache::site { 'devwiki':
-source   => 'puppet:///files/ve/devwiki.conf',
+source   => 'puppet:///modules/role/ve/devwiki.conf',
 priority => 4,
 }
-# lint:endignore
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4986612f0c33c63304b84d77ca9648ab10ed
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: move Mocha ESLint environment from tests to config

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

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

Change subject: Hygiene: move Mocha ESLint environment from tests to config
..

Hygiene: move Mocha ESLint environment from tests to config

Change-Id: I072fcde8cf1c0c99759452feb425601f0c3aecab
---
A test/.eslintrc.yml
M test/features/announcements/announcements.js
M test/features/app/app.js
M test/features/app/spec.js
M test/features/definition/definition.js
M test/features/featured-image/pagecontent.js
M test/features/featured/pagecontent.js
M test/features/info/info.js
M test/features/media/pagecontent.js
M test/features/mobile-sections-lead/pagecontent.js
M test/features/mobile-sections-lead/parse-pronunciation-test.js
M test/features/mobile-sections-remaining/pagecontent.js
M test/features/mobile-sections/pagecontent-v2.js
M test/features/mobile-sections/pagecontent.js
M test/features/mobile-text/pagecontent.js
M test/features/most-read/most-read.js
M test/features/most-read/page-filtering.js
M test/features/news/news.js
M test/features/random/summary.js
M test/features/random/title.js
M test/lib/anchorencode/anchorencode-test.js
M test/lib/api-util/api-util-test.js
M test/lib/app-transforms/transforms.js
M test/lib/dateUtil/date-util-test.js
M test/lib/mobile-util/mobile-util-test.js
M test/lib/mwapi/image-test.js
M test/lib/parseProperty/parseInfobox.js
M test/lib/parsoid/parsoid-access-test.js
M test/lib/size-transforms/transforms-test.js
29 files changed, 3 insertions(+), 56 deletions(-)


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

diff --git a/test/.eslintrc.yml b/test/.eslintrc.yml
new file mode 100644
index 000..e28757c
--- /dev/null
+++ b/test/.eslintrc.yml
@@ -0,0 +1,3 @@
+---
+env:
+  mocha: true
\ No newline at end of file
diff --git a/test/features/announcements/announcements.js 
b/test/features/announcements/announcements.js
index e0fc042..f205449 100644
--- a/test/features/announcements/announcements.js
+++ b/test/features/announcements/announcements.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const preq   = require('preq');
diff --git a/test/features/app/app.js b/test/features/app/app.js
index ab2ee46..dbafca1 100644
--- a/test/features/app/app.js
+++ b/test/features/app/app.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 
diff --git a/test/features/app/spec.js b/test/features/app/spec.js
index 8998723..5b2fd7b 100644
--- a/test/features/app/spec.js
+++ b/test/features/app/spec.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 
diff --git a/test/features/definition/definition.js 
b/test/features/definition/definition.js
index 1dff3d1..e8f4265 100644
--- a/test/features/definition/definition.js
+++ b/test/features/definition/definition.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const assert = require('../../utils/assert.js');
diff --git a/test/features/featured-image/pagecontent.js 
b/test/features/featured-image/pagecontent.js
index 3cede14..e29b0b2 100644
--- a/test/features/featured-image/pagecontent.js
+++ b/test/features/featured-image/pagecontent.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const assert = require('../../utils/assert.js');
diff --git a/test/features/featured/pagecontent.js 
b/test/features/featured/pagecontent.js
index af7229c..d2a7386 100644
--- a/test/features/featured/pagecontent.js
+++ b/test/features/featured/pagecontent.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const preq   = require('preq');
diff --git a/test/features/info/info.js b/test/features/info/info.js
index 869d521..c68164a 100644
--- a/test/features/info/info.js
+++ b/test/features/info/info.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 
diff --git a/test/features/media/pagecontent.js 
b/test/features/media/pagecontent.js
index 1a77949..d8c790f 100644
--- a/test/features/media/pagecontent.js
+++ b/test/features/media/pagecontent.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const assert = require('../../utils/assert.js');
diff --git a/test/features/mobile-sections-lead/pagecontent.js 
b/test/features/mobile-sections-lead/pagecontent.js
index ec2056e..52f0c8f 100644
--- a/test/features/mobile-sections-lead/pagecontent.js
+++ b/test/features/mobile-sections-lead/pagecontent.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const assert = require('../../utils/assert.js');
diff --git a/test/features/mobile-sections-lead/parse-pronunciation-test.js 
b/test/features/mobile-sections-lead/parse-pronunciation-test.js
index 6ff5ab3..ff4934b 100644
--- a/test/features/mobile-sections-lead/parse-pronunciation-test.js
+++ b/test/features/mobile-sections-lead/parse-pronunciation-test.js
@@ -1,5 +1,3 @@
-/* eslint-env mocha */
-
 'use strict';
 
 const assert = require('../../utils/assert.js');
diff --git 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: swift: get rid of monthly ieee-data cronjob

2016-12-06 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: swift: get rid of monthly ieee-data cronjob
..

swift: get rid of monthly ieee-data cronjob

Bug: T152440
Change-Id: Ie17a66f58b7221548f5f304cf77e1f1a49824b63
---
M modules/swift/manifests/init.pp
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/modules/swift/manifests/init.pp b/modules/swift/manifests/init.pp
index 98c4082..47df761 100644
--- a/modules/swift/manifests/init.pp
+++ b/modules/swift/manifests/init.pp
@@ -90,4 +90,9 @@
 source   => 'puppet:///modules/swift/swift.rsyslog.conf',
 priority => 40,
 }
+
+# Removed in later ieee-data versions and cronspam generator - T152440
+file { '/etc/cron.monthly/ieee-data':
+ensure => absent,
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie17a66f58b7221548f5f304cf77e1f1a49824b63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


  1   2   3   4   >