[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Treat NULL and 0 as equivalent for rev_parent_id

2017-10-23 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386048 )

Change subject: Treat NULL and 0 as equivalent for rev_parent_id
..

Treat NULL and 0 as equivalent for rev_parent_id

The return value of Revision::getParentId is under-specified.
Calling code should treat null and 0 as equivalent.

Change-Id: Ia4e281c6b499441803b581ba81d3211e1a09789a
---
M client/includes/RecentChanges/RevisionData.php
M repo/Wikibase.hooks.php
2 files changed, 13 insertions(+), 4 deletions(-)


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

diff --git a/client/includes/RecentChanges/RevisionData.php 
b/client/includes/RecentChanges/RevisionData.php
index 48ab89d..7ab6d63 100644
--- a/client/includes/RecentChanges/RevisionData.php
+++ b/client/includes/RecentChanges/RevisionData.php
@@ -98,7 +98,7 @@
 * @return int
 */
public function getParentId() {
-   return $this->changeParams['parent_id'];
+   return intval( $this->changeParams['parent_id'] );
}
 
/**
diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index aea60e9..253486e 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -192,12 +192,21 @@
self::notifyEntityStoreWatcherOnUpdate( $revision );
 
$notifier = 
WikibaseRepo::getDefaultInstance()->getChangeNotifier();
+   $parentId = $revision->getParentId();
 
-   if ( $revision->getParentId() === null ) {
+   if ( !$parentId ) {
$notifier->notifyOnPageCreated( $revision );
} else {
-   $parent = Revision::newFromId( 
$revision->getParentId() );
-   $notifier->notifyOnPageModified( $revision, 
$parent );
+   $parent = Revision::newFromId( $parentId );
+
+   if ( !$parent ) {
+   wfLogWarning(
+   __METHOD__ . ': Cannot notify 
on page modification: '
+   . 'failed to load parent 
revision with ID ' . $parentId
+   );
+   } else {
+   $notifier->notifyOnPageModified( 
$revision, $parent );
+   }
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia4e281c6b499441803b581ba81d3211e1a09789a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (a13b7efa5)

2017-10-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386047 )

Change subject: Update VE core submodule to master (a13b7efa5)
..

Update VE core submodule to master (a13b7efa5)

New changes:
9c1134b1b Localisation updates from https://translatewiki.net.
ccf83d4ed Localisation updates from https://translatewiki.net.
a13b7efa5 Fix infinite recursion in standalone diff dialog

Change-Id: Icb79a79d3bcde9337938d989d7cd93b3a74dd913
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/ve b/lib/ve
index 28e34c1..a13b7ef 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 28e34c1d70fb1086c5a99e844dced1227f2dbdb6
+Subproject commit a13b7efa52832bf748433b89a3cc0f8228d1c6af

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BibManager[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386046 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Activate banana checker

Change-Id: I79c06709c71cf288c4e1b2dd356f9d83db253c0e
---
M Gruntfile.js
A i18n/qqq.json
M package.json
3 files changed, 140 insertions(+), 4 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 2ea9e32..36b6671 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -2,7 +2,7 @@
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   // grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
jshint: {
@@ -14,9 +14,9 @@
'!node_modules/**'
]
},
-   /* banana: {
+   banana: {
all: 'i18n/'
-   }, */
+   },
jsonlint: {
all: [
'**/*.json',
@@ -25,6 +25,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jsonlint' /* 'banana' */ ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..27e0ecb
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,135 @@
+{
+   "@metadata": {},
+   "specialpages-group-bibmanager": "{{doc-specialgroup}}",
+   "bibmanagerlist": "{{doc-special}}",
+   "bibmanagerlistauthors": "{{doc-special}}",
+   "bibmanagercreate": "{{doc-special}}",
+   "bibmanageredit": "{{doc-special}}",
+   "bibmanagerimport": "{{doc-special}}",
+   "bibmanagerdelete": "{{doc-special}}",
+   "bibmanagerexport": "{{doc-special}}",
+   "BibManager": "{{doc-special}}",
+   "bibmanager-desc": 
"{{desc|name=BibManager|url=https://www.mediawiki.org/wiki/Extension:BibManager}};,
+   "heading_create": "A page title",
+   "heading_create_type": "A page title",
+   "heading_import": "A page title",
+   "heading_delete": "A page title",
+   "heading_edit": "A page title",
+   "heading_list": "A page title",
+   "heading_list_authors": "A page title",
+   "bm_list_welcome": "A intro message",
+   "bm_list_search_submit": "A button text",
+   "bm_list_search_term": "A label message",
+   "bm_list_search-title": "A button text",
+   "bm_list_search_fieldname": "A label message",
+   "bm_list_table_heading-actions": "A table header message",
+   "bm_list_table_heading-description": "A table header message",
+   "bm_list_table_heading-name": "A table header message",
+   "bm_list_table_heading-export": "A table header message",
+   "bm_list_table_submit-export": "A button text",
+   "bm_list_table_edit": "A link text",
+   "bm_list_table_delete": "A link text",
+   "bm_list_table_export": "A link text",
+   "bm_list_author_table_heading-author": "A table header message",
+   "bm_list_author_table_heading-amount": "A table header message",
+   "bm_create-import": "A button text",
+   "bm_create_back": "A navigation link",
+   "bm_create_submit": "A button text",
+   "bm_create-required": "A hint message",
+   "bm_create-optional": "A hint message",
+   "bm_select_entry_type_submit": "A button text",
+   "bm_create_welcome": "A intro message",
+   "bm_label_entry_type_select": "A label message",
+   "bm_import_welcome": "A intro message",
+   "bm_entry_type_article": "A label message",
+   "bm_entry_type_book": "A label message",
+   "bm_entry_type_booklet": "A label message",
+   "bm_entry_type_conference": "A label message",
+   "bm_entry_type_inbook": "A label message",
+   "bm_entry_type_incollection": "A label message",
+   "bm_entry_type_inproceedings": "A label message",
+   "bm_entry_type_manual": "A label message",
+   "bm_entry_type_mastersthesis": "A label message",
+   "bm_entry_type_misc": "A label message",
+   "bm_entry_type_phdthesis": "A label message",
+   "bm_entry_type_proceedings": "A label message",
+   "bm_entry_type_techreport": "A label message",
+   "bm_entry_type_unpublished": "A label message",
+   "bm_bibtex_string_import_link": "A hint message",
+   "bm_delete_submit": "A button text",
+   "bm_delete_confirm-delete": "A confirm message",
+   "bm_edit_submit": "A button text",
+   "bm_edit-title": "A header message",
+   "bm_edit-citation": "A label message",
+   "bm_edit-required": "A hint message",
+ 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 3628105

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386045 )

Change subject: Update mobileapps to 3628105
..


Update mobileapps to 3628105

List of changes:
c330b3f Summary 2.0: Introduce namespace whitelisting
26e12a9 Hygiene: add tmp folder to eslintignore
b6b1843 Hygiene: Update diff test results
c132a94 Hygiene: Update media API calls to use formatversion=2
70422c4 Fix: Include MIME type and thumb URL in media endpoint responses
42d7ffa Media: Return all video derivatives
3a42c87 Hygiene: Simplify extmetadata collection
3628105 Fix pronunciation parsing
xxx Update node module dependencies

Change-Id: Ie1d800948d3a66a52815a65afbac0b6ad1ba9b2f
---
M node_modules/ajv/dist/ajv.min.js
M node_modules/ajv/dist/ajv.min.js.map
M node_modules/ajv/dist/nodent.min.js
M node_modules/ajv/dist/regenerator.min.js
M node_modules/ajv/lib/ajv.d.ts
M node_modules/ajv/package.json
M node_modules/compressible/package.json
A node_modules/express/node_modules/statuses/LICENSE
A node_modules/express/node_modules/statuses/codes.json
A node_modules/express/node_modules/statuses/index.js
A node_modules/express/node_modules/statuses/package.json
A node_modules/finalhandler/node_modules/statuses/LICENSE
A node_modules/finalhandler/node_modules/statuses/codes.json
A node_modules/finalhandler/node_modules/statuses/index.js
A node_modules/finalhandler/node_modules/statuses/package.json
M node_modules/kad/package.json
M node_modules/moment/min/moment-with-locales.js
M node_modules/moment/min/moment-with-locales.min.js
M node_modules/moment/min/moment.min.js
M node_modules/moment/moment.js
M node_modules/moment/package.json
M node_modules/moment/src/lib/locale/locales.js
M node_modules/moment/src/moment.js
A node_modules/send/node_modules/statuses/LICENSE
A node_modules/send/node_modules/statuses/codes.json
A node_modules/send/node_modules/statuses/index.js
A node_modules/send/node_modules/statuses/package.json
M node_modules/statuses/LICENSE
M node_modules/statuses/codes.json
M node_modules/statuses/index.js
M node_modules/statuses/package.json
M src
32 files changed, 1,141 insertions(+), 140 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1d800948d3a66a52815a65afbac0b6ad1ba9b2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mobrovac 
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...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386043 )

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


Merge branch 'master' into deployment

408c28047 Log client-side errors on payments forms
922a99918 Pass contact_id and contact_hash when both given
673e4ad50 Fixes to client-side error logging
4b23c753b Add an off switch for client-side error logging
2eff18302 Handle payment not initiated
d9c7a9855 PayPal: map Netherlands Antilles to Netherlands
ebf2134af Fix test + bug for orphan slayer
1bdca1fd5 Add apihelp-logPaymentsFormError-summary to en.json/qqq.json
81b12c116 Batch mode: don't look for country in session
9586d2684 Add method visibility to WmfFramework.*
d51a7d931 Add contact_id and _hash to the rest of the places

Change-Id: I13c8716a3cfb797ea57139639a44fd4b6c974d0e
---
D tests/phpunit/Adapter/GatewayAdapterTest.php
D tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_10486.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_C2.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Pending-OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Recurring-OK.testresponse
7 files changed, 0 insertions(+), 1,116 deletions(-)

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



diff --git a/tests/phpunit/Adapter/GatewayAdapterTest.php 
b/tests/phpunit/Adapter/GatewayAdapterTest.php
deleted file mode 100644
index e6d1705..000
--- a/tests/phpunit/Adapter/GatewayAdapterTest.php
+++ /dev/null
@@ -1,563 +0,0 @@
-<<< HEAD   (203609 Merge branch 'master' into deployment)
-===
-setMwGlobals( array(
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'testytest' => array(
-   'gateway' => 'globalcollect', // RAR.
-   ),
-   'rapidFailError' => array(
-   'file' => 'error-cc.html',
-   'gateway' => array( 'globalcollect', 
'adyen', 'amazon', 'astropay', 'paypal' ),
-   'special_type' => 'error',
-   )
-   ),
-   ) );
-   }
-
-   /**
-*
-* @covers GatewayAdapter::__construct
-* @covers GatewayAdapter::defineVarMap
-* @covers GatewayAdapter::defineReturnValueMap
-* @covers GatewayAdapter::defineTransactions
-*/
-   public function testConstructor() {
-   $options = $this->getDonorTestData();
-   $class = $this->testAdapterClass;
-
-   $_SERVER['REQUEST_URI'] = 
GatewayFormChooser::buildPaymentsFormURL(
-   'testytest', array( 'gateway' => 
$class::getIdentifier() )
-   );
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway );
-
-   self::resetAllEnv();
-   $gateway = $this->getFreshGatewayObject( $options = array() );
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway, 
"Having trouble constructing a blank adapter." );
-   }
-
-   /**
-* Test that the required fields are read out of country_fields.yaml
-* @dataProvider getRequiredFields
-* @param string $country test donor country
-* @param array $fields expected required fields
-*/
-   public function testRequiredFields( $country, $fields ) {
-   $init = $this->getDonorTestData( $country );
-   $init['contribution_tracking_id'] = '45931210';
-   $init['payment_method'] = 'cc';
-   $this->setUpRequest( $init, array( 'Donor' => $init ) );
-   $gateway = $this->getFreshGatewayObject( $init );
-   $requiredFields = $gateway->getRequiredFields();
-   $this->assertArrayEquals( $fields, $requiredFields );
-   }
-
-   public function getRequiredFields() {
-   return array(
-   array( 'AU', array(
-   'country', 'first_name', 'last_name',
-   'email', 'state_province'
-   ) ),
-   array( 'ES', array(
-   'country', 'first_name', 'last_name',
-   'email'
-   ) ),
-   array( 'US', array(
-   'country', 'first_name', 'last_name',
-   'email', 'street_address', 'city',
-   

[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Flake8 - do not use bare except

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386042 )

Change subject: Flake8 - do not use bare except
..


Flake8 - do not use bare except

Change-Id: Iff3a8de77fc1a989d97175fc90861fa0bf5729c6
---
M FundraiserStatisticsGen/fundstatgen.py
M SquidRipper/squidder.py
M audit/paypal/ppreport.py
M sftp/client.py
M silverpop_export/upload.py
5 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/FundraiserStatisticsGen/fundstatgen.py 
b/FundraiserStatisticsGen/fundstatgen.py
index 06528cf..b14fb74 100644
--- a/FundraiserStatisticsGen/fundstatgen.py
+++ b/FundraiserStatisticsGen/fundstatgen.py
@@ -275,7 +275,7 @@
 
 try:
 logging.captureWarnings(True)
-except:
+except Exception:
 # Damn; python 2.6; just ignore it
 pass
 
diff --git a/SquidRipper/squidder.py b/SquidRipper/squidder.py
index df5114a..9f23679 100644
--- a/SquidRipper/squidder.py
+++ b/SquidRipper/squidder.py
@@ -89,7 +89,7 @@
 try:
 obj = eval(line)
 hosts.append(obj['host'])
-except:
+except Exception:
 pass
 
 return hosts
@@ -106,7 +106,7 @@
 resultStr = result.read()[31:-3]
 jobj = json.loads(resultStr)
 contents.append(jobj['bannerName'])
-except:
+except Exception:
 contents.append(None)
 return contents
 
diff --git a/audit/paypal/ppreport.py b/audit/paypal/ppreport.py
index 334c7e3..774ee23 100644
--- a/audit/paypal/ppreport.py
+++ b/audit/paypal/ppreport.py
@@ -45,7 +45,7 @@
 record = dict(zip(column_headers, row))
 try:
 callback(record)
-except:
+except Exception:
 logme = {
 'file': os.path.basename(path),
 'row': rownum
diff --git a/sftp/client.py b/sftp/client.py
index c5d58eb..98c736a 100644
--- a/sftp/client.py
+++ b/sftp/client.py
@@ -39,7 +39,7 @@
 def get(self, filename, dest_path):
 try:
 self.client.get(filename, dest_path)
-except:
+except Exception:
 if os.path.exists(dest_path):
 log.info("Removing corrupted download: 
{path}".format(path=dest_path))
 os.unlink(dest_path)
diff --git a/silverpop_export/upload.py b/silverpop_export/upload.py
index 8ab7e27..c458225 100644
--- a/silverpop_export/upload.py
+++ b/silverpop_export/upload.py
@@ -41,7 +41,7 @@
 try:
 upload_most_recent()
 break
-except:
+except Exception:
 log.error("Ran into trouble: " + str(sys.exc_info()))
 
 if i == 2:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iff3a8de77fc1a989d97175fc90861fa0bf5729c6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: XenoRyet 
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 mobileapps to 3628105

2017-10-23 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386045 )

Change subject: Update mobileapps to 3628105
..

Update mobileapps to 3628105

List of changes:
c330b3f Summary 2.0: Introduce namespace whitelisting
26e12a9 Hygiene: add tmp folder to eslintignore
b6b1843 Hygiene: Update diff test results
c132a94 Hygiene: Update media API calls to use formatversion=2
70422c4 Fix: Include MIME type and thumb URL in media endpoint responses
42d7ffa Media: Return all video derivatives
3a42c87 Hygiene: Simplify extmetadata collection
3628105 Fix pronunciation parsing
xxx Update node module dependencies

Change-Id: Ie1d800948d3a66a52815a65afbac0b6ad1ba9b2f
---
M node_modules/ajv/dist/ajv.min.js
M node_modules/ajv/dist/ajv.min.js.map
M node_modules/ajv/dist/nodent.min.js
M node_modules/ajv/dist/regenerator.min.js
M node_modules/ajv/lib/ajv.d.ts
M node_modules/ajv/package.json
M node_modules/compressible/package.json
A node_modules/express/node_modules/statuses/LICENSE
A node_modules/express/node_modules/statuses/codes.json
A node_modules/express/node_modules/statuses/index.js
A node_modules/express/node_modules/statuses/package.json
A node_modules/finalhandler/node_modules/statuses/LICENSE
A node_modules/finalhandler/node_modules/statuses/codes.json
A node_modules/finalhandler/node_modules/statuses/index.js
A node_modules/finalhandler/node_modules/statuses/package.json
M node_modules/kad/package.json
M node_modules/moment/min/moment-with-locales.js
M node_modules/moment/min/moment-with-locales.min.js
M node_modules/moment/min/moment.min.js
M node_modules/moment/moment.js
M node_modules/moment/package.json
M node_modules/moment/src/lib/locale/locales.js
M node_modules/moment/src/moment.js
A node_modules/send/node_modules/statuses/LICENSE
A node_modules/send/node_modules/statuses/codes.json
A node_modules/send/node_modules/statuses/index.js
A node_modules/send/node_modules/statuses/package.json
M node_modules/statuses/LICENSE
M node_modules/statuses/codes.json
M node_modules/statuses/index.js
M node_modules/statuses/package.json
M src
32 files changed, 1,141 insertions(+), 140 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/45/386045/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1d800948d3a66a52815a65afbac0b6ad1ba9b2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps/deploy
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] mediawiki...PipeEscape[master]: Provide license file and add file docu

2017-10-23 Thread Kghbln (Code Review)
Kghbln has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386044 )

Change subject: Provide license file and add file docu
..

Provide license file and add file docu

Bug: T123943
Change-Id: I287bd3ad8721b193174dd6b6b6d7d4039dcdccf0
---
A COPYING
M PipeEscape.php
2 files changed, 350 insertions(+), 5 deletions(-)


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

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..d159169
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-10-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386043 )

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

Merge branch 'master' into deployment

408c28047 Log client-side errors on payments forms
922a99918 Pass contact_id and contact_hash when both given
673e4ad50 Fixes to client-side error logging
4b23c753b Add an off switch for client-side error logging
2eff18302 Handle payment not initiated
d9c7a9855 PayPal: map Netherlands Antilles to Netherlands
ebf2134af Fix test + bug for orphan slayer
1bdca1fd5 Add apihelp-logPaymentsFormError-summary to en.json/qqq.json
81b12c116 Batch mode: don't look for country in session
9586d2684 Add method visibility to WmfFramework.*
d51a7d931 Add contact_id and _hash to the rest of the places

Change-Id: I13c8716a3cfb797ea57139639a44fd4b6c974d0e
---
D tests/phpunit/Adapter/GatewayAdapterTest.php
D tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_10486.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_C2.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Pending-OK.testresponse
D 
tests/phpunit/includes/Responses/paypal_ec/GetExpressCheckoutDetails_Recurring-OK.testresponse
7 files changed, 0 insertions(+), 1,116 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/43/386043/1

diff --git a/tests/phpunit/Adapter/GatewayAdapterTest.php 
b/tests/phpunit/Adapter/GatewayAdapterTest.php
deleted file mode 100644
index e6d1705..000
--- a/tests/phpunit/Adapter/GatewayAdapterTest.php
+++ /dev/null
@@ -1,563 +0,0 @@
-<<< HEAD   (203609 Merge branch 'master' into deployment)
-===
-setMwGlobals( array(
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'testytest' => array(
-   'gateway' => 'globalcollect', // RAR.
-   ),
-   'rapidFailError' => array(
-   'file' => 'error-cc.html',
-   'gateway' => array( 'globalcollect', 
'adyen', 'amazon', 'astropay', 'paypal' ),
-   'special_type' => 'error',
-   )
-   ),
-   ) );
-   }
-
-   /**
-*
-* @covers GatewayAdapter::__construct
-* @covers GatewayAdapter::defineVarMap
-* @covers GatewayAdapter::defineReturnValueMap
-* @covers GatewayAdapter::defineTransactions
-*/
-   public function testConstructor() {
-   $options = $this->getDonorTestData();
-   $class = $this->testAdapterClass;
-
-   $_SERVER['REQUEST_URI'] = 
GatewayFormChooser::buildPaymentsFormURL(
-   'testytest', array( 'gateway' => 
$class::getIdentifier() )
-   );
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway );
-
-   self::resetAllEnv();
-   $gateway = $this->getFreshGatewayObject( $options = array() );
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway, 
"Having trouble constructing a blank adapter." );
-   }
-
-   /**
-* Test that the required fields are read out of country_fields.yaml
-* @dataProvider getRequiredFields
-* @param string $country test donor country
-* @param array $fields expected required fields
-*/
-   public function testRequiredFields( $country, $fields ) {
-   $init = $this->getDonorTestData( $country );
-   $init['contribution_tracking_id'] = '45931210';
-   $init['payment_method'] = 'cc';
-   $this->setUpRequest( $init, array( 'Donor' => $init ) );
-   $gateway = $this->getFreshGatewayObject( $init );
-   $requiredFields = $gateway->getRequiredFields();
-   $this->assertArrayEquals( $fields, $requiredFields );
-   }
-
-   public function getRequiredFields() {
-   return array(
-   array( 'AU', array(
-   'country', 'first_name', 'last_name',
-   'email', 'state_province'
-   ) ),
-   array( 'ES', array(
-   'country', 'first_name', 'last_name',
-   'email'
-   ) ),
-   array( 'US', array(
-   'country', 'first_name', 'last_name',
-   'email', 'street_address', 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Ruby to Node conversion of integration tests.

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378688 )

Change subject: Ruby to Node conversion of integration tests.
..


Ruby to Node conversion of integration tests.

Begininng the conversion of integration tests from Ruby to Node.

Maintaining Cucumber (here Cucumber.js) as the testing framework.
https://github.com/cucumber/cucumber-js

Using MWBot as the API helper
https://github.com/Fannon/mwbot

Using Chai as the assertion library
http://chaijs.com/

Requires chromedriver to be installed:
https://sites.google.com/a/chromium.org/chromedriver/

Currently set to run in Chrome (not yet headless).

Bug: T174103

Change-Id: I873f1deed555e78cab20201c938ca0a353ef0576
---
M Gruntfile.js
M package.json
A tests/browser/features/node_example.feature
A tests/integration/config/wdio.conf.jenkins.js
A tests/integration/config/wdio.conf.js
A tests/integration/features/elasticsearch_on_special_version.feature
A tests/integration/features/step_definitions/page_step_helpers.js
A tests/integration/features/step_definitions/page_steps.js
A tests/integration/features/suggest_api.feature
A tests/integration/features/support/hooks.js
A tests/integration/features/support/pages/article_page.js
A tests/integration/features/support/pages/page.js
A tests/integration/features/support/pages/special_version.js
A tests/integration/features/support/world.js
14 files changed, 765 insertions(+), 2 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 024f234..b3f7d8f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,6 +10,15 @@
grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-stylelint' );
+   grunt.loadNpmTasks( 'grunt-webdriver' );
+
+   var WebdriverIOconfigFile;
+
+   if ( process.env.JENKINS_HOME ) {
+   WebdriverIOconfigFile = 
'./tests/integration/config/wdio.conf.jenkins.js';
+   } else {
+   WebdriverIOconfigFile = 
'./tests/integration/config/wdio.conf.js';
+   }
 
grunt.initConfig( {
jshint: {
@@ -42,6 +51,12 @@
'!tests/browser/articles/**',
'!vendor/**'
]
+   },
+   // Configure WebdriverIO Node task
+   webdriver: {
+   test: {
+   configFile: WebdriverIOconfigFile
+   }
}
} );
 
diff --git a/package.json b/package.json
index 2c7a0e1..aabf898 100644
--- a/package.json
+++ b/package.json
@@ -4,15 +4,22 @@
   "private": true,
   "description": "Build tools for the CirrusSearch extension.",
   "scripts": {
-"test": "grunt test"
+"test": "grunt test",
+"selenium": "killall -0 chromedriver 2>/dev/null || chromedriver 
--url-base=/wd/hub --port= & grunt webdriver:test; killall chromedriver"
   },
   "devDependencies": {
+"chai": "^4.1.2",
+"cucumber": "^3.0.1",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",
 "grunt-contrib-jshint": "1.0.0",
 "grunt-jsonlint": "1.0.7",
 "grunt-stylelint": "0.6.0",
+"grunt-webdriver": "^2.0.3",
+"mwbot": "^1.0.9",
 "stylelint": "7.8.0",
-"stylelint-config-wikimedia": "0.4.1"
+"stylelint-config-wikimedia": "0.4.1",
+"wdio-cucumber-framework": "^1.0.1",
+"webdriverio": "^4.8.0"
   }
 }
diff --git a/tests/browser/features/node_example.feature 
b/tests/browser/features/node_example.feature
new file mode 100644
index 000..4120478
--- /dev/null
+++ b/tests/browser/features/node_example.feature
@@ -0,0 +1,10 @@
+Feature: Example feature
+  Scenario: 1 + 0
+   Given I start with 1
+   When I add 0
+   Then I end up with 1
+
+  Scenario: 1 + 1
+   Given I start with 1
+   When I add 1
+   Then I end up with 2
\ No newline at end of file
diff --git a/tests/integration/config/wdio.conf.jenkins.js 
b/tests/integration/config/wdio.conf.jenkins.js
new file mode 100644
index 000..451b1c0
--- /dev/null
+++ b/tests/integration/config/wdio.conf.jenkins.js
@@ -0,0 +1,22 @@
+/*jshint esversion: 6,  node:true */
+
+/* eslint no-undef: "error" */
+/* eslint-env node */
+'use strict';
+var merge = require( 'deepmerge' ),
+   wdioConf = require( './wdio.conf.js' );
+
+// Overwrite default settings
+exports.config = merge( wdioConf.config, {
+   username: 'WikiAdmin',
+   password: 'testpass',
+   screenshotPath: '../log/',
+   baseUrl: process.env.MW_SERVER + process.env.MW_SCRIPT_PATH,
+
+   reporters: [ 'spec', 'junit' ],
+   reporterOptions: {
+   junit: {
+   outputDir: '../log/'
+   }
+   }
+} );
diff --git 

[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Flake8 - do not use bare except

2017-10-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386042 )

Change subject: Flake8 - do not use bare except
..

Flake8 - do not use bare except

Change-Id: Iff3a8de77fc1a989d97175fc90861fa0bf5729c6
---
M FundraiserStatisticsGen/fundstatgen.py
M SquidRipper/squidder.py
M audit/paypal/ppreport.py
M sftp/client.py
M silverpop_export/upload.py
5 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/42/386042/1

diff --git a/FundraiserStatisticsGen/fundstatgen.py 
b/FundraiserStatisticsGen/fundstatgen.py
index 06528cf..b14fb74 100644
--- a/FundraiserStatisticsGen/fundstatgen.py
+++ b/FundraiserStatisticsGen/fundstatgen.py
@@ -275,7 +275,7 @@
 
 try:
 logging.captureWarnings(True)
-except:
+except Exception:
 # Damn; python 2.6; just ignore it
 pass
 
diff --git a/SquidRipper/squidder.py b/SquidRipper/squidder.py
index df5114a..9f23679 100644
--- a/SquidRipper/squidder.py
+++ b/SquidRipper/squidder.py
@@ -89,7 +89,7 @@
 try:
 obj = eval(line)
 hosts.append(obj['host'])
-except:
+except Exception:
 pass
 
 return hosts
@@ -106,7 +106,7 @@
 resultStr = result.read()[31:-3]
 jobj = json.loads(resultStr)
 contents.append(jobj['bannerName'])
-except:
+except Exception:
 contents.append(None)
 return contents
 
diff --git a/audit/paypal/ppreport.py b/audit/paypal/ppreport.py
index 334c7e3..774ee23 100644
--- a/audit/paypal/ppreport.py
+++ b/audit/paypal/ppreport.py
@@ -45,7 +45,7 @@
 record = dict(zip(column_headers, row))
 try:
 callback(record)
-except:
+except Exception:
 logme = {
 'file': os.path.basename(path),
 'row': rownum
diff --git a/sftp/client.py b/sftp/client.py
index c5d58eb..98c736a 100644
--- a/sftp/client.py
+++ b/sftp/client.py
@@ -39,7 +39,7 @@
 def get(self, filename, dest_path):
 try:
 self.client.get(filename, dest_path)
-except:
+except Exception:
 if os.path.exists(dest_path):
 log.info("Removing corrupted download: 
{path}".format(path=dest_path))
 os.unlink(dest_path)
diff --git a/silverpop_export/upload.py b/silverpop_export/upload.py
index 8ab7e27..c458225 100644
--- a/silverpop_export/upload.py
+++ b/silverpop_export/upload.py
@@ -41,7 +41,7 @@
 try:
 upload_most_recent()
 break
-except:
+except Exception:
 log.error("Ran into trouble: " + str(sys.exc_info()))
 
 if i == 2:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff3a8de77fc1a989d97175fc90861fa0bf5729c6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
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...mobileapps[master]: Fix pronunciation parsing

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386040 )

Change subject: Fix pronunciation parsing
..


Fix pronunciation parsing

Needs updating as a result of a template update:
https://en.wikipedia.org/w/index.php?title=Template%3AIPA_audio_link=revision=806709058=783985633

Bug: T178828
Change-Id: I941e17a6a8d81d804d959dc1fa2e5c73ca2e3edf
---
M lib/parseProperty.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/parseProperty.js b/lib/parseProperty.js
index 4e49ac5..b5c7d6e 100644
--- a/lib/parseProperty.js
+++ b/lib/parseProperty.js
@@ -21,7 +21,7 @@
 }
 
 function parsePronunciation(doc, page) {
-const mediaLinkAnchorAfterIPA = 'span.IPA+small.metadata 
a[rel=mw:MediaLink]';
+const mediaLinkAnchorAfterIPA = 'span.IPA+small a[rel=mw:MediaLink]';
 const pronunciationAnchor = doc.querySelector(mediaLinkAnchorAfterIPA);
 const url = pronunciationAnchor && 
pronunciationAnchor.getAttribute('href');
 page.pronunciation = url && { url };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I941e17a6a8d81d804d959dc1fa2e5c73ca2e3edf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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...DonationInterface[master]: Add contact_id and _hash to the rest of the places

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383283 )

Change subject: Add contact_id and _hash to the rest of the places
..


Add contact_id and _hash to the rest of the places

Need to at least store them in session. Putting the stuff in the
hidden fields too, to keep them across session death to the extent
we keep anything.

Bug: T177663
Change-Id: Ide99711deddc569ea83cafbdad808533e2e9e0a0
---
M gateway_common/DonationData.php
M gateway_common/donation.api.php
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/qqq.json
M gateway_forms/mustache/index.html.mustache
M modules/js/ext.donationInterface.forms.js
6 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index 2673df7..3653241 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -979,6 +979,8 @@
$fields[] = 'order_id';
$fields[] = 'appeal';
$fields[] = 'referrer';
+   $fields[] = 'contact_id';
+   $fields[] = 'contact_hash';
return $fields;
}
 
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index f488033..5703a5c 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -131,6 +131,8 @@
public function getAllowedParams() {
return array(
'gateway' => $this->defineParam( true ),
+   'contact_id' => $this->defineParam( false ),
+   'contact_hash' => $this->defineParam( false ),
'amount' => $this->defineParam( false ),
'currency' => $this->defineParam( false ),
'first_name' => $this->defineParam( false ),
diff --git a/gateway_common/i18n/interface/en.json 
b/gateway_common/i18n/interface/en.json
index 1f3f453..999cfdd 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -431,6 +431,8 @@
"apihelp-donate-summary": "This API allow you to submit a donation to 
the Wikimedia Foundation using a variety of payment processors.",
"apihelp-donate-param-gateway": "Which payment gateway to use - adyen, 
globalcollect, etc.",
"apihelp-donate-param-amount": "The amount donated.",
+   "apihelp-donate-param-contact_id": "ID of the donor in CiviCRM.",
+   "apihelp-donate-param-contact_hash": "Hash of the donor in CiviCRM, 
used for verification. Mandatory when contact_id is given.",
"apihelp-donate-param-currency": "Currency code.",
"apihelp-donate-param-first_name": "First name.",
"apihelp-donate-param-last_name": "Last name.",
diff --git a/gateway_common/i18n/interface/qqq.json 
b/gateway_common/i18n/interface/qqq.json
index 61e7711..4bc4835 100644
--- a/gateway_common/i18n/interface/qqq.json
+++ b/gateway_common/i18n/interface/qqq.json
@@ -456,6 +456,8 @@
"apihelp-donate-summary": "{{doc-apihelp-summary|donate}}",
"apihelp-donate-param-gateway": "{{doc-apihelp-param|donate|gateway}}",
"apihelp-donate-param-amount": "{{doc-apihelp-param|donate|amount}}",
+   "apihelp-donate-param-contact_id": 
"{{doc-apihelp-param|donate|contact_id}}",
+   "apihelp-donate-param-contact_hash": 
"{{doc-apihelp-param|donate|contact_hash}}",
"apihelp-donate-param-currency": 
"{{doc-apihelp-param|donate|currency}}",
"apihelp-donate-param-first_name": 
"{{doc-apihelp-param|donate|first_name}}\n{{Identical|First name}}",
"apihelp-donate-param-last_name": 
"{{doc-apihelp-param|donate|last_name}}\n{{Identical|Last name}}",
diff --git a/gateway_forms/mustache/index.html.mustache 
b/gateway_forms/mustache/index.html.mustache
index cc794a3..b8ca5fe 100644
--- a/gateway_forms/mustache/index.html.mustache
+++ b/gateway_forms/mustache/index.html.mustache
@@ -43,6 +43,8 @@



+   
+   



diff --git a/modules/js/ext.donationInterface.forms.js 
b/modules/js/ext.donationInterface.forms.js
index f11019c..88ae071 100644
--- a/modules/js/ext.donationInterface.forms.js
+++ b/modules/js/ext.donationInterface.forms.js
@@ -45,6 +45,8 @@
var sendData = {
action: 'donate',
gateway: $( '#gateway' ).val(),
+   contact_id: $( '#contact_id' ).val(),
+   contact_hash: $( '#contact_hash' ).val(),
currency: $( 

[MediaWiki-commits] [Gerrit] mediawiki...Equivset[master]: Fix indentation of COPYING

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385823 )

Change subject: Fix indentation of COPYING
..


Fix indentation of COPYING

Synced with .

Change-Id: If45adcec47be034b35ad115ef80b46db75c182c9
---
M COPYING
1 file changed, 86 insertions(+), 86 deletions(-)

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



diff --git a/COPYING b/COPYING
index 35faf3a..d159169 100644
--- a/COPYING
+++ b/COPYING
@@ -1,14 +1,14 @@
-GNU GENERAL PUBLIC LICENSE
-Version 2, June 1991
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
 
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
 
-   Preamble
+Preamble
 
-The licenses for most software are designed to take away your
+  The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
 License is intended to guarantee your freedom to share and change free
 software--to make sure the software is free for all its users.  This
@@ -18,48 +18,48 @@
 the GNU Lesser General Public License instead.)  You can apply it to
 your programs, too.
 
-When we speak of free software, we are referring to freedom, not
+  When we speak of free software, we are referring to freedom, not
 price.  Our General Public Licenses are designed to make sure that you
 have the freedom to distribute copies of free software (and charge for
 this service if you wish), that you receive source code or can get it
 if you want it, that you can change the software or use pieces of it
 in new free programs; and that you know you can do these things.
 
-To protect your rights, we need to make restrictions that forbid
+  To protect your rights, we need to make restrictions that forbid
 anyone to deny you these rights or to ask you to surrender the rights.
 These restrictions translate to certain responsibilities for you if you
 distribute copies of the software, or if you modify it.
 
-For example, if you distribute copies of such a program, whether
+  For example, if you distribute copies of such a program, whether
 gratis or for a fee, you must give the recipients all the rights that
 you have.  You must make sure that they, too, receive or can get the
 source code.  And you must show them these terms so they know their
 rights.
 
-We protect your rights with two steps: (1) copyright the software, and
+  We protect your rights with two steps: (1) copyright the software, and
 (2) offer you this license which gives you legal permission to copy,
 distribute and/or modify the software.
 
-Also, for each author's protection and ours, we want to make certain
+  Also, for each author's protection and ours, we want to make certain
 that everyone understands that there is no warranty for this free
 software.  If the software is modified by someone else and passed on, we
 want its recipients to know that what they have is not the original, so
 that any problems introduced by others will not reflect on the original
 authors' reputations.
 
-Finally, any free program is threatened constantly by software
+  Finally, any free program is threatened constantly by software
 patents.  We wish to avoid the danger that redistributors of a free
 program will individually obtain patent licenses, in effect making the
 program proprietary.  To prevent this, we have made it clear that any
 patent must be licensed for everyone's free use or not licensed at all.
 
-The precise terms and conditions for copying, distribution and
+  The precise terms and conditions for copying, distribution and
 modification follow.
 
-GNU GENERAL PUBLIC LICENSE
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
-0. This License applies to any program or other work which contains
+  0. This License applies to any program or other work which contains
 a notice placed by the copyright holder saying it may be distributed
 under the terms of this General Public License.  The "Program", below,
 refers to any such program or work, and a "work based on the Program"
@@ -76,7 +76,7 @@
 Program (independent of having been made by running the Program).
 Whether that is true depends on what the Program does.
 
-1. You may copy and distribute verbatim copies of 

[MediaWiki-commits] [Gerrit] mediawiki...Equivset[master]: Move phpunit.xml to phpunit.xml.dist

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385822 )

Change subject: Move phpunit.xml to phpunit.xml.dist
..


Move phpunit.xml to phpunit.xml.dist

To match other libraries and .gitattributes

Change-Id: Ie4d216bcc51a642b4dab6b3d686214509ff1d337
---
R phpunit.xml.dist
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/phpunit.xml b/phpunit.xml.dist
similarity index 100%
rename from phpunit.xml
rename to phpunit.xml.dist

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4d216bcc51a642b4dab6b3d686214509ff1d337
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/libs/Equivset
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Dbarratt 
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...OfflineImportLexicon[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386041 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Activate banana checker

Change-Id: I4d1afedda9bee81e29711dd5ed783800d2291e5e
---
M Gruntfile.js
A i18n/qqq.json
2 files changed, 72 insertions(+), 1 deletion(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index b802b61..0c1812d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -21,6 +21,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', /** 'banana' **/] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..b9644a0
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,71 @@
+{
+   "@metadata": {},
+   "offlineimportlexicon": "{{doc-special}}",
+   "offlineimportlexicon-desc": 
"{{desc|name=OfflineImportLexicon|url=https://www.mediawiki.org/wiki/Extension:OfflineImportLexicon}};,
+   "offlineimportlexicon-initial-text": "A intro text",
+   "offlineimportlexicon-content-1": "A label message",
+   "offlineimportlexicon-content-2": "A label message",
+   "offlineimportlexicon-content-3": "A label message",
+   "offlineimportlexicon-content-4": "A label message",
+   "offlineimportlexicon-content-5": "A label message",
+   "offlineimportlexicon-content-6": "A label message",
+   "offlineimportlexicon-content-7": "A label message",
+   "offlineimportlexicon-content-8": "A label message",
+   "offlineimportlexicon-content-9": "A label message",
+   "offlineimportlexicon-content-10": "A label message",
+   "offlineimportlexicon-content-21": "A label message",
+   "offlineimportlexicon-content-22": "A label message",
+   "offlineimportlexicon-content-23": "A label message",
+   "offlineimportlexicon-content-24": "A label message",
+   "offlineimportlexicon-content-25": "A label message",
+   "offlineimportlexicon-content-26": "A label message",
+   "offlineimportlexicon-content-27": "A label message",
+   "offlineimportlexicon-content-28": "A label message",
+   "offlineimportlexicon-content-29": "A label message",
+   "offlineimportlexicon-content-31": "A label message",
+   "offlineimportlexicon-content-32": "A label message",
+   "offlineimportlexicon-content-33": "A label message",
+   "offlineimportlexicon-content-34": "A label message",
+   "offlineimportlexicon-content-35": "A label message",
+   "offlineimportlexicon-content-355": "A label message",
+   "offlineimportlexicon-content-36": "A label message",
+   "offlineimportlexicon-content-37": "A label message",
+   "offlineimportlexicon-content-38": "A label message",
+   "offlineimportlexicon-content-39": "A label message",
+   "offlineimportlexicon-content-40": "A label message",
+   "offlineimportlexicon-new-lexicon": "A button text",
+   "offlineimportlexicon-lexicon": "A legend message",
+   "offlineimportlexicon-lexicons": "A label message",
+   "offlineimportlexicon-new-volume": "A button text",
+   "offlineimportlexicon-volume": "A legend message",
+   "offlineimportlexicon-volumes": "A label message",
+   "offlineimportlexicon-new-lemma": "A button text",
+   "offlineimportlexicon-lemma": "A legend message",
+   "offlineimportlexicon-lemmata": "A label message",
+   "offlineimportlexicon-title": "A label message",
+   "offlineimportlexicon-short": "A label message",
+   "offlineimportlexicon-subtitle": "A label message",
+   "offlineimportlexicon-place-of-publication": "A label message",
+   "offlineimportlexicon-year-of-publication": "A label message",
+   "offlineimportlexicon-editor": "A label message",
+   "offlineimportlexicon-publisher": "A label message",
+   "offlineimportlexicon-edition": "A label message",
+   "offlineimportlexicon-language": "A label message",
+   "offlineimportlexicon-number-of-volumes": "A label message",
+   "offlineimportlexicon-create-lexicon": "A button text",
+   "offlineimportlexicon-cancel": "A button text",
+   "offlineimportlexicon-volume-number": "A label message",
+   "offlineimportlexicon-physical-description": "A label message",
+   "offlineimportlexicon-create-volume": "A button text",
+   "offlineimportlexicon-type": "A label message",
+   "offlineimportlexicon-author": "A label message",
+   "offlineimportlexicon-first-page-g": "A label message",
+   "offlineimportlexicon-last-page-g": "A label message",
+   "offlineimportlexicon-first-page-n": "A label message",
+   

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix pronunciation parsing

2017-10-23 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386040 )

Change subject: Fix pronunciation parsing
..

Fix pronunciation parsing

Change-Id: I941e17a6a8d81d804d959dc1fa2e5c73ca2e3edf
---
M lib/parseProperty.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/parseProperty.js b/lib/parseProperty.js
index 4e49ac5..b5c7d6e 100644
--- a/lib/parseProperty.js
+++ b/lib/parseProperty.js
@@ -21,7 +21,7 @@
 }
 
 function parsePronunciation(doc, page) {
-const mediaLinkAnchorAfterIPA = 'span.IPA+small.metadata 
a[rel=mw:MediaLink]';
+const mediaLinkAnchorAfterIPA = 'span.IPA+small a[rel=mw:MediaLink]';
 const pronunciationAnchor = doc.querySelector(mediaLinkAnchorAfterIPA);
 const url = pronunciationAnchor && 
pronunciationAnchor.getAttribute('href');
 page.pronunciation = url && { url };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I941e17a6a8d81d804d959dc1fa2e5c73ca2e3edf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Design tweak: disk usage bar color.

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385981 )

Change subject: Design tweak: disk usage bar color.
..


Design tweak: disk usage bar color.

Bug: T173082
Change-Id: I751bdef101962c705593892960c555f88e60ec7f
---
M app/src/main/res/layout/view_disk_usage.xml
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/app/src/main/res/layout/view_disk_usage.xml 
b/app/src/main/res/layout/view_disk_usage.xml
index 122a506..a9481f7 100644
--- a/app/src/main/res/layout/view_disk_usage.xml
+++ b/app/src/main/res/layout/view_disk_usage.xml
@@ -42,7 +42,8 @@
 android:layout_marginTop="4dp"
 android:layout_marginBottom="8dp"
 android:padding="0.5dp"
-android:background="@drawable/shape_disk_usage">
+android:background="@drawable/shape_disk_usage"
+android:backgroundTint="?attr/chart_shade5">
 
 https://gerrit.wikimedia.org/r/385981
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I751bdef101962c705593892960c555f88e60ec7f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Sharvaniharan 
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]: role::aqs: fix druid endpoint whitelisted pattern

2017-10-23 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386038 )

Change subject: role::aqs: fix druid endpoint whitelisted pattern
..


role::aqs: fix druid endpoint whitelisted pattern

The current pattern prevents AQS to properly contact the Druid
endpoint.

Change-Id: I854a2e6c946ad0077a8ad9735ebfdc0aba4b6504
---
M hieradata/role/common/aqs.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml
index ff7e60f..3e9d11c 100644
--- a/hieradata/role/common/aqs.yaml
+++ b/hieradata/role/common/aqs.yaml
@@ -90,7 +90,7 @@
 # Temporary, waiting for T176223
 profile::aqs::druid_host: druid-public-broker.svc.eqiad.wmnet
 profile::aqs::druid_query_path: '/druid/v2/'
-profile::aqs::druid_uri_pattern: 
'^http\/\/druid-public-broker.svc.eqiad.wmnet:8082\/druid\/v2\/$'
+profile::aqs::druid_uri_pattern: 
'^http:\/\/druid-public-broker.svc.eqiad.wmnet:8082\/druid\/v2'
 
 profile::aqs::seeds:
 - aqs1004-a.eqiad.wmnet

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I854a2e6c946ad0077a8ad9735ebfdc0aba4b6504
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update reverse interwiki map to prefer language prefixes ove...

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384171 )

Change subject: Update reverse interwiki map to prefer language prefixes over 
others
..


Update reverse interwiki map to prefer language prefixes over others

* Updated a bunch of parser tests to reflect the change.
* For the T3636 parser test, added a html/parsoid section to eliminate
  a false wt2html failure.

Bug: T177784
Change-Id: I5cf93950a6da69263fb9da59fba2b33cc2e8931f
---
M lib/config/WikiConfig.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 41 insertions(+), 21 deletions(-)

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



diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index e9f8e48..60dadf3 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -232,14 +232,12 @@
}
});
 
-   var cachedMatcher = null;
-   this.interWikiMatcher = function() {
-   if (cachedMatcher) {
-   return cachedMatcher;
-   }
-   var keys = [];
-   var patterns = [];
+   var updatePatterns = function(keys, patterns, filter) {
conf.interwikiMap.forEach(function(val, key) {
+   if (!filter(val)) {
+   return;
+   }
+
var url = val.url;
var protocolRelative = url.startsWith('//');
if (val.protorel !== undefined) {
@@ -271,6 +269,20 @@
patterns.push('^' + val.prefix + '%3A(.*?)');
}
});
+   };
+
+   var cachedMatcher = null;
+   this.interWikiMatcher = function() {
+   if (cachedMatcher) {
+   return cachedMatcher;
+   }
+   var keys = [];
+   var patterns = [];
+   // For html -> wt reverse mapping, prefer language interwiki 
prefixes
+   // over other interwiki prefixes. So, use "en" instead of 
"wikipedia"
+   // for English wikipedia interwiki links.
+   updatePatterns(keys, patterns, function(val) { return 
!!val.language; });
+   updatePatterns(keys, patterns, function(val) { return 
!val.language; });
var reString = '^(?:' + patterns.join('|') + ')$';
var regExp = new RegExp(reString, 'i');
var matchFunc = function(s) {
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 0c418d9..acd73e1 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -652,7 +652,6 @@
 add("html2wt", "Internal link with is link prefix", "Aðrir 
[[wiki/Söfnuður|mótmælendasöfnuðir]] og\n");
 add("html2wt", "Internal link with is link trail and link prefix", 
"[[wiki/Mótmælendatrú|xxxar]]\n[[wiki/Mótmælendatrú|mótmælendatrúar]]\n[[wiki/Söfnuður|mótmælendasöfnuður]]\n[[wiki/Söfnuður|mótmælendasöfnuðir]]\n[[wiki/Söfnuður|mótmælendasöfnuðirxxx]]\n");
 add("html2wt", "Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved", "[[wiki/Foo|  bar]]\n\n[[wiki/Foo|  ''bar'']]\n\n[http://wp.org 
foo]\n\n[http://wp.org ''foo'']\n");
-add("html2wt", "Interwiki link encoding conversion (T3636)", "* 
[[wikipedia:ro:Olteniţa|Wikipedia:ro:Olteniţa]]\n* 
[[wikipedia:ro:Olteniţa|Wikipedia:ro:Olteniţa]]\n");
 add("html2wt", "Interwiki link with fragment (T4130)", 
"[[meatball:SoftSecurity#foo|MeatBall:SoftSecurity#foo]]\n");
 add("html2wt", "Escaping of interlanguage links (T129218, T156308)", "Blah 
blah blah\n[[:es:Spanish]]\n[[:zh:Chinese| zh : Chinese ]]\n");
 add("html2wt", "Parsoid-specific test: Wikilinks with  should RT 
properly", "[/index.php?title=WW_II=edit=1 WW II]\n");
@@ -1158,8 +1157,8 @@
 add("selser", "External link containing double-single-quotes with no space 
separating the url from text in italics [[1,3,0]]", 
"[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de 
Casagemas'' (1901) en el sitio de ]\n");
 add("selser", "External link containing double-single-quotes with no space 
separating the url from text in italics [[4,0,3]]", "1jnda7a\n");
 add("selser", "External link containing double-single-quotes with no space 
separating the url from text in italics [[[1,2],2,4]]", 
"[http://www.musee-picasso.fr/pages/page_id18528_u1l2.htm ''La muerte de 
Casagemas''1svf0oe (1901) en el sitio de ]mqtmyg6n94l9");
-add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped 
losslessly (T94723) [[[4]]]", "[[wikipedia:European_Robin|1rmduf6]]");
-add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped 
losslessly (T94723) [[[2]]]", "[[wikipedia:European_Robin|134iwocEuropean 
Robin]]");
+add("selser", "mw:ExtLink linking to a interwiki URL can be round-tripped 

[MediaWiki-commits] [Gerrit] mediawiki...MiniInvite[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386039 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Change-Id: I2206f8562da3c7a390df5e82a35935be95d4c522
---
A i18n/qqq.json
1 file changed, 43 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MiniInvite 
refs/changes/39/386039/1

diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..6d2a152
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,43 @@
+{
+   "@metadata": {},
+   "invite-desc": 
"{{desc|name=MiniInvite|url=https://www.mediawiki.org/wiki/Extension:MiniInvite}};,
+   "invite-subject": "An email subject",
+   "invite-body": "An email body",
+   "invite-email-anon-text": "An error message",
+   "invite-not-logged-in": "An error message",
+   "invite-message": "A description message",
+   "invite-skip-step": "A link text",
+   "invite-sent": "A success message",
+   "invite-back-to-userpage": "A navigation link",
+   "invite-sent-thanks": "A success message",
+   "invite-more-friends": "A button text",
+   "invite-your-friends": "A button text",
+   "invite-enter-emails": "A label message",
+   "invite-comma-separated": "A hint message",
+   "invite-customize-email": "A description message",
+   "invite-customize-subject": "A label message",
+   "invite-customize-body": "A label message",
+   "invite-customize-send": "A button text",
+   "invite-entervalidemail": "An error message",
+   "invite-contact-passwd": "A label message",
+   "invite-verifyemail": "A label message",
+   "invite-friendsname": "A label message",
+   "invite-emailaddr": "A label message",
+   "invite-yourcontacts": "A label message",
+   "invite-sharefriends": "A hint message",
+   "invite-getcontactsmaintitle": "A description message",
+   "invite-msg-sent": "A success message",
+   "invite-share-article": "A page title",
+   "invite-send-new-article-to-friends": "A description message",
+   "invite-my-friends": "A button text",
+   "invite-no-thanks": "A button text",
+   "invite-invalid-page": "An error message",
+   "invite-rate-subject": "An email subject",
+   "invite-edit-subject": "An email subject",
+   "invite-view-subject": "An email subject",
+   "invite-edit-body": "An email body",
+   "invite-rate-body": "An email body",
+   "invite-view-body": "An email body",
+   "invite-friend-to-edit": "A link text",
+   "invite-friend-to-read": "A link text"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2206f8562da3c7a390df5e82a35935be95d4c522
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MiniInvite
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: role::aqs: fix druid endpoint whitelisted pattern

2017-10-23 Thread Elukey (Code Review)
Elukey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386038 )

Change subject: role::aqs: fix druid endpoint whitelisted pattern
..

role::aqs: fix druid endpoint whitelisted pattern

The current pattern prevents AQS to properly contact the Druid
endpoint.

Change-Id: I854a2e6c946ad0077a8ad9735ebfdc0aba4b6504
---
M hieradata/role/common/aqs.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/386038/1

diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml
index ff7e60f..3e9d11c 100644
--- a/hieradata/role/common/aqs.yaml
+++ b/hieradata/role/common/aqs.yaml
@@ -90,7 +90,7 @@
 # Temporary, waiting for T176223
 profile::aqs::druid_host: druid-public-broker.svc.eqiad.wmnet
 profile::aqs::druid_query_path: '/druid/v2/'
-profile::aqs::druid_uri_pattern: 
'^http\/\/druid-public-broker.svc.eqiad.wmnet:8082\/druid\/v2\/$'
+profile::aqs::druid_uri_pattern: 
'^http:\/\/druid-public-broker.svc.eqiad.wmnet:8082\/druid\/v2'
 
 profile::aqs::seeds:
 - aqs1004-a.eqiad.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add hijri calender For Urdu wiki

2017-10-23 Thread Obaid Raza (Code Review)
Obaid Raza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386036 )

Change subject: Add hijri calender For Urdu wiki
..

Add hijri calender For Urdu wiki

Change-Id: I9f69e4c3e5e52fc3f67f04b675e3fa73aa03b996
---
M languages/messages/MessagesUr.php
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/386036/2

diff --git a/languages/messages/MessagesUr.php 
b/languages/messages/MessagesUr.php
index 80c8114..f8ee161 100644
--- a/languages/messages/MessagesUr.php
+++ b/languages/messages/MessagesUr.php
@@ -358,3 +358,33 @@
 
 # LinkTrail for Urdu language
 $linkTrail = 
"/^([ابپتٹثجچحخدڈذر​ڑ​زژسشصضطظعغفقکگل​م​نوؤہھیئےآأءۃ]+)(.*)$/sDu";
+
+$datePreferences = [
+   'default',
+   'dmy',
+   'ymd',
+   'hijri',
+   'ISO 8601',
+   'jMY',
+];
+
+$defaultDateFormat = 'dmy';
+
+$dateFormats = [
+   'dmy time' => 'H:i',
+   'dmy date' => 'j xg Yء', # Urdu sign of year
+   'dmy both' => 'H:i، j xg Yء', # Urdu sign of year and comma
+
+   'ymd time' => 'H:i',
+   'ymd date' => 'Yء xg j', # Urdu sign of year
+   'ymd both' => 'H:i، Yء xg j', # Urdu sign of year and comma
+
+   'hijri time' => 'H:i',
+   'hijri date' => 'xmj xmF xmYھ', # Urdu sign of hijri year
+   'hijri both' => 'H:i، xmj xmF xmYھ', # Urdu sign of hijri year and comma
+
+   'jMY time' => 'H:i',
+   'jMY date' => 'j M Yء', # Urdu sign of year
+   'jMY both' => 'H:i، j M Yء', # Urdu sign of year and comma
+];
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f69e4c3e5e52fc3f67f04b675e3fa73aa03b996
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Obaid Raza 
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/vagrant[master]: Update SmashPig for split configuration

2017-10-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386037 )

Change subject: Update SmashPig for split configuration
..

Update SmashPig for split configuration

Change-Id: I92bd9776a3e4da05884e2e24b381170c2c36210d
---
M puppet/modules/smashpig/manifests/init.pp
D puppet/modules/smashpig/templates/SmashPig.yaml.erb
A puppet/modules/smashpig/templates/smashpig/adyen/main.yaml.erb
A puppet/modules/smashpig/templates/smashpig/main.yaml.erb
A puppet/modules/smashpig/templates/smashpig/paypal/main.yaml.erb
5 files changed, 62 insertions(+), 53 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/37/386037/1

diff --git a/puppet/modules/smashpig/manifests/init.pp 
b/puppet/modules/smashpig/manifests/init.pp
index 182040e..f852476 100644
--- a/puppet/modules/smashpig/manifests/init.pp
+++ b/puppet/modules/smashpig/manifests/init.pp
@@ -20,8 +20,22 @@
 update => true,
 }
 
-file { '/etc/fundraising/SmashPig.yaml':
-content => template('smashpig/SmashPig.yaml.erb'),
+file { '/etc/smashpig/main.yaml':
+content => template('smashpig/smashpig/main.yaml.erb'),
+require => [
+Git::Clone['wikimedia/fundraising/SmashPig'],
+],
+}
+
+file { '/etc/smashpig/adyen/main.yaml':
+content => template('smashpig/smashpig/adyen/main.yaml.erb'),
+require => [
+Git::Clone['wikimedia/fundraising/SmashPig'],
+],
+}
+
+file { '/etc/smashpig/paypal/main.yaml':
+content => template('smashpig/smashpig/paypal/main.yaml.erb'),
 require => [
 Git::Clone['wikimedia/fundraising/SmashPig'],
 ],
diff --git a/puppet/modules/smashpig/templates/SmashPig.yaml.erb 
b/puppet/modules/smashpig/templates/SmashPig.yaml.erb
deleted file mode 100644
index 51210a0..000
--- a/puppet/modules/smashpig/templates/SmashPig.yaml.erb
+++ /dev/null
@@ -1,51 +0,0 @@
-default:
-data-store:
-# FIXME some way to reuse this between config files
-redis: 
-servers:
-scheme: tcp
-host: 127.0.0.1
-port: 6379
-
-mysql: 
-class: PDO
-constructor-parameters:
-- mysql:host=127.0.0.1;dbname=smashpig
-- root
-- "<%= scope.lookupvar('mysql::root_password') %>"
-
-pending-db:
-<<: *MYSQL
-
-damaged-db:
-<<: *MYSQL
-
-fredge-db:
-class: PDO
-constructor-parameters:
-- mysql:host=127.0.0.1;dbname=fredge
-- root
-- "<%= scope.lookupvar('mysql::root_password') %>"
-
-banner-history:
-class: PHPQueue\Backend\Predis
-constructor-parameters:
--
-<<: *REDIS
-queue: 'banner-history'
-
-payments-init:
-class: PHPQueue\Backend\Predis
-constructor-parameters:
--
-<<: *REDIS
-queue: payments-init
-
-adyen:
-payment-provider:
-adyen:
-payments-wsdl: https://pal-test.adyen.com/pal/Payment.wsdl
-
-paypal:
-listener:
-postback-url: https://www.sandbox.paypal.com/cgi-bin/webscr
diff --git a/puppet/modules/smashpig/templates/smashpig/adyen/main.yaml.erb 
b/puppet/modules/smashpig/templates/smashpig/adyen/main.yaml.erb
new file mode 100644
index 000..957db05
--- /dev/null
+++ b/puppet/modules/smashpig/templates/smashpig/adyen/main.yaml.erb
@@ -0,0 +1,3 @@
+payment-provider:
+adyen:
+payments-wsdl: https://pal-test.adyen.com/pal/Payment.wsdl
diff --git a/puppet/modules/smashpig/templates/smashpig/main.yaml.erb 
b/puppet/modules/smashpig/templates/smashpig/main.yaml.erb
new file mode 100644
index 000..0431520
--- /dev/null
+++ b/puppet/modules/smashpig/templates/smashpig/main.yaml.erb
@@ -0,0 +1,41 @@
+data-store:
+# FIXME some way to reuse this between config files
+redis: 
+servers:
+scheme: tcp
+host: 127.0.0.1
+port: 6379
+
+mysql: 
+class: PDO
+constructor-parameters:
+- mysql:host=127.0.0.1;dbname=smashpig
+- root
+- "<%= scope.lookupvar('mysql::root_password') %>"
+
+pending-db:
+<<: *MYSQL
+
+damaged-db:
+<<: *MYSQL
+
+fredge-db:
+class: PDO
+constructor-parameters:
+- mysql:host=127.0.0.1;dbname=fredge
+- root
+- "<%= scope.lookupvar('mysql::root_password') %>"
+
+banner-history:
+class: PHPQueue\Backend\Predis
+constructor-parameters:
+-
+<<: *REDIS
+queue: 'banner-history'
+
+payments-init:
+class: PHPQueue\Backend\Predis
+

[MediaWiki-commits] [Gerrit] mediawiki...UploadLocal[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386035 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Activate banana checker

Change-Id: Ib117eed4fb1c04ddd4e7316f73c8d9d5464af25f
---
M Gruntfile.js
A i18n/qqq.json
M package.json
3 files changed, 41 insertions(+), 4 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 8859cd3..ae4e6d7 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,7 +1,7 @@
 /* eslint-env node */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   // grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
jsonlint: {
@@ -11,11 +11,11 @@
'!node_modules/**'
]
},
-   /* banana: {
+   banana: {
all: 'i18n/'
-   } */
+   }
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] );
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..dc72f98
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,36 @@
+{
+   "@metadata": {},
+   "uploadlocal-desc": 
"{{desc|name=UploadLocal|url=https://www.mediawiki.org/wiki/Extension:UploadLocal}};,
+   "specialuploadlocal": "A page title",
+   "uploadlocal": "{{doc-special}}",
+   "uploadlocal_directory_readonly": "An error message",
+   "uploadlocaltext": "A hint message",
+   "uploadlocalbtn": "A button message",
+   "nolocalfiles": "A hint message for no result",
+   "uploadednolocalfiles": "A hint message for no result",
+   "allfilessuccessful": "A success message",
+   "uploadlocalerrors": "An error message",
+   "allfilessuccessfultext": "A success message",
+   "uploadlocal_descriptions_append": "A label message",
+   "uploadlocal_descriptions_prepend": "A label message",
+   "uploadlocal_dest_file_append": "A label message",
+   "uploadlocal_dest_file_prepend": "A label message",
+   "uploadlocal_file_list": "A header message",
+   "uploadlocal_file_list_explanation": "An explanation message",
+   "uploadlocal_global_params": "A header message",
+   "uploadlocal_global_params_explanation": "An explanation message",
+   "uploadlocal_error_badtitle": "An error message",
+   "uploadlocal_error_empty": "An error message",
+   "uploadlocal_error_exists": "An error message",
+   "uploadlocal_error_badprefix": "An error message",
+   "uploadlocal_error_missing": "An error message",
+   "uploadlocal_error_badtype": "An error message",
+   "uploadlocal_error_tooshort": "An error message",
+   "uploadlocal_error_illegal": "An error message",
+   "uploadlocal_error_overwrite": "An error message",
+   "uploadlocal_error_verify": "An error message",
+   "uploadlocal_error_hook": "An error message",
+   "uploadlocal_error_unknown": "An error message",
+   "right-uploadlocal": "{{doc-right|uploadlocal}}",
+   "action-uploadlocal": "{{doc-action|uploadlocal}}"
+}
diff --git a/package.json b/package.json
index f407b5f..10fa9bc 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
},
"devDependencies": {
"grunt": "1.0.1",
+   "grunt-banana-checker": "0.6.0",
"grunt-jsonlint": "1.1.0"
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib117eed4fb1c04ddd4e7316f73c8d9d5464af25f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadLocal
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Add feature flagged DownloadIcon

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385095 )

Change subject: Add feature flagged DownloadIcon
..


Add feature flagged DownloadIcon

Shortcut for print. Disabled by default and controlled by
wgMinervaDownloadIcon

Note that with lazy images enabled, images will not appear
in the printed article. This can be easily addressed inside
the onClick function in a later patchset with a few modifications
to the Skin class.

Currently the flag when enabled will show on all browsers. There
are some open questions on the ticket about how we want to limit
the feature. This shouldn't block review or merging.

Bug: T177215
Change-Id: I49f1736870c743990b3fb9916247e07a597b2f59
---
M i18n/en.json
M i18n/qqq.json
M includes/skins/SkinMinerva.php
M jsduck.json
A resources/skins.minerva.icons.images.scripts/download.svg
A resources/skins.minerva.scripts/DownloadIcon.js
M resources/skins.minerva.scripts/init.js
M skin.json
8 files changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index d7f8a87..434a7c8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -10,6 +10,7 @@
"mobile-frontend-editor-cta": "Help improve this page!",
"mobile-frontend-editor-disabled": "This page is protected to prevent 
vandalism.",
"mobile-frontend-editor-edit": "Edit",
+   "minerva-download": "Download",
"mobile-frontend-editor-redlink-create": "Create page",
"mobile-frontend-editor-redlink-explain": "This page has not yet been 
created.",
"mobile-frontend-editor-redlink-leave": "No, thanks.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index caf550a..4e8a267 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,6 +19,7 @@
"mobile-frontend-editor-cta": "Caption for call to action when an 
anonymous user clicks on edit icon. (Note the mobile site currently doesn't 
allow anonymous editing.)\n{{Identical|Help improve this page}}",
"mobile-frontend-editor-disabled": "Toast message that appears when a 
user is unable to edit a page and clicks edit icon.",
"mobile-frontend-editor-edit": "Caption for the link showing edit form. 
(In the imperative mood)\n{{Identical|Edit}}",
+   "minerva-download": "Caption for the download button (in the imperative 
mood).",
"mobile-frontend-editor-redlink-create": "Label for a create page 
button.\n{{Identical|Create page}}",
"mobile-frontend-editor-redlink-explain": "Question for the user, if he 
want to edit a page, which link he clicked and that does not exist yet, or 
not.",
"mobile-frontend-editor-redlink-leave": "Used as a label for a button 
which the user can click to avoid editing a page which does not exist yet (red 
link): the question/alternative button is 
{{msg-mw|mobile-frontend-editor-redlink-create}}\n\n{{Identical|No 
thanks}}",
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 10fa820..584f6f1 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -1250,6 +1250,7 @@
$out = $this->getOutput();
 
$vars = [
+   'wgMinervaDownloadIcon' => $this->getConfig()->get( 
'MinervaDownloadIcon' ),
'wgMinervaMenuData' => $this->getMenuData(),
// Expose for skins.minerva.tablet.scripts
'wgMinervaTocEnabled' => $out->getProperty( 'MFTOC' ),
diff --git a/jsduck.json b/jsduck.json
index d1938ea..a196292 100644
--- a/jsduck.json
+++ b/jsduck.json
@@ -16,6 +16,7 @@
"Page",
"File",
"Router",
+   "Icon",
"MainMenu",
"mw.user",
"mw.Api",
diff --git a/resources/skins.minerva.icons.images.scripts/download.svg 
b/resources/skins.minerva.icons.images.scripts/download.svg
new file mode 100644
index 000..1a19a9f
--- /dev/null
+++ b/resources/skins.minerva.icons.images.scripts/download.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg;>
\ No newline at end of file
diff --git a/resources/skins.minerva.scripts/DownloadIcon.js 
b/resources/skins.minerva.scripts/DownloadIcon.js
new file mode 100644
index 000..b2969ad
--- /dev/null
+++ b/resources/skins.minerva.scripts/DownloadIcon.js
@@ -0,0 +1,31 @@
+( function ( M ) {
+
+   var msg = mw.msg,
+   Icon = M.require( 'mobile.startup/Icon' );
+
+   /**
+* A download icon for triggering print functionality
+* @class DownloadIcon
+* @extends Icon
+*
+* @constructor
+*/
+   function DownloadIcon() {
+   var options = {};
+   options.tagName = 'li';
+   options.title = msg( 'minerva-download' );
+   options.name = 'download';
+   Icon.call( 

[MediaWiki-commits] [Gerrit] mediawiki...ArticleRatings[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386031 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Change-Id: I8c319f7a2e2cc895657ad674164f9267329c8764
---
A i18n/qqq.json
1 file changed, 27 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleRatings 
refs/changes/31/386031/1

diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..1a778cf
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,27 @@
+{
+   "@metadata": {},
+   "changerating": "{{doc-special}}",
+   "changerating-back": "A navigation message",
+   "changerating-intro-text": "An intro text",
+   "changerating-missing-parameter": "An error message",
+   "changerating-no-such-page": "An error message",
+   "changerating-reason": "A label message",
+   "changerating-success": "A success message",
+   "changerating-submit": "A button text",
+   "massratings": "{{doc-special}}",
+   "massratings-legend": "A legend message",
+   "log-name-ratings": "{{doc-logpage}}",
+   "log-description-ratings": "{{doc-logpage}}",
+   "logentry-ratings-change": "A description message",
+   "ratings-desc": 
"{{desc|name=ArticleRatings|url=https://www.mediawiki.org/wiki/Extension:ArticleRatings}};,
+   "are-disallowed": "An error message",
+   "are-no-such-page": "An error message",
+   "are-rating-for-page": "A label message",
+   "are-change-rating": "A link text",
+   "are-ratings": "{{ignore}}",
+   "group-reviewer": "{{doc-group|reviewer}}",
+   "group-reviewer-member": "{{doc-group|reviewer|member}}",
+   "action-change-rating": "{{doc-action|change-rating}}",
+   "changerating-log-text": "A label message",
+   "changerating-nolog-text": "A hint message for no result"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c319f7a2e2cc895657ad674164f9267329c8764
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleRatings
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...ImageRating[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386034 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Change-Id: I79e85cd898f0d21dce78b39f37062ab70e431422
---
A i18n/qqq.json
1 file changed, 31 insertions(+), 0 deletions(-)


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

diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..936ccfa
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,31 @@
+{
+   "@metadata": {},
+   "apihelp-imagerating-description": 
"{{doc-apihelp-description|imagerating}}",
+   "apihelp-imagerating-summary": "{{doc-apihelp-summary|imagerating}}",
+   "apihelp-imagerating-param-categories": 
"{{doc-apihelp-param|imagerating|categories}}",
+   "apihelp-imagerating-param-pageId": 
"{{doc-apihelp-param|imagerating|pageId}}",
+   "apihelp-imagerating-example-1": "{{doc-apihelp-example|imagerating}}",
+   "imagerating-add-button": "A button text",
+   "imagerating-add-categories-title": "A label message",
+   "imagerating-category": "A category name",
+   "imagerating-community-score": "A score message",
+   "imagerating-desc": 
"{{desc|name=ImageRating|url=https://www.mediawiki.org/wiki/Extension:ImageRating}};,
+   "imagerating-edit-summary": "An edit summary",
+   "imagerating-empty": "A hint message for no result",
+   "imagerating-featured-heading": "A header message",
+   "imagerating-popular-heading": "A page title",
+   "imagerating-popular-heading-param": "A page title",
+   "imagerating-new-heading-param": "A page title",
+   "imagerating-best-heading-param": "A page title",
+   "imagerating-new-heading": "A page title",
+   "imagerating-best-heading": "A page title",
+   "imagerating-menu-title": "A header message",
+   "imagerating-submitted-by": "A hint message",
+   "imagerating-ratetitle": "A description message",
+   "imagerating-categorytitle": "A header message",
+   "imagerating-upload-images": "A link text",
+   "imagerating-prev-link": "A navigation text",
+   "imagerating-next-link": "A navigation text",
+   "action-rateimage": "{{doc-action|rateimage}}",
+   "right-rateimage": "{{doc-right|rateimage}}"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79e85cd898f0d21dce78b39f37062ab70e431422
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ImageRating
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...CommunityHiring[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386033 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Activate banana checker

Change-Id: I574e40a5950c129826ae46d865bfbe9a968778e0
---
M Gruntfile.js
A i18n/qqq.json
M package.json
3 files changed, 39 insertions(+), 4 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 545b62a..7756e75 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,12 +1,12 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   // grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
-   /* banana: {
+   banana: {
all: 'i18n/'
-   }, */
+   },
jsonlint: {
all: [
'**/*.json',
@@ -15,6 +15,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] );
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..154ea26
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,34 @@
+{
+   "@metadata": {},
+   "communityhiring-header": "A header message",
+   "communityhiring-aboutyou": "A intro message",
+   "communityhiring-about-intro": "A info message",
+   "communityhiring-given": "A label message",
+   "communityhiring-family": "A label message",
+   "communityhiring-address": "A label message",
+   "communityhiring-address-city": "A label message",
+   "communityhiring-address-postal": "A label message",
+   "communityhiring-address-country": "A label message",
+   "communityhiring-phone": "A label message",
+   "communityhiring-email": "A label message",
+   "communityhiring-paragraphs": "A info message",
+   "communityhiring-paragraphs-intro": "A info message",
+   "communityhiring-significance": "A label message",
+   "communityhiring-excitement": "A label message",
+   "communityhiring-experiences": "A label message",
+   "communityhiring-other": "A label message",
+   "communityhiring-demonstrative": "A info message",
+   "communityhiring-involvement": "A info message",
+   "communityhiring-contributor": "A label message",
+   "communityhiring-usernames": "A label message",
+   "communityhiring-links": "A label message",
+   "communityhiring-languages": "A info message",
+   "communityhiring-languages-label": "A label message",
+   "communityhiring-links-other": "A label message",
+   "communityhiring-availability": "A info message",
+   "communityhiring-availability-intro": "A label message",
+   "communityhiring-availability-info": "A label message",
+   "communityhiring-relocation-ok": "A label message",
+   "communityhiring-research": "A label message",
+   "communityhiring-field-required": "An error message"
+}
diff --git a/package.json b/package.json
index a8c0f51..529e6ce 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
   },
   "devDependencies": {
 "grunt": "1.0.1",
+"grunt-banana-checker": "0.6.0",
 "grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I574e40a5950c129826ae46d865bfbe9a968778e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommunityHiring
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...Awesomeness[master]: Add missing qqq message documentation

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386032 )

Change subject: Add missing qqq message documentation
..

Add missing qqq message documentation

Activate banana checker

Change-Id: I8480d7ed81c174f84587ab4142642f1195a7dcc8
---
M Gruntfile.js
A i18n/qqq.json
M package.json
3 files changed, 11 insertions(+), 4 deletions(-)


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

diff --git a/Gruntfile.js b/Gruntfile.js
index 545b62a..7756e75 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,12 +1,12 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
-   // grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
-   /* banana: {
+   banana: {
all: 'i18n/'
-   }, */
+   },
jsonlint: {
all: [
'**/*.json',
@@ -15,6 +15,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint' /* 'banana' */ ] );
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..a84cff2
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,6 @@
+{
+   "@metadata": {},
+   "awesomeness": "{{name}}",
+   "awesomeness-desc": 
"{{desc|name=Awesomeness|url=https://www.mediawiki.org/wiki/Extension:Awesomeness}};,
+   "awesome": "{{notranslate}}"
+}
diff --git a/package.json b/package.json
index a8c0f51..529e6ce 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
   },
   "devDependencies": {
 "grunt": "1.0.1",
+"grunt-banana-checker": "0.6.0",
 "grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8480d7ed81c174f84587ab4142642f1195a7dcc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Awesomeness
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Remove unnecessary API call in unit test

2017-10-23 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386030 )

Change subject: Remove unnecessary API call in unit test
..

Remove unnecessary API call in unit test

We do not need to hit the API in this test. It's unnecessary and makes
the test harder to comprehend.

Instead of testing this way, simulate a promise that resolves without
pages.

(npm run test:unit should work without an internet connection)

Change-Id: Iee834114890a64c96ccf255601503a25efd884bc
---
M test/lib/api-util/api-util-test.js
1 file changed, 3 insertions(+), 18 deletions(-)


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

diff --git a/test/lib/api-util/api-util-test.js 
b/test/lib/api-util/api-util-test.js
index 33ef32b..ee2bc00 100644
--- a/test/lib/api-util/api-util-test.js
+++ b/test/lib/api-util/api-util-test.js
@@ -13,25 +13,10 @@
 
 describe('lib:apiUtil', function() {
 
-this.timeout(2); // eslint-disable-line no-invalid-this
-
 it('checkForQueryPagesInResponse should return 504 when query.pages are 
absent', () => {
-return preq.post({
-uri: 'https://commons.wikimedia.org/w/api.php',
-body: {
-action: 'query',
-format: 'json',
-formatversion: 2,
-generator: 'images',
-prop: 'imageinfo|revisions',
-iiextmetadatafilter: 'ImageDescription',
-iiextmetadatamultilang: true,
-iiprop: 'url|extmetadata|dimensions',
-iiurlwidth: 1024,
-rawcontinue: '',
-titles: `Template:Potd/1980-07-06`
-}
-}).then((response) => {
+return new Promise((resolve) => {
+  return resolve({});
+} ).then((response) => {
 assert.throws(() => {
 mwapi.checkForQueryPagesInResponse({ logger }, response);
 }, /api_error/);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee834114890a64c96ccf255601503a25efd884bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Migrate to using external jquery.badge plug-in

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385489 )

Change subject: Migrate to using external jquery.badge plug-in
..


Migrate to using external jquery.badge plug-in

The one is core is deprecated and will be removed.

Bug: T178450
Change-Id: I78543abe412d04d61a05e76702cb7681d5fad61d
---
M PageTriage.hooks.php
M extension.json
A modules/external/jquery.badge.css
A modules/external/jquery.badge.js
4 files changed, 129 insertions(+), 1 deletion(-)

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



diff --git a/PageTriage.hooks.php b/PageTriage.hooks.php
index e3fb056..733df56 100644
--- a/PageTriage.hooks.php
+++ b/PageTriage.hooks.php
@@ -594,7 +594,7 @@
'mediawiki.Title',
'ext.pageTriage.models',
'ext.pageTriage.util',
-   'jquery.badge',
+   'jquery.badge.external',
'jquery.ui.button',
'jquery.ui.draggable',
'jquery.spinner',
diff --git a/extension.json b/extension.json
index 62a292e..04f0e9c 100644
--- a/extension.json
+++ b/extension.json
@@ -146,6 +146,10 @@
"dec"
]
},
+   "jquery.badge.external": {
+   "scripts": "external/jquery.badge.js",
+   "styles": "external/jquery.badge.css"
+   },
"ext.pageTriage.init": {
"scripts": [
"ext.pageTriage.init/ext.pageTriage.init.js"
diff --git a/modules/external/jquery.badge.css 
b/modules/external/jquery.badge.css
new file mode 100644
index 000..6206f7c
--- /dev/null
+++ b/modules/external/jquery.badge.css
@@ -0,0 +1,36 @@
+.notification-badge {
+   min-width: 7px;
+   border-radius: 2px;
+   padding: 1px 4px;
+   text-align: center;
+   font-size: 12px;
+   line-height: 12px;
+   background-color: #72777d;
+   cursor: pointer;
+}
+
+.notification-badge-content {
+   font-weight: bold;
+   color: #fff;
+   vertical-align: baseline;
+}
+
+.notification-badge-inline {
+   margin-left: 3px;
+   display: inline-block;
+   vertical-align: text-top;
+}
+.notification-badge-top {
+   position: absolute;
+   top: -2px;
+   right: -3px;
+}
+.notification-badge-bottom {
+   position: absolute;
+   bottom: -2px;
+   right: -3px;
+}
+
+.notification-badge-important {
+   background-color: #d33;
+}
diff --git a/modules/external/jquery.badge.js b/modules/external/jquery.badge.js
new file mode 100644
index 000..97c3a5f
--- /dev/null
+++ b/modules/external/jquery.badge.js
@@ -0,0 +1,88 @@
+/*
+ * jQuery Badge plugin
+ * version 2.0.0
+ * https://github.com/wikimedia/jquery.badge
+ *
+ * @license MIT
+ *
+ * @author Ryan Kaldari , 2012
+ * @author Andrew Garrett , 2012
+ * @author Marius Hoch , 2012
+ */
+
+/**
+ * @class jQuery.plugin.badge
+ */
+( function ( $ ) {
+   /**
+* Put a badge on an item on the page. The badge container will be 
appended to the
+*  selected element(s).
+*
+* $element.badge( 5 );
+* $element.badge( '100+' );
+* $element.badge( 'New', 'inline' );
+* $element.badge( 0, 'top', true );
+*
+* @param {number|string} text The value to display in the badge. If 
the value is falsey
+*  (0, null, false, '', etc.), any existing badge will be removed.
+* @param {string} [position=top] The position of the badge. Options 
are:
+*  inline, top, bottom.
+* @param {boolean} [displayZero=false] True if the number zero should 
be displayed,
+*  false if the number zero should result in the badge being hidden
+* @return {jQuery}
+* @chainable
+*/
+   $.fn.badge = function ( text, position, displayZero ) {
+   var $badge = this.find( '.notification-badge' ),
+   badgeStyleClass,
+   isImportant = true,
+   displayBadge = true;
+
+   // Set the position of the badge
+   if ( position === 'inline' ||
+   position === 'top' ||
+   position === 'bottom'
+   ) {
+   badgeStyleClass = 'notification-badge-' + position;
+   } else {
+   badgeStyleClass = 'notification-badge-top';
+   }
+
+   // If we're displaying zero, ensure style to be non-important 
(grey instead of red)
+   if ( text === 0 ) {
+   isImportant = false;
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: aqs: add http-subrequest to hyperswitch's config

2017-10-23 Thread Elukey (Code Review)
Elukey has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386013 )

Change subject: aqs: add http-subrequest to hyperswitch's config
..


aqs: add http-subrequest to hyperswitch's config

Add configuration to AQS allowing for querying druid endpoint.

Change-Id: I5235821ad9c9bc868621d3552500b950ad107f3f
---
M hieradata/role/common/aqs.yaml
M modules/aqs/manifests/init.pp
M modules/aqs/templates/config.yaml.erb
M modules/profile/manifests/aqs.pp
4 files changed, 17 insertions(+), 1 deletion(-)

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



diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml
index cdbc74a..ff7e60f 100644
--- a/hieradata/role/common/aqs.yaml
+++ b/hieradata/role/common/aqs.yaml
@@ -88,8 +88,9 @@
 profile::aqs::monitoring_enabled: true
 
 # Temporary, waiting for T176223
-profile::aqs::druid_host: druid1004.eqiad.wmnet
+profile::aqs::druid_host: druid-public-broker.svc.eqiad.wmnet
 profile::aqs::druid_query_path: '/druid/v2/'
+profile::aqs::druid_uri_pattern: 
'^http\/\/druid-public-broker.svc.eqiad.wmnet:8082\/druid\/v2\/$'
 
 profile::aqs::seeds:
 - aqs1004-a.eqiad.wmnet
diff --git a/modules/aqs/manifests/init.pp b/modules/aqs/manifests/init.pp
index c050fda..0349194 100644
--- a/modules/aqs/manifests/init.pp
+++ b/modules/aqs/manifests/init.pp
@@ -58,6 +58,9 @@
 # [*druid_query_path*]
 #   druid broker query path. Default: undef
 #
+# [*druid_uri_pattern*]
+#   druid broker uri pattern for hyperswitch acceptance. Default: undef
+#
 class aqs(
 $cassandra_user= 'cassandra',
 $cassandra_password= 'cassandra',
@@ -77,6 +80,7 @@
 $druid_scheme  = 'http',
 $druid_port= 8082,
 $druid_query_path  = undef,
+$druid_uri_pattern = undef,
 ) {
 
 service::node { 'aqs':
diff --git a/modules/aqs/templates/config.yaml.erb 
b/modules/aqs/templates/config.yaml.erb
index 9ff6af7..5e7226d 100644
--- a/modules/aqs/templates/config.yaml.erb
+++ b/modules/aqs/templates/config.yaml.erb
@@ -29,6 +29,15 @@
 # Swagger spec root.
 spec: 
   title: "The Analytics RESTBase root"
+  <%- if @druid_uri_pattern -%>
+  x-sub-request-filters:
+- type: default
+  name: http
+  options:
+allow:
+  - pattern: /<%= @druid_uri_pattern %>//
+forward_headers: true
+  <%- end -%>
   paths:
 /{domain:analytics.wikimedia.org}: *aqs_project
 
diff --git a/modules/profile/manifests/aqs.pp b/modules/profile/manifests/aqs.pp
index 749560b..262034e 100644
--- a/modules/profile/manifests/aqs.pp
+++ b/modules/profile/manifests/aqs.pp
@@ -5,6 +5,7 @@
 $monitoring_enabled= 
hiera('profile::aqs::monitoring_enabled'),
 $druid_host= hiera('profile::aqs::druid_host'),
 $druid_query_path  = 
hiera('profile::aqs::druid_query_path'),
+$druid_uri_pattern = 
hiera('profile::aqs::druid_uri_pattern'),
 $cassandra_user= hiera('profile::aqs::cassandra_user'),
 $cassandra_password= 
hiera('profile::aqs::cassandra_password'),
 $cassandra_seeds   = hiera('profile::aqs::seeds'),
@@ -19,6 +20,7 @@
 cassandra_password=> $cassandra_password,
 druid_host=> $druid_host,
 druid_query_path  => $druid_query_path,
+druid_uri_pattern => $druid_uri_pattern,
 seeds => $cassandra_seeds,
 cassandra_default_consistency => $cassandra_default_consistency,
 cassandra_local_dc=> $cassandra_local_dc,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5235821ad9c9bc868621d3552500b950ad107f3f
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Joal 
Gerrit-Reviewer: Elukey 
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]: resources: Removed the deprecated 'jquery.badge' module

2017-10-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386029 )

Change subject: resources: Removed the deprecated 'jquery.badge' module
..

resources: Removed the deprecated 'jquery.badge' module

Bug: T178450
Change-Id: I4540e5959ea15323b1f54be51fbeea6ca3f35169
Depends-On: I78543abe412d04d61a05e76702cb7681d5fad61d
---
M RELEASE-NOTES-1.31
M resources/Resources.php
D resources/src/jquery/jquery.badge.css
D resources/src/jquery/jquery.badge.js
4 files changed, 1 insertion(+), 129 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/386029/1

diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index 3c22e78..e06f671 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -26,6 +26,7 @@
 * …
 
  Removed and replaced external libraries 
+* (T17845) The deprecated 'jquery.badge' module was removed.
 * …
 
 === Bug fixes in 1.31 ===
diff --git a/resources/Resources.php b/resources/Resources.php
index b4a3f2f..71b167a 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -164,12 +164,6 @@
'dependencies' => 'jquery.highlightText',
'targets' => [ 'desktop', 'mobile' ],
],
-   'jquery.badge' => [
-   'deprecated' => 'Please use Notifications instead.',
-   'scripts' => 'resources/src/jquery/jquery.badge.js',
-   'styles' => 'resources/src/jquery/jquery.badge.css',
-   'dependencies' => 'mediawiki.language',
-   ],
'jquery.byteLength' => [
'scripts' => 'resources/src/jquery/jquery.byteLength.js',
'targets' => [ 'desktop', 'mobile' ],
diff --git a/resources/src/jquery/jquery.badge.css 
b/resources/src/jquery/jquery.badge.css
deleted file mode 100644
index 1157c27..000
--- a/resources/src/jquery/jquery.badge.css
+++ /dev/null
@@ -1,35 +0,0 @@
-.mw-badge {
-   background-color: #72777d;
-   min-width: 7px;
-   border-radius: 2px;
-   padding: 1px 4px;
-   text-align: center;
-   font-size: 12px;
-   line-height: 12px;
-   cursor: pointer;
-}
-
-.mw-badge-content {
-   font-weight: bold;
-   color: #fff;
-   vertical-align: baseline;
-}
-
-.mw-badge-inline {
-   margin-left: 3px;
-   display: inline-block;
-   /* Hack for IE6 and IE7 (T49926) */
-   zoom: 1;
-   *display: inline; /* stylelint-disable-line 
declaration-block-no-duplicate-properties */
-
-}
-.mw-badge-overlay {
-   position: absolute;
-   bottom: -1px;
-   right: -3px;
-   z-index: 50;
-}
-
-.mw-badge-important {
-   background-color: #d33;
-}
diff --git a/resources/src/jquery/jquery.badge.js 
b/resources/src/jquery/jquery.badge.js
deleted file mode 100644
index 40b3baf..000
--- a/resources/src/jquery/jquery.badge.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/*!
- * jQuery Badge plugin
- *
- * @license MIT
- *
- * @author Ryan Kaldari , 2012
- * @author Andrew Garrett , 2012
- * @author Marius Hoch , 2012
- *
- * 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.
- *
- * This program is distributed WITHOUT ANY WARRANTY.
- */
-
-/**
- * @class jQuery.plugin.badge
- */
-( function ( $, mw ) {
-   /**
-* Put a badge on an item on the page. The badge container will be 
appended to the selected element(s).
-*
-* $element.badge( text );
-* $element.badge( 5 );
-* $element.badge( '100+' );
-* $element.badge( text, inline );
-* $element.badge( 'New', true );
-*
-* @param {number|string} text The value to display in the badge. If 
the value is falsey (0,
-*  null, false, '', etc.), any existing badge will be removed.
-* @param {boolean} [inline=true] True if the badge should be displayed 
inline, false
-*  if the badge should overlay the parent element.
-* @param {boolean} [displayZero=false] True if the number zero should 
be displayed,
-*  false if the number zero should result in the badge being hidden
-* @return {jQuery}
-* @chainable
-*/
-   $.fn.badge = function ( text, inline, displayZero ) {
-   var $badge = this.find( '.mw-badge' ),
-   badgeStyleClass = 'mw-badge-' + ( inline ? 'inline' : 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: resources: Deprecate the 'jquery.badge' module

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386024 )

Change subject: resources: Deprecate the 'jquery.badge' module
..


resources: Deprecate the 'jquery.badge' module

Only used in the PageTriage extension, which can provide it itself:

https://github.com/search?utf8=%E2%9C%93=%22jquery.badge%22+%40wikimedia+-repo%3Awikimedia%2Fjquery.badge+-repo%3Awikimedia%2Fmediawiki-debian=Code

Bug: T178450
Change-Id: Ibe4ff6a1f39fc554dcf4fc20cc214521d854f1ec
(cherry picked from commit dfafef8e706af54706d2de621b845085604f154d)
---
M RELEASE-NOTES-1.30
M resources/Resources.php
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index bec7b86..bcdd436 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -240,6 +240,9 @@
 * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the 
sending
   user object. Using the method without the second argument is deprecated.
 * (T67297) Browsers that don't support Unicode will have their edits rejected.
+* (T178450) The module 'jquery.badge' is deprecated and will be removed in a 
future
+  release. For notifying the user of an event, the Notifications ("Echo") 
system
+  should be used instead.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/resources/Resources.php b/resources/Resources.php
index 818112f..780eb17 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -169,6 +169,7 @@
'targets' => [ 'desktop', 'mobile' ],
],
'jquery.badge' => [
+   'deprecated' => 'Please use Notifications instead.',
'scripts' => 'resources/src/jquery/jquery.badge.js',
'styles' => 'resources/src/jquery/jquery.badge.css',
'dependencies' => 'mediawiki.language',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe4ff6a1f39fc554dcf4fc20cc214521d854f1ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Deprecate Searcher::getAndFilterExtraIndexes

2017-10-23 Thread DCausse (Code Review)
DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386027 )

Change subject: Deprecate Searcher::getAndFilterExtraIndexes
..

Deprecate Searcher::getAndFilterExtraIndexes

This method was doing 2 things and was annoying.

Change-Id: Iad962f177399f60881bf6f24403412642bee9ea7
---
M includes/InterwikiSearcher.php
M includes/Search/SearchContext.php
M includes/Searcher.php
3 files changed, 26 insertions(+), 25 deletions(-)


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

diff --git a/includes/InterwikiSearcher.php b/includes/InterwikiSearcher.php
index c1438df..66431f9 100644
--- a/includes/InterwikiSearcher.php
+++ b/includes/InterwikiSearcher.php
@@ -129,16 +129,6 @@
}
 
/**
-* We don't support extra indices when we're doing interwiki searches
-*
-* @see Searcher::getAndFilterExtraIndexes()
-* @return array
-*/
-   protected function getAndFilterExtraIndexes() {
-   return [];
-   }
-
-   /**
 * @return string The stats key used for reporting hit/miss rates of the
 *  application side query cache.
 */
diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index f5188c1..2a25c1b 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -2,6 +2,7 @@
 
 namespace CirrusSearch\Search;
 
+use CirrusSearch\OtherIndexes;
 use CirrusSearch\SearchConfig;
 use Elastica\Query\AbstractQuery;
 
@@ -902,4 +903,20 @@
return $this->resultsType;
}
 
+   /**
+* Get the list of extra indices to query.
+* Generally needed to query externilized file index.
+* Must be called only once the list of namespaces has been set.
+*
+* @return string[]
+* @see OtherIndexes::getExtraIndexesForNamespaces()
+*/
+   public function getExtraIndices() {
+   if ( $this->getLimitSearchToLocalWiki() || 
!$this->getNamespaces() ) {
+   return [];
+   }
+   return OtherIndexes::getExtraIndexesForNamespaces(
+   $this->getNamespaces()
+   );
+   }
 }
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 112e742..29a29db 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -505,8 +505,13 @@
 
$this->overrideConnectionIfNeeded();
if ( $namespaces ) {
-   $extraIndexes = $this->getAndFilterExtraIndexes();
$this->searchContext->addFilter( new 
\Elastica\Query\Terms( 'namespace', $namespaces ) );
+   $extraIndexes = $this->searchContext->getExtraIndices();
+   if ( !empty( $extraIndexes ) ) {
+   $this->searchContext->addNotFilter( new 
\Elastica\Query\Term(
+   [ 'local_sites_with_dupe' => 
$this->indexBaseName ]
+   ) );
+   }
foreach ( $extraIndexes as $extraIndex ) {
$extraIndexBoosts = $this->config->getElement( 
'CirrusSearchExtraIndexBoostTemplates', $extraIndex );
if ( isset( $extraIndexBoosts['wiki'], 
$extraIndexBoosts['boosts'] ) ) {
@@ -851,22 +856,11 @@
 * Retrieve the extra indexes for our searchable namespaces, if any
 * exist. If they do exist, also add our wiki to our notFilters so
 * we can filter out duplicates properly.
-*
-* @return string[]
+* @deprecated (NOOP: no longer called)
+* @return string[] empty array
 */
protected function getAndFilterExtraIndexes() {
-   if ( $this->searchContext->getLimitSearchToLocalWiki() ) {
-   return [];
-   }
-   $extraIndexes = OtherIndexes::getExtraIndexesForNamespaces(
-   $this->searchContext->getNamespaces()
-   );
-   if ( $extraIndexes ) {
-   $this->searchContext->addNotFilter( new 
\Elastica\Query\Term(
-   [ 'local_sites_with_dupe' => 
$this->indexBaseName ]
-   ) );
-   }
-   return $extraIndexes;
+   return [];
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad962f177399f60881bf6f24403412642bee9ea7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 

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

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Compute CirrusSearchExtraIndexBoostTemplates on the fly

2017-10-23 Thread DCausse (Code Review)
DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386028 )

Change subject: Compute CirrusSearchExtraIndexBoostTemplates on the fly
..

Compute CirrusSearchExtraIndexBoostTemplates on the fly

Change-Id: I6dc9aeddb785b66dfa2007ba740ca82aea4e61bd
---
M includes/Search/SearchContext.php
M includes/Searcher.php
2 files changed, 8 insertions(+), 23 deletions(-)


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

diff --git a/includes/Search/SearchContext.php 
b/includes/Search/SearchContext.php
index 2a25c1b..b05b8a9 100644
--- a/includes/Search/SearchContext.php
+++ b/includes/Search/SearchContext.php
@@ -46,11 +46,6 @@
private $boostTemplatesFromQuery;
 
/**
-* @var array[] set of per-wiki template boosts from extra index 
handling
-*/
-   private $extraIndexBoostTemplates = [];
-
-   /**
 * @deprecated use rescore profiles instead
 * @var bool do we need to boost links
 */
@@ -326,16 +321,15 @@
 *  within that wiki
 */
public function getExtraIndexBoostTemplates() {
-   return $this->extraIndexBoostTemplates;
-   }
+   $extraIndexBoostTemplates = [];
+   foreach ( $this->getExtraIndices() as $extraIndex ) {
+   $extraIndexBoosts = $this->config->getElement( 
'CirrusSearchExtraIndexBoostTemplates', $extraIndex );
+   if ( isset( $extraIndexBoosts['wiki'], 
$extraIndexBoosts['boosts'] ) ) {
+   
$extraIndexBoostTemplates[$extraIndexBoosts['wiki']] = 
$extraIndexBoosts['boosts'];
+   }
+   }
 
-   /**
-* @param string $wiki Index to boost templates within
-* @param float[] $extraIndexBoostTemplates Map from template name to 
weight to apply to that template
-*/
-   public function addExtraIndexBoostTemplates( $wiki, array 
$extraIndexBoostTemplates ) {
-   $this->isDirty = true;
-   $this->extraIndexBoostTemplates[$wiki] = 
$extraIndexBoostTemplates;
+   return $extraIndexBoostTemplates;
}
 
/**
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 29a29db..9292b97 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -512,15 +512,6 @@
[ 'local_sites_with_dupe' => 
$this->indexBaseName ]
) );
}
-   foreach ( $extraIndexes as $extraIndex ) {
-   $extraIndexBoosts = $this->config->getElement( 
'CirrusSearchExtraIndexBoostTemplates', $extraIndex );
-   if ( isset( $extraIndexBoosts['wiki'], 
$extraIndexBoosts['boosts'] ) ) {
-   
$this->searchContext->addExtraIndexBoostTemplates(
-   $extraIndexBoosts['wiki'],
-   $extraIndexBoosts['boosts']
-   );
-   }
-   }
}
 
$this->installBoosts();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dc9aeddb785b66dfa2007ba740ca82aea4e61bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Externalize some query building code out of the Searcher class

2017-10-23 Thread DCausse (Code Review)
DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386026 )

Change subject: Externalize some query building code out of the Searcher class
..

Externalize some query building code out of the Searcher class

Change-Id: I76f72d8f85b01d0c766c0e850fd7dddadfe14a99
---
M autoload.php
M includes/CirrusSearch.php
M includes/CompletionSuggester.php
M includes/Maintenance/AnalysisConfigBuilder.php
A includes/Query/NearMatchQueryBuilder.php
A includes/Query/PrefixSearchQueryBuilder.php
A includes/Query/QueryBuilderTraits.php
A includes/Search/SearchBuilder.php
M includes/Searcher.php
9 files changed, 195 insertions(+), 120 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index bbc06a8..094006a 100644
--- a/autoload.php
+++ b/autoload.php
@@ -127,8 +127,10 @@
'CirrusSearch\\Query\\LinksToFeature' => __DIR__ . 
'/includes/Query/LinksToFeature.php',
'CirrusSearch\\Query\\LocalFeature' => __DIR__ . 
'/includes/Query/LocalFeature.php',
'CirrusSearch\\Query\\MoreLikeFeature' => __DIR__ . 
'/includes/Query/MoreLikeFeature.php',
+   'CirrusSearch\\Query\\NearMatchQueryBuilder' => __DIR__ . 
'/includes/Query/NearMatchQueryBuilder.php',
'CirrusSearch\\Query\\PreferRecentFeature' => __DIR__ . 
'/includes/Query/PreferRecentFeature.php',
'CirrusSearch\\Query\\PrefixFeature' => __DIR__ . 
'/includes/Query/PrefixFeature.php',
+   'CirrusSearch\\Query\\PrefixSearchQueryBuilder' => __DIR__ . 
'/includes/Query/PrefixSearchQueryBuilder.php',
'CirrusSearch\\Query\\QueryHelper' => __DIR__ . 
'/includes/Query/QueryHelper.php',
'CirrusSearch\\Query\\RegexInSourceFeature' => __DIR__ . 
'/includes/Query/RegexInSourceFeature.php',
'CirrusSearch\\Query\\SimpleInSourceFeature' => __DIR__ . 
'/includes/Query/SimpleInSourceFeature.php',
@@ -203,4 +205,5 @@
'CirrusSearch\\UserTesting' => __DIR__ . '/includes/UserTesting.php',
'CirrusSearch\\Util' => __DIR__ . '/includes/Util.php',
'CirrusSearch\\Version' => __DIR__ . '/includes/Version.php',
+   'QueryBuilderTraits' => __DIR__ . 
'/includes/Query/QueryBuilderTraits.php',
 ];
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index 57d16fa..24cd5da 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -45,6 +45,13 @@
const COMPLETION_PREFIX_FALLBACK_PROFILE = 'classic';
 
/**
+* @const int Maximum title length that we'll check in prefix and 
keyword searches.
+* Since titles can be 255 bytes in length we're setting this to 255
+* characters.
+*/
+   const MAX_TITLE_SEARCH = 255;
+
+   /**
 * @var string The last prefix substituted by replacePrefixes.
 */
private $lastNamespacePrefix;
diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index 4b366a2..27317c4 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -2,6 +2,7 @@
 
 namespace CirrusSearch;
 
+use CirrusSearch;
 use Elastica\Request;
 use CirrusSearch\BuildDocument\Completion\SuggestBuilder;
 use CirrusSearch\Search\SearchContext;
@@ -140,11 +141,11 @@
 */
private function checkRequestLength( $search ) {
$requestLength = mb_strlen( $search );
-   if ( $requestLength > Searcher::MAX_TITLE_SEARCH ) {
+   if ( $requestLength > CirrusSearch::MAX_TITLE_SEARCH ) {
if ( class_exists( ApiUsageException::class ) ) {
throw ApiUsageException::newWithMessage(
null,
-   [ 'apierror-cirrus-requesttoolong', 
$requestLength, Searcher::MAX_TITLE_SEARCH ],
+   [ 'apierror-cirrus-requesttoolong', 
$requestLength, CirrusSearch::MAX_TITLE_SEARCH ],
'request_too_long',
[],
400
@@ -152,7 +153,7 @@
} else {
/** @suppress PhanDeprecatedClass */
throw new UsageException( 'Prefix search 
request was longer than the maximum allowed length.' .
-   " ($requestLength > " . 
Searcher::MAX_TITLE_SEARCH . ')', 'request_too_long', 400 );
+   " ($requestLength > " . 
CirrusSearch::MAX_TITLE_SEARCH . ')', 'request_too_long', 400 );
}
}
}
diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index a7f0654..57cab94 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Support variants in prefixSearch

2017-10-23 Thread DCausse (Code Review)
DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386025 )

Change subject: Support variants in prefixSearch
..

Support variants in prefixSearch

Change-Id: Ife0b519ef3a758924851e2351d8cfa5ef872ed5d
---
M includes/CirrusSearch.php
M includes/Searcher.php
2 files changed, 63 insertions(+), 39 deletions(-)


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

diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index 930e82a..57d16fa 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -561,34 +561,34 @@
return parent::completionSearchBackend( $search );
}
 
-   if ( !$this->completionSuggesterEnabled( $this->config ) ) {
-   // Completion suggester is not enabled, fallback to
-   // default implementation
-   return $this->prefixSearch( $search );
-   }
-
-   if ( count( $this->namespaces ) != 1 ||
-   reset( $this->namespaces ) != NS_MAIN
-   ) {
-   // for now, suggester only works for main namespace
-   return $this->prefixSearch( $search );
-   }
-
-   if ( isset( 
$this->features[SearchEngine::COMPLETION_PROFILE_TYPE] ) ) {
-   // Fallback to prefixsearch if the classic profile was 
selected.
-   if ( 
$this->features[SearchEngine::COMPLETION_PROFILE_TYPE] == 
self::COMPLETION_PREFIX_FALLBACK_PROFILE ) {
-   return $this->prefixSearch( $search );
-   }
-   }
-
// Not really useful, mostly for testing purpose
-   $variants = $this->request->getArray( 
'cirrusCompletionSuggesterVariant' );
+   $variants = $this->request->getArray( 'cirrusCompletionVariant' 
);
if ( empty( $variants ) ) {
global $wgContLang;
$variants = $wgContLang->autoConvertToAllVariants( 
$search );
} elseif ( count( $variants ) > 3 ) {
// We should not allow too many variants
$variants = array_slice( $variants, 0, 3 );
+   }
+
+   if ( !$this->completionSuggesterEnabled( $this->config ) ) {
+   // Completion suggester is not enabled, fallback to
+   // default implementation
+   return $this->prefixSearch( $search, $variants );
+   }
+
+   if ( count( $this->namespaces ) != 1 ||
+   reset( $this->namespaces ) != NS_MAIN
+   ) {
+   // for now, suggester only works for main namespace
+   return $this->prefixSearch( $search, $variants );
+   }
+
+   if ( isset( 
$this->features[SearchEngine::COMPLETION_PROFILE_TYPE] ) ) {
+   // Fallback to prefixsearch if the classic profile was 
selected.
+   if ( 
$this->features[SearchEngine::COMPLETION_PROFILE_TYPE] == 
self::COMPLETION_PREFIX_FALLBACK_PROFILE ) {
+   return $this->prefixSearch( $search, $variants 
);
+   }
}
 
return $this->getSuggestions( $search, $variants, $this->config 
);
@@ -608,9 +608,10 @@
/**
 * Older prefix search.
 * @param string $search search text
+* @param string[] $variants
 * @return SearchSuggestionSet
 */
-   protected function prefixSearch( $search ) {
+   protected function prefixSearch( $search, $variants ) {
$searcher = new Searcher( $this->connection, $this->offset, 
$this->limit, $this->config, $this->namespaces );
 
if ( $search ) {
@@ -621,7 +622,7 @@
}
 
try {
-   $status = $searcher->prefixSearch( $search );
+   $status = $searcher->prefixSearch( $search, $variants );
} catch ( ApiUsageException $e ) {
if ( defined( 'MW_API' ) ) {
throw $e;
diff --git a/includes/Searcher.php b/includes/Searcher.php
index 7c44a63..a6d883f 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -251,9 +251,10 @@
/**
 * Perform a prefix search.
 * @param string $term text by which to search
+* $param string[] $variants variants to search for
 * @return Status status containing results defined by resultsType on 
success
 */
-   public function prefixSearch( $term ) {
+   public function prefixSearch( $term, $variants = [] ) {
$this->checkTitleSearchRequestLength( $term );

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: resources: Deprecate the 'jquery.badge' module

2017-10-23 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386024 )

Change subject: resources: Deprecate the 'jquery.badge' module
..

resources: Deprecate the 'jquery.badge' module

Only used in the PageTriage extension, which can provide it itself:

https://github.com/search?utf8=%E2%9C%93=%22jquery.badge%22+%40wikimedia+-repo%3Awikimedia%2Fjquery.badge+-repo%3Awikimedia%2Fmediawiki-debian=Code

Bug: T178450
Change-Id: Ibe4ff6a1f39fc554dcf4fc20cc214521d854f1ec
(cherry picked from commit dfafef8e706af54706d2de621b845085604f154d)
---
M RELEASE-NOTES-1.30
M resources/Resources.php
2 files changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/24/386024/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index bec7b86..bcdd436 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -240,6 +240,9 @@
 * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the 
sending
   user object. Using the method without the second argument is deprecated.
 * (T67297) Browsers that don't support Unicode will have their edits rejected.
+* (T178450) The module 'jquery.badge' is deprecated and will be removed in a 
future
+  release. For notifying the user of an event, the Notifications ("Echo") 
system
+  should be used instead.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/resources/Resources.php b/resources/Resources.php
index 818112f..780eb17 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -169,6 +169,7 @@
'targets' => [ 'desktop', 'mobile' ],
],
'jquery.badge' => [
+   'deprecated' => 'Please use Notifications instead.',
'scripts' => 'resources/src/jquery/jquery.badge.js',
'styles' => 'resources/src/jquery/jquery.badge.css',
'dependencies' => 'mediawiki.language',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe4ff6a1f39fc554dcf4fc20cc214521d854f1ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resources: Deprecate the 'jquery.badge' module

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385490 )

Change subject: resources: Deprecate the 'jquery.badge' module
..


resources: Deprecate the 'jquery.badge' module

Only used in the PageTriage extension, which can provide it itself:

https://github.com/search?utf8=%E2%9C%93=%22jquery.badge%22+%40wikimedia+-repo%3Awikimedia%2Fjquery.badge+-repo%3Awikimedia%2Fmediawiki-debian=Code

Bug: T178450
Change-Id: Ibe4ff6a1f39fc554dcf4fc20cc214521d854f1ec
---
M RELEASE-NOTES-1.30
M resources/Resources.php
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index bec7b86..bcdd436 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -240,6 +240,9 @@
 * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the 
sending
   user object. Using the method without the second argument is deprecated.
 * (T67297) Browsers that don't support Unicode will have their edits rejected.
+* (T178450) The module 'jquery.badge' is deprecated and will be removed in a 
future
+  release. For notifying the user of an event, the Notifications ("Echo") 
system
+  should be used instead.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/resources/Resources.php b/resources/Resources.php
index 7afd89d..b4a3f2f 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -165,6 +165,7 @@
'targets' => [ 'desktop', 'mobile' ],
],
'jquery.badge' => [
+   'deprecated' => 'Please use Notifications instead.',
'scripts' => 'resources/src/jquery/jquery.badge.js',
'styles' => 'resources/src/jquery/jquery.badge.css',
'dependencies' => 'mediawiki.language',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe4ff6a1f39fc554dcf4fc20cc214521d854f1ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: LocalFile: Fix copy-paste error

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386011 )

Change subject: LocalFile: Fix copy-paste error
..


LocalFile: Fix copy-paste error

No idea how that got through.

Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
(cherry picked from commit 919c024f5e9d78c0c0a0ef960776e1079ef78b0c)
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index fd0f3f3..188e2ed 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2441,7 +2441,7 @@
}
 
function doDBDeletes() {
-   global $wgUpdateCompatibleMetadata;
+   global $wgCommentTableSchemaMigrationStage;
 
$dbw = $this->file->repo->getMasterDB();
list( $oldRels, $deleteCurrent ) = $this->getOldRels();
@@ -2456,7 +2456,7 @@
 
if ( $deleteCurrent ) {
$dbw->delete( 'image', [ 'img_name' => 
$this->file->getName() ], __METHOD__ );
-   if ( $wgUpdateCompatibleMetadata > MIGRATION_OLD ) {
+   if ( $wgCommentTableSchemaMigrationStage > 
MIGRATION_OLD ) {
$dbw->delete(
'image_comment_temp', [ 
'imgcomment_name' => $this->file->getName() ], __METHOD__
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from 55e468c265620429b5fc3da497700eb1c15a0bd0:

2017-10-23 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386023 )

Change subject: Merging from 55e468c265620429b5fc3da497700eb1c15a0bd0:
..


Merging from 55e468c265620429b5fc3da497700eb1c15a0bd0:

Fix Wikidata birthday detection

In JavaScript, months are numbered starting from 0, so we need to
*subtract* one from the usual month number to get the right one for the
Date constructor, not add one! (Without this fix, birthday presents are
only enabled on *December* 29th.)

Change-Id: I0fb9add7e2b90e1900c1e7bb37b7ed200c6bb304
---
M embed.html
M i18n/ast.json
M i18n/br.json
M i18n/cy.json
M i18n/lb.json
M i18n/mwl.json
M i18n/pt.json
M index.html
A js/embed.wdqs.min.76334b6dca98e7464aff.js
D js/embed.wdqs.min.e5c4ec7af004f341074c.js
A js/wdqs.min.2b3964b4e1996ea3b281.js
D js/wdqs.min.e3e7bf046b426aa8a38d.js
12 files changed, 10 insertions(+), 10 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fb9add7e2b90e1900c1e7bb37b7ed200c6bb304
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from 55e468c265620429b5fc3da497700eb1c15a0bd0:

2017-10-23 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386023 )

Change subject: Merging from 55e468c265620429b5fc3da497700eb1c15a0bd0:
..

Merging from 55e468c265620429b5fc3da497700eb1c15a0bd0:

Fix Wikidata birthday detection

In JavaScript, months are numbered starting from 0, so we need to
*subtract* one from the usual month number to get the right one for the
Date constructor, not add one! (Without this fix, birthday presents are
only enabled on *December* 29th.)

Change-Id: I0fb9add7e2b90e1900c1e7bb37b7ed200c6bb304
---
M embed.html
M i18n/ast.json
M i18n/br.json
M i18n/cy.json
M i18n/lb.json
M i18n/mwl.json
M i18n/pt.json
M index.html
A js/embed.wdqs.min.76334b6dca98e7464aff.js
D js/embed.wdqs.min.e5c4ec7af004f341074c.js
A js/wdqs.min.2b3964b4e1996ea3b281.js
D js/wdqs.min.e3e7bf046b426aa8a38d.js
12 files changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/23/386023/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fb9add7e2b90e1900c1e7bb37b7ed200c6bb304
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T96923: Remove further access to src when not in selserMode

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/381497 )

Change subject: T96923: Remove further access to src when not in selserMode
..


T96923: Remove further access to src when not in selserMode

Change-Id: I00680855219fccc7f37df6e4127f474b6cced32f
---
M lib/html2wt/separators.js
1 file changed, 8 insertions(+), 13 deletions(-)

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



diff --git a/lib/html2wt/separators.js b/lib/html2wt/separators.js
index bd85c99..e6e16b9 100644
--- a/lib/html2wt/separators.js
+++ b/lib/html2wt/separators.js
@@ -469,13 +469,11 @@
 var buildSep = function(node) {
var state = this.state;
var origNode = node;
-   var src = state.env.page.src;
var prevNode = state.sep.lastSourceNode;
var sep, dsrA, dsrB;
 
/* 
--
 * Assuming we have access to the original source, we can use it only 
if:
-* - If we are in rt-testing mode (NO edits in that scenario) OR
 * - If we are in selser mode AND
 *   . this node is not part of a subtree that has been marked 
'modified'
 * (massively edited, either in actuality or because DOMDiff is not 
smart enough).
@@ -486,12 +484,12 @@
 * may not reflect deleted content between them.
 * 
-- */
var origSepUsable = node && prevNode && node !== prevNode &&
-   src && (state.rtTestMode ||
-   (state.selserMode && !state.inModifiedContent &&
+   state.selserMode && !state.inModifiedContent &&
!DU.nextToDeletedBlockNodeInWT(state.env, prevNode, 
true) &&
!DU.nextToDeletedBlockNodeInWT(state.env, node, false) 
&&
WTSUtils.origSrcValidInEditedContext(state.env, 
prevNode) &&
-   WTSUtils.origSrcValidInEditedContext(state.env, node)));
+   WTSUtils.origSrcValidInEditedContext(state.env, node);
+
if (origSepUsable) {
if (!DU.isElt(prevNode)) {
// Check if this is the last child of a zero-width 
element, and use
@@ -509,10 +507,7 @@
// Should be fixed.

DU.getDataParsoid(prevNode.previousSibling).dsr &&
// Don't extrapolate if the string was 
potentially changed
-   // or we didn't diff (selser disabled)
-   (state.rtTestMode || // no changes in 
rt testing
-   // diffed and no change here
-   (state.selserMode && 
!DU.directChildrenChanged(node.parentNode, this.env)))
+   
!DU.directChildrenChanged(node.parentNode, this.env)
) {
var endDsr = 
DU.getDataParsoid(prevNode.previousSibling).dsr[1];
var correction;
@@ -588,19 +583,19 @@
sep = '';
} else if (dsrA[2] !== null) {
// B in A, from parent to child
-   sep = src.substring(dsrA[0] + 
dsrA[2], dsrB[0]);
+   sep = state.getOrigSrc(dsrA[0] 
+ dsrA[2], dsrB[0]);
}
} else if (dsrA[1] <= dsrB[0]) {
// B following A (siblingish)
-   sep = src.substring(dsrA[1], dsrB[0]);
+   sep = state.getOrigSrc(dsrA[1], 
dsrB[0]);
} else if (dsrB[3] !== null) {
// A in B, from child to parent
-   sep = src.substring(dsrA[1], dsrB[1] - 
dsrB[3]);
+   sep = state.getOrigSrc(dsrA[1], dsrB[1] 
- dsrB[3]);
}
} else if (dsrA[1] <= dsrB[1]) {
if (dsrB[3] !== null) {
// A in B, from child to parent
-   sep = src.substring(dsrA[1], dsrB[1] - 
dsrB[3]);
+   sep = state.getOrigSrc(dsrA[1], dsrB[1] 
- dsrB[3]);
}
} else {
this.env.log("info/html2wt", "dsr backwards: 
should not happen!");

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

[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: Remove Widgets extension as submodule from meta repo

2017-10-23 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/383755 )

Change subject: Remove Widgets extension as submodule from meta repo
..


Remove Widgets extension as submodule from meta repo

The extension is currently broken in git, and updating this repo
leaves one with a dirty clone that cannot be cleaned up. The error
is as follows:

error: Server does not allow request for unadvertised object 
35480f10e7ce9b0fdaf23d3799d7b79463919b1e
Fetched in submodule path 'smarty', but it did not contain 
35480f10e7ce9b0fdaf23d3799d7b79463919b1e. Direct fetching of that commit failed.

It has to do with the submodule in question that it makes use of.
If someone can fix the repo, this change can be reverted.

Change-Id: I1ad244f34b3eac0c6094ba77efa8c703ef7ae96c
---
M .gitmodules
D Widgets
2 files changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index c3770ae..2c37eac 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2886,10 +2886,6 @@
path = WhosOnline
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WhosOnline
branch = .
-[submodule "Widgets"]
-   path = Widgets
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Widgets
-   branch = .
 [submodule "Wigo3"]
path = Wigo3
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Wigo3
diff --git a/Widgets b/Widgets
deleted file mode 16
index fce5acc..000
--- a/Widgets
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit fce5acc6f36efc728cab098d973b7b10ba9f29ed

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ad244f34b3eac0c6094ba77efa8c703ef7ae96c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Fix case of SpecialRecentChanges class

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386020 )

Change subject: Fix case of SpecialRecentChanges class
..


Fix case of SpecialRecentChanges class

Test fails with $wgAutoloadAttemptLowercase = false

Change-Id: Ib8cd202d36d35a36e7513f81cea4a7f8346661bc
(cherry picked from commit 9b8fcb43317aa2654555d2fe1fa20933dc1d45d5)
---
M tests/phpunit/includes/specials/SpecialRecentchangesTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php 
b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
index 0af3089..0b6962d 100644
--- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
+++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -12,7 +12,7 @@
 class SpecialRecentchangesTest extends AbstractChangesListSpecialPageTestCase {
protected function getPage() {
return TestingAccessWrapper::newFromObject(
-   new SpecialRecentchanges
+   new SpecialRecentChanges
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8cd202d36d35a36e7513f81cea4a7f8346661bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
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/mediawiki-config[master]: Scap prep: Clean up everything, fix up StartProfiler symlink...

2017-10-23 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384898 )

Change subject: Scap prep: Clean up everything, fix up StartProfiler symlink 
mess
..


Scap prep: Clean up everything, fix up StartProfiler symlink mess

Basically refactor all of this to not rely on the class state nearly
so much. Fixes a ton of pylint suggestions, plus is just easier to
follow

While we're here, stop making StartProfiler.php a symlink, instead
include it like we do with LocalSettings.php

Bug: T126306
Change-Id: I88fa235104927e683a9a8a0754d10c16103431f8
---
M scap/plugins/prep.py
1 file changed, 82 insertions(+), 79 deletions(-)

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



diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index 3db4040..c87d8f0 100644
--- a/scap/plugins/prep.py
+++ b/scap/plugins/prep.py
@@ -1,3 +1,9 @@
+# -*- coding: utf-8 -*-
+"""
+scap.plugins.prep
+~
+Scap plugin for setting up a new version of MediaWiki for deployment
+"""
 import argparse
 import multiprocessing
 import os
@@ -8,33 +14,81 @@
 import scap.git as git
 import scap.utils as utils
 
+GERRIT_URL = 'https://gerrit.wikimedia.org/r/'
 
-def VersionParser(v):
+
+def version_parser(ver):
+"""Validation our version number formats"""
 try:
-return re.match("(\d+\.\d+(\.\d+-)?wmf\.?\d+|master)", v).group(0)
+return re.match("(\d+\.\d+(\.\d+-)?wmf\.?\d+|master)", ver).group(0)
 except:
 raise argparse.ArgumentTypeError(
-"Branch '%s' does not match required format" % (v,))
+"Branch '%s' does not match required format" % ver)
+
+
+def update_update_strategy(path):
+"""For all submodules, update the merge strategy"""
+with utils.cd(path):
+base_cmd = '/usr/bin/git -C %s config ' % path
+base_cmd += 'submodule.$name.update rebase'
+cmd = "/usr/bin/git submodule foreach --recursive '%s'" % base_cmd
+subprocess.call(cmd, shell=True)
+
+
+def write_settings_stub(dest, include):
+"""Write a silly little PHP file that includes another"""
+file_stub = (
+'https://gerrit.wikimedia.org/r/p/'
-dest_dir = ''
-
 """ Scap sub-command to manage checkout new MediaWiki versions """
 @cli.argument('-p', '--prefix', nargs=1, required=False,
   default='php-', metavar='PREFIX',
   help='Directory prefix to checkout version to.')
-@cli.argument('branch', metavar='BRANCH', type=VersionParser,
+@cli.argument('branch', metavar='BRANCH', type=version_parser,
   help='The name of the branch to operate on.')
 def main(self, *extra_args):
 """ Checkout next MediaWiki """
 
-self.branch = self.arguments.branch
-self.dest_dir = os.path.join(
+dest_dir = os.path.join(
 self.config['stage_dir'],
-'{}{}'.format(self.arguments.prefix, self.branch)
+'{}{}'.format(self.arguments.prefix, self.arguments.branch)
 )
 old_branch = self.active_wikiversions().keys()[0]
 copy_dir = os.path.join(
@@ -42,13 +96,13 @@
 '{}{}'.format(self.arguments.prefix, old_branch)
 )
 
-if os.path.isdir(self.dest_dir):
+if os.path.isdir(dest_dir):
 self.get_logger().info('Version already checked out')
 return 0
 
-git.fetch(self.dest_dir, self.gerrit + 'mediawiki/core', copy_dir)
+git.fetch(dest_dir, GERRIT_URL + 'mediawiki/core', copy_dir)
 
-with utils.cd(self.dest_dir):
+with utils.cd(dest_dir):
 if subprocess.call(['/usr/bin/git', 'config',
 'branch.autosetuprebase', 'always']) != 0:
 self.get_logger().warn('Unable to setup auto-rebase')
@@ -59,81 +113,30 @@
 self.get_logger().warn('Unable to setup submodule fetch jobs')
 
 checkout_version = 'master'
-if self.branch != 'master':
-checkout_version = 'wmf/%s' % self.branch
+if self.arguments.branch != 'master':
+checkout_version = 'wmf/%s' % self.arguments.branch
 
-git.checkout(self.dest_dir, checkout_version)
+git.checkout(dest_dir, checkout_version)
 
 if checkout_version == 'master':
-self.master_stuff()
+master_stuff(dest_dir)
 else:
-git.update_submodules(self.dest_dir, use_upstream=True)
-self.update_submodule_update_strategy(self.dest_dir)
+git.update_submodules(dest_dir, use_upstream=True)
+update_update_strategy(dest_dir)
 
-self.write_localsettings()
-self.create_startprofiler_symlink()
+write_settings_stub(
+os.path.join(dest_dir, 'LocalSettings.php'),
+

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add DOMUtils.hasNChildren() for quickly testing # of child n...

2017-10-23 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386021 )

Change subject: Add DOMUtils.hasNChildren() for quickly testing # of child nodes
..

Add DOMUtils.hasNChildren() for quickly testing # of child nodes

When testing whether a node has a small number of children (for example,
0, 1, or 2) we can avoid paying the O(# children) cost of potentially
creating a backing array for Node#childNodes by simply walking a
short distance down the linked list of children.

Change-Id: I16eca1e5c088a94acfb64177a9ce8545eb487401
---
M lib/html2wt/DOMHandlers.js
M lib/utils/DOMUtils.js
M lib/wt2html/pp/handlers/cleanup.js
M tests/mocha/parse.js
4 files changed, 22 insertions(+), 8 deletions(-)


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

diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index 9ac2547..f1731b7 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -1166,7 +1166,7 @@
return 
nativeExt.serialHandler.handle(node, state, wrapperUnmodified);
} else if 
(/(?:^|\s)mw:(?:Image|Video|Audio)(\/(Frame|Frameless|Thumb))?/.test(type)) {
return 
state.serializer.figureHandler(node);
-   } else if (/(?:^|\s)mw\:Entity/.test(type) && 
node.childNodes.length === 1) {
+   } else if (/(?:^|\s)mw\:Entity/.test(type) && 
DU.hasNChildren(node, 1)) {
// handle a new mw:Entity (not handled 
by selser) by
// serializing its children
if (dp.src !== undefined && contentSrc 
=== dp.srcContent) {
@@ -1183,7 +1183,7 @@
if (dp.src !== undefined) {
return emitPlaceholderSrc(node, 
state);
} else if (/(^|\s)mw:Placeholder(\s|$)/ 
&&
-   node.childNodes.length === 1 &&
+   DU.hasNChildren(node, 1) &&
DU.isText(node.firstChild) &&
// See the DisplaySpace hack in 
the urltext rule
// in the tokenizer.
@@ -1286,7 +1286,7 @@
} else {
// Trigger separator
if (state.sep.constraints && 
state.sep.constraints.min === 2 &&
-   
node.parentNode.childNodes.length === 1) {
+   
DU.hasNChildren(node.parentNode, 1)) {
// p/br pair
// Hackhack ;)
 
diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js
index dc221ce..0cfa41c 100644
--- a/lib/utils/DOMUtils.js
+++ b/lib/utils/DOMUtils.js
@@ -90,6 +90,20 @@
},
 
/**
+* Test the number of children this node has without using
+* `Node#childNodes.length`.  This walks the sibling list and so
+* takes O(`nchildren`) time -- so `nchildren` is expected to be small
+* (say: 0, 1, or 2).
+*/
+   hasNChildren: function(node, nchildren) {
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
+   if (nchildren <= 0) { return false; }
+   nchildren -= 1;
+   }
+   return true;
+   },
+
+   /**
 * Is 'node' a block node that is also visible in wikitext?
 * An example of an invisible block node is a ``-tag that
 * Parsoid generated, or a ``, `` tag.
diff --git a/lib/wt2html/pp/handlers/cleanup.js 
b/lib/wt2html/pp/handlers/cleanup.js
index d761aba..a546282 100644
--- a/lib/wt2html/pp/handlers/cleanup.js
+++ b/lib/wt2html/pp/handlers/cleanup.js
@@ -87,7 +87,7 @@
// template/extension content OR nodes with templated-attributes
!DU.hasParsoidAboutId(node) && (
(!node.hasChildNodes()) || (
-   node.childNodes.length === 1 && 
!DU.isElt(node.firstChild) &&
+   DU.hasNChildren(node, 1) && 
!DU.isElt(node.firstChild) &&
/^\s*$/.test(node.textContent)
)
)) {
diff --git a/tests/mocha/parse.js b/tests/mocha/parse.js
index de145c2..7f7f8bc 100644
--- a/tests/mocha/parse.js
+++ b/tests/mocha/parse.js
@@ -33,12 +33,12 @@
doc.outerHTML.startsWith('

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Simplify extmetadata collection

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385376 )

Change subject: Hygiene: Simplify extmetadata collection
..


Hygiene: Simplify extmetadata collection

Bug: T177430
Change-Id: I2bda0b6bf9abc5759be70163cbfe5afd7cb5466c
---
M lib/gallery.js
1 file changed, 3 insertions(+), 9 deletions(-)

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



diff --git a/lib/gallery.js b/lib/gallery.js
index 629132b..95232b3 100644
--- a/lib/gallery.js
+++ b/lib/gallery.js
@@ -11,20 +11,14 @@
 
 function getExtMetadataValues(extmetadata) {
 const ext = {};
-for (const key in extmetadata) {
-if ({}.hasOwnProperty.call(extmetadata, key)) {
-const value = extmetadata[key].value;
-if (typeof value === 'string') {
-ext[key] = value.trim();
-}
-}
-}
+Object.keys(extmetadata).forEach((key) => {
+ext[key] = extmetadata[key].value;
+});
 return ext;
 }
 
 function handleGalleryItems(item) {
 let obj;
-
 if (item.imageinfo) {
 obj = item.imageinfo[0];
 } else if (item.videoinfo) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2bda0b6bf9abc5759be70163cbfe5afd7cb5466c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove deep clone from selser parserTests

2017-10-23 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386022 )

Change subject: Remove deep clone from selser parserTests
..

Remove deep clone from selser parserTests

A deep clone of the subtree isn't necessary here, and it slows down
the selser parserTests.

Change-Id: If346c38ab8f2292ee452669b5b4d997895002b71
---
M bin/parserTests.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/bin/parserTests.js b/bin/parserTests.js
index b02ac28..01e2ac5 100755
--- a/bin/parserTests.js
+++ b/bin/parserTests.js
@@ -315,7 +315,7 @@
}
 
// Clone the array since it could be modified below
-   var nodes = Util.clone(node.childNodes);
+   var nodes = Array.from(node.childNodes);
 
for (var i = 0; i < changes.length; i++) {
var child = nodes[i];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If346c38ab8f2292ee452669b5b4d997895002b71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix: Include MIME type and thumb URL in media endpoint respo...

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385301 )

Change subject: Fix: Include MIME type and thumb URL in media endpoint responses
..


Fix: Include MIME type and thumb URL in media endpoint responses

Bug: T177430
Change-Id: I3e5e3ab92d85d63aa6fed6669cdad37cf4417c73
---
M lib/gallery.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/lib/gallery.js b/lib/gallery.js
index af5ca69..e79722f 100644
--- a/lib/gallery.js
+++ b/lib/gallery.js
@@ -62,8 +62,8 @@
 return {
 title: item.title,
 url,
-thumbUrl: obj.thumbUrl,
-mimeType: obj.mimeType,
+thumbUrl: obj.thumburl,
+mime: obj.mime,
 width: obj.width,
 height: obj.height,
 ext: getExtMetadata(obj.extmetadata)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e5e3ab92d85d63aa6fed6669cdad37cf4417c73
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Media: Return all video derivatives

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385371 )

Change subject: Media: Return all video derivatives
..


Media: Return all video derivatives

Let clients choose the one they can handle best.

Bug: T177430
Change-Id: Iae68e8554ae6415afd0445d8c6eb715a9674b495
---
M lib/gallery.js
1 file changed, 4 insertions(+), 32 deletions(-)

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



diff --git a/lib/gallery.js b/lib/gallery.js
index e79722f..629132b 100644
--- a/lib/gallery.js
+++ b/lib/gallery.js
@@ -8,32 +8,8 @@
 const MIN_IMAGE_SIZE = 64;
 const MAX_IMAGE_WIDTH = 1280;
 
-// in the case of video, look for a list of transcodings, so that we might
-// find a WebM version, which is playable in Android.
-function getTranscodedVideoUrl(objinfo) {
-let derivative;
-let derivativesArr;
-let key;
-let url;
-if (objinfo.derivatives) {
-derivativesArr = objinfo.derivatives;
-for (key in derivativesArr) {
-if ({}.hasOwnProperty.call(derivativesArr, key)) {
-derivative = derivativesArr[key];
-if (derivative.type && derivative.type.indexOf('webm') > -1) {
-// that's the one!
-url = derivative.src;
-// Note: currently picks the last one
-// TODO: in the future we could have an extra URL that 
provides a size
-// parameter for images and videos
-}
-}
-}
-}
-return url;
-}
 
-function getExtMetadata(extmetadata) {
+function getExtMetadataValues(extmetadata) {
 const ext = {};
 for (const key in extmetadata) {
 if ({}.hasOwnProperty.call(extmetadata, key)) {
@@ -48,25 +24,21 @@
 
 function handleGalleryItems(item) {
 let obj;
-let url;
 
 if (item.imageinfo) {
 obj = item.imageinfo[0];
 } else if (item.videoinfo) {
 obj = item.videoinfo[0];
-url = getTranscodedVideoUrl(obj);
-}
-if (!url) {
-url = obj.url;
 }
 return {
 title: item.title,
-url,
+url: obj.url,
 thumbUrl: obj.thumburl,
 mime: obj.mime,
 width: obj.width,
 height: obj.height,
-ext: getExtMetadata(obj.extmetadata)
+derivatives: obj.derivatives,
+ext: getExtMetadataValues(obj.extmetadata)
 };
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae68e8554ae6415afd0445d8c6eb715a9674b495
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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]: Merge branch 'master' into deployment

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386019 )

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


Merge branch 'master' into deployment

1b34555 Add .editorconfig
1c12a5b Add sqlite3 to requre-dev
be10b92 Handle additional type of failed recurrance.

Change-Id: I6de3786fe314a708617ecbb6d7da5af7ca4aee7c
---
D 
PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
D 
PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
3 files changed, 0 insertions(+), 238 deletions(-)

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



diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
deleted file mode 100644
index 845fc4e..000
--- 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "payment_cycle": "Monthly",
-  "txn_type": "recurring_payment_suspended_due_to_max_failed_payment",
-  "last_name": "Public",
-  "next_payment_date": "N/A",
-  "residence_country": "US",
-  "initial_payment_amount": "0.00",
-  "rp_invoice_id": "49006681",
-  "currency_code": "USD",
-  "time_created": "06:14:38 Aug 02, 2017 PDT",
-  "verify_sign": "AjCMMDabnuh7zx7wI4NpWflSS.lHAqA5jlFVAAuXLAx61931ulA3ylnl",
-  "period_type": " Regular",
-  "payer_status": "verified",
-  "tax": "0.00",
-  "payer_email": "j...@public.com",
-  "first_name": "John",
-  "receiver_email": "nob...@wikimedia.org",
-  "payer_id": "WK4ADPUHGWN6U",
-  "product_type": "1",
-  "shipping": "0.00",
-  "amount_per_cycle": "5.00",
-  "profile_status": "Suspended",
-  "charset": "UTF-8",
-  "notify_version": "3.8",
-  "amount": "5.00",
-  "outstanding_balance": "15.00",
-  "recurring_payment_id": "I-WCJA1MBC3CWY",
-  "product_name": "Monthly donation to the Wikimedia Foundation",
-  "ipn_track_id": "4b8cbe1a39fec"
-}
\ No newline at end of file
diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
deleted file mode 100644
index 3f5bcce..000
--- 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "subscr_id": "I-WCJA1MBC3CWY",
-  "txn_type": "subscr_failed",
-  "contribution_tracking_id": "49006681",
-  "order_id": "49006681",
-  "email": "j...@public.com",
-  "first_name": "John",
-  "last_name": "Public",
-  "country": "US",
-  "gateway": "paypal_ec",
-  "recurring": "1",
-  "gross": "5.00",
-  "currency": "USD",
-  "date": "1501679678"
-}
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index 28ecaca..000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,193 +0,0 @@
-<<< HEAD   (d056a1 Merge branch 'master' into deployment 77a7ef7 Short 
array sy)
-===
- 'donations',
-   'express_checkout.json' => 'donations',
-   'recurring_payment_profile_created.json' => 'recurring',
-   'subscr_signup.json' => 'recurring',
-   'subscr_payment.json' => 'recurring',
-   'recurring_payment.json' => 'recurring',
-   'refund.json' => 'refund',
-   'refund_ec.json' => 'refund',
-   'refund_recurring_ec.json' => 'refund',
-   'chargeback_settlement.json' => 'refund',
-   'chargeback_settlement_ec.json' => 'refund',
-   'buyer_complaint.json' => 'refund',
-   'refund_other.json' => 'refund',
-   'refund_unauthorized_spoof.json' => 'refund',
-   'refund_admin_fraud_reversal.json' => 'refund',
-   'recurring_payment_suspended_due_to_max_failed_payment.json' => 
'recurring',
-   // this should not actually get written to
-   // TODO 'new_case.json' => 'no-op',
-   ];
-
-   public function setUp() {
-   parent::setUp();
-   $this->config = Context::get()->getGlobalConfiguration();
-   $this->providerConfig = $this->setProviderConfiguration( 
'paypal' );
-   }
-
-   public function tearDown() {
-   $this->providerConfig->overrideObjectInstance( 'curl/wrapper', 
null );
-   parent::tearDown();
-   }
-
-   public function messageProvider() {
-   $messages = [];
-   foreach ( self::$message_data 

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Removed $parser->insertStripItem() hack

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386018 )

Change subject: Removed $parser->insertStripItem() hack
..


Removed $parser->insertStripItem() hack

Not necessary for MW >= 1.20.

Change-Id: Iab19b9b6e9e5ab76adaa47cb5929465acef7c47d
---
M parserfunctions/CargoCompoundQuery.php
M parserfunctions/CargoDisplayMap.php
M parserfunctions/CargoQuery.php
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/parserfunctions/CargoCompoundQuery.php 
b/parserfunctions/CargoCompoundQuery.php
index e6d12bc..e4de759 100644
--- a/parserfunctions/CargoCompoundQuery.php
+++ b/parserfunctions/CargoCompoundQuery.php
@@ -125,7 +125,7 @@
$formatter = $queryDisplayer->getFormatter( 
$parser->getOutput() );
if ( $formatter->isDeferred() ) {
$text = $formatter->queryAndDisplay( $sqlQueries, 
$displayParams, $querySpecificParams );
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
}
 
$allQueryResults = array();
@@ -188,7 +188,7 @@
// especially if there's a limit set for each query?
 
if ( $displayHTML ) {
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
} else {
return array( $text, 'noparse' => false );
}
diff --git a/parserfunctions/CargoDisplayMap.php 
b/parserfunctions/CargoDisplayMap.php
index b3fe308..bcd7d2d 100644
--- a/parserfunctions/CargoDisplayMap.php
+++ b/parserfunctions/CargoDisplayMap.php
@@ -90,7 +90,7 @@
$text = $mappingFormat->display( $valuesTable, 
$formattedValuesTable, $fieldDescriptions,
$displayParams );
 
-   return $parser->insertStripItem( $text, $parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => true );
}
 
 }
diff --git a/parserfunctions/CargoQuery.php b/parserfunctions/CargoQuery.php
index 28ecd13..82cca6a 100644
--- a/parserfunctions/CargoQuery.php
+++ b/parserfunctions/CargoQuery.php
@@ -105,14 +105,14 @@
$sqlQuery = CargoSQLQuery::newFromValues( $tablesStr, 
$fieldsStr, $whereStr, $joinOnStr,
$groupByStr, $havingStr, $orderByStr, $limitStr 
);
$text = $formatter->queryAndDisplay( array( $sqlQuery 
), $displayParams );
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
}
 
// If the query limit was set to 0, no need to run the query -
// all we need to do is show the "more results" link, then exit.
if ( $sqlQuery->mQueryLimit == 0 ) {
$text = $queryDisplayer->viewMoreResultsLink( true );
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
}
 
try {
@@ -144,7 +144,7 @@
}
 
if ( $displayHTML ) {
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
} else {
return array( $text, 'noparse' => false );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab19b9b6e9e5ab76adaa47cb5929465acef7c47d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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[REL1_30]: Fix case of SpecialRecentChanges class

2017-10-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386020 )

Change subject: Fix case of SpecialRecentChanges class
..

Fix case of SpecialRecentChanges class

Test fails with $wgAutoloadAttemptLowercase = false

Change-Id: Ib8cd202d36d35a36e7513f81cea4a7f8346661bc
(cherry picked from commit 9b8fcb43317aa2654555d2fe1fa20933dc1d45d5)
---
M tests/phpunit/includes/specials/SpecialRecentchangesTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/386020/1

diff --git a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php 
b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
index 0af3089..0b6962d 100644
--- a/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
+++ b/tests/phpunit/includes/specials/SpecialRecentchangesTest.php
@@ -12,7 +12,7 @@
 class SpecialRecentchangesTest extends AbstractChangesListSpecialPageTestCase {
protected function getPage() {
return TestingAccessWrapper::newFromObject(
-   new SpecialRecentchanges
+   new SpecialRecentChanges
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8cd202d36d35a36e7513f81cea4a7f8346661bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: More kafka tweaks

2017-10-23 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385391 )

Change subject: More kafka tweaks
..


More kafka tweaks

Configure spark kafka consuming to be able to read large messages.

Bug: T178274
Change-Id: I712e46ffc4add5b6ce86fd69aa230aa59896e40f
---
M mjolnir/kafka/client.py
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/mjolnir/kafka/client.py b/mjolnir/kafka/client.py
index 60d4a37..8fdbcaf 100644
--- a/mjolnir/kafka/client.py
+++ b/mjolnir/kafka/client.py
@@ -188,7 +188,13 @@
 offset_ranges.append(OffsetRange(mjolnir.kafka.TOPIC_RESULT, 
partition, start, end))
 assert not isinstance(brokers, basestring)
 # TODO: how can we force the kafka api_version here?
-kafka_params = {"metadata.broker.list": ','.join(brokers)}
+kafka_params = {
+'metadata.broker.list': ','.join(brokers),
+# Set high fetch size values so we don't fail because of large messages
+'max.partition.fetch.bytes': '4000',
+'fetch.message.max.bytes': '4000'
+}
+
 # If this ends up being too much data from kafka, blowing up memory in the
 # spark executors, we could chunk the offsets and union together multiple 
RDD's.
 return (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I712e46ffc4add5b6ce86fd69aa230aa59896e40f
Gerrit-PatchSet: 4
Gerrit-Project: search/MjoLniR
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-10-23 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386019 )

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

Merge branch 'master' into deployment

1b34555 Add .editorconfig
1c12a5b Add sqlite3 to requre-dev
be10b92 Handle additional type of failed recurrance.

Change-Id: I6de3786fe314a708617ecbb6d7da5af7ca4aee7c
---
D 
PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
D 
PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
3 files changed, 0 insertions(+), 238 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/19/386019/1

diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
deleted file mode 100644
index 845fc4e..000
--- 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
-  "payment_cycle": "Monthly",
-  "txn_type": "recurring_payment_suspended_due_to_max_failed_payment",
-  "last_name": "Public",
-  "next_payment_date": "N/A",
-  "residence_country": "US",
-  "initial_payment_amount": "0.00",
-  "rp_invoice_id": "49006681",
-  "currency_code": "USD",
-  "time_created": "06:14:38 Aug 02, 2017 PDT",
-  "verify_sign": "AjCMMDabnuh7zx7wI4NpWflSS.lHAqA5jlFVAAuXLAx61931ulA3ylnl",
-  "period_type": " Regular",
-  "payer_status": "verified",
-  "tax": "0.00",
-  "payer_email": "j...@public.com",
-  "first_name": "John",
-  "receiver_email": "nob...@wikimedia.org",
-  "payer_id": "WK4ADPUHGWN6U",
-  "product_type": "1",
-  "shipping": "0.00",
-  "amount_per_cycle": "5.00",
-  "profile_status": "Suspended",
-  "charset": "UTF-8",
-  "notify_version": "3.8",
-  "amount": "5.00",
-  "outstanding_balance": "15.00",
-  "recurring_payment_id": "I-WCJA1MBC3CWY",
-  "product_name": "Monthly donation to the Wikimedia Foundation",
-  "ipn_track_id": "4b8cbe1a39fec"
-}
\ No newline at end of file
diff --git 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
 
b/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
deleted file mode 100644
index 3f5bcce..000
--- 
a/PaymentProviders/PayPal/Tests/Data/recurring_payment_suspended_due_to_max_failed_payment_transformed.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "subscr_id": "I-WCJA1MBC3CWY",
-  "txn_type": "subscr_failed",
-  "contribution_tracking_id": "49006681",
-  "order_id": "49006681",
-  "email": "j...@public.com",
-  "first_name": "John",
-  "last_name": "Public",
-  "country": "US",
-  "gateway": "paypal_ec",
-  "recurring": "1",
-  "gross": "5.00",
-  "currency": "USD",
-  "date": "1501679678"
-}
diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index 28ecaca..000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,193 +0,0 @@
-<<< HEAD   (d056a1 Merge branch 'master' into deployment 77a7ef7 Short 
array sy)
-===
- 'donations',
-   'express_checkout.json' => 'donations',
-   'recurring_payment_profile_created.json' => 'recurring',
-   'subscr_signup.json' => 'recurring',
-   'subscr_payment.json' => 'recurring',
-   'recurring_payment.json' => 'recurring',
-   'refund.json' => 'refund',
-   'refund_ec.json' => 'refund',
-   'refund_recurring_ec.json' => 'refund',
-   'chargeback_settlement.json' => 'refund',
-   'chargeback_settlement_ec.json' => 'refund',
-   'buyer_complaint.json' => 'refund',
-   'refund_other.json' => 'refund',
-   'refund_unauthorized_spoof.json' => 'refund',
-   'refund_admin_fraud_reversal.json' => 'refund',
-   'recurring_payment_suspended_due_to_max_failed_payment.json' => 
'recurring',
-   // this should not actually get written to
-   // TODO 'new_case.json' => 'no-op',
-   ];
-
-   public function setUp() {
-   parent::setUp();
-   $this->config = Context::get()->getGlobalConfiguration();
-   $this->providerConfig = $this->setProviderConfiguration( 
'paypal' );
-   }
-
-   public function tearDown() {
-   $this->providerConfig->overrideObjectInstance( 'curl/wrapper', 
null );
-   parent::tearDown();
-   }
-
-   public function messageProvider() {
-   $messages = [];
-   foreach ( 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Follow-up: Hygiene: remove unnecessary View casts.

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386008 )

Change subject: Follow-up: Hygiene: remove unnecessary View casts.
..


Follow-up: Hygiene: remove unnecessary View casts.

Change-Id: Idc00e1adbdfab18b80887e9e31f0a2c36bd89efe
---
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
index 739efd5..86f1b0b 100644
--- 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
+++ 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
@@ -91,12 +91,12 @@
 webview.addOnScrollChangeListener(this);
 webview.addOnContentHeightChangedListener(this);
 
-pageLastUpdatedText = (TextView) 
bottomContentContainer.findViewById(R.id.page_last_updated_text);
-pageLicenseText = (TextView) 
bottomContentContainer.findViewById(R.id.page_license_text);
+pageLastUpdatedText = 
bottomContentContainer.findViewById(R.id.page_last_updated_text);
+pageLicenseText = 
bottomContentContainer.findViewById(R.id.page_license_text);
 readMoreContainer = 
bottomContentContainer.findViewById(R.id.read_more_container);
-readMoreList = (ConfigurableListView) 
bottomContentContainer.findViewById(R.id.read_more_list);
+readMoreList = 
bottomContentContainer.findViewById(R.id.read_more_list);
 
-TextView pageExternalLink = (TextView) 
bottomContentContainer.findViewById(R.id.page_external_link);
+TextView pageExternalLink = 
bottomContentContainer.findViewById(R.id.page_external_link);
 pageExternalLink.setPaintFlags(pageExternalLink.getPaintFlags() | 
Paint.UNDERLINE_TEXT_FLAG);
 pageExternalLink.setOnClickListener(new View.OnClickListener() {
 @Override

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc00e1adbdfab18b80887e9e31f0a2c36bd89efe
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Cooltey 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Sharvaniharan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Update media API calls to use formatversion=2

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385300 )

Change subject: Hygiene: Update media API calls to use formatversion=2
..


Hygiene: Update media API calls to use formatversion=2

This allows for easier iteration and simpler code. No functional changes
intended.

Bug: T177430
Change-Id: I06a63b23fc58ad1a15a8da356ad1d303ed30ef87
---
M lib/gallery.js
1 file changed, 31 insertions(+), 51 deletions(-)

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



diff --git a/lib/gallery.js b/lib/gallery.js
index ec6941d..af5ca69 100644
--- a/lib/gallery.js
+++ b/lib/gallery.js
@@ -1,15 +1,9 @@
-/**
- * Common DOM transformations for mobile apps.
- * We rearrange some content and remove content that is not shown/needed.
- */
-
 'use strict';
 
 const BBPromise = require('bluebird');
 const mwapi = require('./mwapi');
 const api = require('./api-util');
 
-// gallery constants:
 const MAX_ITEM_COUNT = 256;
 const MIN_IMAGE_SIZE = 64;
 const MAX_IMAGE_WIDTH = 1280;
@@ -80,13 +74,9 @@
 mwapi.checkForQueryPagesInResponse(req, response);
 
 const output = [];
-const items = response.body.query.pages;
-for (const key in items) {
-if ({}.hasOwnProperty.call(items, key)) {
-output.push(handleGalleryItems(items[key]));
-}
-}
-
+response.body.query.pages.forEach((item) => {
+output.push(handleGalleryItems(item));
+});
 return output;
 }
 
@@ -95,6 +85,7 @@
 Object.assign(params, {
 action: 'query',
 format: 'json',
+formatversion: 2,
 titles,
 continue: ''
 });
@@ -115,49 +106,37 @@
 return {};
 }
 
-// iterate over all items
-const items = response.body.query.pages;
-for (const key in items) {
-if ({}.hasOwnProperty.call(items, key)) {
-const item = items[key];
+// Reject gallery items if they're too small.
+// Also reject SVG and PNG items by default, because they're likely to be
+// logos and/or presentational images.
+const items = response.body.query.pages.filter((page) => {
+const imageInfo = page.imageinfo && Array.isArray(page.imageinfo) && 
page.imageinfo[0];
+return imageInfo
+&& imageInfo.width >= MIN_IMAGE_SIZE
+&& imageInfo.height >= MIN_IMAGE_SIZE
+&& !imageInfo.mime.includes('svg')
+&& !imageInfo.mime.includes('png');
+});
 
-if (!(item.imageinfo && Array.isArray(item.imageinfo) && 
item.imageinfo.length)) {
-continue;
-}
+items.forEach((item) => {
+delete item.ns;
+delete item.imagerepository; // we probably don't care where the repo 
is
+delete item.imageinfo[0].size;
+// TODO: instead of deleting properties we probably want to just add 
well-known
+// properties
 
-// remove the ones that are too small or are of the wrong type
-const imageinfo = item.imageinfo[0];  // TODO: why this is an 
array?
+const mime = item.imageinfo[0].mime;
+isVideo = mime.indexOf('ogg') > -1 || mime.indexOf('video') > -1;
 
-// Reject gallery items if they're too small.
-// Also reject SVG and PNG items by default, because they're 
likely to be
-// logos and/or presentational images.
-if (imageinfo.width < MIN_IMAGE_SIZE
-|| imageinfo.height < MIN_IMAGE_SIZE
-|| imageinfo.mime.indexOf('svg') > -1
-|| imageinfo.mime.indexOf('png') > -1
-) {
-delete items[key];
-} else {
-delete item.ns;
-delete item.imagerepository; // we probably don't care where 
the repo is
-delete imageinfo.size;
-// TODO: instead of deleting properties we probably want to 
just add well-known
-// properties
+// request details individually, to keep the order
+// detailsPromises.push(galleryItemsPromise(domain, item.title, 
isVideo));
 
-const mime = imageinfo.mime;
-isVideo = mime.indexOf('ogg') > -1 || mime.indexOf('video') > 
-1;
-
-// request details individually, to keep the order
-// detailsPromises.push(galleryItemsPromise(domain, 
item.title, isVideo));
-
-if (isVideo) {
-videos.push(item.title);
-} else {
-images.push(item.title);
-}
-}
+if (isVideo) {
+videos.push(item.title);
+} else {
+images.push(item.title);
 }
-}
+});
 
 // one more request for all videos
 if (videos.length > 0) {
@@ -185,6 +164,7 @@
 const query = {
 action: 'query',
 format: 'json',
+formatversion: 

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Removed $parser->insertStripItem() hack

2017-10-23 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386018 )

Change subject: Removed $parser->insertStripItem() hack
..

Removed $parser->insertStripItem() hack

Not necessary for MW >= 1.20.

Change-Id: Iab19b9b6e9e5ab76adaa47cb5929465acef7c47d
---
M parserfunctions/CargoCompoundQuery.php
M parserfunctions/CargoDisplayMap.php
M parserfunctions/CargoQuery.php
3 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/18/386018/2

diff --git a/parserfunctions/CargoCompoundQuery.php 
b/parserfunctions/CargoCompoundQuery.php
index e6d12bc..e4de759 100644
--- a/parserfunctions/CargoCompoundQuery.php
+++ b/parserfunctions/CargoCompoundQuery.php
@@ -125,7 +125,7 @@
$formatter = $queryDisplayer->getFormatter( 
$parser->getOutput() );
if ( $formatter->isDeferred() ) {
$text = $formatter->queryAndDisplay( $sqlQueries, 
$displayParams, $querySpecificParams );
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
}
 
$allQueryResults = array();
@@ -188,7 +188,7 @@
// especially if there's a limit set for each query?
 
if ( $displayHTML ) {
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
} else {
return array( $text, 'noparse' => false );
}
diff --git a/parserfunctions/CargoDisplayMap.php 
b/parserfunctions/CargoDisplayMap.php
index b3fe308..bcd7d2d 100644
--- a/parserfunctions/CargoDisplayMap.php
+++ b/parserfunctions/CargoDisplayMap.php
@@ -90,7 +90,7 @@
$text = $mappingFormat->display( $valuesTable, 
$formattedValuesTable, $fieldDescriptions,
$displayParams );
 
-   return $parser->insertStripItem( $text, $parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => true );
}
 
 }
diff --git a/parserfunctions/CargoQuery.php b/parserfunctions/CargoQuery.php
index 28ecd13..82cca6a 100644
--- a/parserfunctions/CargoQuery.php
+++ b/parserfunctions/CargoQuery.php
@@ -105,14 +105,14 @@
$sqlQuery = CargoSQLQuery::newFromValues( $tablesStr, 
$fieldsStr, $whereStr, $joinOnStr,
$groupByStr, $havingStr, $orderByStr, $limitStr 
);
$text = $formatter->queryAndDisplay( array( $sqlQuery 
), $displayParams );
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
}
 
// If the query limit was set to 0, no need to run the query -
// all we need to do is show the "more results" link, then exit.
if ( $sqlQuery->mQueryLimit == 0 ) {
$text = $queryDisplayer->viewMoreResultsLink( true );
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
}
 
try {
@@ -144,7 +144,7 @@
}
 
if ( $displayHTML ) {
-   return $parser->insertStripItem( $text, 
$parser->mStripState );
+   return array( $text, 'noparse' => true, 'isHTML' => 
true );
} else {
return array( $text, 'noparse' => false );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab19b9b6e9e5ab76adaa47cb5929465acef7c47d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix infinite recursion in standalone diff dialog

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386003 )

Change subject: Fix infinite recursion in standalone diff dialog
..


Fix infinite recursion in standalone diff dialog

Change-Id: I90fb54aad642e61cf17105a5c77d1e95cfe33b54
---
M src/ui/dialogs/ve.ui.DiffDialog.js
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/src/ui/dialogs/ve.ui.DiffDialog.js 
b/src/ui/dialogs/ve.ui.DiffDialog.js
index 4710d3d..6904d89 100644
--- a/src/ui/dialogs/ve.ui.DiffDialog.js
+++ b/src/ui/dialogs/ve.ui.DiffDialog.js
@@ -87,7 +87,9 @@
// Parent method
ve.ui.DiffDialog.parent.prototype.setDimensions.apply( this, arguments 
);
 
-   this.positionDiffElement();
+   if ( !this.positioning ) {
+   this.positionDiffElement();
+   }
 };
 
 /**
@@ -99,10 +101,12 @@
var dialog = this;
setTimeout( function () {
dialog.withoutSizeTransitions( function () {
+   dialog.positioning = true;
if ( dialog.diffElement && dialog.isVisible() ) {
dialog.diffElement.positionDescriptions();
dialog.updateSize();
}
+   dialog.positioning = false;
} );
}, OO.ui.theme.getDialogTransitionDuration() );
 };

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: Clean up i18n messages

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386017 )

Change subject: Clean up i18n messages
..

Clean up i18n messages

- Removed unused 'block' message, it also exists in core
- Moved html from message to code
- Set title for special page link. Makes translation easier

Change-Id: Idf65f2626e8b4b38e4708ad26b68dff6e2bc1cf0
---
M BanPests.php
M BlockAndNuke.body.php
M i18n/en.json
3 files changed, 10 insertions(+), 11 deletions(-)


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

diff --git a/BanPests.php b/BanPests.php
index c474510..5201967 100644
--- a/BanPests.php
+++ b/BanPests.php
@@ -139,7 +139,7 @@
);
$ret[] = $ip;
if ( $sp ) {
-   $sp->getOutput()->addHTML( 
wfMessage( "blockandnuke-banned-ip", $ip ) );
+   $sp->getOutput()->addHTML( 
wfMessage( "blockandnuke-banned-ip", $ip ) . '' );
}
}
}
@@ -218,7 +218,7 @@
$article = new Article( $title );
$ret = $article->doDelete( $reason );
if ( $ret && $sp ) {
-   $sp->getOutput()->addHTML( wfMessage( 
"blockandnuke-deleted-page", $title ) );
+   $sp->getOutput()->addHTML( wfMessage( 
"blockandnuke-deleted-page", $title ) . '' );
}
}
}
diff --git a/BlockAndNuke.body.php b/BlockAndNuke.body.php
index b49efcf..6c8c899 100644
--- a/BlockAndNuke.body.php
+++ b/BlockAndNuke.body.php
@@ -35,7 +35,7 @@
$wgOut->addHTML( $this->msg( 
'blockandnuke-banhammer' )->escaped() );
$this->getNewPages( $user );
} elseif ( count( $pages ) || count( $user_2 ) || 
count( $ips ) ) {
-   $wgOut->addHTML( $this->msg( 
'blockandnuke-banning' )->escaped() );
+   $wgOut->addHTML( $this->msg( 
'blockandnuke-banning' )->escaped() . '' );
$v = false;
$v = BanPests::blockUser( $user_2, $user_id, 
$wgUser, $spammer )
|| BanPests::deletePages( $pages, $this 
)
diff --git a/i18n/en.json b/i18n/en.json
index 21b61b6..7c82df8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -6,25 +6,24 @@
},
"action-blockandnuke": "Block and Nuke",
"blockandnuke": "Block and Nuke",
-   "block": "Mass delete",
-   "blockandnuke-confirm": "Click the BlockandNuke button to block the 
selected users and delete all their contributions.(Do not uncheck any of 
the boxes below)",
-   "blockandnuke-desc": "Gives administrators the ability to 
[[Special:BlockandNuke]] pages",
+   "blockandnuke-confirm": "Click the BlockandNuke button to block the 
selected users and delete all their contributions.\n\n(Do not uncheck any of 
the boxes below)",
+   "blockandnuke-desc": "Gives administrators the ability to 
[[Special:BlockandNuke|Block and Nuke]] pages",
"blockandnuke-nopages": "No new pages by 
[[Special:Contributions/$1|$1]] in recent changes.",
"blockandnuke-list": "The following pages were recently created by 
[[Special:Contributions/$1|$1]]; put in a comment and hit the button to delete 
them.",
"blockandnuke-defaultreason": "Mass removal of pages added by $1",
"blockandnuke-delete-file": "BlockandNuke delete spam",
"blockandnuke-delete-article": "BlockandNuke delete spam articles.",
-   "blockandnuke-tools": "List of Users who have recently contributed and 
are not found on the Whitelist: To add a user to the whitelist edit 
extensions/BlockandNuke/whitelist.txt",
+   "blockandnuke-tools": "List of Users who have recently contributed and 
are not found on the Whitelist:\n\nTo add a user to the whitelist edit 
extensions/BlockandNuke/whitelist.txt",
"blockandnuke-submit-user": "Block Users",
"blockandnuke-submit-delete": "BlockandNuke",
"blockandnuke-block": "Selected users have been blocked and their 
contributions deleted.",
"blockandnuke-message": "Users blocked by BlockandNuke.",
"blockandnuke-banhammer": "To block the selected users and delete all 
their contributions click the button below.",
"blockandnuke-nothing-to-do": "Nothing to do!",
-   "blockandnuke-banning": "Banning...",
-   "blockandnuke-deleted-page": "Deleted $1",
-   "blockandnuke-banned-ip": "Banned IP $1",
+   "blockandnuke-banning": "Banning...",
+   

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: WIP: Add tidy-font-bug high priority linteer category

2017-10-23 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386016 )

Change subject: WIP: Add tidy-font-bug high priority linteer category
..

WIP: Add tidy-font-bug high priority linteer category

Change-Id: I7510ad39172b4025a79bc6f3f26eb265587c8d8c
---
M lib/wt2html/pp/handlers/linter.js
1 file changed, 63 insertions(+), 0 deletions(-)


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

diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 87d1ba0..6de5926 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -452,6 +452,69 @@
};
env.log('lint/obsolete-tag', lintObj);
}
+
+   if (c.nodeName === 'FONT' && c.getAttribute('color')) {
+   /* --
+* Tidy migrates  into the link in these cases
+* [[Foo]]
+* [[Foo]]l (link-trail)
+* [[Foo]]
+* __NOTOC__[[Foo]]
+* [[Category:Foo]][[Foo]]
+* {{1x|[[Foo]]}}
+*
+* Tidy does not migrate  into the link in these cases
+*  [[Foo]]
+* [[Foo]] 
+* [[Foo]]L (not a link-trail)
+* [[Foo]][[Bar]]
+* [[Foo]][[Bar]]
+*
+*  is special.
+* This behavior is not seen with other formatting tags.
+*
+* Remex/parsoid won't do any of this.
+* This difference in behavior only matters when the font tag
+* specifies a link colour because the link no longer renders
+* as blue/red but in the font-specified colour.
+* -- */
+   var tidyFontBug = true;
+   var haveLink = false;
+   var n = c.firstChild;
+   while (n) {
+   if (!DU.isComment(n) &&
+   n.nodeName !== 'A' &&
+   n.nodeName !== 'FIGURE' &&
+   !(n.nodeName === 'SPAN' && 
/\bmw:Image\b/.test(n.getAttribute('typeof'))) &&
+   !DU.isBehaviorSwitch(env, n) &&
+   !DU.isSolTransparentLink(n) &&
+   !(n.nodeName === 'META' && 
Util.TPL_META_TYPE_REGEXP.test(n.getAttribute('typeof')))
+   ) {
+   tidyFontBug = false;
+   break;
+   }
+
+   if (n.nodeName === 'A' || n.nodeName === 'FIGURE') {
+   if (!haveLink) {
+   haveLink = true;
+   } else {
+   tidyFontBug = false;
+   break;
+   }
+   }
+
+   n = n.nextSibling;
+   }
+
+   if (tidyFontBug) {
+   var templateInfo = findEnclosingTemplateName(env, 
tplInfo);
+   env.log('lint/tidy-font-bug', {
+   dsr: findLintDSR(templateInfo, tplInfo, dp.dsr),
+   templateInfo: templateInfo,
+   params: { name: 'font' },
+   });
+   }
+   }
 }
 
 /*

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7510ad39172b4025a79bc6f3f26eb265587c8d8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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] operations/puppet[production]: Add tbayer to analytics-admins

2017-10-23 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386015 )

Change subject: Add tbayer to analytics-admins
..


Add tbayer to analytics-admins

Bug: T178802
Change-Id: I82a034f3638b6b284e55e7508cb125c84b1fa898
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 78722f4..51419bd 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -251,7 +251,7 @@
 description: Admin access to analytics cluster.
  This will grant shell access on all Analytics Cluster nodes, 
as well
  as the ability to sudo to certain Analytics Cluster system 
users.
-members: [joal, nuria, mforns, milimetric, fdans]
+members: [joal, nuria, mforns, milimetric, fdans, tbayer]
 privileges: ['ALL = (hdfs)  NOPASSWD: ALL',
  'ALL = (oozie) NOPASSWD: ALL',
  'ALL = (hive)  NOPASSWD: ALL']

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82a034f3638b6b284e55e7508cb125c84b1fa898
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add tbayer to analytics-admins

2017-10-23 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386015 )

Change subject: Add tbayer to analytics-admins
..

Add tbayer to analytics-admins

Bug: T178802
Change-Id: I82a034f3638b6b284e55e7508cb125c84b1fa898
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/386015/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 78722f4..51419bd 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -251,7 +251,7 @@
 description: Admin access to analytics cluster.
  This will grant shell access on all Analytics Cluster nodes, 
as well
  as the ability to sudo to certain Analytics Cluster system 
users.
-members: [joal, nuria, mforns, milimetric, fdans]
+members: [joal, nuria, mforns, milimetric, fdans, tbayer]
 privileges: ['ALL = (hdfs)  NOPASSWD: ALL',
  'ALL = (oozie) NOPASSWD: ALL',
  'ALL = (hive)  NOPASSWD: ALL']

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ZeroPortal[master]: Document why ApiBase is overridden and add isInternal member

2017-10-23 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386014 )

Change subject: Document why ApiBase is overridden and add isInternal member
..

Document why ApiBase is overridden and add isInternal member

Bug T91456

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroPortal 
refs/changes/14/386014/1

diff --git a/includes/ApiZeroPortal.php b/includes/ApiZeroPortal.php
index 83def69..0d0a09f 100644
--- a/includes/ApiZeroPortal.php
+++ b/includes/ApiZeroPortal.php
@@ -14,7 +14,11 @@
 use ZeroBanner\ApiRawJsonPrinter;
 use ZeroBanner\ZeroConfig;
 
-/** @noinspection PhpInconsistentReturnPointsInspection */
+/** @noinspection PhpInconsistentReturnPointsInspection
+ * This class extends ApiBase in order to serve Wikipedia Zero
+ * configuration management portal experiences and ease the
+ * scheduled jobs synchronizing mobile operator IP addresses.
+ */
 class ApiZeroPortal extends ApiBase {
 
/**
@@ -365,4 +369,10 @@
}
}
 
+   /**
+* @inheritDoc
+*/
+   public function isInternal() {
+   return true;
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add http-subrequest to AQS config

2017-10-23 Thread Joal (Code Review)
Joal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386013 )

Change subject: Add http-subrequest to AQS config
..

Add http-subrequest to AQS config

Add configuration to AQS allowing for querying druid endpoint.

Change-Id: I5235821ad9c9bc868621d3552500b950ad107f3f
---
M hieradata/role/common/aqs.yaml
M modules/aqs/manifests/init.pp
M modules/aqs/templates/config.yaml.erb
3 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/386013/1

diff --git a/hieradata/role/common/aqs.yaml b/hieradata/role/common/aqs.yaml
index cdbc74a..fde8364 100644
--- a/hieradata/role/common/aqs.yaml
+++ b/hieradata/role/common/aqs.yaml
@@ -90,6 +90,7 @@
 # Temporary, waiting for T176223
 profile::aqs::druid_host: druid1004.eqiad.wmnet
 profile::aqs::druid_query_path: '/druid/v2/'
+profile::aqs::druid_uri_pattern: 
'^http\/\/druid1004.eqiad.wmnet:8082\/druid\/v2\/$'
 
 profile::aqs::seeds:
 - aqs1004-a.eqiad.wmnet
diff --git a/modules/aqs/manifests/init.pp b/modules/aqs/manifests/init.pp
index c050fda..0349194 100644
--- a/modules/aqs/manifests/init.pp
+++ b/modules/aqs/manifests/init.pp
@@ -58,6 +58,9 @@
 # [*druid_query_path*]
 #   druid broker query path. Default: undef
 #
+# [*druid_uri_pattern*]
+#   druid broker uri pattern for hyperswitch acceptance. Default: undef
+#
 class aqs(
 $cassandra_user= 'cassandra',
 $cassandra_password= 'cassandra',
@@ -77,6 +80,7 @@
 $druid_scheme  = 'http',
 $druid_port= 8082,
 $druid_query_path  = undef,
+$druid_uri_pattern = undef,
 ) {
 
 service::node { 'aqs':
diff --git a/modules/aqs/templates/config.yaml.erb 
b/modules/aqs/templates/config.yaml.erb
index 9ff6af7..43e2ed6 100644
--- a/modules/aqs/templates/config.yaml.erb
+++ b/modules/aqs/templates/config.yaml.erb
@@ -29,6 +29,13 @@
 # Swagger spec root.
 spec: 
   title: "The Analytics RESTBase root"
+  x-sub-request-filters:
+- type: default
+  name: http
+  options:
+allow:
+  - pattern: /<%= @druid_uri_pattern %>//
+forward_headers: true
   paths:
 /{domain:analytics.wikimedia.org}: *aqs_project
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add missing @throws documentation to Language::factory

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385951 )

Change subject: Add missing @throws documentation to Language::factory
..


Add missing @throws documentation to Language::factory

Change-Id: Id5ff9d438864e2d39a10441c43aba4188191f623
---
M languages/Language.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/languages/Language.php b/languages/Language.php
index 435f058..8517f26 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -178,6 +178,7 @@
/**
 * Get a cached or new language object for a given language code
 * @param string $code
+* @throws MWException
 * @return Language
 */
static function factory( $code ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5ff9d438864e2d39a10441c43aba4188191f623
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Umherirrender 
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...ZeroBanner[master]: Document why ApiBase is overridden and add isInternal member

2017-10-23 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386012 )

Change subject: Document why ApiBase is overridden and add isInternal member
..

Document why ApiBase is overridden and add isInternal member

Bug T91456

Change-Id: I41c20e81238f40448e5ad6328c3a61673a3d5207
---
M includes/ApiZeroBanner.php
1 file changed, 13 insertions(+), 1 deletion(-)


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

diff --git a/includes/ApiZeroBanner.php b/includes/ApiZeroBanner.php
index 5c565e6..6e30bf0 100644
--- a/includes/ApiZeroBanner.php
+++ b/includes/ApiZeroBanner.php
@@ -7,7 +7,9 @@
 use ApiResult;
 
 /**
- * Utility class to avoid any warnings or any other additions by the API 
framework
+ * Utility class to avoid any warnings or any other additions by the
+ * API framework. This class extends ApiBase in order to shrink
+ * responses for clients.
  * Class ApiRawJsonPrinter
  * @package ZeroBanner
  */
@@ -41,6 +43,9 @@
/**
 * Override built-in handling of format parameter.
 * Only JSON is supported.
+* This class extends ApiBase in order to generate Wikipedia Zero
+* specific output, as used for example by native apps and
+* JavaScript-capable clients.
 * @return ApiFormatBase
 */
public function getCustomPrinter() {
@@ -207,4 +212,11 @@
=> 'apihelp-zeroconfig-example-2',
];
}
+
+   /**
+* @inheritDoc
+*/
+   public function isInternal() {
+   return true;
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: LocalFile: Fix copy-paste error

2017-10-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386011 )

Change subject: LocalFile: Fix copy-paste error
..

LocalFile: Fix copy-paste error

No idea how that got through.

Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
(cherry picked from commit 919c024f5e9d78c0c0a0ef960776e1079ef78b0c)
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/386011/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index fd0f3f3..188e2ed 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2441,7 +2441,7 @@
}
 
function doDBDeletes() {
-   global $wgUpdateCompatibleMetadata;
+   global $wgCommentTableSchemaMigrationStage;
 
$dbw = $this->file->repo->getMasterDB();
list( $oldRels, $deleteCurrent ) = $this->getOldRels();
@@ -2456,7 +2456,7 @@
 
if ( $deleteCurrent ) {
$dbw->delete( 'image', [ 'img_name' => 
$this->file->getName() ], __METHOD__ );
-   if ( $wgUpdateCompatibleMetadata > MIGRATION_OLD ) {
+   if ( $wgCommentTableSchemaMigrationStage > 
MIGRATION_OLD ) {
$dbw->delete(
'image_comment_temp', [ 
'imgcomment_name' => $this->file->getName() ], __METHOD__
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Anomie 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Follow-up: Hygiene: remove unnecessary View casts.

2017-10-23 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386008 )

Change subject: Follow-up: Hygiene: remove unnecessary View casts.
..

Follow-up: Hygiene: remove unnecessary View casts.

Change-Id: Idc00e1adbdfab18b80887e9e31f0a2c36bd89efe
---
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
index 739efd5..86f1b0b 100644
--- 
a/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
+++ 
b/app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
@@ -91,12 +91,12 @@
 webview.addOnScrollChangeListener(this);
 webview.addOnContentHeightChangedListener(this);
 
-pageLastUpdatedText = (TextView) 
bottomContentContainer.findViewById(R.id.page_last_updated_text);
-pageLicenseText = (TextView) 
bottomContentContainer.findViewById(R.id.page_license_text);
+pageLastUpdatedText = 
bottomContentContainer.findViewById(R.id.page_last_updated_text);
+pageLicenseText = 
bottomContentContainer.findViewById(R.id.page_license_text);
 readMoreContainer = 
bottomContentContainer.findViewById(R.id.read_more_container);
-readMoreList = (ConfigurableListView) 
bottomContentContainer.findViewById(R.id.read_more_list);
+readMoreList = 
bottomContentContainer.findViewById(R.id.read_more_list);
 
-TextView pageExternalLink = (TextView) 
bottomContentContainer.findViewById(R.id.page_external_link);
+TextView pageExternalLink = 
bottomContentContainer.findViewById(R.id.page_external_link);
 pageExternalLink.setPaintFlags(pageExternalLink.getPaintFlags() | 
Paint.UNDERLINE_TEXT_FLAG);
 pageExternalLink.setOnClickListener(new View.OnClickListener() {
 @Override

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc00e1adbdfab18b80887e9e31f0a2c36bd89efe
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Cooltey 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Remove unnecessary calls to Node#childNodes

2017-10-23 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386009 )

Change subject: Remove unnecessary calls to Node#childNodes
..

Remove unnecessary calls to Node#childNodes

These calls force us to allocate a backing array for childNodes,
deoptimizing a linked list DOM representation.  Iterate over the
children using Node#firstChild / Node#nextSibling instead, which
can be efficiently done w/o allocating a backing array.

Change-Id: Ibed52d3d82a7fc54796d7ef6f1cf771a6f48b974
---
M lib/utils/DOMUtils.js
M lib/wt2html/XMLSerializer.js
M lib/wt2html/pp/processors/computeDSR.js
M lib/wt2html/pp/processors/handlePres.js
4 files changed, 20 insertions(+), 30 deletions(-)


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

diff --git a/lib/utils/DOMUtils.js b/lib/utils/DOMUtils.js
index c9cd9fb..dc221ce 100644
--- a/lib/utils/DOMUtils.js
+++ b/lib/utils/DOMUtils.js
@@ -815,9 +815,8 @@
 * Check whether a node has any children that are elements.
 */
hasElementChild: function(node) {
-   var children = node.childNodes;
-   for (var i = 0, n = children.length; i < n; i++) {
-   if (DU.isElt(children[i])) {
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
+   if (DU.isElt(child)) {
return true;
}
}
@@ -829,9 +828,7 @@
 * Check if a node has a block-level element descendant.
 */
hasBlockElementDescendant: function(node) {
-   var children = node.childNodes;
-   for (var i = 0, n = children.length; i < n; i++) {
-   var child = children[i];
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
if (DU.isElt(child) &&
// Is a block-level node
(this.isBlockNode(child) ||
@@ -997,15 +994,14 @@
switch (node.nodeType) {
case node.ELEMENT_NODE:
var nodeName = node.nodeName.toLowerCase();
-   var children = node.childNodes;
var attrInfo = 
domAttrsToTagAttrs(node.attributes);
 
if (Util.isVoidElement(nodeName)) {
tokBuf.push(new 
pd.SelfclosingTagTk(nodeName, attrInfo.attrs, attrInfo.dataAttrs));
} else {
tokBuf.push(new pd.TagTk(nodeName, 
attrInfo.attrs, attrInfo.dataAttrs));
-   for (var i = 0, n = children.length; i 
< n; i++) {
-   tokBuf = 
this.convertDOMtoTokens(tokBuf, children[i]);
+   for (var child = node.firstChild; 
child; child = child.nextSibling) {
+   tokBuf = 
this.convertDOMtoTokens(tokBuf, child);
}
var endTag = new pd.EndTagTk(nodeName);
// Keep stx parity
@@ -1966,15 +1962,16 @@
 *See encapsulateExpansionHTML's doc. for more info about these 
options.
 */
buildDOMFragmentTokens: function(env, token, docOrHTML, addAttrsCB, 
opts) {
-   var body;
+   var body, nodes;
if (docOrHTML.constructor === String) {
body = DU.ppToDOM(docOrHTML);
} else {
body = docOrHTML.body;
}
 
-   var nodes = body.childNodes;
-   if (nodes.length === 0) {
+   if (body.hasChildNodes()) {
+   nodes = body.childNodes;
+   } else {
// RT extensions expanding to nothing.
nodes = [body.ownerDocument.createElement('link')];
}
diff --git a/lib/wt2html/XMLSerializer.js b/lib/wt2html/XMLSerializer.js
index a1b1864..2c2a993 100644
--- a/lib/wt2html/XMLSerializer.js
+++ b/lib/wt2html/XMLSerializer.js
@@ -238,9 +238,8 @@
var accum = options.captureOffsets ?
accumOffsets.bind(null, out) : function(bit) { out.str += bit; 
};
if (options.innerXML) {
-   var children = node.childNodes;
-   for (var i = 0; i < children.length; i++) {
-   serializeToString(children[i], options, accum);
+   for (var child = node.firstChild; child; child = 
child.nextSibling) {
+   serializeToString(child, options, accum);
}
} else {
serializeToString(node, 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: LocalFile: Fix copy-paste error

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386005 )

Change subject: LocalFile: Fix copy-paste error
..


LocalFile: Fix copy-paste error

No idea how that got through.

Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 410a794..a36bec3 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2463,7 +2463,7 @@
}
 
function doDBDeletes() {
-   global $wgUpdateCompatibleMetadata;
+   global $wgCommentTableSchemaMigrationStage;
 
$dbw = $this->file->repo->getMasterDB();
list( $oldRels, $deleteCurrent ) = $this->getOldRels();
@@ -2478,7 +2478,7 @@
 
if ( $deleteCurrent ) {
$dbw->delete( 'image', [ 'img_name' => 
$this->file->getName() ], __METHOD__ );
-   if ( $wgUpdateCompatibleMetadata > MIGRATION_OLD ) {
+   if ( $wgCommentTableSchemaMigrationStage > 
MIGRATION_OLD ) {
$dbw->delete(
'image_comment_temp', [ 
'imgcomment_name' => $this->file->getName() ], __METHOD__
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Only use our hacked Node#normalize if domino is old

2017-10-23 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386010 )

Change subject: Only use our hacked Node#normalize if domino is old
..

Only use our hacked Node#normalize if domino is old

We used a hacky reimplementation of Node#normalize to work around
a slow array-based DOM implementation in domino; if domino is
new enough, this will break (because Node#childNodes isn't writable).
Use the built-in Node#normalize in that case instead.

Change-Id: Ifdf176e6876bb9f8d861d21feedeea913d36841c
---
M lib/wt2html/pp/processors/normalize.js
1 file changed, 19 insertions(+), 1 deletion(-)


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

diff --git a/lib/wt2html/pp/processors/normalize.js 
b/lib/wt2html/pp/processors/normalize.js
index 22b12ac..73a03ef 100644
--- a/lib/wt2html/pp/processors/normalize.js
+++ b/lib/wt2html/pp/processors/normalize.js
@@ -1,6 +1,18 @@
 'use strict';
 
 var domino = require('domino');
+
+// Test for domino > 1.0.29, where childNodes was made a proper read-only
+// property. Not coincidentally, the workaround below for a slow implementation
+// of Node#normalize in domino became unnecessary after 1.0.29.
+var DOMINO_AFTER_1_0_29 = false;
+try {
+   domino.createDocument('test').body.childNodes = new 
domino.impl.NodeList();
+} catch (e) {
+   DOMINO_AFTER_1_0_29 = true;
+}
+
+
 var DU = require('../../../utils/DOMUtils').DOMUtils;
 
 // Like Node.normalize() but it clones the childNodes arrays in order to avoid
@@ -56,12 +68,18 @@
newChunks.push(kids.slice(chunkStart));
}
// Clone childNodes by concatenating the chunks
+   // XXX: childNodes isn't really writable in DOM; this only works
+   // for domino <= 1.0.29
parent.childNodes = new 
domino.impl.NodeList([].concat.apply([], newChunks));
}
 }
 
 function normalize(body, env) {
-   normalizeNode(body);
+   if (DOMINO_AFTER_1_0_29) {
+   body.normalize();
+   } else {
+   normalizeNode(body);
+   }
 }
 
 if (typeof module === "object") {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdf176e6876bb9f8d861d21feedeea913d36841c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki...CategoryWatch[master]: add Echo support

2017-10-23 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386007 )

Change subject: add Echo support
..

add Echo support

* Sprinkle debug statements throught to help with that.
* Add shim to work w/o WatchedItemStore from MediaWikiServices.
* Make third arg on CategoryAfterPageRemovalHook optional.
* Add title-message key that older Echo requires and silently dies without.

Change-Id: Id0df74ccef1f9c6ea51c22396977f5424cbe19ae
---
M .gitignore
D CategoryWatch.php
A assets/catwatch.svg
M extension.json
M i18n/en.json
M i18n/qqq.json
A src/CategoryWatch.php
A src/EchoEventPresentationModel.php
A src/Hook.php
9 files changed, 905 insertions(+), 464 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryWatch 
refs/changes/07/386007/1

diff --git a/.gitignore b/.gitignore
index 4a59931..d2d7c2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
 *~
 \#*\#
 .\#*
+.tramp_history
 
 # misc
 PHPTAGS.sqlite
diff --git a/CategoryWatch.php b/CategoryWatch.php
deleted file mode 100644
index aca8f23..000
--- a/CategoryWatch.php
+++ /dev/null
@@ -1,453 +0,0 @@
-https://www.mediawiki.org/Extension:CategoryWatch
- * for installation and usage details
- * See http://www.organicdesign.co.nz/Extension_talk:CategoryWatch
- * for development notes and disucssion
- *
- * @file
- * @ingroup Extensions
- * @author Aran Dunkley [http://www.organicdesign.co.nz/nad User:Nad]
- * @copyright © 2008 Aran Dunkley
- * @licence GNU General Public Licence 2.0 or later
- */
-
-class CategoryWatch {
-   // Instance
-   protected static $watcher;
-
-   /**
-* The extension function.
-* It has to be the static function in a class now.
-*/
-   public static function setupCategoryWatch() {
-   wfDebugLog( 'CategoryWatch', 'loading extension...' );
-
-   # Instantiate the CategoryWatch singleton now
-   # that the environment is prepared
-   self::$watcher = new CategoryWatch();
-   }
-
-   /**
-* Get a list of categories before article updated Since MediaWiki
-* version 1.25.x, we have to use static function for hooks.  the
-* hook has different signatures.
-* @param WikiPage $wikiPage the page
-* @param User $user who is modifying
-* @param Content $content the new article content
-* @param string $summary the article summary (comment)
-* @param bool $isMinor minor flag
-* @param bool $isWatch watch flag (not used, aka always null)
-* @param int $section section number (not used, aka always null)
-* @param int $flags see WikiPage::doEditContent documentation for 
flags' definition
-* @param Status $status Status (object)
-*/
-   public static function onPageContentSave(
-   $wikiPage, $user, $content, $summary, $isMinor,
-   $isWatch, $section, $flags, $status
-   ) {
-   global $wgCategoryWatchUseAutoCat, 
$wgCategoryWatchUseAutoCatRealName,
-   $wgCategoryWatch;
-
-   self::$watcher->before = [];
-   $dbr  = wfGetDB( DB_MASTER );
-   $cl   = $dbr->tableName( 'categorylinks' );
-   $id   = $wikiPage->getID();
-   wfDebugLog( 'CategoryWatch', "tablename = $cl" );
-   wfDebugLog( 'CategoryWatch', "page id=$id" );
-   $res  = $dbr->select(
-   $cl, 'cl_to', "cl_from = $id", __METHOD__,
-   [ 'ORDER BY' => 'cl_sortkey' ]
-   );
-   $row = $dbr->fetchRow( $res );
-   while ( $row ) {
-   self::$watcher->before[] = $row[0];
-   $row = $dbr->fetchRow( $res );
-   }
-   $dbr->freeResult( $res );
-   wfDebugLog( 'CategoryWatch', 'Categories before page saved' );
-   wfDebugLog( 'CategoryWatch', join( ', ', self::$watcher->before 
) );
-
-   # If using the automatically watched category feature, ensure
-   # that all users are watching it
-   if ( $wgCategoryWatchUseAutoCat ) {
-   $dbr = wfGetDB( DB_SLAVE );
-
-   # Find all users not watching the autocat
-   $like = str_replace(
-   ' ', '_',
-   trim( wfMessage( 'categorywatch-autocat', '' 
)->text() )
-   );
-   $utbl = $dbr->tableName( 'user' );
-   $wtbl = $dbr->tableName( 'watchlist' );
-   $sql = "SELECT user_id FROM $utbl LEFT JOIN $wtbl ON "
-. "user_id=wl_user AND wl_title LIKE '%$like%' 
"
-. "WHERE wl_user IS NULL";
-
-   # 

[MediaWiki-commits] [Gerrit] mediawiki/extensions[master]: rm UserSnoop

2017-10-23 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385834 )

Change subject: rm UserSnoop
..


rm UserSnoop

Bug:T178755
Change-Id: Ie320a4a0ec92f467c6091aa66d007a0f3390abf9
---
M .gitmodules
D UserSnoop
2 files changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index c3770ae..bb34748 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2786,10 +2786,6 @@
path = UserPageViewTracker
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/UserPageViewTracker
branch = .
-[submodule "UserSnoop"]
-   path = UserSnoop
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/UserSnoop
-   branch = .
 [submodule "UserStatus"]
path = UserStatus
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/UserStatus
diff --git a/UserSnoop b/UserSnoop
deleted file mode 16
index be3601d..000
--- a/UserSnoop
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit be3601d67e1ac12a6bf770847553f52971b31e04

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie320a4a0ec92f467c6091aa66d007a0f3390abf9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: MacFan4000 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix documentation of CodeSamples.getExamples()

2017-10-23 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386006 )

Change subject: Fix documentation of CodeSamples.getExamples()
..

Fix documentation of CodeSamples.getExamples()

Change-Id: Ide58b0d7ae9219be1ef1f97367e12f9ea0958c7a
---
M wikibase/queryService/api/CodeSamples.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/06/386006/1

diff --git a/wikibase/queryService/api/CodeSamples.js 
b/wikibase/queryService/api/CodeSamples.js
index 7aa92a6..2227820 100644
--- a/wikibase/queryService/api/CodeSamples.js
+++ b/wikibase/queryService/api/CodeSamples.js
@@ -179,7 +179,8 @@
SELF.prototype._endpoint = null;
 
/**
-* @return {jQuery.Promise} Object taking list of example queries { 
title:, query: }
+* @return {jQuery.Promise} yields a list of code examples for the 
current query
+* ({ code: string, mimetype: string })
 */
SELF.prototype.getExamples = function ( currentQuery ) {
var self = this,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide58b0d7ae9219be1ef1f97367e12f9ea0958c7a
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove unnecessary View casts.

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384160 )

Change subject: Hygiene: remove unnecessary View casts.
..


Hygiene: remove unnecessary View casts.

Change-Id: I907965ce6ad7b13b7cc53abcd5bc4dde9bb143fe
---
M app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
M app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
M app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/edit/summaries/EditSummaryFragment.java
M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/gallery/GalleryItemFragment.java
M app/src/main/java/org/wikipedia/gallery/GalleryThumbnailScrollView.java
M app/src/main/java/org/wikipedia/history/SearchActionModeCallback.java
M app/src/main/java/org/wikipedia/language/LangLinksActivity.java
M app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
M app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
M app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
M app/src/main/java/org/wikipedia/page/NoDimBottomSheetDialog.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageInfoDialog.java
M app/src/main/java/org/wikipedia/page/ReferenceDialog.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/main/java/org/wikipedia/page/shareafact/ShareHandler.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListFragment.java
M app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
M app/src/main/java/org/wikipedia/search/SearchFragment.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
M app/src/main/java/org/wikipedia/settings/AboutActivity.java
M app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
M app/src/main/java/org/wikipedia/settings/LicenseActivity.java
M app/src/main/java/org/wikipedia/util/FeedbackUtil.java
M app/src/main/java/org/wikipedia/views/TextInputDialog.java
M app/src/main/java/org/wikipedia/wiktionary/WiktionaryDialog.java
31 files changed, 93 insertions(+), 94 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java 
b/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
index 5587857..7553fb2 100644
--- a/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
+++ b/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
@@ -49,10 +49,10 @@
 this.prevTitle = prevTitle;
 
 captchaContainer = activity.findViewById(R.id.captcha_container);
-captchaImage = (SimpleDraweeView) 
activity.findViewById(R.id.captcha_image);
+captchaImage = activity.findViewById(R.id.captcha_image);
 captchaText = ((TextInputLayout) 
activity.findViewById(R.id.captcha_text)).getEditText();
 captchaProgress = activity.findViewById(R.id.captcha_image_progress);
-TextView submitButton = (TextView) 
activity.findViewById(R.id.captcha_submit_button);
+TextView submitButton = 
activity.findViewById(R.id.captcha_submit_button);
 
 if (submitButtonText != null) {
 submitButton.setText(submitButtonText);
diff --git a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java 
b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
index b300d54..a78878f 100644
--- a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
+++ b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
@@ -148,19 +148,19 @@
 supportActionBar.setTitle("");
 }
 
-sectionText = (EditText) findViewById(R.id.edit_section_text);
+sectionText = findViewById(R.id.edit_section_text);
 
 syntaxHighlighter = new SyntaxHighlighter(this, sectionText);
 
 sectionProgress = findViewById(R.id.edit_section_load_progress);
-sectionContainer = (ScrollView) 
findViewById(R.id.edit_section_container);
+sectionContainer = findViewById(R.id.edit_section_container);
 sectionContainer.setSmoothScrollingEnabled(false);
-errorView = (WikiErrorView) findViewById(R.id.view_edit_section_error);
+errorView = findViewById(R.id.view_edit_section_error);
 
 abusefilterContainer = 
findViewById(R.id.edit_section_abusefilter_container);
-abuseFilterImage = (ImageView) 
findViewById(R.id.edit_section_abusefilter_image);
-abusefilterTitle = (TextView) 
findViewById(R.id.edit_section_abusefilter_title);
-abusefilterText = (TextView) 
findViewById(R.id.edit_section_abusefilter_text);
+abuseFilterImage = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: LocalFile: Fix copy-paste error

2017-10-23 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386005 )

Change subject: LocalFile: Fix copy-paste error
..

LocalFile: Fix copy-paste error

No idea how that got through.

Change-Id: Ic7eebe624434005ff962f19eaa85cdf40e131284
---
M includes/filerepo/file/LocalFile.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/386005/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 410a794..a36bec3 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -2463,7 +2463,7 @@
}
 
function doDBDeletes() {
-   global $wgUpdateCompatibleMetadata;
+   global $wgCommentTableSchemaMigrationStage;
 
$dbw = $this->file->repo->getMasterDB();
list( $oldRels, $deleteCurrent ) = $this->getOldRels();
@@ -2478,7 +2478,7 @@
 
if ( $deleteCurrent ) {
$dbw->delete( 'image', [ 'img_name' => 
$this->file->getName() ], __METHOD__ );
-   if ( $wgUpdateCompatibleMetadata > MIGRATION_OLD ) {
+   if ( $wgCommentTableSchemaMigrationStage > 
MIGRATION_OLD ) {
$dbw->delete(
'image_comment_temp', [ 
'imgcomment_name' => $this->file->getName() ], __METHOD__
);

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...discovery-maven-tool-configs[master]: updated plugins to latest version

2017-10-23 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386002 )

Change subject: updated plugins to latest version
..


updated plugins to latest version

Change-Id: I17a93a8967dd0da137621c0a7550a35d7749c24c
---
M pom.xml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pom.xml b/pom.xml
index f884ef5..286ade1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -217,7 +217,7 @@
 
 org.sonatype.plugins
 nexus-staging-maven-plugin
-1.6.7
+1.6.8
 true
 
 ossrh

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17a93a8967dd0da137621c0a7550a35d7749c24c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discovery-maven-tool-configs
Gerrit-Branch: master
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Bearloga 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Gehel 
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...discovery-parent-pom[master]: update all dependencies and plugins to latest version

2017-10-23 Thread Gehel (Code Review)
Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386004 )

Change subject: update all dependencies and plugins to latest version
..

update all dependencies and plugins to latest version

Change-Id: Ib49e9cf1f1bf26995c4aa012426e9dff75b9c42a
---
M pom.xml
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discovery-parent-pom 
refs/changes/04/386004/1

diff --git a/pom.xml b/pom.xml
index 431fa66..9cdf30e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,13 +63,14 @@
 
 
 
-
1.4
+
1.6
+2.4.1
 1.8
 1.8
 UTF-8
 
UTF-8
 1.7.25
-3.1.0-RC5
+3.1.0-RC7
 
 
 
@@ -96,7 +97,7 @@
 
 de.thetaphi
 forbiddenapis
-2.3
+${forbiddenapis.version}
 provided
 true
 
@@ -197,7 +198,7 @@
 
 de.thetaphi
 forbiddenapis
-2.3
+${forbiddenapis.version}
 
 ${maven.compiler.target}
 false
@@ -310,7 +311,7 @@
 
 com.puppycrawl.tools
 checkstyle
-8.2
+8.3
 
 
 org.wikimedia.discovery
@@ -360,7 +361,7 @@
 
 3.3.1
 
-
+
 
 
 
@@ -542,7 +543,7 @@
 
 org.sonatype.plugins
 nexus-staging-maven-plugin
-1.6.7
+1.6.8
 true
 
 ossrh

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib49e9cf1f1bf26995c4aa012426e9dff75b9c42a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discovery-parent-pom
Gerrit-Branch: master
Gerrit-Owner: Gehel 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Fix infinite recursion in standalone diff dialog

2017-10-23 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386003 )

Change subject: Fix infinite recursion in standalone diff dialog
..

Fix infinite recursion in standalone diff dialog

Change-Id: I90fb54aad642e61cf17105a5c77d1e95cfe33b54
---
M src/ui/dialogs/ve.ui.DiffDialog.js
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/03/386003/1

diff --git a/src/ui/dialogs/ve.ui.DiffDialog.js 
b/src/ui/dialogs/ve.ui.DiffDialog.js
index 4710d3d..6904d89 100644
--- a/src/ui/dialogs/ve.ui.DiffDialog.js
+++ b/src/ui/dialogs/ve.ui.DiffDialog.js
@@ -87,7 +87,9 @@
// Parent method
ve.ui.DiffDialog.parent.prototype.setDimensions.apply( this, arguments 
);
 
-   this.positionDiffElement();
+   if ( !this.positioning ) {
+   this.positionDiffElement();
+   }
 };
 
 /**
@@ -99,10 +101,12 @@
var dialog = this;
setTimeout( function () {
dialog.withoutSizeTransitions( function () {
+   dialog.positioning = true;
if ( dialog.diffElement && dialog.isVisible() ) {
dialog.diffElement.positionDescriptions();
dialog.updateSize();
}
+   dialog.positioning = false;
} );
}, OO.ui.theme.getDialogTransitionDuration() );
 };

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...discovery-maven-tool-configs[master]: updated plugins to latest version

2017-10-23 Thread Gehel (Code Review)
Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386002 )

Change subject: updated plugins to latest version
..

updated plugins to latest version

Change-Id: I17a93a8967dd0da137621c0a7550a35d7749c24c
---
M pom.xml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discovery-maven-tool-configs
 refs/changes/02/386002/1

diff --git a/pom.xml b/pom.xml
index f884ef5..286ade1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -217,7 +217,7 @@
 
 org.sonatype.plugins
 nexus-staging-maven-plugin
-1.6.7
+1.6.8
 true
 
 ossrh

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17a93a8967dd0da137621c0a7550a35d7749c24c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/discovery-maven-tool-configs
Gerrit-Branch: master
Gerrit-Owner: Gehel 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump src/ to 1cefef12 for deploy

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/386000 )

Change subject: Bump src/ to 1cefef12 for deploy
..


Bump src/ to 1cefef12 for deploy

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

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



diff --git a/src b/src
index ddf7b29..1cefef1 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ddf7b293b882e72a8479a4e26b9ccc16ecf6f367
+Subproject commit 1cefef127c51854952f8035ec4b17238a1eda96e

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PopcornEditor[master]: Add missing qqq message documentation

2017-10-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385856 )

Change subject: Add missing qqq message documentation
..


Add missing qqq message documentation

Change-Id: I9eabd6114cc4871434c970c10fbe02318e71223e
---
A i18n/qqq.json
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/i18n/qqq.json b/i18n/qqq.json
new file mode 100644
index 000..e1268e6
--- /dev/null
+++ b/i18n/qqq.json
@@ -0,0 +1,11 @@
+{
+   "@metadata": {},
+   "popcorn-editbutton-edit": "A button text",
+   "popcorn-summary-label": "A label message",
+   "popcorn-summary-default": "An edit summary",
+   "popcorn-editor-save-close": "A button text",
+   "popcorn-editor-close": "A button text",
+   "popcorn-desc": 
"{{desc|name=PopcornEditor|url=https://www.mediawiki.org/wiki/Extension:PopcornEditor}};,
+   "popcorn-edit-tab": "A tab text",
+   "popcorn-edit-tab-tooltip": "A tooltip text"
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9eabd6114cc4871434c970c10fbe02318e71223e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PopcornEditor
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jforrester 
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...parsoid[master]: Add html5-misnesting category to tools/compare.linter.result...

2017-10-23 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386001 )

Change subject: Add html5-misnesting category to tools/compare.linter.results.js
..

Add html5-misnesting category to tools/compare.linter.results.js

Change-Id: I5240d4c603a85dcc6f847712743988b6f3a7acc3
---
M tools/compare.linter.results.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/tools/compare.linter.results.js b/tools/compare.linter.results.js
index 2a93e8a..6731cc2 100755
--- a/tools/compare.linter.results.js
+++ b/tools/compare.linter.results.js
@@ -80,6 +80,7 @@
"pwrap-bug-workaround",
"self-closed-tag",
"tidy-whitespace-bug",
+   "html5-misnesting",
 ];
 
 var argv = opts.argv;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5240d4c603a85dcc6f847712743988b6f3a7acc3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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...deploy[master]: Bump src/ to 1cefef12 for deploy

2017-10-23 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386000 )

Change subject: Bump src/ to 1cefef12 for deploy
..

Bump src/ to 1cefef12 for deploy

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


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

diff --git a/src b/src
index ddf7b29..1cefef1 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit ddf7b293b882e72a8479a4e26b9ccc16ecf6f367
+Subproject commit 1cefef127c51854952f8035ec4b17238a1eda96e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7b160b8f38c43efcf0b485b4c1cef9d3638272f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid/deploy
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: WIP: add puppet package version paramater to puppetmaster mo...

2017-10-23 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385999 )

Change subject: WIP: add puppet package version paramater to puppetmaster module
..

WIP: add puppet package version paramater to puppetmaster module

Add paramater to allow more granular selection of puppet package version

Change-Id: I18586d907153606e185cea8061ea478eccce4371
---
M hieradata/role/codfw/puppetmaster/frontend.yaml
M modules/profile/manifests/puppetmaster/frontend.pp
M modules/puppetmaster/manifests/init.pp
3 files changed, 27 insertions(+), 10 deletions(-)


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

diff --git a/hieradata/role/codfw/puppetmaster/frontend.yaml 
b/hieradata/role/codfw/puppetmaster/frontend.yaml
index e124b99..c7705b5 100644
--- a/hieradata/role/codfw/puppetmaster/frontend.yaml
+++ b/hieradata/role/codfw/puppetmaster/frontend.yaml
@@ -1 +1,2 @@
 profile::puppetmaster::common::puppetdb_host: nihal.codfw.wmnet
+profile::puppetmaster::common::puppet_package_version: 4.8.2-5~bpo8+1
diff --git a/modules/profile/manifests/puppetmaster/frontend.pp 
b/modules/profile/manifests/puppetmaster/frontend.pp
index ee86a8c..f86242d 100644
--- a/modules/profile/manifests/puppetmaster/frontend.pp
+++ b/modules/profile/manifests/puppetmaster/frontend.pp
@@ -45,15 +45,16 @@
 }
 
 class { '::puppetmaster':
-bind_address=> '*',
-server_type => 'frontend',
-is_git_master   => true,
-workers => $workers,
-config  => $::profile::puppetmaster::common::config,
-secure_private  => $secure_private,
-prevent_cherrypicks => $prevent_cherrypicks,
-allow_from  => $allow_from,
-extra_auth_rules=> $extra_auth_rules,
+bind_address   => '*',
+server_type=> 'frontend',
+is_git_master  => true,
+workers=> $workers,
+config => $::profile::puppetmaster::common::config,
+secure_private => $secure_private,
+prevent_cherrypicks=> $prevent_cherrypicks,
+allow_from => $allow_from,
+extra_auth_rules   => $extra_auth_rules,
+puppet_package_version => 
hiera('::profile::puppetmaster::common::puppet_package_version', undef),
 }
 
 # Main site to respond to
diff --git a/modules/puppetmaster/manifests/init.pp 
b/modules/puppetmaster/manifests/init.pp
index b7bdafe..1584ad9 100644
--- a/modules/puppetmaster/manifests/init.pp
+++ b/modules/puppetmaster/manifests/init.pp
@@ -33,9 +33,11 @@
 #Bool - use git hooks to prevent cherry picking on top of the git repo
 #- $git_user
 #String - name of user who should own the git repositories
-#
 #- $git_group
 #String - name of group which should own the git repositories
+#- $puppet_package_version
+#String - version of puppet packages to ensure. defaults to "present"
+
 class puppetmaster(
 $server_name='puppet',
 $bind_address='*',
@@ -58,6 +60,7 @@
 $prevent_cherrypicks=true,
 $git_user='gitpuppet',
 $git_group='gitpuppet',
+$puppet_package_version=undef,
 ){
 
 $gitdir = '/var/lib/git'
@@ -76,12 +79,24 @@
 require_package('puppetdb-terminus')
 }
 
+# If puppet_package_version paramater was supplied set
+# puppet_package_ensure accordingly. otherwise default to "present"
+if $puppet_package_version {
+$puppet_package_ensure = $puppet_package_version
+} else {
+$puppet_package_ensure = 'present'
+}
 
 package { [
 'puppetmaster',
 'puppetmaster-common',
 'vim-puppet',
 'puppet-el',
+]:
+ensure => $puppet_package_ensure,
+}
+
+package { [
 'rails',
 'ruby-json',
 'ruby-mysql',

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Fix CodeMirror height

2017-10-23 Thread Jonas Kress (WMDE) (Code Review)
Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385998 )

Change subject: Fix CodeMirror height
..

Fix CodeMirror height

Change-Id: Ib195dcf931911fd0b95937644fc2a65397fd4c2a
---
M style.less
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/98/385998/1

diff --git a/style.less b/style.less
index 7eb08f4..077d341 100644
--- a/style.less
+++ b/style.less
@@ -78,7 +78,7 @@
 
 .CodeMirror {
border: 1px solid #ccc;
-   height: auto !important;
+   height: 100%;
 }
 
 .CodeMirror-scroll {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib195dcf931911fd0b95937644fc2a65397fd4c2a
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: [WIP] Refactor deeds

2017-10-23 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385997 )

Change subject: [WIP] Refactor deeds
..

[WIP] Refactor deeds

The existing deed code was pretty hard to follow.

OwnWork & ThirdParty were mostly alright, even though some of
the code for ThirdParty was in the generic UploadWizardDeed
(and none of the other places that used UploadWizardDeed used
that)
But it got mighty complex when dealing with custom deeds,
where methods got overridden in places you wouldn't even expect.

Change-Id: I444a61586b03f3f5391394750267476a2e1830b1
---
M extension.json
M resources/controller/uw.controller.Deed.js
A resources/deed/uw.deed.Abstract.js
A resources/deed/uw.deed.Custom.js
A resources/deed/uw.deed.External.js
A resources/deed/uw.deed.OwnWork.js
A resources/deed/uw.deed.ThirdParty.js
A resources/deed/uw.deed.base.js
M resources/details/uw.DeedChooserDetailsWidget.js
M resources/mw.UploadWizard.js
D resources/mw.UploadWizardDeed.js
D resources/mw.UploadWizardDeedOwnWork.js
D resources/mw.UploadWizardDeedThirdParty.js
13 files changed, 951 insertions(+), 686 deletions(-)


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

diff --git a/extension.json b/extension.json
index 214c711..3beab2b 100644
--- a/extension.json
+++ b/extension.json
@@ -205,6 +205,10 @@
"uw.controller.Thanks",
"uw.controller.Tutorial",
"uw.controller.Upload",
+   "uw.deed.OwnWork",
+   "uw.deed.ThirdParty",
+   "uw.deed.Custom",
+   "uw.deed.External",
"uw.units",
"oojs",
"oojs-ui",
@@ -242,9 +246,6 @@
"resources/mw.QuickTitleChecker.js",
"resources/mw.FlickrChecker.js",
"resources/mw.GroupProgressBar.js",
-   "resources/mw.UploadWizardDeed.js",
-   "resources/mw.UploadWizardDeedOwnWork.js",
-   "resources/mw.UploadWizardDeedThirdParty.js",
"resources/mw.UploadWizardDeedChooser.js",
"resources/mw.UploadWizardLicenseInput.js",
"resources/mw.UploadWizard.js",
@@ -316,49 +317,9 @@
"mwe-upwiz-finished",
"mwe-upwiz-deeds-macro-prompt",
"mwe-upwiz-source-ownwork",
-   "mwe-upwiz-source-ownwork-assert-any-license",
-   "mwe-upwiz-source-ownwork-assert",
-   "mwe-upwiz-source-ownwork-assert-custom",
-   "mwe-upwiz-source-ownwork-assert-note",
-   "mwe-upwiz-source-ownwork-assert-cc-by-sa-4.0",
-   "mwe-upwiz-source-ownwork-cc-by-sa-4.0-explain",
-   "mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0",
-   "mwe-upwiz-source-ownwork-cc-by-sa-3.0-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-at",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-at-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-de",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-de-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-ee",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-ee-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-es",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-es-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-hr",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-hr-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-lu",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-lu-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-nl",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-nl-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-no",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-no-explain",
-   
"mwe-upwiz-source-ownwork-assert-cc-by-sa-3.0-pl",
-   
"mwe-upwiz-source-ownwork-cc-by-sa-3.0-pl-explain",
-   

[MediaWiki-commits] [Gerrit] integration/config[master]: Convert ci-jessie to use docker-pkg

2017-10-23 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385996 )

Change subject: Convert ci-jessie to use docker-pkg
..

Convert ci-jessie to use docker-pkg

Change-Id: Ic1cd5571de6a0f6bca841794582dc865d988f3ca
---
D dockerfiles/ci-jessie/Dockerfile
A dockerfiles/ci-jessie/Dockerfile.template
A dockerfiles/ci-jessie/changelog
A dockerfiles/ci-jessie/control
D dockerfiles/ci-stretch/Dockerfile
A dockerfiles/ci-stretch/Dockerfile.template
A dockerfiles/ci-stretch/changelog
A dockerfiles/ci-stretch/control
R dockerfiles/composer-package/Dockerfile.template
A dockerfiles/composer-package/changelog
A dockerfiles/composer-package/control
R dockerfiles/composer-test/Dockerfile.template
A dockerfiles/composer-test/changelog
A dockerfiles/composer-test/control
R dockerfiles/composer/Dockerfile.template
A dockerfiles/composer/changelog
A dockerfiles/composer/control
D dockerfiles/composer/prebuild.sh
A dockerfiles/convert.sh
D dockerfiles/npm/Dockerfile
A dockerfiles/npm/Dockerfile.template
A dockerfiles/npm/changelog
D dockerfiles/operations-puppet/Dockerfile
A dockerfiles/operations-puppet/Dockerfile.template
M dockerfiles/operations-puppet/bundle-config
A dockerfiles/operations-puppet/changelog
A dockerfiles/operations-puppet/control
D dockerfiles/operations-puppet/prebuild.sh
M dockerfiles/operations-puppet/run.sh
D dockerfiles/php/Dockerfile
A dockerfiles/php/Dockerfile.template
A dockerfiles/php/changelog
A dockerfiles/php/control
D dockerfiles/tox/Dockerfile
A dockerfiles/tox/Dockerfile.template
A dockerfiles/tox/changelog
A dockerfiles/tox/control
37 files changed, 178 insertions(+), 199 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/96/385996/1

diff --git a/dockerfiles/ci-jessie/Dockerfile b/dockerfiles/ci-jessie/Dockerfile
deleted file mode 100644
index df45cd4..000
--- a/dockerfiles/ci-jessie/Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM docker-registry.wikimedia.org/wikimedia-jessie:latest
-
-# Cache directory, honored by multiple softwares
-ENV XDG_CACHE_HOME=/cache
-
-RUN echo 'APT::Install-Recommends "false";' > 
/etc/apt/apt.conf.d/99disable-install-recommends  && \
-install --directory --mode 777 "${XDG_CACHE_HOME}" /log /src
-
-
-# Locale generation, auto generated by installing 'locales'
-RUN apt-get update && \
-echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
-DEBIAN_FRONTEND=noninteractive apt-get install --yes \
-ca-certificates \
-git \
-locales \
-&& \
-rm -rf /var/lib/apt/lists/*
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
diff --git a/dockerfiles/ci-jessie/Dockerfile.template 
b/dockerfiles/ci-jessie/Dockerfile.template
new file mode 100644
index 000..b1f30a6
--- /dev/null
+++ b/dockerfiles/ci-jessie/Dockerfile.template
@@ -0,0 +1,14 @@
+FROM {{ seed_image }}
+
+# Keep the following in sync with ci-stretch
+ARG DEBIAN_FRONTEND=noninteractive
+
+# Cache directory, honored by multiple softwares
+ENV XDG_CACHE_HOME=/cache
+
+# Locale are auto generated by installing 'locales'
+RUN install --directory --mode 777 "${XDG_CACHE_HOME}" /log /src \
+&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
+&& {{ "ca-certificates git locales" | apt_install }}
+
+ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
diff --git a/dockerfiles/ci-jessie/changelog b/dockerfiles/ci-jessie/changelog
new file mode 100644
index 000..8189bad
--- /dev/null
+++ b/dockerfiles/ci-jessie/changelog
@@ -0,0 +1,5 @@
+ci-jessie (0.3.0) wikimedia; urgency=medium
+
+  * Initial conversion to docker-pkg
+
+ -- Giuseppe Lavagetto   Thu, 19 Oct 2017 10:09:28 
+0200
diff --git a/dockerfiles/ci-jessie/control b/dockerfiles/ci-jessie/control
new file mode 100644
index 000..d119dc0
--- /dev/null
+++ b/dockerfiles/ci-jessie/control
@@ -0,0 +1,3 @@
+Package: ci-jessie
+Description: Base jessie image for CI tasksk
+Maintainer: Antoine Musso 
diff --git a/dockerfiles/ci-stretch/Dockerfile 
b/dockerfiles/ci-stretch/Dockerfile
deleted file mode 100644
index ca41a75..000
--- a/dockerfiles/ci-stretch/Dockerfile
+++ /dev/null
@@ -1,19 +0,0 @@
-FROM docker-registry.wikimedia.org/wikimedia-stretch:latest
-
-# Cache directory, honored by multiple softwares
-ENV XDG_CACHE_HOME=/cache
-
-RUN echo 'APT::Install-Recommends "false";' > 
/etc/apt/apt.conf.d/99disable-install-recommends && \
-install --directory --mode 777 "${XDG_CACHE_HOME}" /log /src
-
-# Locale generation, auto generated by installing 'locales'
-RUN apt-get update && \
-echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
-DEBIAN_FRONTEND=noninteractive apt-get install --yes \
-ca-certificates \
-git \
-locales \
-&& \
-rm -rf /var/lib/apt/lists/*
-
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
diff --git 

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Improve code samples for several languages

2017-10-23 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385995 )

Change subject: Improve code samples for several languages
..

Improve code samples for several languages

Use heredocs/nowdocs for PHP and Ruby, triple-quoted strings for Python,
and concatenate multiple string literals for Java and JavaScript.

Change-Id: I60c12c835836241b13070d82b356ec0f80289838
---
M wikibase/queryService/api/CodeSamples.js
1 file changed, 58 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/95/385995/1

diff --git a/wikibase/queryService/api/CodeSamples.js 
b/wikibase/queryService/api/CodeSamples.js
index 1267afe..ba9cee7 100644
--- a/wikibase/queryService/api/CodeSamples.js
+++ b/wikibase/queryService/api/CodeSamples.js
@@ -40,6 +40,18 @@
},
PHP: {
escape: function( query ) {
+   // try nowdoc first
+   var identifiers = [ 'SPARQL', 'QUERY', 
'EOF' ];
+   for ( var index in identifiers ) {
+   var identifier = identifiers[ 
index ];
+   if ( !( new RegExp( '^' + 
identifier + '$', 'm' ).test( query ) ) ) {
+   return "<<< '" + 
identifier + "'\n"
+   + query + '\n'
+   + identifier;
+   }
+   }
+
+   // fall back to double quoted
var escapedQuery = query
.replace( /\\/g, '' )
.replace( /"/g, '\\"' )
@@ -50,11 +62,22 @@
},
'JavaScript (jQuery)': {
escape: function( query ) {
-   var escapedQuery = query
-   .replace( /\\/g, '' )
-   .replace( /"/g, '\\"' )
-   .replace( /\n/g, '\\n' );
-   return '"' + escapedQuery + '"';
+   var code = '';
+   var lines = query.split( '\n' );
+   for ( var index in lines ) {
+   var line = lines[ index ];
+   var escapedLine = line
+   .replace( /\\/g, '' 
)
+   .replace( /"/g, '\\"' );
+   if ( index > 0 ) {
+   code += '\\n" +\n   
 ';
+   }
+   code += '"' + escapedLine;
+   }
+   if ( index > 0 ) {
+   code += '"';
+   }
+   return code;
},
mimetype: 'application/javascript'
},
@@ -70,24 +93,46 @@
},
Java: {
escape: function( query ) {
-   var escapedQuery = query
-   .replace( /\\/g, '' )
-   .replace( /"/g, '\\"' )
-   .replace( /\n/g, '\\n' );
-   return '"' + escapedQuery + '"';
+   var code = '';
+   var lines = query.split( '\n' );
+   for ( var index in lines ) {
+   var line = lines[ index ];
+   var escapedLine = line
+   .replace( /\\/g, '' 
)
+   .replace( /"/g, '\\"' );
+   if ( index > 0 ) {
+   code += '\\n" +\n   
 ';
+   }
+ 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: graphite: Use systemd::tmpfile

2017-10-23 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385994 )

Change subject: graphite: Use systemd::tmpfile
..

graphite: Use systemd::tmpfile

Change-Id: I05d07ad501d3b005f3a5f5666013e33efc77993b
---
M modules/graphite/manifests/init.pp
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/385994/1

diff --git a/modules/graphite/manifests/init.pp 
b/modules/graphite/manifests/init.pp
index 3e2f77b..37e3566 100644
--- a/modules/graphite/manifests/init.pp
+++ b/modules/graphite/manifests/init.pp
@@ -159,12 +159,8 @@
 
 # create required directory in /run at reboot, don't wait for a puppet
 # run to fix it
-file { '/usr/lib/tmpfiles.d/graphite.conf':
-ensure  => present,
-mode=> '0444',
+systemd::tmpfile { 'graphite':
 content => 'd /var/run/carbon 0755 _graphite _graphite',
-owner   => 'root',
-group   => 'root',
 }
 
 rsyslog::conf { 'graphite':

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: docker: fix pip cache permissions

2017-10-23 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385993 )

Change subject: docker: fix pip cache permissions
..

docker: fix pip cache permissions

pip creates cache materials so that it is solely accessible by the user.
We run the container as 65534:500.  To use castor, we would need to read
the cache as jenkins-deploy:500.

Fix XDG_CACHE_DIR files and directories to let group read them. Will let
castor save the container cache when running on the host.

Change-Id: I47573245c9af5372d5cc35c08b641dce9ac25afc
---
M dockerfiles/tox/example-run.sh
M dockerfiles/tox/run.sh
2 files changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/93/385993/1

diff --git a/dockerfiles/tox/example-run.sh b/dockerfiles/tox/example-run.sh
index 866d76a..d126ec7 100644
--- a/dockerfiles/tox/example-run.sh
+++ b/dockerfiles/tox/example-run.sh
@@ -1,11 +1,13 @@
 #!/bin/bash
 
 install --mode 777 --directory log
+install --mode 777 --directory cache
 docker run \
 --rm --tty \
 --env ZUUL_URL=https://gerrit.wikimedia.org/r \
 --env ZUUL_PROJECT=analytics/quarry/web \
 --env ZUUL_COMMIT=master \
 --env ZUUL_REF=master \
+--volume /"$(pwd)"/cache://cache \
 --volume /"$(pwd)"/log://log \
  wmfreleng/tox:latest
diff --git a/dockerfiles/tox/run.sh b/dockerfiles/tox/run.sh
index 9b2cfe5..85a18e8 100644
--- a/dockerfiles/tox/run.sh
+++ b/dockerfiles/tox/run.sh
@@ -10,7 +10,19 @@
 mv /src/.tox/log "${LOG_DIR}" || /bin/true
 }
 
-trap capture_logs EXIT
+fix_cache_permissions() {
+# CI runs has nobody:wikidev and the docker host would need access to
+# files. pip creates its cache with restrictive permissions.
+find "$XDG_CACHE_HOME" -type d -not -perm '/g+rx' -print0|xargs -0 
--no-run-if-empty chmod g+rx
+find "$XDG_CACHE_HOME" -type f -not -perm '/g+r' -print0|xargs -0 
--no-run-if-empty chmod g+r
+}
+
+handle_exit() {
+capture_logs
+fix_cache_permissions
+}
+
+trap handle_exit EXIT
 
 cd /src
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47573245c9af5372d5cc35c08b641dce9ac25afc
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Design tweaks in theme chooser dialog.

2017-10-23 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385992 )

Change subject: Design tweaks in theme chooser dialog.
..

Design tweaks in theme chooser dialog.

Bug: T173407
Change-Id: I402f1c18e20a3d89701082a74de0632c75c57edf
---
M app/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java
M app/src/main/java/org/wikipedia/views/DiscreteSeekBar.java
M app/src/main/res/drawable/ic_seek_bar_tick.xml
M app/src/main/res/layout/dialog_theme_chooser.xml
4 files changed, 24 insertions(+), 10 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java 
b/app/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java
index 03cda02..385d94a 100644
--- a/app/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java
+++ b/app/src/main/java/org/wikipedia/theme/ThemeChooserDialog.java
@@ -2,6 +2,7 @@
 
 import android.os.Bundle;
 import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
 import android.support.v7.widget.SwitchCompat;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -21,6 +22,7 @@
 import org.wikipedia.settings.Prefs;
 import org.wikipedia.util.DimenUtil;
 import org.wikipedia.util.FeedbackUtil;
+import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.views.DiscreteSeekBar;
 
 import butterknife.BindView;
@@ -159,6 +161,9 @@
 private void updateDimImagesSwitch() {
 dimImagesSwitch.setChecked(Prefs.shouldDimDarkModeImages());
 dimImagesSwitch.setEnabled(app.getCurrentTheme() == Theme.DARK);
+dimImagesSwitch.setTextColor(dimImagesSwitch.isEnabled()
+? ResourceUtil.getThemedColor(getContext(), 
R.attr.section_title_color)
+: ContextCompat.getColor(getContext(), R.color.black26));
 }
 
 private final class ThemeButtonListener implements View.OnClickListener {
diff --git a/app/src/main/java/org/wikipedia/views/DiscreteSeekBar.java 
b/app/src/main/java/org/wikipedia/views/DiscreteSeekBar.java
index 5101d8f..b620e01 100644
--- a/app/src/main/java/org/wikipedia/views/DiscreteSeekBar.java
+++ b/app/src/main/java/org/wikipedia/views/DiscreteSeekBar.java
@@ -6,6 +6,7 @@
 import android.graphics.Canvas;
 import android.graphics.drawable.Drawable;
 import android.support.annotation.AttrRes;
+import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.v4.content.ContextCompat;
 import android.util.AttributeSet;
@@ -62,11 +63,18 @@
 
 @Override
 protected synchronized void onDraw(Canvas canvas) {
-drawTickMarks(canvas);
-super.onDraw(canvas);
+int value = getValue();
+if (value >= 0) {
+drawTickMarks(canvas, true, false);
+super.onDraw(canvas);
+drawTickMarks(canvas, false, true);
+} else {
+super.onDraw(canvas);
+drawTickMarks(canvas, true, true);
+}
 }
 
-void drawTickMarks(Canvas canvas) {
+void drawTickMarks(@NonNull Canvas canvas, boolean drawCenter, boolean 
drawOther) {
 int max = getMax() + min;
 int value = getValue();
 if (tickDrawable != null) {
@@ -83,10 +91,10 @@
 canvas.save();
 canvas.translate((float) getPaddingLeft(), (float) (getHeight() / 2));
 for (int i = min; i <= max; ++i) {
-if (tickDrawable != null && i > value) {
+if (drawOther && tickDrawable != null && i > value) {
 tickDrawable.draw(canvas);
 }
-if (i == 0 && centerDrawable != null) {
+if (drawCenter && i == 0 && centerDrawable != null) {
 centerDrawable.draw(canvas);
 }
 canvas.translate(tickSpacing, 0.0f);
diff --git a/app/src/main/res/drawable/ic_seek_bar_tick.xml 
b/app/src/main/res/drawable/ic_seek_bar_tick.xml
index 4ddc38d..5483148 100644
--- a/app/src/main/res/drawable/ic_seek_bar_tick.xml
+++ b/app/src/main/res/drawable/ic_seek_bar_tick.xml
@@ -6,5 +6,5 @@
 
+android:fillColor="?attr/chart_shade1"/>
 
diff --git a/app/src/main/res/layout/dialog_theme_chooser.xml 
b/app/src/main/res/layout/dialog_theme_chooser.xml
index f08bc8d..e3d0ec6 100644
--- a/app/src/main/res/layout/dialog_theme_chooser.xml
+++ b/app/src/main/res/layout/dialog_theme_chooser.xml
@@ -26,8 +26,8 @@
 
 
@@ -36,7 +36,6 @@
 android:id="@+id/text_size_percent"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
-android:layout_marginTop="12dp"
 android:gravity="center"
 android:textSize="16sp"
 android:textColor="?attr/secondary_text_color"
@@ -45,7 +44,7 @@
 
+android:layout_marginTop="4dp">
 
 
 

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki...AdvancedSearch[master]: ArbitraryWordInput: Add tests

2017-10-23 Thread Pablo Grass (WMDE) (Code Review)
Pablo Grass (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385991 )

Change subject: ArbitraryWordInput: Add tests
..

ArbitraryWordInput: Add tests

Add first tests for ArbitraryWordInput.

Issue: T173563

Change-Id: I10737b380e2d6fe6c9c640cb76bc84e5c223725d
---
M AdvancedSearch.hooks.php
A tests/qunit/ui/ArbitraryWordInput.test.js
2 files changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AdvancedSearch 
refs/changes/91/385991/1

diff --git a/AdvancedSearch.hooks.php b/AdvancedSearch.hooks.php
index eb2146d..016893c 100644
--- a/AdvancedSearch.hooks.php
+++ b/AdvancedSearch.hooks.php
@@ -83,6 +83,7 @@
public static function onResourceLoaderTestModules( array 
&$testModules, ResourceLoader $rl ) {
$testModules['qunit']['ext.advancedSearch.tests'] = [
'scripts' => [
+   'tests/qunit/ui/ArbitraryWordInput.test.js',
'tests/qunit/ui/NamespaceFilters.test.js',
'tests/qunit/ui/NamespacePresets.test.js',
'tests/qunit/ui/SearchPreview.test.js',
@@ -91,6 +92,7 @@
'tests/qunit/dm/FileTypeOptionProvider.test.js'
],
'dependencies' => [
+   'ext.advancedSearch.ui.ArbitraryWordInput',
'ext.advancedSearch.ui.NamespaceFilters',
'ext.advancedSearch.ui.NamespacePresets',
'ext.advancedSearch.ui.SearchPreview',
diff --git a/tests/qunit/ui/ArbitraryWordInput.test.js 
b/tests/qunit/ui/ArbitraryWordInput.test.js
new file mode 100644
index 000..96d9eb4
--- /dev/null
+++ b/tests/qunit/ui/ArbitraryWordInput.test.js
@@ -0,0 +1,34 @@
+( function ( mw ) {
+   var ArbitraryWordInput = mw.libs.advancedSearch.ui.ArbitraryWordInput,
+   Model = mw.libs.advancedSearch.dm.SearchModel;
+
+   QUnit.module( 'ext.advancedSearch.ui.ArbitraryWordInput' );
+
+   QUnit.test( 'Placeholder text presented if no content', function ( 
assert ) {
+   assert.expect( 1 );
+
+   var input = new ArbitraryWordInput( new Model(), { placeholder: 
'lorem ipsum' } );
+
+   assert.equal( input.getTextForPlaceholder(), 'lorem ipsum' );
+   } );
+
+   QUnit.test( 'Placeholder text empty if content gets set', function ( 
assert ) {
+   assert.expect( 1 );
+
+   var input = new ArbitraryWordInput( new Model(), { placeholder: 
'lorem ipsum' } );
+   input.setValue( [ 'asinus' ] );
+
+   assert.equal( input.getTextForPlaceholder(), '' );
+   } );
+
+   QUnit.test( 'Placeholder text empty if content set from the start', 
function ( assert ) {
+   assert.expect( 1 );
+
+   var model = new Model();
+   model.storeOption( 'somekey', [ 'gaudiamus' ] );
+   var input = new ArbitraryWordInput( model, { placeholder: 
'lorem ipsum', optionId: 'somekey' } );
+
+   assert.equal( input.getTextForPlaceholder(), '' );
+   } );
+
+}( mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10737b380e2d6fe6c9c640cb76bc84e5c223725d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AdvancedSearch
Gerrit-Branch: master
Gerrit-Owner: Pablo Grass (WMDE) 

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


[MediaWiki-commits] [Gerrit] operations...kafkatee[master]: Add kafka.offset.store.method config

2017-10-23 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/385989 )

Change subject: Add kafka.offset.store.method config
..


Add kafka.offset.store.method config

Bug:  T178432
Change-Id: I881bbdc2a43bb59b987920feed8c530d85e23656
---
M manifests/init.pp
M templates/kafkatee.conf.erb
2 files changed, 18 insertions(+), 11 deletions(-)

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



diff --git a/manifests/init.pp b/manifests/init.pp
index 2a7eb98..dbeaa22 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -6,6 +6,7 @@
 #
 # == Parameters:
 # $kafka_brokers - Array of Kafka broker addresses.
+# $kafka_offset_store_method - Ether 'none', 'file', or 'broker'.  Default: 
file
 # $kafka_offset_store_path   - Path in which to store consumed Kafka offsets.
 #  Default: /var/cache/kafkatee/offsets
 # $kafka_offset_reset- Where to consume from if the offset from which 
to
@@ -49,17 +50,18 @@
 
 class kafkatee (
 $kafka_brokers,
-$kafka_offset_store_path = '/var/cache/kafkatee/offsets',
-$kafka_offset_reset  = 'largest',
-$kafka_message_max_bytes = undef,
-$kafka_group_id  = $::fqdn,
-$pidfile = '/var/run/kafkatee/kafkatee.pid',
-$log_statistics_file = '/var/cache/kafkatee/kafkatee.stats.json',
-$log_statistics_interval = 60,
-$output_encoding = 'string',
-$output_format   = undef,
-$output_queue_size   = undef,
-$configure_rsyslog   = true,
+$kafka_offset_store_method = 'file',
+$kafka_offset_store_path   = '/var/cache/kafkatee/offsets',
+$kafka_offset_reset= 'largest',
+$kafka_message_max_bytes   = undef,
+$kafka_group_id= $::fqdn,
+$pidfile   = '/var/run/kafkatee/kafkatee.pid',
+$log_statistics_file   = '/var/cache/kafkatee/kafkatee.stats.json',
+$log_statistics_interval   = 60,
+$output_encoding   = 'string',
+$output_format = undef,
+$output_queue_size = undef,
+$configure_rsyslog = true,
 )
 {
 package { 'kafkatee':
diff --git a/templates/kafkatee.conf.erb b/templates/kafkatee.conf.erb
index 9f7fb83..effefcb 100644
--- a/templates/kafkatee.conf.erb
+++ b/templates/kafkatee.conf.erb
@@ -50,6 +50,11 @@
 # Default: none
 kafka.metadata.broker.list = <%= Array(@kafka_brokers).sort.join(',') %>
 
+
+# Offset commit store method: 'file' - local file store (offset.store.path, 
et.al),
+# 'broker' - broker commit store (requires Apache Kafka 0.8.2 or later on the 
broker).
+kafka.offset.store.method=<%= @kafka_offset_store_method %>
+
 # Offset file directory.
 # Each topic + partition combination has its own offset file.
 # Default: current directory

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I881bbdc2a43bb59b987920feed8c530d85e23656
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/kafkatee
Gerrit-Branch: master
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: redis: Switch to systemd::tmpfile

2017-10-23 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385990 )

Change subject: redis: Switch to systemd::tmpfile
..

redis: Switch to systemd::tmpfile

Change-Id: Iba77346223ad5e6ac10615928ee073ea2d7dc533
---
M modules/redis/manifests/init.pp
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/385990/1

diff --git a/modules/redis/manifests/init.pp b/modules/redis/manifests/init.pp
index c9bc951..af0820a 100644
--- a/modules/redis/manifests/init.pp
+++ b/modules/redis/manifests/init.pp
@@ -55,11 +55,7 @@
 
 # ensure that /var/run/redis is created at boot
 if os_version('debian >= jessie') {
-file { '/etc/tmpfiles.d/redis-startup.conf':
-ensure  => present,
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
+systemd::tmpfile { 'redis-startup':
 content => 'd /var/run/redis 0755 redis redis',
 }
 } else {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: aborrero: new opsen user and key

2017-10-23 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385988 )

Change subject: aborrero: new opsen user and key
..

aborrero: new opsen user and key

Bug: T178807
Change-Id: I37c5b233d6f6817aff1f7b2475d3b6675cf4c06e
---
M modules/admin/data/data.yaml
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/385988/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 78722f4..6263b7a 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -28,7 +28,7 @@
 members: _members [filippo, jgreen, bblack, andrew, faidon, rush, 
oblivian, yuvipanda,
   dzahn, akosiaris, mark, ariel, cmjohnson, otto, robh, tstarling,
   ori, jmm, jynus, aaron, ema, elukey, gehel, volans, madhuvishy, 
marostegui,
-  ayounsi, herron]
+  ayounsi, herron, aborrero]
 privileges: ['ALL = (ALL) NOPASSWD: ALL']
   parsoid-roots:
 gid: 701
@@ -2587,6 +2587,14 @@
   - ssh-rsa 
B3NzaC1yc2EDAQABAAACAQC4BEpVOzbQtI8EFQBWqZJqX5hxxornmURV5tAGxKkl7pHF6Yiza6jeA6FQDqY3yLbzm+rwN7xJsRDjYN121R03s+fC4gmPsNnML/m4sgkz6QgS3pEYDU81861e1ySUhXv73OH+EJtQy6WIEsh18XOam0rYaXeX1XXtq1/qIIyiXNX0rXJbJrHmv79TxMpKuT8M+Z1R9NOnkNXecsxoYK4lY/pe3/qSo6UHplPMVnkt+eT71BPCvZsnaMZHkBgMtCJmSNWRkqNUM20/UZ44FBEr4PKwLxwwwmrLQOS3Z5U6uj7n9GC9g0gL+k0LjKUGm3aCnVfXBaUY55+lDqksdfk7U8baSoZB/MJ81bhhgR5DxsaB4EKsXl9fDE9PGrE0dOt6f/3grAdqfTG0yDhoY9hu0TkD3DpgrOS5KsbsmqATZkjGrGKC5B7ce5oB3enytizytmLNMBDSq1FJI5ly22EDzUmpLVNoGCJS9tQvxYpE0K8lMOEwMSDkeEmZF69ZLnjJVVKF0tadRTUWSdmACjQ1KNd26zzkGcysmqU43bwXjnQ7u+7q9h3h7kIzAK9bUoOU+Kkc/91C9AIWyc2Tz6+HUWQ7J26qlyOFWF9vguU7rQGpzCnGEVosa4DgJAb4BbFZjyK+VjXxy16I5+bAtMnWE4ivuSlKskzGqzResNw3bw==
 miriam@miriam-WMF
 uid: 18005
 email: mr...@wikimedia.org
+  aborrero:
+ensure: present
+gid: 500
+name: aborrero
+realname: Arturo Borrero Gonzalez
+ssh_keys:
+uid: 18194
+email: aborr...@wikimedia.org
 
 ldap_only_users:
   abartov:

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

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

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


<    1   2   3   4   >