[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Fix phpcs mistakes

2017-01-11 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331832 )

Change subject: Fix phpcs mistakes
..

Fix phpcs mistakes

Fixes some broken indentation introduced in I51182c5e1.

Change-Id: I9efb75fe74ed732e3634b7061a64766bc4d539f2
---
M backend/MWOAuthConsumerAcceptance.php
M control/MWOAuthConsumerSubmitControl.php
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
M frontend/specialpages/SpecialMWOAuthListConsumers.php
M frontend/specialpages/SpecialMWOAuthManageMyGrants.php
5 files changed, 18 insertions(+), 13 deletions(-)


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

diff --git a/backend/MWOAuthConsumerAcceptance.php 
b/backend/MWOAuthConsumerAcceptance.php
index 474f992..d9a58ff 100644
--- a/backend/MWOAuthConsumerAcceptance.php
+++ b/backend/MWOAuthConsumerAcceptance.php
@@ -146,7 +146,7 @@
return $row;
}
 
-   protected function decodeRow( \DBConnRef $db, $row ) {;
+   protected function decodeRow( \DBConnRef $db, $row ){
$row['oaac_grants'] = \FormatJson::decode( $row['oaac_grants'], 
true );
$row['oaac_accepted'] = wfTimestamp( TS_MW, 
$row['oaac_accepted'] );
 
diff --git a/control/MWOAuthConsumerSubmitControl.php 
b/control/MWOAuthConsumerSubmitControl.php
index 0340a83..604fcbe 100644
--- a/control/MWOAuthConsumerSubmitControl.php
+++ b/control/MWOAuthConsumerSubmitControl.php
@@ -77,14 +77,14 @@
'description'  => '/^.*$/s',
'email'=> function( $s ) {
return \Sanitizer::validateEmail( $s );
-  },
+   },
'wiki' => function( $s ) {
global $wgConf;
return ( $s === '*'
|| in_array( $s, 
$wgConf->getLocalDatabases() )
|| array_search( $s, 
MWOAuthUtils::getAllWikiNames() ) !== false
);
-  },
+   },
'granttype'=> 
'/^(authonly|authonlyprivate|normal)$/',
'grants'   => function( $s ) {
$grants = \FormatJson::decode( $s, true 
);
@@ -98,8 +98,9 @@
'update'  => [
'consumerKey'  => '/^[0-9a-f]{32}$/',
'rsaKey'   => $validateRsaKey,
-   'resetSecret'  => function( $s ) { return 
is_bool( $s );
-  },
+   'resetSecret'  => function( $s ) {
+   return is_bool( $s );
+   },
'reason'   => '/^.{0,255}$/',
'changeToken'  => '/^[0-9a-f]{40}$/'
],
diff --git a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php 
b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
index 9fde1e1..d9caeec 100644
--- a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
+++ b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
@@ -175,8 +175,9 @@
)
),
'force-options-on' => array_map(
-   function( $g ) { return 
"grant-$g";
- },
+   function( $g ) {
+   return 
"grant-$g";
+   },

\MWGrants::getHiddenGrants()
),
'validation-callback' => null 
// different format
diff --git a/frontend/specialpages/SpecialMWOAuthListConsumers.php 
b/frontend/specialpages/SpecialMWOAuthListConsumers.php
index 5d9fb16..dc1c18e 100644
--- a/frontend/specialpages/SpecialMWOAuthListConsumers.php
+++ b/frontend/specialpages/SpecialMWOAuthListConsumers.php
@@ -163,8 +163,9 @@
$this->getContext()
);
$form->setAction( $this->getPageTitle()->getFullUrl() ); // 
always go back to listings
-   $form->setSubmitCallback( function() { return false;
-} );
+   $form->setSubmitCallback( function() {
+   return false;
+   } );
$form->setMethod( 'get' );
$form->setSubmitTextMsg( 'go' );

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Require MW 1.25+

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

Change subject: Require MW 1.25+
..


Require MW 1.25+

This extension uses extension registration...

Change-Id: I2e7b42642d27e7a729db75da937ec75e8385c672
---
M extension.json
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index dc6be7d..ba2dc87 100644
--- a/extension.json
+++ b/extension.json
@@ -9,6 +9,9 @@
"license-name": "GPL-2.0+",
"type": "other",
"manifest_version": 1,
+   "requires": {
+   "MediaWiki": ">= 1.25.0"
+   },
"config": {
"TwoColConflictBetaFeature": true
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2e7b42642d27e7a729db75da937ec75e8385c672
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Tobias Gritschacher 
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: simplify most-read-filter.filterBotTraffic()

2017-01-11 Thread BearND (Code Review)
BearND has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/330617 )

Change subject: Hygiene: simplify most-read-filter.filterBotTraffic()
..


Hygiene: simplify most-read-filter.filterBotTraffic()

Change-Id: I2feb5c47f178f6e600ae00d3575723a4d199cdbd
---
M lib/feed/most-read-filter.js
1 file changed, 5 insertions(+), 9 deletions(-)

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



diff --git a/lib/feed/most-read-filter.js b/lib/feed/most-read-filter.js
index 62aa214..f99177e 100644
--- a/lib/feed/most-read-filter.js
+++ b/lib/feed/most-read-filter.js
@@ -47,19 +47,15 @@
 
 // Create an object with title keys for speedy desktop article lookups when
 // iterating over combined-platform top pageviews
-const desktopArticles = (function() {
-const result = {};
-desktopMostRead.forEach((entry) => {
-result[entry.article] = entry;
-});
-return result;
-}());
+const desktopArticles = {};
+desktopMostRead.forEach((entry) => {
+desktopArticles[entry.article] = entry;
+});
 return allPlatformsMostRead.filter((entry) => {
 const title = entry.article;
 const totalViews = entry.views;
 const desktopViews = desktopArticles[title] && 
desktopArticles[title].views;
-return (desktopViews
-&& desktopViews >= totalViews * BOT_FILTER_THRESHOLD
+return (desktopViews >= totalViews * BOT_FILTER_THRESHOLD
 && desktopViews <= totalViews * (1 - BOT_FILTER_THRESHOLD))
 && !isBlacklisted(title);
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2feb5c47f178f6e600ae00d3575723a4d199cdbd
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: Sniedzielski 
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]: Frame args is expected to be an array

2017-01-11 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331831 )

Change subject: Frame args is expected to be an array
..

Frame args is expected to be an array

 * Fixup for 60ee19ac

 * Path only gets exercised if Util.processContentInPipeline is invoked
   w/o a parent frame, which hadn't been the case until
   Ibdf8a6e0390bf79e9aeb67a0beaa9ad0c9705e90

Change-Id: If573c49e454485cbf19b554a773244893e616781
---
M lib/utils/Util.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/utils/Util.js b/lib/utils/Util.js
index d4f6b58..93d54ec 100644
--- a/lib/utils/Util.js
+++ b/lib/utils/Util.js
@@ -1110,7 +1110,7 @@
if (opts.tplArgs) {
pipeline.setFrame(frame, opts.tplArgs.name, 
opts.tplArgs.attribs);
} else {
-   pipeline.setFrame(frame, null, null);
+   pipeline.setFrame(frame, null, []);
}
 
// Set source offsets for this pipeline's content

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If573c49e454485cbf19b554a773244893e616781
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
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]: Keystone: Turn down default log levels

2017-01-11 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331830 )

Change subject: Keystone: Turn down default log levels
..


Keystone: Turn down default log levels

Keystone logfiles are getting super big!

Change-Id: I92f867974e74ddb27728703477a5a45f815fdcab
---
M modules/openstack/files/liberty/keystone/logging.conf
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/openstack/files/liberty/keystone/logging.conf 
b/modules/openstack/files/liberty/keystone/logging.conf
index 572ef79..59df5f0 100644
--- a/modules/openstack/files/liberty/keystone/logging.conf
+++ b/modules/openstack/files/liberty/keystone/logging.conf
@@ -8,24 +8,24 @@
 keys=production,file,devel
 
 [logger_root]
-level=DEBUG
+level=WARNING
 handlers=file
 
 [handler_production]
 class=handlers.SysLogHandler
-level=DEBUG
+level=WARNING
 formatter=normal_with_name
 args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)
 
 [handler_file]
 class=FileHandler
-level=DEBUG
+level=WARNING
 formatter=normal_with_name
 args=('/var/log/keystone/keystone.log', 'a')
 
 [handler_devel]
 class=StreamHandler
-level=DEBUG
+level=WARNING
 formatter=debug
 args=(sys.stdout,)
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Keystone: Turn down default log levels

2017-01-11 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331830 )

Change subject: Keystone: Turn down default log levels
..

Keystone: Turn down default log levels

Keystone logfiles are getting super big!

Change-Id: I92f867974e74ddb27728703477a5a45f815fdcab
---
M modules/openstack/files/liberty/keystone/logging.conf
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/331830/1

diff --git a/modules/openstack/files/liberty/keystone/logging.conf 
b/modules/openstack/files/liberty/keystone/logging.conf
index 572ef79..59df5f0 100644
--- a/modules/openstack/files/liberty/keystone/logging.conf
+++ b/modules/openstack/files/liberty/keystone/logging.conf
@@ -8,24 +8,24 @@
 keys=production,file,devel
 
 [logger_root]
-level=DEBUG
+level=WARNING
 handlers=file
 
 [handler_production]
 class=handlers.SysLogHandler
-level=DEBUG
+level=WARNING
 formatter=normal_with_name
 args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)
 
 [handler_file]
 class=FileHandler
-level=DEBUG
+level=WARNING
 formatter=normal_with_name
 args=('/var/log/keystone/keystone.log', 'a')
 
 [handler_devel]
 class=StreamHandler
-level=DEBUG
+level=WARNING
 formatter=debug
 args=(sys.stdout,)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92f867974e74ddb27728703477a5a45f815fdcab
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Arrange Special:Version/credits into columns and remove spac...

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

Change subject: Arrange Special:Version/credits into columns and remove space 
at top
..


Arrange Special:Version/credits into columns and remove space at top

Make the long list of names more manageable and readable.

Change-Id: I3bb5da73ecf0c46b77a675324dcd62c9c4ea60da
---
M CREDITS
M includes/specials/SpecialVersion.php
M resources/src/mediawiki.special/mediawiki.special.version.css
3 files changed, 16 insertions(+), 4 deletions(-)

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



diff --git a/CREDITS b/CREDITS
index d9ff970..b37edf2 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,10 +1,9 @@
-{{int:version-credits-summary}}
-
-
+
+The following list can be found parsed under Special:Version/Credits -->
 
 == Contributors ==
 
diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 272f074..708eced 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -78,9 +78,16 @@
// Now figure out what to do
switch ( strtolower( $parts[0] ) ) {
case 'credits':
+   $out->addModuleStyles( 
'mediawiki.special.version' );
+
$wikiText = '{{int:version-credits-not-found}}';
if ( $extName === 'MediaWiki' ) {
$wikiText = file_get_contents( $IP . 
'/CREDITS' );
+   // Put the contributor list into columns
+   $wikiText = str_replace(
+   [ '', '' ],
+   [ '', '' ],
+   $wikiText );
} elseif ( ( $extNode !== null ) && isset( 
$extNode['path'] ) ) {
$file = $this->getExtAuthorsFileName( 
dirname( $extNode['path'] ) );
if ( $file ) {
diff --git a/resources/src/mediawiki.special/mediawiki.special.version.css 
b/resources/src/mediawiki.special/mediawiki.special.version.css
index 5b259e7..ebb6b48 100644
--- a/resources/src/mediawiki.special/mediawiki.special.version.css
+++ b/resources/src/mediawiki.special/mediawiki.special.version.css
@@ -18,3 +18,9 @@
 .mw-version-ext-vcs-version {
unicode-bidi: embed;
 }
+
+.mw-version-credits {
+   column-width: 18em;
+   -moz-column-width: 18em;
+   -webkit-column-width: 18em;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3bb5da73ecf0c46b77a675324dcd62c9c4ea60da
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TTO 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use formatversion=2 for API request

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

Change subject: Use formatversion=2 for API request
..


Use formatversion=2 for API request

This simplifies precessing the response.
The parameter indexpageids=1 is not necessary anymore.

Change-Id: I672ea3fc49a04b9f76ca129d984518bce0281604
---
M modules/tools/ext.cx.tools.categories.js
M modules/tools/ext.cx.tools.template.js
M modules/tools/ext.cx.tools.validator.js
3 files changed, 18 insertions(+), 31 deletions(-)

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



diff --git a/modules/tools/ext.cx.tools.categories.js 
b/modules/tools/ext.cx.tools.categories.js
index 95abc0c..ab7a7db 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -502,27 +502,21 @@
categoryTool = this;
 
this.siteMapper.getApi( language ).get( {
+   formatversion: 2,
action: 'query',
prop: 'categories',
clshow: '!hidden',
cllimit: 100,
-   indexpageids: true,
titles: title
} ).done( function ( response ) {
-   var pageId,
-   categoriesArray = [];
+   var categoriesArray = response.query.pages[ 0 
].categories || [];
 
-   if ( response.query ) {
-   pageId = response.query.pageids[ 0 ];
-   categoriesArray = response.query.pages[ pageId 
].categories || [];
+   $.each( categoriesArray, function ( index, object ) {
+   var categoryId;
 
-   $.each( categoriesArray, function ( index, 
object ) {
-   var categoryId;
-
-   categoryId = makeCategoryId( index, 3, 
'0' );
-   categories[ categoryId ] = object.title;
-   } );
-   }
+   categoryId = makeCategoryId( index, 3, '0' );
+   categories[ categoryId ] = object.title;
+   } );
 
categoryTool.categories.source = categories;
deferred.resolve( categories );
diff --git a/modules/tools/ext.cx.tools.template.js 
b/modules/tools/ext.cx.tools.template.js
index 0257c35..6794e51 100644
--- a/modules/tools/ext.cx.tools.template.js
+++ b/modules/tools/ext.cx.tools.template.js
@@ -450,21 +450,18 @@
var self = this;
 
return self.siteMapper.getApi( this.language ).get( {
+   formatversion: 2,
action: 'query',
titles: templateName,
redirects: true,
prop: 'revisions',
-   rvprop: 'content',
-   indexpageids: '1'
+   rvprop: 'content'
} ).then( function ( resp ) {
-   var title, pageContent = '';
+   var page = resp.query.pages[ 0 ], title, pageContent = 
'';
 
-   if (
-   resp.query.pages[ resp.query.pageids[ 0 ] 
].revisions &&
-   resp.query.pages[ resp.query.pageids[ 0 ] 
].revisions[ 0 ]
-   ) {
-   pageContent = resp.query.pages[ 
resp.query.pageids[ 0 ] ].revisions[ 0 ][ '*' ];
-   title = resp.query.pages[ resp.query.pageids[ 0 
] ].title;
+   if ( page.revisions && page.revisions[ 0 ] ) {
+   pageContent = page.revisions[ 0 ].content;
+   title = page.title;
}
 
return {
diff --git a/modules/tools/ext.cx.tools.validator.js 
b/modules/tools/ext.cx.tools.validator.js
index e59f627..b9ef7d2 100644
--- a/modules/tools/ext.cx.tools.validator.js
+++ b/modules/tools/ext.cx.tools.validator.js
@@ -29,22 +29,18 @@
}
 
return api.get( {
+   formatversion: 2,
action: 'query',
titles: title,
-   redirects: 1,
-   indexpageids: 1
+   redirects: 1
} ).then( function ( response ) {
-   var pageid = response.query.pageids[ 0 ];
+   var page = response.query.pages[ 0 ];
 
-   if ( response.query.pages[ pageid ].missing !== 
undefined ) {
+   if ( page.missing || page.invalid ) {
  

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Move more PageFragment message handlers to setupMes...

2017-01-11 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331829 )

Change subject: Hygiene: Move more PageFragment message handlers to 
setupMessageHandlers
..

Hygiene: Move more PageFragment message handlers to setupMessageHandlers

With a bit of additional light refactoring.

No functional changes intended.

Change-Id: I91fabbdbeadd28ac243c85ee32ae73f0ac5f854a
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/ReferenceHandler.java
2 files changed, 36 insertions(+), 41 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index b7a763d..5f09e48 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -330,42 +330,6 @@
 setupMessageHandlers();
 sendDecorOffsetMessage();
 
-linkHandler = new LinkHandler(this) {
-@Override
-public void onPageLinkClicked(String anchor) {
-dismissBottomSheet();
-JSONObject payload = new JSONObject();
-try {
-payload.put("anchor", anchor);
-} catch (JSONException e) {
-throw new RuntimeException(e);
-}
-bridge.sendMessage("handleReference", payload);
-}
-
-@Override
-public void onInternalLinkClicked(PageTitle title) {
-handleInternalLink(title);
-}
-
-@Override
-public WikiSite getWikiSite() {
-return model.getTitle().getWikiSite();
-}
-};
-bridge.addListener("linkClicked", linkHandler);
-
-new ReferenceHandler(bridge) {
-@Override
-protected void onReferenceClicked(String refHtml) {
-if (!isAdded()) {
-Log.d("PageFragment", "Detached from activity, so stopping 
reference click.");
-return;
-}
-showBottomSheet(new ReferenceDialog(getActivity(), 
linkHandler, refHtml));
-}
-};
-
 // make sure styles get injected before the DarkModeMarshaller and 
other handlers
 if (app.isCurrentThemeDark()) {
 new DarkModeMarshaller(bridge).turnOn(true);
@@ -1055,6 +1019,41 @@
 }
 
 private void setupMessageHandlers() {
+linkHandler = new LinkHandler(this) {
+@Override
+public void onPageLinkClicked(String anchor) {
+dismissBottomSheet();
+JSONObject payload = new JSONObject();
+try {
+payload.put("anchor", anchor);
+} catch (JSONException e) {
+throw new RuntimeException(e);
+}
+bridge.sendMessage("handleReference", payload);
+}
+
+@Override
+public void onInternalLinkClicked(PageTitle title) {
+handleInternalLink(title);
+}
+
+@Override
+public WikiSite getWikiSite() {
+return model.getTitle().getWikiSite();
+}
+};
+bridge.addListener("linkClicked", linkHandler);
+
+bridge.addListener("referenceClicked", new ReferenceHandler() {
+@Override
+protected void onReferenceClicked(String refHtml) {
+if (!isAdded()) {
+Log.d("PageFragment", "Detached from activity, so stopping 
reference click.");
+return;
+}
+showBottomSheet(new ReferenceDialog(getActivity(), 
linkHandler, refHtml));
+}
+});
 bridge.addListener("ipaSpan", new 
CommunicationBridge.JSEventListener() {
 @Override
 public void onMessage(String messageType, JSONObject 
messagePayload) {
diff --git a/app/src/main/java/org/wikipedia/page/ReferenceHandler.java 
b/app/src/main/java/org/wikipedia/page/ReferenceHandler.java
index 4a9e131..5265a5e 100644
--- a/app/src/main/java/org/wikipedia/page/ReferenceHandler.java
+++ b/app/src/main/java/org/wikipedia/page/ReferenceHandler.java
@@ -7,11 +7,7 @@
 /**
  * Handles any reference links coming from a {@link PageFragment}
  */
-public abstract class ReferenceHandler implements 
CommunicationBridge.JSEventListener {
-
-public ReferenceHandler(CommunicationBridge bridge) {
-bridge.addListener("referenceClicked", this);
-}
+abstract class ReferenceHandler implements CommunicationBridge.JSEventListener 
{
 
 /**
  * Called when a reference link was clicked.

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

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove cols and rows preferences

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

Change subject: Remove cols and rows preferences
..


Remove cols and rows preferences

In https://gerrit.wikimedia.org/r/80061/, Chad was convinced this
preference is barely used and mostly set to weird values by people
who don't understand what they're doing.

He made some quick stats: http://p.defau.lt/?fgGU0StB4J9l0LC5GZq8AA

Used defaults of 80 columns and 25 rows in places that still
were asking for it. The old default values are left in
$wgDefaultUserOptions for now, since various extensions are
using them.

The 'rows' and 'columns' messages don't appear to be in use in
any extensions in Git, so I killed those as well.

(This is the same as I642188c74d929a586b1882a1cf8656056c4fcf5a.)

Bug: T26430
Change-Id: I6c9802bc4f9cf32fb75c3dd7b9e2dc18f271eedf
---
M includes/DefaultSettings.php
M includes/EditPage.php
M includes/Preferences.php
M includes/specials/SpecialUndelete.php
M includes/specials/SpecialUpload.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/user/UserTest.php
8 files changed, 13 insertions(+), 31 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index ffa5c21..856a3f9 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4788,7 +4788,7 @@
  */
 $wgDefaultUserOptions = [
'ccmeonemails' => 0,
-   'cols' => 80,
+   'cols' => 80, // @deprecated since 1.29 No longer used in core
'date' => 'default',
'diffonly' => 0,
'disablemail' => 0,
@@ -4818,7 +4818,7 @@
'rcdays' => 7,
'rcenhancedfilters' => 0,
'rclimit' => 50,
-   'rows' => 25,
+   'rows' => 25, // @deprecated since 1.29 No longer used in core
'showhiddencats' => 0,
'shownumberswatching' => 1,
'showtoolbar' => 1,
diff --git a/includes/EditPage.php b/includes/EditPage.php
index acbd130..05fa366 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4441,8 +4441,8 @@
$attribs = $customAttribs + [
'accesskey' => ',',
'id' => $name,
-   'cols' => $user->getIntOption( 'cols' ),
-   'rows' => $user->getIntOption( 'rows' ),
+   'cols' => 80,
+   'rows' => 25,
// Avoid PHP notices when appending preferences
// (appending allows customAttribs['style'] to 
still work).
'style' => ''
diff --git a/includes/Preferences.php b/includes/Preferences.php
index 263ff5b..89982a6 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -55,8 +55,6 @@
/** @var array */
protected static $saveFilters = [
'timecorrection' => [ 'Preferences', 'filterTimezoneInput' ],
-   'cols' => [ 'Preferences', 'filterIntval' ],
-   'rows' => [ 'Preferences', 'filterIntval' ],
'rclimit' => [ 'Preferences', 'filterIntval' ],
'wllimit' => [ 'Preferences', 'filterIntval' ],
'searchlimit' => [ 'Preferences', 'filterIntval' ],
@@ -817,20 +815,7 @@
]
];
}
-   $defaultPreferences['cols'] = [
-   'type' => 'int',
-   'label-message' => 'columns',
-   'section' => 'editing/editor',
-   'min' => 4,
-   'max' => 1000,
-   ];
-   $defaultPreferences['rows'] = [
-   'type' => 'int',
-   'label-message' => 'rows',
-   'section' => 'editing/editor',
-   'min' => 4,
-   'max' => 1000,
-   ];
+
if ( $user->isAllowed( 'minoredit' ) ) {
$defaultPreferences['minordefault'] = [
'type' => 'toggle',
@@ -838,6 +823,7 @@
'label-message' => 'tog-minordefault',
];
}
+
$defaultPreferences['forceeditsummary'] = [
'type' => 'toggle',
'section' => 'editing/editor',
diff --git a/includes/specials/SpecialUndelete.php 
b/includes/specials/SpecialUndelete.php
index 3d51842..4c6a593 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -1141,8 +1141,8 @@
'textarea',
[
'readonly' => 'readonly',
-  

[MediaWiki-commits] [Gerrit] oojs/ui[master]: ClippableElement: Also clean up maxWidth, maxHeight when tur...

2017-01-11 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331828 )

Change subject: ClippableElement: Also clean up maxWidth, maxHeight when 
turning clipping off
..

ClippableElement: Also clean up maxWidth, maxHeight when turning clipping off

Follow-up to 5515e061ed8271cd7ef8dfb14b35453596d35c8c.

Change-Id: Ib0ae316a1f79c32cba77982d8dba7b5e7b60fcee
---
M src/mixins/ClippableElement.js
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/28/331828/1

diff --git a/src/mixins/ClippableElement.js b/src/mixins/ClippableElement.js
index aae229d..37b7c04 100644
--- a/src/mixins/ClippableElement.js
+++ b/src/mixins/ClippableElement.js
@@ -109,7 +109,14 @@
// Initial clip after visible
this.clip();
} else {
-   this.$clippable.css( { width: '', height: '', 
overflowX: '', overflowY: '' } );
+   this.$clippable.css( {
+   width: '',
+   height: '',
+   maxWidth: '',
+   maxHeight: '',
+   overflowX: '',
+   overflowY: ''
+   } );
OO.ui.Element.static.reconsiderScrollbars( 
this.$clippable[ 0 ] );
 
this.$clippableScrollableContainer = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0ae316a1f79c32cba77982d8dba7b5e7b60fcee
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css

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

Change subject: Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css
..


Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css

There are separate JS files for them, so the CSS should be separate, too.

This is a part of the refactoring that is required for bug T153365.

Change-Id: Iadbe5eeccff25ed1d184658945a4eb52e465d863
---
M extension.json
M modules/ve-math/ve.ui.MWMathDialog.css
A modules/ve-math/ve.ui.MWMathPage.css
3 files changed, 59 insertions(+), 57 deletions(-)

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



diff --git a/extension.json b/extension.json
index a059655..8f74d56 100644
--- a/extension.json
+++ b/extension.json
@@ -161,6 +161,7 @@
"ve-math/ve.ce.MWMathNode.css",
"ve-math/ve.ui.MWMathIcons.css",
"ve-math/ve.ui.MWMathInspector.css",
+   "ve-math/ve.ui.MWMathPage.css",
"ve-math/ve.ui.MWMathDialog.css"
],
"dependencies": [
diff --git a/modules/ve-math/ve.ui.MWMathDialog.css 
b/modules/ve-math/ve.ui.MWMathDialog.css
index 5ce983e..4c056ab 100644
--- a/modules/ve-math/ve.ui.MWMathDialog.css
+++ b/modules/ve-math/ve.ui.MWMathDialog.css
@@ -34,58 +34,6 @@
bottom: 10em;
 }
 
-.ve-ui-mwMathPage-symbol {
-   background-position: center;
-   background-repeat: no-repeat;
-   cursor: pointer;
-   font-size: 1.5em;
-   width: 1.8em;
-   height: 1.8em;
-   display: inline-block;
-   vertical-align: middle;
-   margin: 0 0.1em 0.1em 0;
-   box-sizing: border-box;
-   border: 1px solid #e6e6e6;
-   /* stylelint-disable no-unsupported-browser-features */
-   -webkit-transition: border-color 200ms;
-   -moz-transition: border-color 200ms;
-   transition: border-color 200ms;
-   /* stylelint-enable no-unsupported-browser-features */
-}
-
-.ve-ui-mwMathPage-symbol-wide {
-   /* 2(symbol width) + margin */
-   width: 3.7em;
-}
-
-.ve-ui-mwMathPage-symbol-wider {
-   /* 2.5(symbol width) + 1.5(margin) */
-   width: 4.65em;
-}
-
-.ve-ui-mwMathPage-symbol-widest {
-   /* 3(symbol width) + 2(margin) */
-   width: 5.6em;
-}
-
-.ve-ui-mwMathPage-symbol-contain {
-   background-size: contain; /* stylelint-disable-line 
no-unsupported-browser-features */
-}
-
-.ve-ui-mwMathPage-symbol-largeLayout {
-   height: 3.7em;
-   width: 4.65em;
-}
-
-.ve-ui-mwMathPage-symbol-largeLayout.ve-ui-mwMathPage-symbol-wide {
-   /* 5(symbol width) + 4(margin) */
-   width: 9.4em;
-}
-
-.ve.ui.mwMathPage-symbol:hover {
-   border-color: #ccc;
-}
-
 .ve-ui-mwMathDialog-preview {
text-align: center;
line-height: 10em;
@@ -100,9 +48,4 @@
 /* Ensures the preview image is vertically centred */
 .ve-ui-mwMathDialog-preview .mwe-math-fallback-image-display {
display: inline-block;
-}
-
-.ve-ui-mwMathPage-outline {
-   padding: 0.5em;
-   color: #555;
 }
diff --git a/modules/ve-math/ve.ui.MWMathPage.css 
b/modules/ve-math/ve.ui.MWMathPage.css
new file mode 100644
index 000..c064966
--- /dev/null
+++ b/modules/ve-math/ve.ui.MWMathPage.css
@@ -0,0 +1,58 @@
+/*!
+ * VisualEditor UserInterface MWMathPage styles.
+ *
+ * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.ve-ui-mwMathPage-symbol {
+   background-position: center;
+   background-repeat: no-repeat;
+   cursor: pointer;
+   font-size: 1.5em;
+   width: 1.8em;
+   height: 1.8em;
+   display: inline-block;
+   vertical-align: middle;
+   margin: 0 0.1em 0.1em 0;
+   box-sizing: border-box;
+   border: 1px solid #e6e6e6;
+   /* stylelint-disable no-unsupported-browser-features */
+   -webkit-transition: border-color 200ms;
+   -moz-transition: border-color 200ms;
+   transition: border-color 200ms;
+   /* stylelint-enable no-unsupported-browser-features */
+}
+
+.ve-ui-mwMathPage-symbol-wide {
+   /* 2(symbol width) + margin */
+   width: 3.7em;
+}
+
+.ve-ui-mwMathPage-symbol-wider {
+   /* 2.5(symbol width) + 1.5(margin) */
+   width: 4.65em;
+}
+
+.ve-ui-mwMathPage-symbol-widest {
+   /* 3(symbol width) + 2(margin) */
+   width: 5.6em;
+}
+
+.ve-ui-mwMathPage-symbol-contain {
+   background-size: contain; /* stylelint-disable-line 
no-unsupported-browser-features */
+}
+
+.ve-ui-mwMathPage-symbol-largeLayout {
+   height: 3.7em;
+   width: 4.65em;
+}
+
+.ve-ui-mwMathPage-symbol-largeLayout.ve-ui-mwMathPage-symbol-wide {
+   /* 5(symbol width) + 4(margin) */
+   width: 9.4em;
+}
+
+.ve.ui.mwMathPage-symbol:hover {
+   border-color: #ccc;
+}


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css

2017-01-11 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331827 )

Change subject: Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css
..

Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css

There are separate JS files for them, so the CSS should be separate, too.

This is a part of the refactoring that is required for bug T153365.

Change-Id: Iadbe5eeccff25ed1d184658945a4eb52e465d863
---
M extension.json
M modules/ve-math/ve.ui.MWMathDialog.css
A modules/ve-math/ve.ui.MWMathPage.css
3 files changed, 59 insertions(+), 57 deletions(-)


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

diff --git a/extension.json b/extension.json
index a059655..8f74d56 100644
--- a/extension.json
+++ b/extension.json
@@ -161,6 +161,7 @@
"ve-math/ve.ce.MWMathNode.css",
"ve-math/ve.ui.MWMathIcons.css",
"ve-math/ve.ui.MWMathInspector.css",
+   "ve-math/ve.ui.MWMathPage.css",
"ve-math/ve.ui.MWMathDialog.css"
],
"dependencies": [
diff --git a/modules/ve-math/ve.ui.MWMathDialog.css 
b/modules/ve-math/ve.ui.MWMathDialog.css
index 5ce983e..4c056ab 100644
--- a/modules/ve-math/ve.ui.MWMathDialog.css
+++ b/modules/ve-math/ve.ui.MWMathDialog.css
@@ -34,58 +34,6 @@
bottom: 10em;
 }
 
-.ve-ui-mwMathPage-symbol {
-   background-position: center;
-   background-repeat: no-repeat;
-   cursor: pointer;
-   font-size: 1.5em;
-   width: 1.8em;
-   height: 1.8em;
-   display: inline-block;
-   vertical-align: middle;
-   margin: 0 0.1em 0.1em 0;
-   box-sizing: border-box;
-   border: 1px solid #e6e6e6;
-   /* stylelint-disable no-unsupported-browser-features */
-   -webkit-transition: border-color 200ms;
-   -moz-transition: border-color 200ms;
-   transition: border-color 200ms;
-   /* stylelint-enable no-unsupported-browser-features */
-}
-
-.ve-ui-mwMathPage-symbol-wide {
-   /* 2(symbol width) + margin */
-   width: 3.7em;
-}
-
-.ve-ui-mwMathPage-symbol-wider {
-   /* 2.5(symbol width) + 1.5(margin) */
-   width: 4.65em;
-}
-
-.ve-ui-mwMathPage-symbol-widest {
-   /* 3(symbol width) + 2(margin) */
-   width: 5.6em;
-}
-
-.ve-ui-mwMathPage-symbol-contain {
-   background-size: contain; /* stylelint-disable-line 
no-unsupported-browser-features */
-}
-
-.ve-ui-mwMathPage-symbol-largeLayout {
-   height: 3.7em;
-   width: 4.65em;
-}
-
-.ve-ui-mwMathPage-symbol-largeLayout.ve-ui-mwMathPage-symbol-wide {
-   /* 5(symbol width) + 4(margin) */
-   width: 9.4em;
-}
-
-.ve.ui.mwMathPage-symbol:hover {
-   border-color: #ccc;
-}
-
 .ve-ui-mwMathDialog-preview {
text-align: center;
line-height: 10em;
@@ -100,9 +48,4 @@
 /* Ensures the preview image is vertically centred */
 .ve-ui-mwMathDialog-preview .mwe-math-fallback-image-display {
display: inline-block;
-}
-
-.ve-ui-mwMathPage-outline {
-   padding: 0.5em;
-   color: #555;
 }
diff --git a/modules/ve-math/ve.ui.MWMathPage.css 
b/modules/ve-math/ve.ui.MWMathPage.css
new file mode 100644
index 000..c064966
--- /dev/null
+++ b/modules/ve-math/ve.ui.MWMathPage.css
@@ -0,0 +1,58 @@
+/*!
+ * VisualEditor UserInterface MWMathPage styles.
+ *
+ * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.ve-ui-mwMathPage-symbol {
+   background-position: center;
+   background-repeat: no-repeat;
+   cursor: pointer;
+   font-size: 1.5em;
+   width: 1.8em;
+   height: 1.8em;
+   display: inline-block;
+   vertical-align: middle;
+   margin: 0 0.1em 0.1em 0;
+   box-sizing: border-box;
+   border: 1px solid #e6e6e6;
+   /* stylelint-disable no-unsupported-browser-features */
+   -webkit-transition: border-color 200ms;
+   -moz-transition: border-color 200ms;
+   transition: border-color 200ms;
+   /* stylelint-enable no-unsupported-browser-features */
+}
+
+.ve-ui-mwMathPage-symbol-wide {
+   /* 2(symbol width) + margin */
+   width: 3.7em;
+}
+
+.ve-ui-mwMathPage-symbol-wider {
+   /* 2.5(symbol width) + 1.5(margin) */
+   width: 4.65em;
+}
+
+.ve-ui-mwMathPage-symbol-widest {
+   /* 3(symbol width) + 2(margin) */
+   width: 5.6em;
+}
+
+.ve-ui-mwMathPage-symbol-contain {
+   background-size: contain; /* stylelint-disable-line 
no-unsupported-browser-features */
+}
+
+.ve-ui-mwMathPage-symbol-largeLayout {
+   height: 3.7em;
+   width: 4.65em;
+}
+
+.ve-ui-mwMathPage-symbol-largeLayout.ve-ui-mwMathPage-symbol-wide {
+   /* 5(symbol width) + 4(margin) */
+   width: 9.4em;
+}
+
+.ve.ui.mwMathPage-symbol:hover {
+   border-color: 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Updating interwiki map

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

Change subject: Updating interwiki map
..


Updating interwiki map

Change-Id: I0afbd8475b916fef100b5ef5f88e40b9aa8897c5
---
M wmf-config/interwiki.php
1 file changed, 39 insertions(+), 37 deletions(-)

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 3842a8a..cdedb6a 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact=$1',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -39,10 +39,8 @@
'__global:communityscheme' => '0 
http://community.schemewiki.org/?c=s=$1',
'__global:communitywiki' => '0 http://www.communitywiki.org/$1',
'__global:comune' => '0 http://rete.comuni-italiani.it/wiki/$1',
-   '__global:crazyhacks' => '0 
http://www.crazy-hacks.org/wiki/index.php?title=$1',
'__global:creativecommons' => '0 //creativecommons.org/licenses/$1',
'__global:creativecommonswiki' => '0 
https://wiki.creativecommons.org/$1',
-   '__global:creatureswiki' => '0 http://creatures.wikia.com/wiki/$1',
'__global:cxej' => '0 
http://esperanto.blahus.cz/cxej/vikio/index.php/$1',
'__global:dcc' => '0 http://www.dccwiki.com/$1',
'__global:dcdatabase' => '0 http://dc.wikia.com/$1',
@@ -57,10 +55,10 @@
'__global:dmoz' => '0 http://www.dmoz.org/$1',
'__global:dmozs' => '0 http://www.dmoz.org/cgi-bin/search?search=$1',
'__global:doi' => '0 //dx.doi.org/$1',
-   '__global:donate' => '1 //donate.wikimedia.org/wiki/$1',
+   '__global:donate' => '1 https://donate.wikimedia.org/wiki/$1',
'__global:doom_wiki' => '0 http://doom.wikia.com/wiki/$1',
-   '__global:download' => '1 //releases.wikimedia.org/$1',
-   '__global:dbdump' => '1 //dumps.wikimedia.org/$1/latest/',
+   '__global:download' => '1 https://releases.wikimedia.org/$1',
+   '__global:dbdump' => '1 https://dumps.wikimedia.org/$1/latest/',
'__global:dpd' => '0 http://lema.rae.es/dpd/?key=$1',
'__global:drae' => '0 http://lema.rae.es/drae/?val=$1',
'__global:dreamhost' => '0 http://wiki.dreamhost.com/index.php/$1',
@@ -77,7 +75,7 @@
'__global:enkol' => '0 http://enkol.pl/$1',
'__global:eokulturcentro' => '0 
http://esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1',
'__global:esolang' => '0 http://esolangs.org/wiki/$1',
-   '__global:etherpad' => '1 //etherpad.wikimedia.org/$1',
+   '__global:etherpad' => '1 https://etherpad.wikimedia.org/$1',
'__global:ethnologue' => '0 //www.ethnologue.com/language/$1',
'__global:ethnologuefamily' => '0 
//www.ethnologue.com/show_family.asp?subid=$1',
'__global:evowiki' => '0 http://wiki.cotch.net/index.php/$1',
@@ -91,7 +89,7 @@
'__global:floralwiki' => '0 http://www.floralwiki.co.uk/wiki/$1',
'__global:foldoc' => '0 http://foldoc.org/$1',
'__global:forthfreak' => '0 http://wiki.forthfreak.net/index.cgi?$1',
-   '__global:foundation' => '1 //wikimediafoundation.org/wiki/$1',
+   '__global:foundation' => '1 https://wikimediafoundation.org/wiki/$1',
'__global:foxwiki' => '0 http://fox.wikis.com/wc.dll?Wiki~$1',
'__global:freebio' => '0 http://freebiology.org/wiki/$1',
'__global:freebsdman' => '0 
http://www.FreeBSD.org/cgi/man.cgi?apropos=1=$1',
@@ -114,7 +112,6 @@
'__global:google' => '0 //www.google.com/search?q=$1',
'__global:googledefine' => '0 //www.google.com/search?q=define:$1',
'__global:googlegroups' => '0 //groups.google.com/groups?q=$1',
-   '__global:greatlakeswiki' => '0 http://greatlakeswiki.org/index.php/$1',
'__global:guildwarswiki' => '0 http://wiki.guildwars.com/wiki/$1',
'__global:guildwiki' => '0 http://guildwars.wikia.com/wiki/$1',
'__global:gutenberg' => '0 http://www.gutenberg.org/etext/$1',
@@ -133,7 +130,7 @@
'__global:imdbtitle' => '0 http://www.imdb.com/title/tt$1/',
'__global:imdbcompany' => '0 http://www.imdb.com/company/co$1/',
'__global:imdbcharacter' => '0 http://www.imdb.com/character/ch$1/',
-   '__global:incubator' => '1 //incubator.wikimedia.org/wiki/$1',
+   '__global:incubator' => '1 https://incubator.wikimedia.org/wiki/$1',
'__global:infosecpedia' => '0 http://infosecpedia.org/wiki/$1',
'__global:infosphere' => '0 http://theinfosphere.org/$1',
'__global:irc' => '0 irc://irc.freenode.net/$1',
@@ -157,7 +154,6 @@
'__global:komicawiki' => '0 http://wiki.komica.org/wiki3/?$1',
'__global:kontuwiki' => '0 http://kontu.wiki/$1',
'__global:koslarwiki' => '0 http://wiki.koslar.de/index.php/$1',
-   '__global:kpopwiki' => '0 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Updating interwiki map

2017-01-11 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331826 )

Change subject: Updating interwiki map
..

Updating interwiki map

Change-Id: I0afbd8475b916fef100b5ef5f88e40b9aa8897c5
---
M wmf-config/interwiki.php
1 file changed, 39 insertions(+), 37 deletions(-)


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

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 3842a8a..cdedb6a 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact=$1',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -39,10 +39,8 @@
'__global:communityscheme' => '0 
http://community.schemewiki.org/?c=s=$1',
'__global:communitywiki' => '0 http://www.communitywiki.org/$1',
'__global:comune' => '0 http://rete.comuni-italiani.it/wiki/$1',
-   '__global:crazyhacks' => '0 
http://www.crazy-hacks.org/wiki/index.php?title=$1',
'__global:creativecommons' => '0 //creativecommons.org/licenses/$1',
'__global:creativecommonswiki' => '0 
https://wiki.creativecommons.org/$1',
-   '__global:creatureswiki' => '0 http://creatures.wikia.com/wiki/$1',
'__global:cxej' => '0 
http://esperanto.blahus.cz/cxej/vikio/index.php/$1',
'__global:dcc' => '0 http://www.dccwiki.com/$1',
'__global:dcdatabase' => '0 http://dc.wikia.com/$1',
@@ -57,10 +55,10 @@
'__global:dmoz' => '0 http://www.dmoz.org/$1',
'__global:dmozs' => '0 http://www.dmoz.org/cgi-bin/search?search=$1',
'__global:doi' => '0 //dx.doi.org/$1',
-   '__global:donate' => '1 //donate.wikimedia.org/wiki/$1',
+   '__global:donate' => '1 https://donate.wikimedia.org/wiki/$1',
'__global:doom_wiki' => '0 http://doom.wikia.com/wiki/$1',
-   '__global:download' => '1 //releases.wikimedia.org/$1',
-   '__global:dbdump' => '1 //dumps.wikimedia.org/$1/latest/',
+   '__global:download' => '1 https://releases.wikimedia.org/$1',
+   '__global:dbdump' => '1 https://dumps.wikimedia.org/$1/latest/',
'__global:dpd' => '0 http://lema.rae.es/dpd/?key=$1',
'__global:drae' => '0 http://lema.rae.es/drae/?val=$1',
'__global:dreamhost' => '0 http://wiki.dreamhost.com/index.php/$1',
@@ -77,7 +75,7 @@
'__global:enkol' => '0 http://enkol.pl/$1',
'__global:eokulturcentro' => '0 
http://esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1',
'__global:esolang' => '0 http://esolangs.org/wiki/$1',
-   '__global:etherpad' => '1 //etherpad.wikimedia.org/$1',
+   '__global:etherpad' => '1 https://etherpad.wikimedia.org/$1',
'__global:ethnologue' => '0 //www.ethnologue.com/language/$1',
'__global:ethnologuefamily' => '0 
//www.ethnologue.com/show_family.asp?subid=$1',
'__global:evowiki' => '0 http://wiki.cotch.net/index.php/$1',
@@ -91,7 +89,7 @@
'__global:floralwiki' => '0 http://www.floralwiki.co.uk/wiki/$1',
'__global:foldoc' => '0 http://foldoc.org/$1',
'__global:forthfreak' => '0 http://wiki.forthfreak.net/index.cgi?$1',
-   '__global:foundation' => '1 //wikimediafoundation.org/wiki/$1',
+   '__global:foundation' => '1 https://wikimediafoundation.org/wiki/$1',
'__global:foxwiki' => '0 http://fox.wikis.com/wc.dll?Wiki~$1',
'__global:freebio' => '0 http://freebiology.org/wiki/$1',
'__global:freebsdman' => '0 
http://www.FreeBSD.org/cgi/man.cgi?apropos=1=$1',
@@ -114,7 +112,6 @@
'__global:google' => '0 //www.google.com/search?q=$1',
'__global:googledefine' => '0 //www.google.com/search?q=define:$1',
'__global:googlegroups' => '0 //groups.google.com/groups?q=$1',
-   '__global:greatlakeswiki' => '0 http://greatlakeswiki.org/index.php/$1',
'__global:guildwarswiki' => '0 http://wiki.guildwars.com/wiki/$1',
'__global:guildwiki' => '0 http://guildwars.wikia.com/wiki/$1',
'__global:gutenberg' => '0 http://www.gutenberg.org/etext/$1',
@@ -133,7 +130,7 @@
'__global:imdbtitle' => '0 http://www.imdb.com/title/tt$1/',
'__global:imdbcompany' => '0 http://www.imdb.com/company/co$1/',
'__global:imdbcharacter' => '0 http://www.imdb.com/character/ch$1/',
-   '__global:incubator' => '1 //incubator.wikimedia.org/wiki/$1',
+   '__global:incubator' => '1 https://incubator.wikimedia.org/wiki/$1',
'__global:infosecpedia' => '0 http://infosecpedia.org/wiki/$1',
'__global:infosphere' => '0 http://theinfosphere.org/$1',
'__global:irc' => '0 irc://irc.freenode.net/$1',
@@ -157,7 +154,6 @@
'__global:komicawiki' => '0 http://wiki.komica.org/wiki3/?$1',
'__global:kontuwiki' => '0 http://kontu.wiki/$1',
'__global:koslarwiki' => '0 http://wiki.koslar.de/index.php/$1',
-   '__global:kpopwiki' => 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Consolidate database lists list in one place

2017-01-11 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331825 )

Change subject: Consolidate database lists list in one place
..

Consolidate database lists list in one place

Change-Id: Iadd6cae1e90134f89e8eccf1d2124befc146ecc4
---
M composer.json
M tests/cirrusTest.php
M wmf-config/CommonSettings.php
A wmf-config/DatabaseLists.php
4 files changed, 63 insertions(+), 25 deletions(-)


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

diff --git a/composer.json b/composer.json
index 9b2be44..a29819e 100644
--- a/composer.json
+++ b/composer.json
@@ -9,6 +9,11 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"phpunit/phpunit": "4.8.31"
},
+   "autoload": {
+   "psr-4": {
+   "Wikimedia\\Config\\": "wmf-config/"
+   }
+   },
"scripts": {
"test": [
"phpunit",
diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php
index e40ba44..30c540a 100644
--- a/tests/cirrusTest.php
+++ b/tests/cirrusTest.php
@@ -1,5 +1,7 @@
 loadWgConf( $wmfRealm );
 
list( $site, $lang ) = $wgConf->siteFromDB( $wgDBname );
-   $wikiTags = [];
-   foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
-   'large', 'wikimania', 'wikidata', 
'wikidataclient', 'visualeditor-nondefault',
-   'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho', 'mobilemainpagelegacy', 
'clldefault', 'nowikidatadescriptiontaglines',
-   'top6-wikipedia'
-   ] as $tag ) {
-   $dblist = MWWikiversions::readDbListFile( $tag );
-   if ( in_array( $wgDBname, $dblist ) ) {
-   $wikiTags[] = $tag;
-   }
-   }
+   $wikiTags = DatabaseLists::getTagsListsFor( $wgDBname );
 
$dbSuffix = ( $site === 'wikipedia' ) ? 'wiki' : $site;
$confParams = [
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index a00a871..e1486a3 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -11,6 +11,7 @@
 ###
 
 use MediaWiki\Logger\LoggerFactory;
+use Wikimedia\Config\DatabaseLists;
 
 # Godforsaken hack to work around problems with the Squid caching changes...
 #
@@ -162,19 +163,7 @@
# Get configuration from SiteConfiguration object
require( "$wmfConfigDir/InitialiseSettings.php" );
 
-   $wikiTags = [];
-   foreach ( [ 'private', 'fishbowl', 'special', 'closed', 'flow', 
'flaggedrevs', 'small', 'medium',
-   'large', 'wikimania', 'wikidata', 'wikidataclient', 
'visualeditor-nondefault',
-   'commonsuploads', 'nonbetafeatures', 'group0', 
'group1', 'group2', 'wikipedia', 'nonglobal',
-   'wikitech', 'nonecho', 'mobilemainpagelegacy', 
'clldefault', 'nowikidatadescriptiontaglines',
-   'related-articles-footer-blacklisted-skins',
-   'top6-wikipedia'
-   ] as $tag ) {
-   $dblist = MWWikiversions::readDbListFile( $tag );
-   if ( in_array( $wgDBname, $dblist ) ) {
-   $wikiTags[] = $tag;
-   }
-   }
+   $wikiTags = DatabaseLists::getTagsListsFor( $wgDBname );
 
$dbSuffix = ( $site === 'wikipedia' ) ? 'wiki' : $site;
$confParams = [
diff --git a/wmf-config/DatabaseLists.php b/wmf-config/DatabaseLists.php
new file mode 100644
index 000..59f44dc
--- /dev/null
+++ b/wmf-config/DatabaseLists.php
@@ -0,0 +1,53 @@
+https://gerrit.wikimedia.org/r/331825
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: beta: Set $wgLinterStatsdSampleFactor

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

Change subject: beta: Set $wgLinterStatsdSampleFactor
..


beta: Set $wgLinterStatsdSampleFactor

10 seems reasonable given the frequency of edits on beta.

Change-Id: I6d1c4755d92a0b9621c3856b4e24905ff8e8aafb
---
M wmf-config/InitialiseSettings-labs.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 15ebd82..9722d3c 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -563,5 +563,8 @@
'wmgUseTwoColConflict' => [
'default' => true,
],
+   'wgLinterStatsdSampleFactor' => [
+   'default' => 10,
+   ],
];
 } # wmflLabsSettings()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d1c4755d92a0b9621c3856b4e24905ff8e8aafb
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Allow AceEditorWidget to accept autocomplete word list

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

Change subject: Allow AceEditorWidget to accept autocomplete word list
..


Allow AceEditorWidget to accept autocomplete word list

Bug: T155107
Change-Id: I2dd752fb55a4d5596dbc8b8dc69eb55083d7ec66
---
M modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js
1 file changed, 24 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js
index cd646ad..c01ba8f 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js
@@ -27,12 +27,15 @@
  * @cfg {string} [autocomplete='none'] Symbolic name of autocomplete
  * mode: 'none', 'basic' (requires the user to press Ctrl-Space) or
  * 'live' (shows a list of suggestions as the user types)
+ * @cfg {Array} [autocompleteWordList=null] List of words to
+ * autocomplete to
  */
 ve.ui.MWAceEditorWidget = function VeUiMWAceEditorWidget( config ) {
// Configuration
config = config || {};
 
this.autocomplete = config.autocomplete || 'none';
+   this.autocompleteWordList = config.autocompleteWordList || null;
 
this.$ace = $( '' );
this.editor = null;
@@ -99,7 +102,9 @@
  * @fires resize
  */
 ve.ui.MWAceEditorWidget.prototype.setupEditor = function () {
-   var basePath = mw.config.get( 'wgExtensionAssetsPath', '' );
+   var completer, widget = this,
+   basePath = mw.config.get( 'wgExtensionAssetsPath', '' );
+
if ( basePath.slice( 0, 2 ) === '//' ) {
// ACE uses web workers, which have importScripts, which don't 
like relative links.
basePath = window.location.protocol + basePath;
@@ -109,10 +114,28 @@
this.$input.addClass( 'oo-ui-element-hidden' );
this.editor = ace.edit( this.$ace[ 0 ] );
this.setMinRows( this.minRows );
+
+   // Autocompletion
this.editor.setOptions( {
enableBasicAutocompletion: this.autocomplete !== 'none',
enableLiveAutocompletion: this.autocomplete === 'live'
} );
+   if ( this.autocompleteWordList ) {
+   completer = {
+   getCompletions: function( editor, session, pos, prefix, 
callback ) {
+   var wordList = widget.autocompleteWordList;
+   callback( null, wordList.map( function( word ) {
+   return {
+   caption: word,
+   value: word,
+   meta: 'static'
+   };
+   } ) );
+   }
+   };
+   ace.require( 'ace/ext/language_tools' ).addCompleter( completer 
);
+   }
+
this.editor.getSession().on( 'change', this.onEditorChange.bind( this ) 
);
this.editor.renderer.on( 'resize', this.onEditorResize.bind( this ) );
this.setEditorValue( this.getValue() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dd752fb55a4d5596dbc8b8dc69eb55083d7ec66
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Tchanders 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Handle new Parsoid reference links

2017-01-11 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331824 )

Change subject: Handle new Parsoid reference links
..

Handle new Parsoid reference links

Parsoid recently changed the formatting of reference link hrefs to include
the page title before the URL fragment.  Update the app-side link handling
to handle this format.

Bug: T155070
Change-Id: I6a6b12984807358d3800bd8a6f89c5649f3c2c9f
---
M app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/page/LinkHandler.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
A app/src/main/java/org/wikipedia/page/PageTitleContextFragment.java
A app/src/test/java/org/wikipedia/page/LinkHandlerTest.java
5 files changed, 78 insertions(+), 12 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java 
b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
index 2bef695..db6059f 100644
--- a/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
+++ b/app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
@@ -31,6 +31,7 @@
 import org.wikipedia.page.LinkHandler;
 import org.wikipedia.page.PageActivity;
 import org.wikipedia.page.PageTitle;
+import org.wikipedia.page.PageTitleContextFragment;
 import org.wikipedia.util.ConfigurationCompat;
 import org.wikipedia.util.L10nUtil;
 import org.wikipedia.util.UriUtil;
@@ -46,10 +47,11 @@
 
 import static org.wikipedia.util.DeviceUtil.hideSoftKeyboard;
 
-public class EditPreviewFragment extends Fragment {
+public class EditPreviewFragment extends Fragment implements 
PageTitleContextFragment {
 private ObservableWebView webview;
 private ScrollView previewContainer;
 private EditSectionActivity parentActivity;
+@NonNull private PageTitle pageTitle;
 
 private ViewGroup editSummaryTagsContainer;
 
@@ -62,6 +64,10 @@
 
 private ProgressDialog progressDialog;
 private EditFunnel funnel;
+
+public PageTitle getTitle() {
+return pageTitle;
+}
 
 @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container, 
Bundle savedInstanceState) {
@@ -79,8 +85,8 @@
 public void onActivityCreated(Bundle savedInstanceState) {
 super.onActivityCreated(savedInstanceState);
 
-parentActivity = (EditSectionActivity)getActivity();
-PageTitle pageTitle = parentActivity.getPageTitle();
+parentActivity = (EditSectionActivity) getActivity();
+pageTitle = parentActivity.getPageTitle();
 funnel = 
WikipediaApp.getInstance().getFunnelManager().getEditFunnel(pageTitle);
 
 /*
@@ -189,7 +195,7 @@
 new DarkModeMarshaller(bridge).turnOn(false);
 }
 
-new LinkHandler(getActivity(), bridge) {
+new LinkHandler(this) {
 @Override
 public void onPageLinkClicked(String href) {
 // TODO: also need to handle references, issues, disambig, 
... in preview eventually
diff --git a/app/src/main/java/org/wikipedia/page/LinkHandler.java 
b/app/src/main/java/org/wikipedia/page/LinkHandler.java
index 06fa39d..f708343 100644
--- a/app/src/main/java/org/wikipedia/page/LinkHandler.java
+++ b/app/src/main/java/org/wikipedia/page/LinkHandler.java
@@ -20,15 +20,15 @@
  * Handles any html links coming from a {@link org.wikipedia.page.PageFragment}
  */
 public abstract class LinkHandler implements 
CommunicationBridge.JSEventListener, LinkMovementMethodExt.UrlHandler {
-private final Context context;
+@NonNull private Context context;
+@Nullable private PageTitleContextFragment fragment;
 
-public LinkHandler(Context context, CommunicationBridge bridge) {
-this(context);
-
-bridge.addListener("linkClicked", this);
+public LinkHandler(@NonNull PageTitleContextFragment fragment) {
+this.context = fragment.getActivity();
+this.fragment = fragment;
 }
 
-public LinkHandler(Context context) {
+LinkHandler(@NonNull Context context) {
 this.context = context;
 }
 
@@ -64,6 +64,8 @@
 onInternalLinkClicked(title);
 } else if (href.startsWith("#")) {
 onPageLinkClicked(href.substring(1));
+} else if (fragment != null && 
href.startsWith(fragment.getTitle().getText() + "#")) {
+
onPageLinkClicked(href.substring(fragment.getTitle().getText().length() + 1));
 } else {
 Uri uri = Uri.parse(href);
 String authority = uri.getAuthority();
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 49f5432..ae79c50 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix missing ct_id recovery

2017-01-11 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331823 )

Change subject: Fix missing ct_id recovery
..

Fix missing ct_id recovery

We were returning a blank when there were no ct_ids on any associated
contributions. Don't return early if empty, and let the existing
backfill logic do its job.

Bug: T147873
Change-Id: Id6a9374260d6bbc4b73df90e3924cb6f38c6f198
---
M sites/all/modules/queue2civicrm/recurring/recurring.module
M sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
M sites/all/modules/wmf_civicrm/tracking.inc
3 files changed, 23 insertions(+), 3 deletions(-)


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

diff --git a/sites/all/modules/queue2civicrm/recurring/recurring.module 
b/sites/all/modules/queue2civicrm/recurring/recurring.module
index 4b6588b..106e2b7 100644
--- a/sites/all/modules/queue2civicrm/recurring/recurring.module
+++ b/sites/all/modules/queue2civicrm/recurring/recurring.module
@@ -167,8 +167,10 @@
 $query = "SELECT id FROM {contribution_tracking} WHERE contribution_id 
IN ( {$id_list} )";
 // we can use this related contribution tracking id
 $contribution_tracking_id = db_query( $query )->fetchField();
-watchdog( 'recurring', 'recurring_get_contribution_tracking_id: 
Selected contrib tracking id from past contributions, %cti', array( '%cti' => 
$contribution_tracking_id ), WATCHDOG_DEBUG );
-return $contribution_tracking_id;
+if ( !empty( $contribution_tracking_id ) ) {
+  watchdog( 'recurring', 'recurring_get_contribution_tracking_id: 
Selected contrib tracking id from past contributions, %cti', array( '%cti' => 
$contribution_tracking_id ), WATCHDOG_DEBUG );
+  return $contribution_tracking_id;
+}
   }
 }
 
diff --git 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
index 7bfada8..fcc4d59 100644
--- 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
+++ 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
@@ -186,4 +186,22 @@
$this->assertTrue( $result->getCommunicationStatus() );
$this->assertRegExp( '/SET_PAYMENT/', $result->getRawResponse() 
);
}
+
+   /**
+* Recover from missing ct_ids on all associated contributions
+*/
+   public function testBackfillContributionTracking() {
+   $id_list = implode( ',', $this->contributions );
+
+   $dbs = wmf_civicrm_get_dbs();
+   $dbs->push( 'donations' );
+   $query = "DELETE FROM {contribution_tracking} WHERE 
contribution_id IN( $id_list )";
+   db_query( $query );
+   $contribution_tracking_id = 
recurring_get_contribution_tracking_id( array(
+   'txn_type' => 'subscr_payment',
+   'subscr_id' => $this->subscriptionId,
+   'payment_date' => strtotime( "now" ),
+   ) );
+   $this->assertNotEmpty( $contribution_tracking_id );
+   }
 }
diff --git a/sites/all/modules/wmf_civicrm/tracking.inc 
b/sites/all/modules/wmf_civicrm/tracking.inc
index 178af4f..6d7739c 100644
--- a/sites/all/modules/wmf_civicrm/tracking.inc
+++ b/sites/all/modules/wmf_civicrm/tracking.inc
@@ -7,7 +7,7 @@
  * particular transaction.  Rare, but inserting some data for a trxn when
  * absent helps facilitate better analytics.
  * 
- * @return the contribution_tracking id 
+ * @return int the contribution_tracking id
  */
 function wmf_civicrm_insert_contribution_tracking( $utm_source, $utm_medium, 
$utm_campaign, $ts, $contrib_id=null, $optout=null, $anonymous=null ) {
 // make sure we're using the default (drupal) db

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6a9374260d6bbc4b73df90e3924cb6f38c6f198
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


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

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

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


Update VE core submodule to master (a129536)

New changes:
1e4a2a5 Desktop demo improvements
0be3300 Replace abandoned colors with current ones
c3895e4 Warn before deleting a bunch of local files
a21d08d ui.CommandHelpRegistry: fix extending of existing command

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

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



diff --git a/lib/ve b/lib/ve
index 460f16c..a129536 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 460f16cbb3b881ec8bc51c95aec648b96996f2a8
+Subproject commit a1295369a8bfe2b53c6f8f5c5f8abda2bbac6a64

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CookieWarning[master]: Remove explicit font selection

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

Change subject: Remove explicit font selection
..


Remove explicit font selection

We want to use the font of the page, not some different one.

Change-Id: Iaf8d6ce5e7422a4515fc9e8ab4f067e213609560
---
M resources/ext.CookieWarning/ext.CookieWarning.less
M resources/ext.CookieWarning/ext.CookieWarning.mobile.less
2 files changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/resources/ext.CookieWarning/ext.CookieWarning.less 
b/resources/ext.CookieWarning/ext.CookieWarning.less
index 6a816b2..6b1889f 100644
--- a/resources/ext.CookieWarning/ext.CookieWarning.less
+++ b/resources/ext.CookieWarning/ext.CookieWarning.less
@@ -5,7 +5,6 @@
opacity: 0.85;
color: #fff;
font-weight: bold;
-   font-family: arial;
font-size: 13px;
padding: 7px 15px;
top: 0;
@@ -35,7 +34,6 @@
margin-right: 0.5em;
white-space: nowrap;
font-weight: bold;
-   font-family: arial;
font-size: 13px;
}
 }
diff --git a/resources/ext.CookieWarning/ext.CookieWarning.mobile.less 
b/resources/ext.CookieWarning/ext.CookieWarning.mobile.less
index afb13b4..7280fe9 100644
--- a/resources/ext.CookieWarning/ext.CookieWarning.mobile.less
+++ b/resources/ext.CookieWarning/ext.CookieWarning.mobile.less
@@ -6,7 +6,6 @@
 .mw-cookiewarning-container {
background-color: #ff;
padding: 16px;
-   font-family: HelveticaNeue;
font-size: @cookieWarningFontSize;
font-weight: 500;
font-style: normal;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf8d6ce5e7422a4515fc9e8ab4f067e213609560
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CookieWarning
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ApiVisualEditorEdit: Use 'html' format for API errors so we ...

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

Change subject: ApiVisualEditorEdit: Use 'html' format for API errors so we can 
see them
..


ApiVisualEditorEdit: Use 'html' format for API errors so we can see them

The Translate extension emits errors when the saved text is in error —

* pt-parse-open,
* pt-parse-close,
* pt-shake-position,
* pt-shake-multiple,
* pt-shake-empty, or
* pt-parse-nested

Switching to 'html' error message format means we pay attention to the top
error, displayed in the user's language. This avoids showing 'editaborted'
generic messages when we can actually help people with specifics.

Change-Id: Id9d7e510e32a3a13cc061648679e01edd68a3868
---
M ApiVisualEditorEdit.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index 5a9e503..baacfda 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -25,6 +25,7 @@
'basetimestamp' => $params['basetimestamp'],
'starttimestamp' => $params['starttimestamp'],
'token' => $params['token'],
+   'errorformat' => 'html',
];
 
if ( $params['minor'] ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9d7e510e32a3a13cc061648679e01edd68a3868
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: DLynch 
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]: Minor changes to RebaseServer

2017-01-11 Thread Divec (Code Review)
Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331822 )

Change subject: Minor changes to RebaseServer
..

Minor changes to RebaseServer

Change-Id: I59d1995fa6330c6ee6ffa9fc06079a2d39ebe67d
---
M .jsduck/categories.json
M build/modules.json
M rebaser/server.js
A src/dm/ve.dm.RebaseDocState.js
M src/dm/ve.dm.RebaseServer.js
M tests/dm/ve.dm.RebaseServer.test.js
M tests/index.html
7 files changed, 77 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/22/331822/1

diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index e768281..866f841 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -104,6 +104,7 @@
"name": "Rebasing",
"classes": [
"ve.dm.Change",
+   "ve.dm.RebaseDocState",
"ve.dm.RebaseServer",
"ve.dm.RebaseClient",
"ve.dm.SurfaceSynchronizer"
diff --git a/build/modules.json b/build/modules.json
index 40c33a2..81cc35b 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -622,6 +622,7 @@
"visualEditor.rebase": {
"scripts": [
"src/dm/ve.dm.Change.js",
+   "src/dm/ve.dm.RebaseDocState.js",
"src/dm/ve.dm.RebaseServer.js",
"src/dm/ve.dm.RebaseClient.js",
"src/dm/ve.dm.SurfaceSynchronizer.js"
@@ -910,6 +911,7 @@
"src/dm/ve.dm.IndexValueStore.js",
"src/dm/ve.dm.Transaction.js",
"src/dm/ve.dm.Change.js",
+   "src/dm/ve.dm.RebaseDocState.js",
"src/dm/ve.dm.RebaseServer.js",
"src/ve.Range.js",
"src/dm/ve.dm.Selection.js",
diff --git a/rebaser/server.js b/rebaser/server.js
index 9f24955..feea48a 100644
--- a/rebaser/server.js
+++ b/rebaser/server.js
@@ -39,7 +39,7 @@
 
 function makeConnectionHandler( docName ) {
return function handleConnection( socket ) {
-   var history = rebaseServer.getStateForDoc( docName ).history,
+   var history = rebaseServer.getDocState( docName ).history,
author = 1 + ( lastAuthorForDoc.get( docName ) || 0 );
lastAuthorForDoc.set( docName, author );
console.log( 'new client ' + author + ' for ' + docName );
diff --git a/src/dm/ve.dm.RebaseDocState.js b/src/dm/ve.dm.RebaseDocState.js
new file mode 100644
index 000..3a06686
--- /dev/null
+++ b/src/dm/ve.dm.RebaseDocState.js
@@ -0,0 +1,38 @@
+/*!
+ * VisualEditor DataModel rebase document state class.
+ *
+ * @copyright 2011-2017 VisualEditor Team and others; see 
http://ve.mit-license.org
+ */
+
+/* eslint-env node, es6 */
+
+/**
+ * DataModel rebase document state
+ *
+ * @class
+ *
+ * @constructor
+ * @param {ve.dm.Change} history History as one big change
+ * @param {Map} continueBases Per-author transposed 
history for rebasing
+ * @param {Map} rejections Per-author count of unacknowledged 
rejections
+ */
+ve.dm.RebaseDocState = function VeDmRebaseDocState( history, continueBases, 
rejections ) {
+   /**
+* @property {ve.dm.Change} history History as one big change
+*/
+   this.history = history || new ve.dm.Change( 0, [], [], {} );
+
+   /**
+* @property {Map.} continueBases Per-author 
transposed history for rebasing
+*/
+   this.continueBases = continueBases || new Map();
+
+   /**
+* @property {Map.} Per-author count of unacknowledged 
rejections
+*/
+   this.rejections = rejections || new Map();
+};
+
+/* Inheritance */
+
+OO.initClass( ve.dm.RebaseDocState );
diff --git a/src/dm/ve.dm.RebaseServer.js b/src/dm/ve.dm.RebaseServer.js
index ada232d..af9918b 100644
--- a/src/dm/ve.dm.RebaseServer.js
+++ b/src/dm/ve.dm.RebaseServer.js
@@ -21,21 +21,34 @@
 /**
  * Get the state of a document by name.
  *
- * @param {string} name Name of a document
- * @return {Object} Document state (history and selections)
- * @return {ve.dm.Change} return.history History as one big Change
- * @return {Map.} return.continueBases Per-author 
transposed history for rebasing
- * @return {Map.} return.rejections Per-author count of 
unacknowledged rejections
+ * @param {string} doc Name of a document
+ * @return {ve.dm.RebaseDocState} Document state
  */
-ve.dm.RebaseServer.prototype.getStateForDoc = function ( name ) {
-   if ( !this.stateForDoc.has( name ) ) {
-   this.stateForDoc.set( name, {
-

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

2017-01-11 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331821 )

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

Update VE core submodule to master (a129536)

New changes:
1e4a2a5 Desktop demo improvements
0be3300 Replace abandoned colors with current ones
c3895e4 Warn before deleting a bunch of local files
a21d08d ui.CommandHelpRegistry: fix extending of existing command

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


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

diff --git a/lib/ve b/lib/ve
index 460f16c..a129536 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 460f16cbb3b881ec8bc51c95aec648b96996f2a8
+Subproject commit a1295369a8bfe2b53c6f8f5c5f8abda2bbac6a64

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...InterwikiSorting[master]: Add Phan config

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

Change subject: Add Phan config
..


Add Phan config

See: https://www.mediawiki.org/wiki/Continuous_integration/Phan

Change-Id: Ibb8e338f5546a7b3bc16efa208d9f4651b2e674b
---
M .gitignore
A tests/phan/config.php
A tests/phan/issues/.gitkeep
A tests/phan/stubs/README
4 files changed, 308 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index c369f1e..df1ee47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,5 @@
 ## Sublime
 sublime-*
 sftp-config.json
+.idea/
+/tests/phan/issues
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..44c53ec
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,303 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   'src/',
+   'tests/phan/stubs/',
+   './../../includes',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => function_exists( 'xcache_get' ) ? [] : [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   'tests/phan/stubs/',
+   './../../includes',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had more issues
+* to fix in your code base.
+*
+* In quick-mode the scanner doesn't rescan a function
+* or a method's code block every time a call is seen.
+* This means that the problem here won't be detected:
+*
+* ```php
+*  false,
+
+   /**
+* By default, Phan will not analyze all node types
+* in order to save time. If this config is set to true,
+* Phan will dig deeper into the AST tree and do an
+* analysis on all nodes, possibly finding more issues.
+*
+* See \Phan\Analysis::shouldVisit for the set of skipped
+* nodes.
+*/
+   'should_visit_all_nodes' => true,
+
+   /**
+* If enabled, check all methods that override a
+* parent method to make sure its signature is
+* compatible with the parent's. This check
+* can add quite a bit of time to the analysis.
+*/
+   'analyze_signature_compatibility' => true,
+
+   // Emit all issues. They are then suppressed via
+   // suppress_issue_types, rather than a minimum
+   // severity.
+   "minimum_severity" => 0,
+
+   /**
+* If true, missing properties will be created when
+* they are first seen. If false, we'll report an
+* error message if there is an attempt to write
+* to a class property that wasn't explicitly
+* defined.
+*/
+   'allow_missing_properties' => false,
+
+   /**
+* Allow null to be cast as any type and for any
+* type to be cast to null. Setting this to false
+* will cut down on false positives.
+*/
+   'null_casts_as_any_type' => true,
+
+   /**
+* If enabled, scalars (int, float, bool, string, null)
+* are treated as if they can cast to each other.
+*
+* MediaWiki is pretty lax and uses many scalar
+* types 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add 'webp' package to ImageMagick role

2017-01-11 Thread Brion VIBBER (Code Review)
Brion VIBBER has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331820 )

Change subject: Add 'webp' package to ImageMagick role
..

Add 'webp' package to ImageMagick role

ImageMagick converts WebP files through delegation to external
programs 'cwebp' and 'dwebp', which live in the 'webp' package
and are not installed by the 'imagemagick' package itself.

This should fix thumbs for WebP uploads which were enabled today.

Bug: T27397
Change-Id: I00c0334aae132db4bb6ddc5e1f29e9d62f381800
---
M modules/imagemagick/manifests/install.pp
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/modules/imagemagick/manifests/install.pp 
b/modules/imagemagick/manifests/install.pp
index 6881f22..37f09eb 100644
--- a/modules/imagemagick/manifests/install.pp
+++ b/modules/imagemagick/manifests/install.pp
@@ -17,6 +17,9 @@
 group   => 'root',
 mode=> '0644',
 source  => 'puppet:///modules/imagemagick/policy.xml',
-require => Class['packages::imagemagick']
+require => [
+Class['packages::imagemagick'],
+Class['packages::webp']
+]
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00c0334aae132db4bb6ddc5e1f29e9d62f381800
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Brion VIBBER 

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: ui.CommandHelpRegistry: fix extending of existing command

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

Change subject: ui.CommandHelpRegistry: fix extending of existing command
..


ui.CommandHelpRegistry: fix extending of existing command

We were accidentally discarding the existing command details, since 16fa88e9.

Change-Id: Ie749f7532036b7285d868c640ddbf42e2159e09d
---
M src/ui/ve.ui.CommandHelpRegistry.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/ui/ve.ui.CommandHelpRegistry.js 
b/src/ui/ve.ui.CommandHelpRegistry.js
index 84bbf8f..e05944f 100644
--- a/src/ui/ve.ui.CommandHelpRegistry.js
+++ b/src/ui/ve.ui.CommandHelpRegistry.js
@@ -43,7 +43,7 @@
details = ve.copy( details );
details.sequences = ( existingCommand.sequences || [] 
).concat( details.sequences );
}
-   ve.extendObject( existingCommand, details );
+   details = ve.extendObject( existingCommand, details );
}
 
details.group = groupName;

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Use directly wgGalleryOptions without wmg

2017-01-11 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331819 )

Change subject: Use directly wgGalleryOptions without wmg
..

Use directly wgGalleryOptions without wmg

Change-Id: I7b7db8b88a46357a74a0565f4ce2a8c17aece501
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index a00a871..b6f532f 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -460,10 +460,6 @@
 $wgFileBlacklist[] = 'txt';
 $wgFileBlacklist[] = 'mht';
 
-if ( isset( $wmgGalleryOptions ) ) {
-   $wgGalleryOptions = $wmgGalleryOptions;
-}
-
 if ( $wmgUsePagedTiffHandler ) {
wfLoadExtension( 'PagedTiffHandler' );
 }
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cb10374..e359a25 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17827,7 +17827,7 @@
'cswiki' => 14, // T148327
 ],
 
-'wmgGalleryOptions' => [
+'wgGalleryOptions' => [
'default' => [
'imagesPerRow' => 0,
'imageWidth' => 120,

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Add mwext-php70-phan-jessie to Wikibase experimental

2017-01-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331818 )

Change subject: Add mwext-php70-phan-jessie to Wikibase experimental
..

Add mwext-php70-phan-jessie to Wikibase experimental

Change-Id: I2b163cbaa1f021839dec142f080a197e605779cb
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/18/331818/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index e5a677a..bbcdb0e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -8604,6 +8604,7 @@
   - mwext-Wikibase-client-tests-sqlite-php55
   # Will switch to Nodepool eventually T137112
   - mwext-mw-selenium-composer-jessie
+  - mwext-php70-phan-jessie
 postmerge:
   - mwext-doxygen-publish
   - mwext-jsduck-publish

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Don't accept pipe unconditionally in extlink

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

Change subject: Don't accept pipe unconditionally in extlink
..


Don't accept pipe unconditionally in extlink

 * It's only protected in link descriptions, as exemplified in,
   Images with the "|" character in the comment

 * Fixes a falsely passing test.

 * % is removed since it isn't actually breaking on it.  Maybe it was
   meant to?

Change-Id: I41063fb3622e532803b18c1b3e90d36f2c673fc9
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests.txt
2 files changed, 11 insertions(+), 5 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index ff3d4b6..ca741b8 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -2052,15 +2052,22 @@
 extlink_preprocessor_text
   // added special separator character class inline: separates url from
   // description / text
-  = r:( $[^'<~[{\n\r|!\]}\t&="' 
\u00A0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000]+
-  / !inline_breaks s:( directive / no_punctuation_char ) { return s; }
+  = & {
+// Prevent breaking on pipes when we're in a link description.
+// See the test, 'Images with the "|" character in the comment'.
+return stops.push('linkdesc', false);
+  }
+  r:( $[^'<~[{\n\r|!\]}\t&="' 
\u00A0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000]+
+  / !inline_breaks s:( directive / no_punctuation_char / [&|{] ) { return s; }
   /// urlencoded_char
   // !inline_breaks no_punctuation_char
   / $([.:,] !(space / eolf))
   / $(['] ![']) // single quotes are ok, double quotes are bad
-  / [&%|{] )+ {
+  )+ {
+  stops.pop('linkdesc');
   return tu.flattenString(r);
   }
+  / & { return stops.pop('linkdesc'); }
 
 // Attribute values with preprocessor support
 
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index aed718c..34083e0 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -6407,7 +6407,7 @@
 !! html/parsoid
 
 
-" 
onmouseover="alert(document.cookie)">test
+[ftp://|x]" 
onmouseover="alert(document.cookie)">test
 !! end
 
 !! test
@@ -19789,7 +19789,6 @@
 

 
 !!end
-
 
 # Images with the "|" character in external URLs in comment tags; Eats half 
the comment, leaves unmatched "" tag.
 !! test

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: API improvements needed for ProofreadPage extension.

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

Change subject: API improvements needed for ProofreadPage extension.
..

API improvements needed for ProofreadPage extension.

ProofreadPage wants to fetch its content w/ a specific non-wikitext
contentformat.

Change-Id: I3e039e36fd8202b5a068a7dcb2303e99bada8ad6
---
M lib/config/extapi.js
M lib/mw/ApiRequest.js
2 files changed, 11 insertions(+), 3 deletions(-)


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

diff --git a/lib/config/extapi.js b/lib/config/extapi.js
index 193e30e..5b01687 100644
--- a/lib/config/extapi.js
+++ b/lib/config/extapi.js
@@ -28,6 +28,7 @@
// and explicitly mark the exported functions as 
"stable", ie
// we need to bump Parsoid's major version if the 
exported
// functions are changed.
+   TemplateRequest: 
require('../mw/ApiRequest.js').TemplateRequest,
Util: require('../utils/Util.js').Util,
DOMUtils: require('../utils/DOMUtils.js').DOMUtils,
JSUtils: require('../utils/jsutils.js').JSUtils,
diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js
index 7421c17..dd2ef3f 100644
--- a/lib/mw/ApiRequest.js
+++ b/lib/mw/ApiRequest.js
@@ -488,12 +488,13 @@
  * @param {string} title The template (or really, page) we should fetch from 
the wiki
  * @param {string} oldid The revision ID you want to get, defaults to "latest 
revision"
  */
-function TemplateRequest(env, title, oldid) {
+function TemplateRequest(env, title, oldid, opts) {
ApiRequest.call(this, env, title);
// IMPORTANT: Set queueKey to the 'title'
// since TemplateHandler uses it for recording listeners
this.queueKey = title;
this.reqType = "Template Fetch";
+   opts = opts || {}; // optional extra arguments
 
var apiargs = {
format: 'json',
@@ -502,6 +503,12 @@
rawcontinue: 1,
rvprop: PARSOID_RVPROP,
};
+
+   // Allow request to give a specific contentformat
+   // (otherwise wikitext is the default)
+   if (opts.contentformat) {
+   apiargs.rvcontentformat = opts.contentformat;
+   }
 
if (oldid) {
this.oldid = oldid;
@@ -613,8 +620,8 @@
 TemplateRequest.promise = promiseFor(TemplateRequest);
 
 // Function which returns a promise to set page src info.
-TemplateRequest.setPageSrcInfo = function(env, target, oldid) {
-   return TemplateRequest.promise(env, target, oldid).then(function(src) {
+TemplateRequest.setPageSrcInfo = function(env, target, oldid, opts) {
+   return TemplateRequest.promise(env, target, oldid, 
opts).then(function(src) {
env.setPageSrcInfo(src);
});
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e039e36fd8202b5a068a7dcb2303e99bada8ad6
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] VisualEditor/VisualEditor[master]: ui.CommandHelpRegistry: fix extending of existing command

2017-01-11 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331816 )

Change subject: ui.CommandHelpRegistry: fix extending of existing command
..

ui.CommandHelpRegistry: fix extending of existing command

We were accidentally discarding the existing command details, since 16fa88e9.

Change-Id: Ie749f7532036b7285d868c640ddbf42e2159e09d
---
M src/ui/ve.ui.CommandHelpRegistry.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/16/331816/1

diff --git a/src/ui/ve.ui.CommandHelpRegistry.js 
b/src/ui/ve.ui.CommandHelpRegistry.js
index 84bbf8f..e05944f 100644
--- a/src/ui/ve.ui.CommandHelpRegistry.js
+++ b/src/ui/ve.ui.CommandHelpRegistry.js
@@ -43,7 +43,7 @@
details = ve.copy( details );
details.sequences = ( existingCommand.sequences || [] 
).concat( details.sequences );
}
-   ve.extendObject( existingCommand, details );
+   details = ve.extendObject( existingCommand, details );
}
 
details.group = groupName;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Fix fatal in prod

2017-01-11 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331815 )

Change subject: Fix fatal in prod
..

Fix fatal in prod

Bug: T154705
Change-Id: I18188a0052631d79e9665f6406cba0cf2a302fb8
---
M includes/JCDataApi.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/includes/JCDataApi.php b/includes/JCDataApi.php
index 4ac7848..294e332 100644
--- a/includes/JCDataApi.php
+++ b/includes/JCDataApi.php
@@ -4,6 +4,7 @@
 use ApiBase;
 use ApiResult;
 use ApiFormatJson;
+use Title;
 
 /**
  * Get localized json data, similar to Lua's mw.data.get() function
@@ -20,7 +21,10 @@
$data = JCSingleton::getContent( $jct );
if ( !$data ) {
$this->dieWithError(
-   [ 'apierror-invalidtitle', wfEscapeWikiText( 
$jct->getPrefixedText() ) ]
+   [
+   'apierror-invalidtitle',
+   wfEscapeWikiText( 
Title::newFromTitleValue( $jct )->getPrefixedText() )
+   ]
);
} elseif ( !method_exists( $data, 'getLocalizedData' ) ) {
$data = $data->getData();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18188a0052631d79e9665f6406cba0cf2a302fb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Move mwext-php70-phan-jessie to nodepool

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

Change subject: Move mwext-php70-phan-jessie to nodepool
..


Move mwext-php70-phan-jessie to nodepool

Change-Id: I712a8b98a819a651b10f8e4f53b10ca93fe45526
---
M jjb/mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 455f4ff..0834ba7 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -435,7 +435,7 @@
 # Phan! (T153039)
 - job:
 name: 'mwext-php70-phan-jessie'
-node: DebianJessie
+node: ci-jessie-wikimedia
 concurrent: true
 properties:
  - build-discarder:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I712a8b98a819a651b10f8e4f53b10ca93fe45526
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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...ElectronPdfService[master]: Add Phan config

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

Change subject: Add Phan config
..


Add Phan config

See: https://www.mediawiki.org/wiki/Continuous_integration/Phan

Change-Id: I55be17a368a43a076f6b600c3dff746f1913989e
---
M .gitignore
A tests/phan/config.php
A tests/phan/issues/.gitkeep
A tests/phan/stubs/README
4 files changed, 307 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 51d4694..fd16af5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 /composer.lock
 /vendor
 /node_modules
+/tests/phan/issues
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..44c53ec
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,303 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   'src/',
+   'tests/phan/stubs/',
+   './../../includes',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => function_exists( 'xcache_get' ) ? [] : [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   'tests/phan/stubs/',
+   './../../includes',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had more issues
+* to fix in your code base.
+*
+* In quick-mode the scanner doesn't rescan a function
+* or a method's code block every time a call is seen.
+* This means that the problem here won't be detected:
+*
+* ```php
+*  false,
+
+   /**
+* By default, Phan will not analyze all node types
+* in order to save time. If this config is set to true,
+* Phan will dig deeper into the AST tree and do an
+* analysis on all nodes, possibly finding more issues.
+*
+* See \Phan\Analysis::shouldVisit for the set of skipped
+* nodes.
+*/
+   'should_visit_all_nodes' => true,
+
+   /**
+* If enabled, check all methods that override a
+* parent method to make sure its signature is
+* compatible with the parent's. This check
+* can add quite a bit of time to the analysis.
+*/
+   'analyze_signature_compatibility' => true,
+
+   // Emit all issues. They are then suppressed via
+   // suppress_issue_types, rather than a minimum
+   // severity.
+   "minimum_severity" => 0,
+
+   /**
+* If true, missing properties will be created when
+* they are first seen. If false, we'll report an
+* error message if there is an attempt to write
+* to a class property that wasn't explicitly
+* defined.
+*/
+   'allow_missing_properties' => false,
+
+   /**
+* Allow null to be cast as any type and for any
+* type to be cast to null. Setting this to false
+* will cut down on false positives.
+*/
+   'null_casts_as_any_type' => true,
+
+   /**
+* If enabled, scalars (int, float, bool, string, null)
+* are treated as if they can cast to each other.
+*
+* MediaWiki is pretty lax and uses many scalar
+* types 

[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Remove b/c stuff

2017-01-11 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331814 )

Change subject: Remove b/c stuff
..

Remove b/c stuff

Change-Id: I7e878442569e58e34c577d2d52e3a617e3858f04
---
M includes/JCDataApi.php
1 file changed, 4 insertions(+), 12 deletions(-)


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

diff --git a/includes/JCDataApi.php b/includes/JCDataApi.php
index 4697abb..4ac7848 100644
--- a/includes/JCDataApi.php
+++ b/includes/JCDataApi.php
@@ -14,22 +14,14 @@
$params = $this->extractRequestParams();
$jct = JCSingleton::parseTitle( $params['title'], NS_DATA );
if ( !$jct ) {
-   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
-   } else {
-   $this->dieUsageMsg( [ 'invalidtitle', 
$params['title'] ] );
-   }
+   $this->dieWithError( [ 'apierror-invalidtitle', 
wfEscapeWikiText( $params['title'] ) ] );
}
 
$data = JCSingleton::getContent( $jct );
if ( !$data ) {
-   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-   $this->dieWithError(
-   [ 'apierror-invalidtitle', 
wfEscapeWikiText( $jct->getPrefixedText() ) ]
-   );
-   } else {
-   $this->dieUsageMsg( [ 'invalidtitle', $jct ] );
-   }
+   $this->dieWithError(
+   [ 'apierror-invalidtitle', wfEscapeWikiText( 
$jct->getPrefixedText() ) ]
+   );
} elseif ( !method_exists( $data, 'getLocalizedData' ) ) {
$data = $data->getData();
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e878442569e58e34c577d2d52e3a617e3858f04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/JsonConfig
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: uw.LocationDetailsWidget: It's an error to specify only one ...

2017-01-11 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331813 )

Change subject: uw.LocationDetailsWidget: It's an error to specify only one of 
latitude, longitude
..

uw.LocationDetailsWidget: It's an error to specify only one of latitude, 
longitude

Either both or none must be present.

Change-Id: I844bdd1af552557edfb0cdc168eabda2621d8b39
---
M resources/details/uw.LocationDetailsWidget.js
1 file changed, 7 insertions(+), 5 deletions(-)


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

diff --git a/resources/details/uw.LocationDetailsWidget.js 
b/resources/details/uw.LocationDetailsWidget.js
index d6f6bf3..1db0518 100644
--- a/resources/details/uw.LocationDetailsWidget.js
+++ b/resources/details/uw.LocationDetailsWidget.js
@@ -62,12 +62,14 @@
// input is invalid if the coordinates are out of bounds, or if 
the
// coordinates that were derived from the input are 0, without 
a 0 even
// being present in the input
-   if ( latNum > 90 || latNum < -90 || ( latNum === 0 && 
latInput.indexOf( '0' ) < 0 && latInput !== '' ) || isNaN( latNum ) ) {
-   errors.push( mw.message( 'mwe-upwiz-error-latitude' ) );
-   }
+   if ( latInput || lonInput ) {
+   if ( latNum > 90 || latNum < -90 || ( latNum === 0 && 
latInput.indexOf( '0' ) < 0 ) || isNaN( latNum ) ) {
+   errors.push( mw.message( 
'mwe-upwiz-error-latitude' ) );
+   }
 
-   if ( lonNum > 180 || lonNum < -180 || ( lonNum === 0 && 
lonInput.indexOf( '0' ) < 0 && lonInput !== '' ) || isNaN( lonNum ) ) {
-   errors.push( mw.message( 'mwe-upwiz-error-longitude' ) 
);
+   if ( lonNum > 180 || lonNum < -180 || ( lonNum === 0 && 
lonInput.indexOf( '0' ) < 0 ) || isNaN( lonNum ) ) {
+   errors.push( mw.message( 
'mwe-upwiz-error-longitude' ) );
+   }
}
 
if ( headInput !== '' && ( headInput > 360 || headInput < 0 || 
isNaN( headNum ) ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I844bdd1af552557edfb0cdc168eabda2621d8b39
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...Cognate[master]: Add Phan config

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

Change subject: Add Phan config
..


Add Phan config

See: https://www.mediawiki.org/wiki/Continuous_integration/Phan

Change-Id: Ifc78ad0373c55d1559de51375720677c546f8d23
---
M .gitignore
A tests/phan/config.php
A tests/phan/issues/.gitkeep
A tests/phan/stubs/README
4 files changed, 310 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 309b0a3..a7e9044 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 .idea/
+/tests/phan/issues
 node_modules/
 vendor/
 
diff --git a/tests/phan/config.php b/tests/phan/config.php
new file mode 100644
index 000..ca52658
--- /dev/null
+++ b/tests/phan/config.php
@@ -0,0 +1,306 @@
+ [
+   ],
+
+   /**
+* A list of directories that should be parsed for class and
+* method information. After excluding the directories
+* defined in exclude_analysis_directory_list, the remaining
+* files will be statically analyzed for errors.
+*
+* Thus, both first-party and third-party code being used by
+* your application should be included in this list.
+*/
+   'directory_list' => [
+   'maintenance/',
+   'src/',
+   'tests/phan/stubs/',
+   './../../includes',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* A file list that defines files that will be excluded
+* from parsing and analysis and will not be read at all.
+*
+* This is useful for excluding hopelessly unanalyzable
+* files that can't be removed for whatever reason.
+*/
+   'exclude_file_list' => function_exists( 'xcache_get' ) ? [] : [
+   ],
+
+   /**
+* A list of directories holding code that we want
+* to parse, but not analyze. Also works for individual
+* files.
+*/
+   "exclude_analysis_directory_list" => [
+   'tests/phan/stubs/',
+   './../../includes',
+   './../../maintenance',
+   './../../vendor',
+   ],
+
+   /**
+* Backwards Compatibility Checking. This is slow
+* and expensive, but you should consider running
+* it before upgrading your version of PHP to a
+* new version that has backward compatibility
+* breaks.
+*/
+   'backward_compatibility_checks' => false,
+
+   /**
+* A set of fully qualified class-names for which
+* a call to parent::__construct() is required
+*/
+   'parent_constructor_required' => [
+   ],
+
+   /**
+* Run a quick version of checks that takes less
+* time at the cost of not running as thorough
+* an analysis. You should consider setting this
+* to true only when you wish you had more issues
+* to fix in your code base.
+*
+* In quick-mode the scanner doesn't rescan a function
+* or a method's code block every time a call is seen.
+* This means that the problem here won't be detected:
+*
+* ```php
+*  false,
+
+   /**
+* By default, Phan will not analyze all node types
+* in order to save time. If this config is set to true,
+* Phan will dig deeper into the AST tree and do an
+* analysis on all nodes, possibly finding more issues.
+*
+* See \Phan\Analysis::shouldVisit for the set of skipped
+* nodes.
+*/
+   'should_visit_all_nodes' => true,
+
+   /**
+* If enabled, check all methods that override a
+* parent method to make sure its signature is
+* compatible with the parent's. This check
+* can add quite a bit of time to the analysis.
+*/
+   'analyze_signature_compatibility' => true,
+
+   // Emit all issues. They are then suppressed via
+   // suppress_issue_types, rather than a minimum
+   // severity.
+   "minimum_severity" => 0,
+
+   /**
+* If true, missing properties will be created when
+* they are first seen. If false, we'll report an
+* error message if there is an attempt to write
+* to a class property that wasn't explicitly
+* defined.
+*/
+   'allow_missing_properties' => false,
+
+   /**
+* Allow null to be cast as any type and for any
+* type to be cast to null. Setting this to false
+* will cut down on false positives.
+*/
+   'null_casts_as_any_type' => true,
+
+   /**
+* If enabled, scalars (int, float, bool, string, null)
+* are treated as if they can cast to each other.
+*
+* MediaWiki is pretty lax and uses many scalar
+  

[MediaWiki-commits] [Gerrit] mediawiki...CookieWarning[master]: Remove explicit font selection

2017-01-11 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331812 )

Change subject: Remove explicit font selection
..

Remove explicit font selection

We want to use the font of the page, not some different one.

Change-Id: Iaf8d6ce5e7422a4515fc9e8ab4f067e213609560
---
M resources/ext.CookieWarning/ext.CookieWarning.less
M resources/ext.CookieWarning/ext.CookieWarning.mobile.less
2 files changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/resources/ext.CookieWarning/ext.CookieWarning.less 
b/resources/ext.CookieWarning/ext.CookieWarning.less
index 6a816b2..6b1889f 100644
--- a/resources/ext.CookieWarning/ext.CookieWarning.less
+++ b/resources/ext.CookieWarning/ext.CookieWarning.less
@@ -5,7 +5,6 @@
opacity: 0.85;
color: #fff;
font-weight: bold;
-   font-family: arial;
font-size: 13px;
padding: 7px 15px;
top: 0;
@@ -35,7 +34,6 @@
margin-right: 0.5em;
white-space: nowrap;
font-weight: bold;
-   font-family: arial;
font-size: 13px;
}
 }
diff --git a/resources/ext.CookieWarning/ext.CookieWarning.mobile.less 
b/resources/ext.CookieWarning/ext.CookieWarning.mobile.less
index afb13b4..7280fe9 100644
--- a/resources/ext.CookieWarning/ext.CookieWarning.mobile.less
+++ b/resources/ext.CookieWarning/ext.CookieWarning.mobile.less
@@ -6,7 +6,6 @@
 .mw-cookiewarning-container {
background-color: #ff;
padding: 16px;
-   font-family: HelveticaNeue;
font-size: @cookieWarningFontSize;
font-weight: 500;
font-style: normal;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf8d6ce5e7422a4515fc9e8ab4f067e213609560
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CookieWarning
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Askplatyp.us integration

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

Change subject: Askplatyp.us integration
..

Askplatyp.us integration

Change-Id: I7da33ff6448466f1d51d1128b1ac5a4d5fc98ced
---
M i18n/en.json
M i18n/qqq.json
M index.html
M style.css
M wikibase/queryService/ui/App.js
5 files changed, 58 insertions(+), 1 deletion(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index f989c61..f6e00cb 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -21,6 +21,7 @@
 "wdqs-app-button-download-title": "Download result",
 "wdqs-app-button-link": "Link",
 "wdqs-app-button-link-title": "Get link to query",
+"wdqs-app-text2query": "Enter your question in natural language",
 "wdqs-app-help-feedback": "Give Feedback!",
 "wdqs-app-help-request-query": "Request a query",
 "wdqs-app-help-portal": "Help Portal",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 793f3f1..b9672fb 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -23,6 +23,7 @@
"wdqs-app-button-download-title": "Title for button download result",
"wdqs-app-button-link": "Button get link to query\n{{Identical|Link}}",
"wdqs-app-button-link-title": "Title for button get link to query",
+   "wdqs-app-text2query": "Tooltip for creating a query based upon natural 
language text",
"wdqs-app-help-feedback": "Button message in help dropdown",
"wdqs-app-help-request-query": "Button message in help dropdown",
"wdqs-app-help-portal": "Button message in help dropdown",
diff --git a/index.html b/index.html
index 00ea1e7..d6976bc 100644
--- a/index.html
+++ b/index.html
@@ -164,6 +164,7 @@


 
+



@@ -211,6 +212,27 @@


 
+   
+   
+   
+   
+   
+   
+
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+



diff --git a/style.css b/style.css
index 7473f2f..45f4fed 100644
--- a/style.css
+++ b/style.css
@@ -122,7 +122,14 @@
font-size: 25px;
background: rgba(255,255,255,0.5);
 }
-
+.text2query {
+   z-index: 100;
+   position: absolute;
+   top: 40px;
+   right: 10px;
+   font-size: 25px;
+   background: rgba(255,255,255,0.5);
+}
 /**
Bootstrap Styles
 **/
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index ed258d3..5c83b2a 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -224,6 +224,7 @@
this._initRdfNamespaces();
this._initHandlers();
this._initResultBrowserMenu();
+   this._initText2Query();
};
 
/**
@@ -320,6 +321,31 @@
/**
 * @private
 */
+   SELF.prototype._initText2Query = function() {
+   var self = this,
+   url = 
'http://qa.dev.askplatyp.us/v0/wikidata-sparql?q={q}={lang}';
+
+   $( '#text2query .btn' ).click( function() {
+   var q = $( '#text2query .input-lg' ).val(), lang = 
$.i18 && $.i18n.lang ||
+   'und', actionBar = new 
wikibase.queryService.ui.toolbar.Actionbar(
+   $( '#text2query .action-bar' ) );
+
+   actionBar.show( '', '', 'info', 100 );
+
+   $.get( url.replace( '{q}', q ).replace( '{lang}', lang 
), function( data ) {
+   self._editor.setValue( data );
+   $( '#text2query' ).modal( 'hide' );
+   actionBar.hide();
+   } ).fail( function() {
+   actionBar.show( '', '', 'danger' );
+   } );
+
+   } );
+   };
+
+   /**
+* @private
+*/
SELF.prototype._initExamples = function() {
var self = this;
new wikibase.queryService.ui.QueryExampleDialog( $( 
'#QueryExamples' ),

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove unused method in SharedPreferenceCookieManager

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

Change subject: Hygiene: remove unused method in SharedPreferenceCookieManager
..


Hygiene: remove unused method in SharedPreferenceCookieManager

Change-Id: I14750eca61e758d6becd38d53d748e7b6207f0cf
---
M app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
1 file changed, 0 insertions(+), 7 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java 
b/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
index 31da327..72c0fca 100644
--- 
a/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
+++ 
b/app/src/main/java/org/wikipedia/dataclient/SharedPreferenceCookieManager.java
@@ -127,13 +127,6 @@
 throw new UnsupportedOperationException("We poor. We no have 
CookieStore");
 }
 
-// This will remove cookies for the domain specified but cookies from 
other domains may still be
-// merged into requests.
-public synchronized void clearCookiesForDomain(String domain) {
-Prefs.removeCookiesForDomain(domain);
-cookieJar.remove(domain);
-}
-
 public synchronized void clearAllCookies() {
 for (String domain: cookieJar.keySet()) {
 Prefs.removeCookiesForDomain(domain);

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Move mwext-php70-phan-jessie to nodepool

2017-01-11 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331810 )

Change subject: Move mwext-php70-phan-jessie to nodepool
..

Move mwext-php70-phan-jessie to nodepool

Change-Id: I712a8b98a819a651b10f8e4f53b10ca93fe45526
---
M jjb/mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/10/331810/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 455f4ff..0834ba7 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -435,7 +435,7 @@
 # Phan! (T153039)
 - job:
 name: 'mwext-php70-phan-jessie'
-node: DebianJessie
+node: ci-jessie-wikimedia
 concurrent: true
 properties:
  - build-discarder:

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: use ReleaseUtil directly instead of wrapping in Wik...

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

Change subject: Hygiene: use ReleaseUtil directly instead of wrapping in 
WikipediaApp
..


Hygiene: use ReleaseUtil directly instead of wrapping in WikipediaApp

Change-Id: I3d00b9d384857b5d927e814f5ccf80d917a91fad
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/analytics/EventLoggingEvent.java
M app/src/main/java/org/wikipedia/analytics/Funnel.java
M app/src/main/java/org/wikipedia/analytics/LinkPreviewFunnel.java
M app/src/main/java/org/wikipedia/analytics/PageScrollFunnel.java
M app/src/main/java/org/wikipedia/analytics/SessionFunnel.java
M app/src/main/java/org/wikipedia/analytics/WikipediaZeroUsageFunnel.java
M app/src/main/java/org/wikipedia/analytics/WiktionaryDialogFunnel.java
M app/src/main/java/org/wikipedia/dataclient/ApiTask.java
M app/src/main/java/org/wikipedia/page/PageDataClient.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/recurring/RecurringTasksExecutor.java
M app/src/main/java/org/wikipedia/search/SearchResults.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/java/org/wikipedia/settings/RbSwitch.java
M app/src/main/java/org/wikipedia/util/log/L.java
16 files changed, 34 insertions(+), 48 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index dbbb9c5..5426366 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -101,26 +101,6 @@
 private CrashReporter crashReporter;
 private RefWatcher refWatcher;
 
-public boolean isProdRelease() {
-return ReleaseUtil.isProdRelease();
-}
-
-public boolean isPreProdRelease() {
-return ReleaseUtil.isPreProdRelease();
-}
-
-public boolean isAlphaRelease() {
-return ReleaseUtil.isAlphaRelease();
-}
-
-public boolean isPreBetaRelease() {
-return ReleaseUtil.isPreBetaRelease();
-}
-
-public boolean isDevRelease() {
-return ReleaseUtil.isDevRelease();
-}
-
 public SessionFunnel getSessionFunnel() {
 return sessionFunnel;
 }
@@ -169,7 +149,7 @@
 
 // HockeyApp exception handling interferes with the test runner, so 
enable it only for
 // beta and stable releases
-if (!isPreBetaRelease()) {
+if (!ReleaseUtil.isPreBetaRelease()) {
 initExceptionHandling();
 }
 
@@ -481,13 +461,13 @@
 }
 
 public void putCrashReportProperty(String key, String value) {
-if (!isPreBetaRelease()) {
+if (!ReleaseUtil.isPreBetaRelease()) {
 crashReporter.putReportProperty(key, value);
 }
 }
 
 public void checkCrashes(@NonNull Activity activity) {
-if (!isPreBetaRelease()) {
+if (!ReleaseUtil.isPreBetaRelease()) {
 crashReporter.checkCrashes(activity);
 }
 }
diff --git a/app/src/main/java/org/wikipedia/analytics/EventLoggingEvent.java 
b/app/src/main/java/org/wikipedia/analytics/EventLoggingEvent.java
index 7e412c3..01e3ad8 100644
--- a/app/src/main/java/org/wikipedia/analytics/EventLoggingEvent.java
+++ b/app/src/main/java/org/wikipedia/analytics/EventLoggingEvent.java
@@ -4,9 +4,9 @@
 
 import org.json.JSONException;
 import org.json.JSONObject;
-import org.wikipedia.WikipediaApp;
 import org.wikipedia.concurrency.SaneAsyncTask;
 import org.wikipedia.dataclient.OkHttpConnectionFactory;
+import org.wikipedia.util.ReleaseUtil;
 import org.wikipedia.util.log.L;
 
 import okhttp3.Request;
@@ -22,7 +22,7 @@
 public class EventLoggingEvent {
 private static final String EVENTLOG_URL_PROD = 
"https://meta.wikimedia.org/beacon/event;;
 private static final String EVENTLOG_URL_DEV = 
"http://deployment.wikimedia.beta.wmflabs.org/beacon/event;;
-private static final String EVENTLOG_URL = 
WikipediaApp.getInstance().isPreBetaRelease()
+private static final String EVENTLOG_URL = ReleaseUtil.isPreBetaRelease()
 ? EVENTLOG_URL_DEV : EVENTLOG_URL_PROD;
 
 private final JSONObject data;
diff --git a/app/src/main/java/org/wikipedia/analytics/Funnel.java 
b/app/src/main/java/org/wikipedia/analytics/Funnel.java
index 2b4cb61..e0e05dc 100644
--- a/app/src/main/java/org/wikipedia/analytics/Funnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/Funnel.java
@@ -9,6 +9,7 @@
 import org.json.JSONObject;
 import org.wikipedia.WikipediaApp;
 import org.wikipedia.dataclient.WikiSite;
+import org.wikipedia.util.ReleaseUtil;
 import org.wikipedia.util.log.L;
 
 import java.util.UUID;
@@ -130,7 +131,7 @@
 
 int rate = getSampleRate();
 if (rate != SAMPLE_LOG_DISABLE) {
-boolean chosen = 

[MediaWiki-commits] [Gerrit] integration/config[master]: Run extension-phan-generic for 4 WMDE extensions

2017-01-11 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331796 )

Change subject: Run extension-phan-generic for 4 WMDE extensions
..


Run extension-phan-generic for 4 WMDE extensions

Cognate
InterwikiSorting
RevisionSlider
ElectronPdfService

Change-Id: Idb0a65714c87689dcedae410732183b6211aa669
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index f14e52e..e5a677a 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3096,6 +3096,7 @@
 template:
   - name: extension-unittests-generic
   - name: npm
+  - name: extension-phan-generic
 check:
   - jsonlint
 
@@ -3522,6 +3523,7 @@
   - name: extension-unittests-generic
   - name: npm
   - name: extension-selenium
+  - name: extension-phan-generic
 check:
   - jsonlint
   - jshint
@@ -3978,6 +3980,7 @@
 template:
   - name: extension-unittests-generic
   - name: npm
+  - name: extension-phan-generic
 check:
   - jsonlint
 
@@ -6490,6 +6493,7 @@
   - name: extension-unittests-generic
   - name: npm
   - name: extension-selenium
+  - name: extension-phan-generic
 check:
   - jsonlint
   - jshint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb0a65714c87689dcedae410732183b6211aa669
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: ApiVisualEditorEdit: Use 'html' format for API errors so we ...

2017-01-11 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331809 )

Change subject: ApiVisualEditorEdit: Use 'html' format for API errors so we can 
see them
..

ApiVisualEditorEdit: Use 'html' format for API errors so we can see them

The Translate extension emits errors when the saved text is in error —

* pt-parse-open,
* pt-parse-close,
* pt-shake-position,
* pt-shake-multiple,
* pt-shake-empty, or
* pt-parse-nested

Switching to 'html' error message format means we pay attention to the top
error, displayed in the user's language. This avoids showing 'editaborted'
generic messages when we can actually help people with specifics.

Change-Id: Id9d7e510e32a3a13cc061648679e01edd68a3868
---
M ApiVisualEditorEdit.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/ApiVisualEditorEdit.php b/ApiVisualEditorEdit.php
index 5a9e503..baacfda 100644
--- a/ApiVisualEditorEdit.php
+++ b/ApiVisualEditorEdit.php
@@ -25,6 +25,7 @@
'basetimestamp' => $params['basetimestamp'],
'starttimestamp' => $params['starttimestamp'],
'token' => $params['token'],
+   'errorformat' => 'html',
];
 
if ( $params['minor'] ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9d7e510e32a3a13cc061648679e01edd68a3868
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] integration/config[master]: Make extension-phan-generic job template

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

Change subject: Make extension-phan-generic job template
..


Make extension-phan-generic job template

Change-Id: Idfd2858afb74b5d50fe47e8b729584514c6edda8
---
M zuul/layout.yaml
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index af715c8..f14e52e 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1069,6 +1069,12 @@
   - mediawiki-extensions-php55-trusty
   - mediawiki-extensions-qunit-jessie
 
+  - name: extension-phan-generic
+test:
+ - mwext-php70-phan-jessie
+gate-and-submit:
+ - mwext-php70-phan-jessie
+
   # Template for MediaWiki extensions.
   # Triggers qunit jobs
   - name: extension-qunit

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfd2858afb74b5d50fe47e8b729584514c6edda8
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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]: wikitech: Add oathauth group with oathauth-api-all right

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

Change subject: wikitech: Add oathauth group with oathauth-api-all right
..


wikitech: Add oathauth group with oathauth-api-all right

Add a new group named 'oathauth' that will be used to grant the
'oathauth-api-all' right to StrikerBot.

Bug: T153487
Change-Id: Ife8bb6d5a99690f433a8255f9cc670b2b8a8e282
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 17eef60..cb10374 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8426,6 +8426,7 @@
'accessrestrictedregions' => true,
'editallhiera' => true,
],
+   'oathauth' => [ 'oathauth-api-all' => true ], // T153487
'oauthadmin' => [ 'autopatrol' => true ],
'shell' => [ 'loginviashell' => true ],
'shellmanagers' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife8bb6d5a99690f433a8255f9cc670b2b8a8e282
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
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]: Include DB shard in production SPI log entries

2017-01-11 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331808 )

Change subject: Include DB shard in production SPI log entries
..

Include DB shard in production SPI log entries

Change-Id: I34342d30ecca98f4e77c978679d0c8b8bda72ca7
---
M .gitignore
M wmf-config/logging.php
2 files changed, 4 insertions(+), 6 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index be01919..6430414 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@
 /.tox
 mediawiki_config.egg-info
 __pycache__
+mediawiki-config.iml
diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 2fecd36..1f9488e 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -89,10 +89,7 @@
};
}
],
-];
-
-if ( $wmfRealm === 'labs' ) {
-   $wmgMonologProcessors['shard'] = [
+   'shard' => [
'factory' => function () {
/** Adds the database shard name (e.g. s1, s2, ...) */
return function ( array $record ) {
@@ -104,8 +101,8 @@
return $record;
};
}
-   ];
-}
+   ]
+];
 
 $wmgMonologHandlers = [
'blackhole' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34342d30ecca98f4e77c978679d0c8b8bda72ca7
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable ElectronPdfService on testwikidatawiki

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

Change subject: Enable ElectronPdfService on testwikidatawiki
..


Enable ElectronPdfService on testwikidatawiki

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 2c48452..17eef60 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12116,6 +12116,7 @@
'testwiki' => true, // T150944
'test2wiki' => true, // T150944
'mediawikiwiki' => true, // T150944
+   'testwikidatawiki' => true,
 ],
 
 'wmgUseSpamBlacklist' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68923313598ce5bec7dd45ef05dcc6e3a4f97675
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove unused PageProps class

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

Change subject: Hygiene: remove unused PageProps class
..


Hygiene: remove unused PageProps class

Change-Id: Ic1480b187b003ca7b60743e903a9a5ea52053ab7
---
M app/src/main/java/org/wikipedia/page/MwApiResultPage.java
1 file changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/MwApiResultPage.java 
b/app/src/main/java/org/wikipedia/page/MwApiResultPage.java
index af13f11..8d5ff9a 100644
--- a/app/src/main/java/org/wikipedia/page/MwApiResultPage.java
+++ b/app/src/main/java/org/wikipedia/page/MwApiResultPage.java
@@ -84,9 +84,4 @@
 this.source = source;
 }
 }
-
-static class PageProps {
-@Nullable private String disambiguation;
-@Nullable private String mainpage;
-}
-}
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1480b187b003ca7b60743e903a9a5ea52053ab7
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Sniedzielski 
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]: Enable ElectronPdfService on testwikidatawiki

2017-01-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331807 )

Change subject: Enable ElectronPdfService on testwikidatawiki
..

Enable ElectronPdfService on testwikidatawiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 2c48452..17eef60 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12116,6 +12116,7 @@
'testwiki' => true, // T150944
'test2wiki' => true, // T150944
'mediawikiwiki' => true, // T150944
+   'testwikidatawiki' => true,
 ],
 
 'wmgUseSpamBlacklist' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: noc: Implement noc.wikimedia.org/db.php?format=json

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

Change subject: noc: Implement noc.wikimedia.org/db.php?format=json
..


noc: Implement noc.wikimedia.org/db.php?format=json

The HTML page is useful, but not machine readable.

Also improve labels to better reflect the configuration
(sections by db, not sections by wiki. one of the dbs is 'centralauth',
for example).

* Databases -> Hosts.
* Wikis -> Databases.

Change-Id: I8dba4717db2ba6ae309dc072573e2e079d0ad683
---
M docroot/noc/db.php
1 file changed, 82 insertions(+), 64 deletions(-)

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



diff --git a/docroot/noc/db.php b/docroot/noc/db.php
index 3328584..992a3bd 100644
--- a/docroot/noc/db.php
+++ b/docroot/noc/db.php
@@ -1,4 +1,82 @@
-
+ $cluster ) 
{
+   if ( $cluster == $clusterName ) {
+   $ret[] = $db;
+   }
+   }
+   return $ret;
+   }
+   public function htmlFor( $clusterName ) {
+   print "Hosts";
+   foreach ( $this->getHosts( $clusterName ) as $host ) {
+   print "$host ";
+   }
+   print 'Loads:';
+   foreach ( $this->getLoads( $clusterName ) as $host => $load ) {
+   print "$host => $load";
+   }
+   print 'Databases:';
+   if ( $clusterName == 'DEFAULT' ) {
+   print 'Any wiki not hosted on the other clusters.';
+   } else {
+   foreach ( $this->getDBs( $clusterName ) as $db ) {
+   print "$db";
+   }
+   }
+   }
+}
+
+$wmf = new WmfClusters();
+
+if ( $format === 'json' ) {
+   $data = array();
+   foreach ( $wmf->getNames() as $name ) {
+   $data[$name] = array(
+   'hosts' => $wmf->getHosts( $name ),
+   'loads' => $wmf->getLoads( $name ),
+   'dbs' => $wmf->getDBs( $name ),
+   );
+   }
+   header( 'Content-Type: application/json; charset=utf-8' );
+   echo json_encode( $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES );
+   exit;
+}
+
+?>
 
 

@@ -20,70 +98,10 @@
 
  $cluster 
) {
-   if ( $cluster == $clusterName ) {
-   $ret[] = $wiki;
-   }
-   }
-   return $ret;
-   }
-   function loads( $clusterName ) {
-   global $wgLBFactoryConf;
-   return $wgLBFactoryConf['sectionLoads'][$clusterName];
-   }
-   function databases( $clusterName ) {
-   global $wgLBFactoryConf;
-   return array_keys( 
$wgLBFactoryConf['sectionLoads'][$clusterName] );
-   }
-
-   function contentFor( $name ) {
-   print "Databases:";
-   foreach( $this->databases( $name ) as $db ) {
-   print "$db ";
-   }
-   print 'Loads:';
-   foreach( $this->loads( $name ) as $key => $val ) {
-   print "$key => $val";
-   }
-   print 'Wikis:';
-   if( $name == 'DEFAULT' ) {
-   print 'Any wiki not hosted on the other clusters.';
-   } else {
-   foreach ( $this->wikis( $name ) as $w ) {
-   print "$w";
-   }
-   }
-   }
-}
-
-$wmf = new WmfClusters();
-
 // Generate navigation links
 print '';
 $tab = 0;
-foreach ( $wmf->names() as $name ) {
+foreach ( $wmf->getNames() as $name ) {
$tab++;
print 'Cluster ' . htmlspecialchars( 
$name ) . '';
 }
@@ -91,10 +109,10 @@
 
 // Generate content sections
 $tab = 0;
-foreach ( $wmf->names() as $name ) {
+foreach ( $wmf->getNames() as $name ) {
$tab++;
print "Cluster " . 
htmlspecialchars( $name ) . '';
-   print $wmf->contentFor( $name ) . '';
+   print $wmf->htmlFor( $name ) . '';
 }
 print '';
 ?>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8dba4717db2ba6ae309dc072573e2e079d0ad683
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jcrespo 
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]: Update gallery image bounding box on svwiki to 150x150

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

Change subject: Update gallery image bounding box on svwiki to 150x150
..


Update gallery image bounding box on svwiki to 150x150

Bug: T113877
Change-Id: Iee70c0785e09f159db9d9c4c960226adb674b8f6
---
M wmf-config/InitialiseSettings.php
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index cd2d72c..2c48452 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17824,6 +17824,22 @@
'default' => 3,
'cswiki' => 14, // T148327
 ],
+
+'wmgGalleryOptions' => [
+   'default' => [
+   'imagesPerRow' => 0,
+   'imageWidth' => 120,
+   'imageHeight' => 120,
+   'captionLength' => true,
+   'showBytes' => true,
+   'mode' => 'traditional',
+   ],
+   '+svwiki' => [
+   'imageWidth' => 150,
+   'imageHeight' => 150,
+   ],
+],
+
 ];
 
 ### WMF Labs override #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee70c0785e09f159db9d9c4c960226adb674b8f6
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gilles 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Gilles 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Replace abandoned colors with current ones

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

Change subject: Replace abandoned colors with current ones
..


Replace abandoned colors with current ones

Replacing abandoned colors with ones from overhauled WikimediaUI
color palette, conforming to WCAG 2.0 level AA.
Also side-aligning spacer for better findability in reading direction.

Bug: T153486
Change-Id: I14868e38d2e54a64663e1ec5cf0cdbbc6b5dbfc2
---
M src/ui/styles/elements/ve.ui.DiffElement.css
1 file changed, 5 insertions(+), 6 deletions(-)

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



diff --git a/src/ui/styles/elements/ve.ui.DiffElement.css 
b/src/ui/styles/elements/ve.ui.DiffElement.css
index e3199fa..0a2565f 100644
--- a/src/ui/styles/elements/ve.ui.DiffElement.css
+++ b/src/ui/styles/elements/ve.ui.DiffElement.css
@@ -33,7 +33,7 @@
 .ve-ui-diffElement-up,
 .ve-ui-diffElement-down,
 .ve-ui-diffElement-doc-child-change {
-   border-left: 6px solid #347bff;
+   border-left: 6px solid #36c;
padding-left: 4px;
margin-left: -10px;
 }
@@ -59,12 +59,12 @@
 
 .ve-ui-diffElement-down:before {
bottom: 0;
-   border-top: 6px solid #347bff;
+   border-top: 6px solid #36c;
 }
 
 .ve-ui-diffElement-up:before {
top: 0;
-   border-bottom: 6px solid #347bff;
+   border-bottom: 6px solid #36c;
 }
 
 .ve-ui-diffElement-insert:empty:before,
@@ -79,12 +79,11 @@
 }
 
 .ve-ui-diffElement-no-changes {
-   color: #888;
+   color: #72777d;
font-style: italic;
 }
 
 .ve-ui-diffElement-spacer {
-   color: #888;
-   text-align: center;
+   color: #72777d;
clear: both;
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Using media browser in core instead of VisualEditor

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

Change subject: Using media browser in core instead of VisualEditor
..


Using media browser in core instead of VisualEditor

Bug: T154951
Change-Id: I0cd376d0f444b94e51dc6a57bd2cd6a6ce74d02d
---
M extension.json
M modules/ext.CollaborationKit.hubimage.js
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 0d2401d..4b8d88d 100644
--- a/extension.json
+++ b/extension.json
@@ -124,7 +124,7 @@
"oojs-ui.styles.icons-movement",
"mediawiki.widgets",
"mediawiki.widgets.UserInputWidget",
-   "ext.visualEditor.mwimage",
+   "mediawiki.widgets.MediaSearch",
"mediawiki.api"
],
"messages": [
diff --git a/modules/ext.CollaborationKit.hubimage.js 
b/modules/ext.CollaborationKit.hubimage.js
index a0b627d..ba61989 100644
--- a/modules/ext.CollaborationKit.hubimage.js
+++ b/modules/ext.CollaborationKit.hubimage.js
@@ -18,7 +18,7 @@
ProcessDialog.prototype.initialize = function () {
ProcessDialog.super.prototype.initialize.apply( this, 
arguments );
 
-   this.content = new ve.ui.MWMediaSearchWidget();
+   this.content = new mw.widgets.MediaSearchWidget();
this.$body.append( this.content.$element );
};
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cd376d0f444b94e51dc6a57bd2cd6a6ce74d02d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 
Gerrit-Reviewer: Isarra 
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]: Adding language name configuration for Wikidata

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

Change subject: Adding language name configuration for Wikidata
..


Adding language name configuration for Wikidata

* nys: Noongar
* srq: mbia cheë

Bug: T113408
Bug: T127858
Change-Id: Id59e4f049076294b6bd826fa5465ccc46ca3dc7c
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d6436b0..cd2d72c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16513,10 +16513,12 @@
'din' => 'dinka',   // T75563
'kea' => 'Kabuverdianu',// T127435
'nod' => 'ᨣᩴᩤᨾᩮᩥᩬᨦ',// T93880
+   'nys' => 'Noongar', // T127858
'ota' => 'لسان توركى',  // T59342
'rwr' => 'मारवाड़ी',   // T61905
'sje' => 'bidumsámegiella', // T146707
'smj' => 'julevsámegiella', // T146707
+   'srq' => 'mbia cheë',   // T113408
],
 ],
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id59e4f049076294b6bd826fa5465ccc46ca3dc7c
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jon Harald Søby 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hoo man 
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]: Warn before deleting a bunch of local files

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

Change subject: Warn before deleting a bunch of local files
..


Warn before deleting a bunch of local files

Change-Id: Id52e71088417b0fb6e47393c7531310ef7fce963
---
M bin/sync-gh-pages.sh
1 file changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/bin/sync-gh-pages.sh b/bin/sync-gh-pages.sh
index b9098ed..371235f 100755
--- a/bin/sync-gh-pages.sh
+++ b/bin/sync-gh-pages.sh
@@ -2,6 +2,13 @@
 
 # This script builds a new gh-pages branch from latest master
 
+read -p "This script will delete all untracked files in the VE folder. 
Continue (y/n)? " -n 1 -r
+echo
+if [[ ! $REPLY =~ ^[Yy]$ ]]
+then
+   exit 0
+fi
+
 cd "$(dirname $0)/.."
 git fetch origin
 git checkout -B gh-pages origin/master

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id52e71088417b0fb6e47393c7531310ef7fce963
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] operations/mediawiki-config[master]: Add transitionary config for EducationProgram

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

Change subject: Add transitionary config for EducationProgram
..


Add transitionary config for EducationProgram

$eg -> $wg

Change-Id: Id3013fbf622373b255bb7e1d9a0aaa2f353e4004
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 3f31bae..a00a871 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2582,7 +2582,7 @@
 
 if ( $wmgUseEducationProgram ) {
require_once( "$IP/extensions/EducationProgram/EducationProgram.php" );
-   $egEPSettings['dykCategory'] = $wmgEducationProgramDYKCat;
+   $egEPSettings['dykCategory'] = $wgEPSettings['dykCategory'] = 
$wmgEducationProgramDYKCat;
$wgNamespaceProtection[EP_NS] = [ 'ep-course' ]; // T112806 (security)
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3013fbf622373b255bb7e1d9a0aaa2f353e4004
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add DB "shard" column to logstash log entries for labs

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

Change subject: Add DB "shard" column to logstash log entries for labs
..


Add DB "shard" column to logstash log entries for labs

Change-Id: Id8f44727cfb942853a8fa9c9abd256bbb328e9f3
---
M tests/loggingTest.php
M wmf-config/logging.php
2 files changed, 18 insertions(+), 1 deletion(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  Krinkle: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/tests/loggingTest.php b/tests/loggingTest.php
index 2d76be7..a357204 100644
--- a/tests/loggingTest.php
+++ b/tests/loggingTest.php
@@ -79,6 +79,7 @@
$wmgLogstashServers = array( 'localhost' );
$wmgKafkaServers = array( 'localhost' );
$wmgMonologChannels = array( 'test' => $channelConfig );
+   $wmfRealm = 'production';
 
include __DIR__ . '/../wmf-config/logging.php';
 
diff --git a/wmf-config/logging.php b/wmf-config/logging.php
index 45a8eb4..2fecd36 100644
--- a/wmf-config/logging.php
+++ b/wmf-config/logging.php
@@ -87,10 +87,26 @@
$record['extra']['normalized_message'] = 
substr( $nm, 0, 255 );
return $record;
};
-   },
+   }
],
 ];
 
+if ( $wmfRealm === 'labs' ) {
+   $wmgMonologProcessors['shard'] = [
+   'factory' => function () {
+   /** Adds the database shard name (e.g. s1, s2, ...) */
+   return function ( array $record ) {
+   global $wgLBFactoryConf, $wgDBname;
+
+   $record['extra']['shard'] = isset( 
$wgLBFactoryConf['sectionsByDB'][$wgDBname] )
+   ? 
$wgLBFactoryConf['sectionsByDB'][$wgDBname]
+   : 's3';
+   return $record;
+   };
+   }
+   ];
+}
+
 $wmgMonologHandlers = [
'blackhole' => [
'class' => '\\Monolog\\Handler\\NullHandler',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8f44727cfb942853a8fa9c9abd256bbb328e9f3
Gerrit-PatchSet: 8
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: Hygiene: Remove unused action types

2017-01-11 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331804 )

Change subject: Hygiene: Remove unused action types
..

Hygiene: Remove unused action types

PREVIEW_ANIMATING and PREVIEW_INTERACTIVE were introduced in
Ib495755b but never used.

Change-Id: Ib849960874f938185414ae74bc67d906f26aae0c
---
M resources/ext.popups/actions.js
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/resources/ext.popups/actions.js b/resources/ext.popups/actions.js
index d38051f..8bae158 100644
--- a/resources/ext.popups/actions.js
+++ b/resources/ext.popups/actions.js
@@ -14,8 +14,6 @@
PREVIEW_DWELL: 'PREVIEW_DWELL',
PREVIEW_ABANDON_START: 'PREVIEW_ABANDON_START',
PREVIEW_ABANDON_END: 'PREVIEW_ABANDON_END',
-   PREVIEW_ANIMATING: 'PREVIEW_ANIMATING',
-   PREVIEW_INTERACTIVE: 'PREVIEW_INTERACTIVE',
PREVIEW_SHOW: 'PREVIEW_SHOW',
PREVIEW_CLICK: 'PREVIEW_CLICK',
SETTINGS_SHOW: 'SETTINGS_SHOW',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib849960874f938185414ae74bc67d906f26aae0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: mpga
Gerrit-Owner: Phuedx 

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: Hygiene: Remove link element from LINK_ABANDON_*

2017-01-11 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331805 )

Change subject: Hygiene: Remove link element from LINK_ABANDON_*
..

Hygiene: Remove link element from LINK_ABANDON_*

Initially, the link element was added to LINK_ABANDON_* to determine
when an interaction should be reset. However, this wasn't enough to
protect against timing-related bugs, e.g. T154923. Now that tokens are
used to determine when interactions should be reset, the link element
can safely be removed from the LINK_ABANON_* actions.

Supporting changes:
* Update the return type of mw.popups.actions.linkAbandon in its
  DocBlock.

Change-Id: Iaaed7a4846af75f9c4051d7bc761022ea5b3f6cf
---
M resources/ext.popups/actions.js
M tests/qunit/ext.popups/actions.test.js
2 files changed, 2 insertions(+), 7 deletions(-)


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

diff --git a/resources/ext.popups/actions.js b/resources/ext.popups/actions.js
index 8bae158..a2a5074 100644
--- a/resources/ext.popups/actions.js
+++ b/resources/ext.popups/actions.js
@@ -208,16 +208,14 @@
 * maybe keeping a origin: 'LINK'|'PREVIEW' field on the action payload 
for
 * introspection on the devtools.
 *
-* @param {Element} el
-* @return {Object}
+* @return {Redux.Thunk}
 */
-   actions.linkAbandon = function ( el ) {
+   actions.linkAbandon = function () {
return function ( dispatch, getState ) {
var token = getState().preview.activeToken;
 
dispatch( timedAction( {
type: types.LINK_ABANDON_START,
-   el: el,
token: token
} ) );
 
@@ -225,7 +223,6 @@
.then( function () {
dispatch( {
type: types.LINK_ABANDON_END,
-   el: el,
token: token
} );
} );
diff --git a/tests/qunit/ext.popups/actions.test.js 
b/tests/qunit/ext.popups/actions.test.js
index 7f1c670..8aed7d8 100644
--- a/tests/qunit/ext.popups/actions.test.js
+++ b/tests/qunit/ext.popups/actions.test.js
@@ -340,7 +340,6 @@
 
assert.ok( dispatch.calledWith( {
type: 'LINK_ABANDON_START',
-   el: that.el,
timestamp: mw.now(),
token: token
} ) );
@@ -356,7 +355,6 @@
assert.ok(
dispatch.calledWith( {
type: 'LINK_ABANDON_END',
-   el: that.el,
token: token
} ),
'LINK_ABANDON_* share the same token.'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaaed7a4846af75f9c4051d7bc761022ea5b3f6cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: mpga
Gerrit-Owner: Phuedx 

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


[MediaWiki-commits] [Gerrit] mediawiki...Popups[mpga]: actions: Merge LINK_ABANDON_* + PREVIEW_ABANDON_*

2017-01-11 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331806 )

Change subject: actions: Merge LINK_ABANDON_* + PREVIEW_ABANDON_*
..

actions: Merge LINK_ABANDON_* + PREVIEW_ABANDON_*

Per Id1339dc2, the LINK_ABANDON_* and PREVIEW_ABANDON_* actions can (and
should) as they are reduced in the same way in the preview and
eventLogging reducers.

Change-Id: I71b30d4d2774deb4efea9e565f2ccd7383bf08c1
---
M resources/ext.popups/actions.js
M resources/ext.popups/boot.js
M resources/ext.popups/changeListeners/linkTitle.js
M resources/ext.popups/reducers/eventLogging.js
M resources/ext.popups/reducers/preview.js
M resources/ext.popups/renderer.js
M tests/qunit/ext.popups/actions.test.js
M tests/qunit/ext.popups/integration.test.js
M tests/qunit/ext.popups/reducers/preview.test.js
9 files changed, 81 insertions(+), 173 deletions(-)


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

diff --git a/resources/ext.popups/actions.js b/resources/ext.popups/actions.js
index a2a5074..3135794 100644
--- a/resources/ext.popups/actions.js
+++ b/resources/ext.popups/actions.js
@@ -5,15 +5,13 @@
BOOT: 'BOOT',
CHECKIN: 'CHECKIN',
LINK_DWELL: 'LINK_DWELL',
-   LINK_ABANDON_START: 'LINK_ABANDON_START',
-   LINK_ABANDON_END: 'LINK_ABANDON_END',
+   ABANDON_START: 'ABANDON_START',
+   ABANDON_END: 'ABANDON_END',
LINK_CLICK: 'LINK_CLICK',
FETCH_START: 'FETCH_START',
FETCH_END: 'FETCH_END',
FETCH_FAILED: 'FETCH_FAILED',
PREVIEW_DWELL: 'PREVIEW_DWELL',
-   PREVIEW_ABANDON_START: 'PREVIEW_ABANDON_START',
-   PREVIEW_ABANDON_END: 'PREVIEW_ABANDON_END',
PREVIEW_SHOW: 'PREVIEW_SHOW',
PREVIEW_CLICK: 'PREVIEW_CLICK',
SETTINGS_SHOW: 'SETTINGS_SHOW',
@@ -201,28 +199,24 @@
/**
 * Represents the user abandoning a link, either by moving their mouse 
away
 * from it or by shifting focus to another UI element using their 
keyboard or
-* an assistive device.
-*
-* TODO: linkAbandon and previewAbandon share test cases and structure,
-* we should collapse them into one action creator in a followup commit,
-* maybe keeping a origin: 'LINK'|'PREVIEW' field on the action payload 
for
-* introspection on the devtools.
+* an assistive device, or abandoning a preview by moving their mouse 
away
+* from it.
 *
 * @return {Redux.Thunk}
 */
-   actions.linkAbandon = function () {
+   actions.abandon = function () {
return function ( dispatch, getState ) {
var token = getState().preview.activeToken;
 
dispatch( timedAction( {
-   type: types.LINK_ABANDON_START,
+   type: types.ABANDON_START,
token: token
} ) );
 
mw.popups.wait( ABANDON_END_DELAY )
.then( function () {
dispatch( {
-   type: types.LINK_ABANDON_END,
+   type: types.ABANDON_END,
token: token
} );
} );
@@ -251,31 +245,6 @@
actions.previewDwell = function () {
return {
type: types.PREVIEW_DWELL
-   };
-   };
-
-   /**
-* Represents the user abandoning a preview by moving their mouse away 
from
-* it.
-*
-* @return {Object}
-*/
-   actions.previewAbandon = function () {
-   return function ( dispatch, getState ) {
-   var token = getState().preview.activeToken;
-
-   dispatch( {
-   type: types.PREVIEW_ABANDON_START,
-   token: token
-   } );
-
-   mw.popups.wait( ABANDON_END_DELAY )
-   .then( function () {
-   dispatch( timedAction( {
-   type: types.PREVIEW_ABANDON_END,
-   token: token
-   } ) );
-   } );
};
};
 
diff --git a/resources/ext.popups/boot.js b/resources/ext.popups/boot.js
index 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update Kafka analytics broker list for deployment-prep

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

Change subject: Update Kafka analytics broker list for deployment-prep
..


Update Kafka analytics broker list for deployment-prep

Change-Id: I0ba59909e3c035fe8231c7b07d2d563065c4d36c
---
M wmf-config/LabsServices.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/LabsServices.php b/wmf-config/LabsServices.php
index b29c6a4..b596943 100644
--- a/wmf-config/LabsServices.php
+++ b/wmf-config/LabsServices.php
@@ -40,9 +40,9 @@
'10.68.16.147', // deployment-logstash2.deployment-prep.eqiad.wmflabs
 ];
 
-### Analytics Kafka cluster (not present in labs)
+### Analytics Kafka cluster (analytics-deployment-prep)
 $wmfAllServices['eqiad']['kafka'] = [
-   'deployment-kafka02.deployment-prep.eqiad.wmflabs:9092',
+   'deployment-kafka01.deployment-prep.eqiad.wmflabs:9092',
'deployment-kafka03.deployment-prep.eqiad.wmflabs:9092',
 ];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ba59909e3c035fe8231c7b07d2d563065c4d36c
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ottomata 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Fix warning in production

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

Change subject: Fix warning in production
..


Fix warning in production

Bug: T155057
Change-Id: I395e27d12a48b2e10c9467af3e571034ecbdb24b
---
M includes/ApiGraph.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index db3bc12..a0bdc2d 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -160,7 +160,7 @@
$st = FormatJson::parse( $ppValue );
if ( $st->isOK() ) {
$allGraphs = $st->getValue();
-   if ( property_exists( $allGraphs, $hash 
) ) {
+   if ( is_object( $allGraphs ) && 
property_exists( $allGraphs, $hash ) ) {
$graph = $allGraphs->$hash;
}
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Using media browser in core instead of VisualEditor

2017-01-11 Thread Harej (Code Review)
Harej has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331803 )

Change subject: Using media browser in core instead of VisualEditor
..

Using media browser in core instead of VisualEditor

Bug: T154951
Change-Id: I0cd376d0f444b94e51dc6a57bd2cd6a6ce74d02d
---
M extension.json
M modules/ext.CollaborationKit.hubimage.js
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index 0d2401d..4b8d88d 100644
--- a/extension.json
+++ b/extension.json
@@ -124,7 +124,7 @@
"oojs-ui.styles.icons-movement",
"mediawiki.widgets",
"mediawiki.widgets.UserInputWidget",
-   "ext.visualEditor.mwimage",
+   "mediawiki.widgets.MediaSearch",
"mediawiki.api"
],
"messages": [
diff --git a/modules/ext.CollaborationKit.hubimage.js 
b/modules/ext.CollaborationKit.hubimage.js
index a0b627d..ba61989 100644
--- a/modules/ext.CollaborationKit.hubimage.js
+++ b/modules/ext.CollaborationKit.hubimage.js
@@ -18,7 +18,7 @@
ProcessDialog.prototype.initialize = function () {
ProcessDialog.super.prototype.initialize.apply( this, 
arguments );
 
-   this.content = new ve.ui.MWMediaSearchWidget();
+   this.content = new mw.widgets.MediaSearchWidget();
this.$body.append( this.content.$element );
};
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cd376d0f444b94e51dc6a57bd2cd6a6ce74d02d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Fix the ProofreadPage’s VisualEditor

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

Change subject: Fix the ProofreadPage’s VisualEditor
..


Fix the ProofreadPage’s VisualEditor

The ProofreadPage’s VisualEditor was broken because of the commit
Ic8ea89a42ad6d873 (cb081bc3c8c3115).

Thanks to Tim’s help. In some cases, like during the API call for
the VisualEditor, the 'parser clone' clones a StubObject because
the real Parser is not already initialised; with unstub() it
becomes initialised.

Change-Id: Iac9f14815dab092bb06e5743a793abfd4aa2b0f5
---
M includes/index/ProofreadIndexPage.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/index/ProofreadIndexPage.php 
b/includes/index/ProofreadIndexPage.php
index e73716b..0554b4b 100644
--- a/includes/index/ProofreadIndexPage.php
+++ b/includes/index/ProofreadIndexPage.php
@@ -413,6 +413,7 @@
static $parser = null;
 
if ( $parser === null ) {
+   StubObject::unstub( $wgParser );
$parser = clone $wgParser;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac9f14815dab092bb06e5743a793abfd4aa2b0f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Seb35 
Gerrit-Reviewer: Tpt 
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...Graph[master]: Rm b/c code

2017-01-11 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331802 )

Change subject: Rm b/c code
..

Rm b/c code

Change-Id: I5df347a57b39d0ec5a811fe832b65af07e12e1e9
---
M includes/ApiGraph.php
1 file changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index db3bc12..127b868 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -167,11 +167,7 @@
}
}
if ( !$graph ) {
-   if ( is_callable( [ $this, 'dieWithError' ] ) ) {
-   $this->dieWithError( 'apierror-graph-missing', 
'invalidhash' );
-   } else {
-   $this->dieUsage( 'No graph found.', 
'invalidhash' );
-   }
+   $this->dieWithError( 'apierror-graph-missing', 
'invalidhash' );
}
return $graph;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Replace outdated color with current one

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

Change subject: Replace outdated color with current one
..


Replace outdated color with current one

Replacing outdated color with `#36c` from overhauled color palette.
Also making focus following common outline-width.

Bug: T153486
Change-Id: I5c76a788fff21c53bd193628bc610f38d388179f
---
M build/screenshots.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/build/screenshots.js b/build/screenshots.js
index 1a1629a..c2c2ac3 100644
--- a/build/screenshots.js
+++ b/build/screenshots.js
@@ -81,7 +81,7 @@
if ( 
$lastHighlighted ) {

$lastHighlighted.css( 'outline', '' );
}
-   $element.css( 
'outline', '3px solid #347bff' );
+   $element.css( 
'outline', '2px solid #36c' );

$lastHighlighted = $element;
},
runMenuTask: function ( 
done, tool, expanded, highlight, extraElements ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c76a788fff21c53bd193628bc610f38d388179f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Math[master]: Add word list to math dialog for autocompletion

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

Change subject: Add word list to math dialog for autocompletion
..


Add word list to math dialog for autocompletion

Bug: T155107
Change-Id: I57bbf9d9a75810cd06b9ba43a173f9bf4a74c9fc
---
M modules/ve-math/ve.ui.MWMathDialog.js
1 file changed, 72 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-math/ve.ui.MWMathDialog.js 
b/modules/ve-math/ve.ui.MWMathDialog.js
index 0d57bd2..a3ae846 100644
--- a/modules/ve-math/ve.ui.MWMathDialog.js
+++ b/modules/ve-math/ve.ui.MWMathDialog.js
@@ -39,6 +39,76 @@
 
 ve.ui.MWMathDialog.static.symbols = null;
 
+ve.ui.MWMathDialog.static.autocompleteWordList = [
+   'AA', 'acute', 'alef', 'alefsym', 'aleph', 'alpha', 'Alpha', 'amalg', 
'And',
+   'and', 'ang', 'angle', 'approx', 'approxeq', 'arccos', 'arccot', 
'arccsc', 'arcsec', 'arcsin',
+   'arctan', 'arg', 'ast', 'asymp', 'atop', 'backepsilon', 'backprime', 
'backsim', 'backsimeq', 'backslash',
+   'bar', 'barwedge', 'Bbb', 'Bbbk', 'bcancel', 'because', 'beta', 'Beta', 
'beth', 'between',
+   'big', 'Big', 'bigcap', 'bigcirc', 'bigcup', 'bigg', 'Bigg', 'biggl', 
'Biggl', 'biggr',
+   'Biggr', 'bigl', 'Bigl', 'bigodot', 'bigoplus', 'bigotimes', 'bigr', 
'Bigr', 'bigsqcup', 'bigstar',
+   'bigtriangledown', 'bigtriangleup', 'biguplus', 'bigvee', 'bigwedge', 
'binom', 'blacklozenge', 'blacksquare', 'blacktriangle', 'blacktriangledown',
+   'blacktriangleleft', 'blacktriangleright', 'bmod', 'bold', 
'boldsymbol', 'bot', 'bowtie', 'Box', 'boxdot', 'boxminus',
+   'boxplus', 'boxtimes', 'breve', 'bull', 'bullet', 'bumpeq', 'Bumpeq', 
'C', 'cancel', 'cancelto',
+   'cap', 'Cap', 'cdot', 'cdots', 'centerdot', 'cfrac', 'check', 
'checkmark', 'chi', 'Chi',
+   'choose', 'circ', 'circeq', 'circlearrowleft', 'circlearrowright', 
'circledast', 'circledcirc', 'circleddash', 'circledS', 'clubs',
+   'clubsuit', 'cnums', 'colon', 'color', 'complement', 'Complex', 'cong', 
'Coppa', 'coppa', 'coprod',
+   'cos', 'cosh', 'cot', 'coth', 'csc', 'cup', 'Cup', 'curlyeqprec', 
'curlyeqsucc', 'curlyvee',
+   'curlywedge', 'curvearrowleft', 'curvearrowright', 'dagger', 'Dagger', 
'daleth', 'darr', 'dArr', 'Darr', 'dashv',
+   'dbinom', 'ddagger', 'ddot', 'ddots', 'definecolor', 'deg', 'delta', 
'Delta', 'det', 'dfrac',
+   'diagdown', 'diagup', 'diamond', 'Diamond', 'diamonds', 'diamondsuit', 
'digamma', 'Digamma', 'dim', 'displaystyle',
+   'div', 'divideontimes', 'dot', 'doteq', 'Doteq', 'doteqdot', 'dotplus', 
'dots', 'dotsb', 'dotsc',
+   'dotsi', 'dotsm', 'dotso', 'doublebarwedge', 'doublecap', 'doublecup', 
'downarrow', 'Downarrow', 'downdownarrows', 'downharpoonleft',
+   'downharpoonright', 'ell', 'emph', 'empty', 'emptyset', 'epsilon', 
'Epsilon', 'eqcirc', 'eqsim', 'eqslantgtr',
+   'eqslantless', 'equiv', 'eta', 'Eta', 'eth', 'euro', 'exist', 'exists', 
'exp', 'fallingdotseq',
+   'Finv', 'flat', 'forall', 'frac', 'frown', 'Game', 'gamma', 'Gamma', 
'gcd', 'ge',
+   'geneuro', 'geneuronarrow', 'geneurowide', 'geq', 'geqq', 'geqslant', 
'gets', 'gg', 'ggg', 'gggtr',
+   'gimel', 'gnapprox', 'gneq', 'gneqq', 'gnsim', 'grave', 'gtrapprox', 
'gtrdot', 'gtreqless', 'gtreqqless',
+   'gtrless', 'gtrsim', 'gvertneqq', 'H', 'hAar', 'harr', 'Harr', 'hat', 
'hbar', 'hearts',
+   'heartsuit', 'hline', 'hom', 'hookleftarrow', 'hookrightarrow', 
'hslash', 'iff', 'nt', 'iiint', 'iint',
+   'Im', 'image', 'imath', 'implies', 'in', 'inf', 'infin', 'infty', 
'injlim', 'int',
+   'intercal', 'iota', 'Iota', 'isin', 'jmath', 'kappa', 'Kappa', 'ker', 
'Koppa', 'koppa',
+   'lambda', 'Lambda', 'land', 'lang', 'langle', 'larr', 'Larr', 'lArr', 
'lbrace', 'lbrack',
+   'lceil', 'ldots', 'le', 'leftarrow', 'Leftarrow', 'leftarrowtail', 
'leftharpoondown', 'leftharpoonup', 'leftleftarrows', 'leftrightarrow',
+   'Leftrightarrow', 'leftrightarrows', 'leftrightharpoons', 
'leftrightsquigarrow', 'leftthreetimes', 'leq', 'leqq', 'leqslant', 
'lessapprox', 'lessdot',
+   'lesseqgtr', 'lesseqqgtr', 'lessgtr', 'lesssim', 'lfloor', 'lg', 'lim', 
'liminf', 'limits', 'limsup',
+   'll', 'llcorner', 'Lleftarrow', 'lll', 'ln', 'lnapprox', 'lneq', 
'lneqq', 'lnot', 'lnsim',
+   'log', 'longleftarrow', 'Longleftarrow', 'longleftrightarrow', 
'Longleftrightarrow', 'longmapsto', 'longrightarrow', 'Longrightarrow', 
'looparrowleft', 'looparrowright',
+   'lor', 'lozenge', 'lrarr', 'Lrarr', 'lrArr', 'lrcorner', 'Lsh', 
'ltimes', 'lVert', 'lvertneqq',
+   'mapsto', 'mathbb', 'mathbf', 'mathbin', 'mathcal', 'mathclose', 
'mathfrak', 'mathit', 'mathop', 'mathopen',
+   'mathord', 'mathpunct', 'mathrel', 'mathrm', 'mathsf', 'mathtt', 'max', 
'measuredangle', 'mho', 'mid',
+   

[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Fix warning in production

2017-01-11 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331801 )

Change subject: Fix warning in production
..

Fix warning in production

Bug: T155057
Change-Id: I395e27d12a48b2e10c9467af3e571034ecbdb24b
---
M includes/ApiGraph.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index db3bc12..a0bdc2d 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -160,7 +160,7 @@
$st = FormatJson::parse( $ppValue );
if ( $st->isOK() ) {
$allGraphs = $st->getValue();
-   if ( property_exists( $allGraphs, $hash 
) ) {
+   if ( is_object( $allGraphs ) && 
property_exists( $allGraphs, $hash ) ) {
$graph = $allGraphs->$hash;
}
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Fix the ProofreadPage’s VisualEditor

2017-01-11 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331800 )

Change subject: Fix the ProofreadPage’s VisualEditor
..

Fix the ProofreadPage’s VisualEditor

The ProofreadPage’s VisualEditor was broken because of the commit
Ic8ea89a42ad6d873 (cb081bc3c8c3115).

Thanks to Tim’s help. In some cases, like during the API call for
the VisualEditor, the 'parser clone' clones a StubObject because
the real Parser is not already initialised; with unstub() it
becomes initialised.

Change-Id: Iac9f14815dab092bb06e5743a793abfd4aa2b0f5
---
M includes/index/ProofreadIndexPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/index/ProofreadIndexPage.php 
b/includes/index/ProofreadIndexPage.php
index e73716b..0554b4b 100644
--- a/includes/index/ProofreadIndexPage.php
+++ b/includes/index/ProofreadIndexPage.php
@@ -413,6 +413,7 @@
static $parser = null;
 
if ( $parser === null ) {
+   StubObject::unstub( $wgParser );
$parser = clone $wgParser;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac9f14815dab092bb06e5743a793abfd4aa2b0f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Seb35 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Minerva should apply known template hacks in production

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

Change subject: Minerva should apply known template hacks in production
..


Minerva should apply known template hacks in production

Preparation for making default value of config variable false

Bug: T94102
Change-Id: Ic0ac456351f9dd922e8ac33a3548004b0db58bc5
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ef62797..d6436b0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14707,6 +14707,10 @@
'arwiki' => true,
 ],
 
+'wgMinervaApplyKnownTemplateHacks' => [
+   'default' => true,
+],
+
 'wgMinervaBottomLanguageButton' => [
'default' => false,
 ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0ac456351f9dd922e8ac33a3548004b0db58bc5
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
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]: [WIP] ProofreadPage extension

2017-01-11 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331799 )

Change subject: [WIP] ProofreadPage extension
..

[WIP] ProofreadPage extension

Change-Id: Ibdf8a6e0390bf79e9aeb67a0beaa9ad0c9705e90
---
A lib/ext/PRP/index.js
1 file changed, 74 insertions(+), 0 deletions(-)


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

diff --git a/lib/ext/PRP/index.js b/lib/ext/PRP/index.js
new file mode 100644
index 000..1072e80
--- /dev/null
+++ b/lib/ext/PRP/index.js
@@ -0,0 +1,74 @@
+/* --
+ * This is an implementation of
+ * -- */
+'use strict';
+
+var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.6.1');
+var DU = ParsoidExtApi.DOMUtils;
+var Promise = ParsoidExtApi.Promise;
+var addMetaData = ParsoidExtApi.addMetaData;
+
+/**
+ * Native Parsoid implementation of the "json" contentmodel.
+ */
+var PRPExt = function() {
+this.config = {
+contentmodels: {
+'proofread-page': this
+}
+};
+};
+
+var parsePageWikitext = function( text ) {
+var structureMatchResult, headerMatchResult, result = {
+header: '',
+body: '',
+footer: '',
+level: {
+level: 1,
+user: null
+}
+};
+
+structureMatchResult = wikitext.match( 
/^([\s\S]*)\n*<\/noinclude>([\s\S]*)([\s\S]*)<\/noinclude>$/
 );
+if ( structureMatchResult === null ) {
+result.body = wikitext;
+return result;
+}
+result.body = structureMatchResult[ 2 ];
+result.footer = structureMatchResult[ 3 ];
+
+headerMatchResult = structureMatchResult[ 1 ].match( /^|> *<\/pagequality>)([\s\S]*)$/ );
+if ( headerMatchResult === null ) {
+result.header = structureMatchResult[ 1 ];
+return result;
+}
+result.level.level = parseInt( headerMatchResult[ 1 ] );
+result.level.user = headerMatchResult[ 2 ];
+result.header = headerMatchResult[ 4 ];
+return result;
+};
+
+// Wikitext to HTML
+PRPExt.prototype.toHTML = Promise.method(function(env) {
+// Default: wikitext parser.
+   var content = parsePageWikitext(env.page.src);
+   var serialization =
+'' +
+'' +
+content.header +
+'' +
+'' + content.body + '' +
+'' + content.footer + '';
+   return env.pipelineFactory.parse(serialization);
+});
+
+// HTML to Wikitext
+PRPExt.prototype.fromHTML = Promise.method(function(env, body, useSelser) {
+// Default: wikitext serializer.
+return DU.serializeDOM(env, body, useSelser);
+});
+
+if (typeof module === "object") {
+module.exports = PRPExt;
+}

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Warn before deleting a bunch of local files

2017-01-11 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331798 )

Change subject: Warn before deleting a bunch of local files
..

Warn before deleting a bunch of local files

Change-Id: Id52e71088417b0fb6e47393c7531310ef7fce963
---
M bin/sync-gh-pages.sh
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/98/331798/1

diff --git a/bin/sync-gh-pages.sh b/bin/sync-gh-pages.sh
index b9098ed..371235f 100755
--- a/bin/sync-gh-pages.sh
+++ b/bin/sync-gh-pages.sh
@@ -2,6 +2,13 @@
 
 # This script builds a new gh-pages branch from latest master
 
+read -p "This script will delete all untracked files in the VE folder. 
Continue (y/n)? " -n 1 -r
+echo
+if [[ ! $REPLY =~ ^[Yy]$ ]]
+then
+   exit 0
+fi
+
 cd "$(dirname $0)/.."
 git fetch origin
 git checkout -B gh-pages origin/master

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id52e71088417b0fb6e47393c7531310ef7fce963
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] VisualEditor/VisualEditor[master]: Replace abandoned colors with current ones

2017-01-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331797 )

Change subject: Replace abandoned colors with current ones
..

Replace abandoned colors with current ones

Replacing abandoned colors with ones from overhauled WikimediaUI
color palette, conforming to WCAG 2.0 level AA.
Also side-aligning spacer for better findability in reading direction.

Bug: T153486
Change-Id: I14868e38d2e54a64663e1ec5cf0cdbbc6b5dbfc2
---
M src/ui/styles/elements/ve.ui.DiffElement.css
1 file changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/97/331797/1

diff --git a/src/ui/styles/elements/ve.ui.DiffElement.css 
b/src/ui/styles/elements/ve.ui.DiffElement.css
index e3199fa..0a2565f 100644
--- a/src/ui/styles/elements/ve.ui.DiffElement.css
+++ b/src/ui/styles/elements/ve.ui.DiffElement.css
@@ -33,7 +33,7 @@
 .ve-ui-diffElement-up,
 .ve-ui-diffElement-down,
 .ve-ui-diffElement-doc-child-change {
-   border-left: 6px solid #347bff;
+   border-left: 6px solid #36c;
padding-left: 4px;
margin-left: -10px;
 }
@@ -59,12 +59,12 @@
 
 .ve-ui-diffElement-down:before {
bottom: 0;
-   border-top: 6px solid #347bff;
+   border-top: 6px solid #36c;
 }
 
 .ve-ui-diffElement-up:before {
top: 0;
-   border-bottom: 6px solid #347bff;
+   border-bottom: 6px solid #36c;
 }
 
 .ve-ui-diffElement-insert:empty:before,
@@ -79,12 +79,11 @@
 }
 
 .ve-ui-diffElement-no-changes {
-   color: #888;
+   color: #72777d;
font-style: italic;
 }
 
 .ve-ui-diffElement-spacer {
-   color: #888;
-   text-align: center;
+   color: #72777d;
clear: both;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14868e38d2e54a64663e1ec5cf0cdbbc6b5dbfc2
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Run extension-phan-generic for 4 WMDE extensions

2017-01-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331796 )

Change subject: Run extension-phan-generic for 4 WMDE extensions
..

Run extension-phan-generic for 4 WMDE extensions

Cognate
InterwikiSorting
RevisionSlider
ElectronPdfService

Change-Id: Idb0a65714c87689dcedae410732183b6211aa669
---
M zuul/layout.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 78e74a5..50ac0da 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3100,6 +3100,7 @@
 template:
   - name: extension-unittests-generic
   - name: npm
+  - name: extension-phan-generic
 check:
   - jsonlint
 
@@ -3526,6 +3527,7 @@
   - name: extension-unittests-generic
   - name: npm
   - name: extension-selenium
+  - name: extension-phan-generic
 check:
   - jsonlint
   - jshint
@@ -3982,6 +3984,7 @@
 template:
   - name: extension-unittests-generic
   - name: npm
+  - name: extension-phan-generic
 check:
   - jsonlint
 
@@ -6494,6 +6497,7 @@
   - name: extension-unittests-generic
   - name: npm
   - name: extension-selenium
+  - name: extension-phan-generic
 check:
   - jsonlint
   - jshint

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Make extension-phan-generic job template

2017-01-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331795 )

Change subject: Make extension-phan-generic job template
..

Make extension-phan-generic job template

Change-Id: Idfd2858afb74b5d50fe47e8b729584514c6edda8
---
M zuul/layout.yaml
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/95/331795/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index af715c8..78e74a5 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1069,6 +1069,16 @@
   - mediawiki-extensions-php55-trusty
   - mediawiki-extensions-qunit-jessie
 
+  - name: extension-phan-generic
+check:
+ - mwext-php70-phan-jessie
+test:
+ - mwext-php70-phan-jessie
+gate-and-submit:
+ - mwext-php70-phan-jessie
+experimental:
+ - mwext-php70-phan-jessie
+
   # Template for MediaWiki extensions.
   # Triggers qunit jobs
   - name: extension-qunit

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

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

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


[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Add banner impressions jobs

2017-01-11 Thread Mforns (Code Review)
Mforns has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331794 )

Change subject: Add banner impressions jobs
..

Add banner impressions jobs

Bug: T155141
Change-Id: Iae85a39048596c71a8b4838a1b4ee60b9f6f6b7f
---
A 
oozie/banner_impressions/druid/daily/generate_daily_druid_banner_impressions.hql
A oozie/banner_impressions/druid/daily/load_banner_impressions.json
2 files changed, 155 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/94/331794/1

diff --git 
a/oozie/banner_impressions/druid/daily/generate_daily_druid_banner_impressions.hql
 
b/oozie/banner_impressions/druid/daily/generate_daily_druid_banner_impressions.hql
new file mode 100644
index 000..d430fe6
--- /dev/null
+++ 
b/oozie/banner_impressions/druid/daily/generate_daily_druid_banner_impressions.hql
@@ -0,0 +1,84 @@
+
+SET hive.exec.compress.output=true;
+SET 
mapreduce.output.fileoutputformat.compress.codec=org.apache.hadoop.io.compress.GzipCodec;
+ADD JAR /usr/lib/hive-hcatalog/share/hcatalog/hive-hcatalog-core.jar;
+
+
+DROP TABLE IF EXISTS andyrussg.tmp_banner_impressions;
+CREATE EXTERNAL TABLE IF NOT EXISTS andyrussg.tmp_banner_impressions (
+`ts` string,
+`campaign`   string,
+`banner` string,
+`uselang`string,
+`project`string,
+`device` string,
+`status_code`string,
+`country`string,
+`anonymous`  boolean,
+`bucket` string,
+`region` string,
+-- `geocoded_consistent`boolean, TODO
+`sample_rate`float,
+`request_count`  bigint,
+`normalized_impressions` bigint
+)
+ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
+STORED AS TEXTFILE
+LOCATION '/user/andyrussg/banner_impressions';
+
+
+CREATE TEMPORARY MACRO uri_param_value(param_name string, col string)
+parse_url(concat('http://bla.org/woo/', col), 'QUERY', param_name);
+
+INSERT OVERWRITE TABLE andyrussg.tmp_banner_impressions
+SELECT
+CONCAT(
+LPAD(year, 4, '0'), '-',
+LPAD(month, 2, '0'), '-',
+LPAD(day, 2, '0'), 'T',
+LPAD(hour, 2, '0'), ':00:00Z') AS ts,
+uri_param_value('campaign', uri_query) AS campaign,
+uri_param_value('banner', uri_query) AS banner,
+uri_param_value('uselang', uri_query) AS uselang,
+uri_param_value('project', uri_query) AS project,
+uri_param_value('device', uri_query) AS device,
+uri_param_value('statusCode', uri_query) AS status_code,
+uri_param_value('country', uri_query) AS country,
+IF (uri_param_value('anonymous', uri_query) = 'true', true, false) AS 
anonymous,
+uri_param_value('bucket', uri_query) AS bucket,
+geocoded_data['subdivision'] AS region,
+-- geocoded_data['country_code'] = uri_param_value('country', uri_query) 
AS geocoded_consistent TODO
+cast(uri_param_value('recordImpressionSampleRate', uri_query) AS float) AS 
sample_rate,
+COUNT(*) AS request_count,
+cast(COUNT(*) / cast(uri_param_value('recordImpressionSampleRate', 
uri_query) AS float) AS bigint) AS normalized_impressions
+FROM
+wmf.webrequest
+WHERE
+year=2016
+AND month=12
+AND day=18
+AND webrequest_source = 'text'
+AND uri_path = '/beacon/impression'
+AND agent_type = 'user'
+AND uri_param_value('debug', uri_query) = 'false'
+-- AND x_analytics_map['proxy'] IS NULL Note: add once added to pageviews
+GROUP BY
+CONCAT(
+LPAD(year, 4, '0'), '-',
+LPAD(month, 2, '0'), '-',
+LPAD(day, 2, '0'), 'T',
+LPAD(hour, 2, '0'), ':00:00Z'),
+uri_param_value('campaign', uri_query),
+uri_param_value('banner', uri_query),
+uri_param_value('uselang', uri_query),
+uri_param_value('project', uri_query),
+uri_param_value('device', uri_query),
+uri_param_value('statusCode', uri_query),
+uri_param_value('country', uri_query),
+IF (uri_param_value('anonymous', uri_query) = 'true', true, false),
+uri_param_value('bucket', uri_query),
+uri_param_value('recordImpressionSampleRate', uri_query),
+geocoded_data['subdivision'];
+-- geocoded_data['country_code'] = uri_param_value('country', uri_query); 
TODO
+
+-- DROP TABLE IF EXISTS andyrussg.tmp_banner_impressions;
diff --git a/oozie/banner_impressions/druid/daily/load_banner_impressions.json 
b/oozie/banner_impressions/druid/daily/load_banner_impressions.json
new file mode 100644
index 000..250dab2
--- /dev/null
+++ b/oozie/banner_impressions/druid/daily/load_banner_impressions.json
@@ -0,0 +1,71 @@
+{
+  "type" : "index_hadoop",
+  "spec" : {
+"ioConfig" : {
+  "type" : "hadoop",
+  "inputSpec" : {
+  

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Element: Batch setTimeout() calls for #updateThemeClasses

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

Change subject: Element: Batch setTimeout() calls for #updateThemeClasses
..


Element: Batch setTimeout() calls for #updateThemeClasses

Rather than call setTimeout() (through OO.ui.debounce()) for each
widget we create, queue them up and only call setTimeout() once per
batch. There is some small overhead associated with each setTimeout()
call (in Chrome, ~0.035 ms); there is some more overhead when the
timeout is called (in Chrome, ~0.025 ms); it becomes noticeable when
we set up 10,000 timeouts.

Bug: T154025
Change-Id: Iead4d6742f23a6e1d5ebf690716a9eda68de22e7
---
M src/Element.js
M src/Theme.js
M tests/JSPHP.test.karma.js
M tests/JSPHP.test.standalone.js
4 files changed, 39 insertions(+), 16 deletions(-)

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



diff --git a/src/Element.js b/src/Element.js
index 1d7c702..f01d066 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -33,7 +33,6 @@
this.$element = config.$element ||
$( document.createElement( this.getTagName() ) );
this.elementGroup = null;
-   this.debouncedUpdateThemeClassesHandler = OO.ui.debounce( 
this.debouncedUpdateThemeClasses );
 
// Initialization
if ( Array.isArray( config.classes ) ) {
@@ -776,16 +775,7 @@
  *   guaranteeing that theme updates do not occur within an element's 
constructor
  */
 OO.ui.Element.prototype.updateThemeClasses = function () {
-   this.debouncedUpdateThemeClassesHandler();
-};
-
-/**
- * @private
- * @localdoc This method is called directly from the QUnit tests instead of 
#updateThemeClasses, to
- *   make them synchronous.
- */
-OO.ui.Element.prototype.debouncedUpdateThemeClasses = function () {
-   OO.ui.theme.updateElementClasses( this );
+   OO.ui.theme.queueUpdateElementClasses( this );
 };
 
 /**
diff --git a/src/Theme.js b/src/Theme.js
index e0a6d82..b0ea34b 100644
--- a/src/Theme.js
+++ b/src/Theme.js
@@ -6,7 +6,10 @@
  *
  * @constructor
  */
-OO.ui.Theme = function OoUiTheme() {};
+OO.ui.Theme = function OoUiTheme() {
+   this.elementClassesQueue = [];
+   this.debouncedUpdateQueuedElementClasses = OO.ui.debounce( 
this.updateQueuedElementClasses );
+};
 
 /* Setup */
 
@@ -51,6 +54,36 @@
 };
 
 /**
+ * @private
+ */
+OO.ui.Theme.prototype.updateQueuedElementClasses = function () {
+   var i;
+   for ( i = 0; i < this.elementClassesQueue.length; i++ ) {
+   this.updateElementClasses( this.elementClassesQueue[ i ] );
+   }
+   // Clear the queue
+   this.elementClassesQueue = [];
+};
+
+/**
+ * Queue #updateElementClasses to be called for this element.
+ *
+ * @localdoc QUnit tests override this method to directly call 
#queueUpdateElementClasses,
+ *   to make them synchronous.
+ *
+ * @param {OO.ui.Element} element Element for which to update classes
+ */
+OO.ui.Theme.prototype.queueUpdateElementClasses = function ( element ) {
+   // Keep items in the queue unique. Use lastIndexOf to start checking 
from the end because that's
+   // the most common case (this method is often called repeatedly for the 
same element).
+   if ( this.elementClassesQueue.lastIndexOf( element ) !== -1 ) {
+   return;
+   }
+   this.elementClassesQueue.push( element );
+   this.debouncedUpdateQueuedElementClasses();
+};
+
+/**
  * Get the transition duration in milliseconds for dialogs opening/closing
  *
  * The dialog should be fully rendered this many milliseconds after the
diff --git a/tests/JSPHP.test.karma.js b/tests/JSPHP.test.karma.js
index eb499fd..973837d 100644
--- a/tests/JSPHP.test.karma.js
+++ b/tests/JSPHP.test.karma.js
@@ -42,9 +42,9 @@
} );
}
 
-   // Updating theme classes is normally debounced, we need to do it 
immediately
+   // Updating theme classes is normally debounced, but we need to do it 
immediately
// if we want the tests to be synchronous
-   OO.ui.Element.prototype.updateThemeClasses = 
OO.ui.Element.prototype.debouncedUpdateThemeClasses;
+   OO.ui.Theme.prototype.queueUpdateElementClasses = 
OO.ui.Theme.prototype.updateElementClasses;
 
/* global testSuiteConfigs, testSuitePHPOutput */
for ( klassName in testSuiteConfigs ) {
diff --git a/tests/JSPHP.test.standalone.js b/tests/JSPHP.test.standalone.js
index db06971..cc63795 100644
--- a/tests/JSPHP.test.standalone.js
+++ b/tests/JSPHP.test.standalone.js
@@ -42,9 +42,9 @@
} );
}
 
-   // Updating theme classes is normally debounced, we need to do it 
immediately
+   // Updating theme classes is normally debounced, but we need to do it 
immediately
// if we want the tests to be synchronous
-   OO.ui.Element.prototype.updateThemeClasses = 
OO.ui.Element.prototype.debouncedUpdateThemeClasses;
+   

[MediaWiki-commits] [Gerrit] integration/config[master]: Use full paths for PHAN mwext job things

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

Change subject: Use full paths for PHAN mwext job things
..


Use full paths for PHAN mwext job things

Also change to running on DebianJessie temporarily for
easier debugging.

Change-Id: I5f054f09f809d091bada4cf0202103c6b98aa5b3
---
M jjb/mediawiki-extensions.yaml
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 0ebf950..455f4ff 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -435,7 +435,7 @@
 # Phan! (T153039)
 - job:
 name: 'mwext-php70-phan-jessie'
-node: ci-jessie-wikimedia
+node: DebianJessie
 concurrent: true
 properties:
  - build-discarder:
@@ -448,9 +448,10 @@
  - mw-fetch-composer-dev
  - shell: |
 cd $WORKSPACE/src
+mkdir -p $WORKSPACE/log
 composer require etsy/phan:0.7 --prefer-dist --dev --no-progress 
--ansi --profile -v # todo don't hardcode version here
-PHAN=vendor/bin/phan ./tests/phan/bin/phan ./extensions/$EXT_NAME -m 
checkstyle
-mv ./extensions/$EXT_NAME/tests/phan/issues/latest 
$WORKSPACE/log/phan-issues
+PHAN=$WORKSPACE/src/vendor/bin/phan ./tests/phan/bin/phan 
./extensions/$EXT_NAME -m checkstyle
+mv $WORKSPACE/src/extensions/$EXT_NAME/tests/phan/issues/latest 
$WORKSPACE/log/phan-issues
 publishers:
  - castor-save
  - checkstyle:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f054f09f809d091bada4cf0202103c6b98aa5b3
Gerrit-PatchSet: 4
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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]: mw.Api: Deprecate mw.Api.errors, mw.Api.warnings

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

Change subject: mw.Api: Deprecate mw.Api.errors, mw.Api.warnings
..


mw.Api: Deprecate mw.Api.errors, mw.Api.warnings

Change-Id: I90f1ca1f26d647f34059fec342778568f7a5ff71
---
M RELEASE-NOTES-1.29
M resources/src/mediawiki/api.js
2 files changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 4174876..905ea12 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -175,6 +175,8 @@
 * Linker::getInternalLinkAttributesObj() (deprecated since 1.25) was removed.
 * Linker::getLinkAttributesInternal() (deprecated since 1.25) was removed.
 * RedisConnectionPool::handleException (deprecated since 1.23) was removed.
+* The static properties mw.Api.errors and mw.Api.warnings, containing 
incomplete
+  and outdated lists of errors/warnings returned by the API, are now 
deprecated.
 
 == Compatibility ==
 
diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js
index a174f58..d5032da 100644
--- a/resources/src/mediawiki/api.js
+++ b/resources/src/mediawiki/api.js
@@ -427,9 +427,8 @@
/**
 * @static
 * @property {Array}
-* List of errors we might receive from the API.
-* For now, this just documents our expectation that there should be 
similar messages
-* available.
+* Very incomplete and outdated list of errors we might receive from 
the API. Do not use.
+* @deprecated since 1.29
 */
mw.Api.errors = [
// occurs when POST aborted
@@ -487,17 +486,18 @@
'stashwrongowner',
'stashnosuchfilekey'
];
+   mw.log.deprecate( mw.Api, 'errors', mw.Api.errors );
 
/**
 * @static
 * @property {Array}
-* List of warnings we might receive from the API.
-* For now, this just documents our expectation that there should be 
similar messages
-* available.
+* Very incomplete and outdated list of warnings we might receive from 
the API. Do not use.
+* @deprecated since 1.29
 */
mw.Api.warnings = [
'duplicate',
'exists'
];
+   mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings );
 
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90f1ca1f26d647f34059fec342778568f7a5ff71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Matthias Mullie 
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...Math[master]: Create chemistry icon for upcoming VE chemistry support

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

Change subject: Create chemistry icon for upcoming VE chemistry support
..


Create chemistry icon for upcoming VE chemistry support

Bug: T153365
Change-Id: Ieaf5708932cfc91de6c293fd752dd64b8a73c73d
---
A modules/ve-math/chem.svg
1 file changed, 10 insertions(+), 0 deletions(-)

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



diff --git a/modules/ve-math/chem.svg b/modules/ve-math/chem.svg
new file mode 100644
index 000..bf8b040
--- /dev/null
+++ b/modules/ve-math/chem.svg
@@ -0,0 +1,10 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+
+
+
+
+
+
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieaf5708932cfc91de6c293fd752dd64b8a73c73d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Physikerwelt 
Gerrit-Reviewer: Tchanders 
Gerrit-Reviewer: TheDJ 
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]: Fix inconsistent capitalisation for link labels in EditWatch...

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

Change subject: Fix inconsistent capitalisation for link labels in EditWatchlist
..


Fix inconsistent capitalisation for link labels in EditWatchlist

This patch adds a uncapitalized version of 'history_short' message.

Bug: T151166
Change-Id: Ifecad060abfd3567952e2d0f41115c03f67751c1
---
M includes/specials/SpecialEditWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialEditWatchlist.php 
b/includes/specials/SpecialEditWatchlist.php
index 347f0c0..b447271 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -629,7 +629,7 @@
if ( $title->exists() ) {
$tools['history'] = $linkRenderer->makeKnownLink(
$title,
-   $this->msg( 'history_short' )->text(),
+   $this->msg( 'history_small' )->text(),
[],
[ 'action' => 'history' ]
);
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index a621f1c..3e88216 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -173,6 +173,7 @@
"searcharticle": "Go",
"history": "Page history",
"history_short": "History",
+   "history_small": "history",
"updatedmarker": "updated since my last visit",
"printableversion": "Printable version",
"permalink": "Permanent link",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index da43aef..4e04f90 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -358,6 +358,7 @@
"searcharticle": "Button description in the search menu displayed on 
every page. The \"Search\" button is 
{{msg-mw|Searchbutton}}.\n{{Identical|Go}}",
"history": "{{Identical|Page history}}",
"history_short": "Text used on the history 
tab.\n\n{{Identical|History}}",
+   "history_small": "Uncapitalized version of {{msg-mw|History 
short}}.\n\n{{Identical|History}}",
"updatedmarker": "Displayed in the page history (of a page you are 
[[Special:Watchlist|watching]]), when the page has been edited since the last 
time you visited it. This feature is used if 
[[mw:Manual:$wgShowUpdatedMarker|$wgShowUpdatedMarker]] is enabled.",
"printableversion": "Display name for link in wiki menu that leads to a 
printable version of a content page. Example: see one but last menu item on 
[[Main Page]].\n\nSee also:\n* {{msg-mw|Printableversion}}\n* 
{{msg-mw|Accesskey-t-print}}\n* 
{{msg-mw|Tooltip-t-print}}\n{{Identical|Printable version}}",
"permalink": "Display name for a permanent link to the current revision 
of a page. When the page is edited, permalink will still link to this revision. 
Example: Last menu link on [[{{MediaWiki:Mainpage}}]]\n\nSee also:\n* 
{{msg-mw|Permalink}}\n* {{msg-mw|Accesskey-t-permalink}}\n* 
{{msg-mw|Tooltip-t-permalink}}\n{{Identical|Permalink}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifecad060abfd3567952e2d0f41115c03f67751c1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Divadsn 
Gerrit-Reviewer: DatGuy 
Gerrit-Reviewer: Florianschmidtwelzow 
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] VisualEditor/VisualEditor[master]: Desktop demo improvements

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

Change subject: Desktop demo improvements
..


Desktop demo improvements

* Recreate the toolbar when changing languages
* Don't double-initialize the demo

Change-Id: I420c6a0ccd9027bd585a184cf5f7d77590d08570
---
M demos/ve/ve.demo.init.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/demos/ve/ve.demo.init.js b/demos/ve/ve.demo.init.js
index c3722c7..53dd212 100644
--- a/demos/ve/ve.demo.init.js
+++ b/demos/ve/ve.demo.init.js
@@ -4,7 +4,7 @@
  * @copyright 2011-2017 VisualEditor Team and others; see 
http://ve.mit-license.org
  */
 
-new ve.init.sa.Platform( ve.messagePaths ).initialize().done( function () {
+new ve.init.sa.Platform( ve.messagePaths ).getInitializedPromise().done( 
function () {
 
var $toolbar = $( '.ve-demo-targetToolbar' ),
$editor = $( '.ve-demo-editor' ),
@@ -89,6 +89,7 @@
OO.ui.msg = ve.init.platform.getMessage.bind( ve.init.platform 
);
 
// HACK: Re-initialize page to load message files
+   ve.init.target.teardownToolbar();
ve.init.platform.initialize().done( function () {
var i;
for ( i = 0; i < ve.demo.surfaceContainers.length; i++ 
) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I420c6a0ccd9027bd585a184cf5f7d77590d08570
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Re-add wgCommonsMetadataForceRecalculate

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

Change subject: Re-add wgCommonsMetadataForceRecalculate
..


Re-add wgCommonsMetadataForceRecalculate

This partially reverts commit a39c69105d62a2599b24d70bfb91b7d6d24ea51f.

Change-Id: I9c0b8fdc81f517fa17fb97ea88cdce2890494e10
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 1441f2e..3f31bae 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2079,7 +2079,7 @@
 if ( $wmgUseCommonsMetadata ) {
wfLoadExtension( 'CommonsMetadata' );
$wgCommonsMetadataSetTrackingCategories = true;
-   $wgCommonsMetadataForceRecalculate = false;
+   $wgCommonsMetadataForceRecalculate = 
$wmgCommonsMetadataForceRecalculate;
 }
 
 if ( $wmgUseGWToolset ) {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 442ef4f..ef62797 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12982,6 +12982,10 @@
'wikitech' => false,
 ],
 
+'wmgCommonsMetadataForceRecalculate' => [
+   'default' => false,
+],
+
 // T134778
 // T136746
 'wmgUsePopups' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c0b8fdc81f517fa17fb97ea88cdce2890494e10
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Replace outdated color with current one

2017-01-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331793 )

Change subject: Replace outdated color with current one
..

Replace outdated color with current one

Replacing outdated color with `#36c` from overhauled color palette.
Also making focus following common outline-width.

Bug: T153486
Change-Id: I5c76a788fff21c53bd193628bc610f38d388179f
---
M build/screenshots.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/build/screenshots.js b/build/screenshots.js
index 1a1629a..c2c2ac3 100644
--- a/build/screenshots.js
+++ b/build/screenshots.js
@@ -81,7 +81,7 @@
if ( 
$lastHighlighted ) {

$lastHighlighted.css( 'outline', '' );
}
-   $element.css( 
'outline', '3px solid #347bff' );
+   $element.css( 
'outline', '2px solid #36c' );

$lastHighlighted = $element;
},
runMenuTask: function ( 
done, tool, expanded, highlight, extraElements ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageAssessments[master]: Add maintenance script to purge bad page assessments

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

Change subject: Add maintenance script to purge bad page assessments
..


Add maintenance script to purge bad page assessments

Change-Id: Ie6ae0681cb65321c4b1ffe60030aa544ce20f5f2
---
A maintenance/purgeBadAssessments.php
1 file changed, 33 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/purgeBadAssessments.php 
b/maintenance/purgeBadAssessments.php
new file mode 100644
index 000..1da9294
--- /dev/null
+++ b/maintenance/purgeBadAssessments.php
@@ -0,0 +1,33 @@
+requireExtension( 'PageAssessments' );
+   $this->addDescription( "Purge bad assessments from the 
page_assessments table" );
+   }
+
+   public function execute() {
+   $dbw = $this->getDB( DB_MASTER );
+   $this->output( "Purging bad assessments from 
page_assessments...\n" );
+   // Delete all assessments with page ID 0
+   $dbw->delete( 'page_assessments', 'pa_page_id = 0' );
+   $this->output( "Done.\n" );
+   $this->output( "Assessments deleted: " . $dbw->affectedRows() . 
"\n" );
+   }
+
+}
+
+$maintClass = "PurgeBadAssessments";
+require_once RUN_MAINTENANCE_IF_MAIN;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6ae0681cb65321c4b1ffe60030aa544ce20f5f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageAssessments
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: MusikAnimal 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: Samwilson 
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]: Exclude new high-priority video transcode jobs from default ...

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

Change subject: Exclude new high-priority video transcode jobs from default 
queue
..


Exclude new high-priority video transcode jobs from default queue

Prep for I3d834ad: TMH transcode jobs being split into two queues,
one low and one high priority. Existing queue is low prio, new
queue is high prio and by default will include only SD resolutions
and files less than 15 minutes long, while large and long files
go to the low-priority queue.

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 00c381c..1441f2e 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2573,6 +2573,7 @@
 
 # Timed Media Handler:
 $wgJobTypesExcludedFromDefaultQueue[] = 'webVideoTranscode';
+$wgJobTypesExcludedFromDefaultQueue[] = 'webVideoTranscodePrioritized';
 
 # GWToolset
 $wgJobTypesExcludedFromDefaultQueue[] = 'gwtoolsetUploadMetadataJob';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aee49682f66cdd7c7a6b9267d8d486affc2903a
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Florianschmidtwelzow 
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]: Desktop demo improvements

2017-01-11 Thread DLynch (Code Review)
DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331792 )

Change subject: Desktop demo improvements
..

Desktop demo improvements

* Recreate the toolbar when changing languages
* Don't double-initialize the demo

Change-Id: I420c6a0ccd9027bd585a184cf5f7d77590d08570
---
M demos/ve/ve.demo.init.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/92/331792/1

diff --git a/demos/ve/ve.demo.init.js b/demos/ve/ve.demo.init.js
index c3722c7..53dd212 100644
--- a/demos/ve/ve.demo.init.js
+++ b/demos/ve/ve.demo.init.js
@@ -4,7 +4,7 @@
  * @copyright 2011-2017 VisualEditor Team and others; see 
http://ve.mit-license.org
  */
 
-new ve.init.sa.Platform( ve.messagePaths ).initialize().done( function () {
+new ve.init.sa.Platform( ve.messagePaths ).getInitializedPromise().done( 
function () {
 
var $toolbar = $( '.ve-demo-targetToolbar' ),
$editor = $( '.ve-demo-editor' ),
@@ -89,6 +89,7 @@
OO.ui.msg = ve.init.platform.getMessage.bind( ve.init.platform 
);
 
// HACK: Re-initialize page to load message files
+   ve.init.target.teardownToolbar();
ve.init.platform.initialize().done( function () {
var i;
for ( i = 0; i < ve.demo.surfaceContainers.length; i++ 
) {

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: CapsuleMultiSelectWidget: Remove onFocusForPopup, call focus...

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

Change subject: CapsuleMultiSelectWidget: Remove onFocusForPopup, call focus 
directly
..


CapsuleMultiSelectWidget: Remove onFocusForPopup, call focus directly

If this.popup is set (which it is in this case), onFocusForPopup()
and focus() do the same thing. So just call focus() directly rather
than duplicating its code.

Change-Id: I21b8cff40484ad85f904636f408a059b7a05fe74
---
M src/widgets/CapsuleMultiselectWidget.js
1 file changed, 1 insertion(+), 15 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/widgets/CapsuleMultiselectWidget.js 
b/src/widgets/CapsuleMultiselectWidget.js
index 91be472..be0cd61 100644
--- a/src/widgets/CapsuleMultiselectWidget.js
+++ b/src/widgets/CapsuleMultiselectWidget.js
@@ -119,7 +119,7 @@
// Events
if ( this.popup ) {
$tabFocus.on( {
-   focus: this.onFocusForPopup.bind( this )
+   focus: this.focus.bind( this )
} );
this.popup.$element.on( 'focusout', this.onPopupFocusOut.bind( 
this ) );
if ( this.popup.$autoCloseIgnore ) {
@@ -525,20 +525,6 @@
 OO.ui.CapsuleMultiselectWidget.prototype.onInputBlur = function () {
this.addItemFromLabel( this.$input.val() );
this.clearInput();
-};
-
-/**
- * Handle focus events
- *
- * @private
- * @param {jQuery.Event} event
- */
-OO.ui.CapsuleMultiselectWidget.prototype.onFocusForPopup = function () {
-   if ( !this.isDisabled() ) {
-   this.popup.setSize( this.$handle.width() );
-   this.popup.toggle( true );
-   OO.ui.findFocusable( this.popup.$element ).focus();
-   }
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I21b8cff40484ad85f904636f408a059b7a05fe74
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Bartosz Dziewoński 
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]: static.php should use deployed branch for invalid hashes

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

Change subject: static.php should use deployed branch for invalid hashes
..


static.php should use deployed branch for invalid hashes

Files loaded via static.php with a non-standard query string
were being pulled from the most recent available branch instead
of the deployment branch.

This caused mismatched file versions between ResourceLoader and
wgExtensionAssetsPath HTTP fetches for TimedMediaHandler's ogv.js
library, since the library applies its own cache hashes in the
query string which are in a different format.

In this case, should be fixed by using deployed version as default
both when there's no query string *and* when there's a query string
that's not in the hash format that the Varnish VCL layer sends us
to the static host for.

(This should continue to provide the forward consistency protections
of a classic cache-buster query string for those files, but they
won't get the benefits of the forward/backward protection on rollback
that static.php's hash checking would provide.)

Bug: T146363
Change-Id: I95639d5e45b18f6459c2889dc2633faadedfad9b
---
M w/static.php
1 file changed, 18 insertions(+), 6 deletions(-)

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



diff --git a/w/static.php b/w/static.php
index c7afb50..30cd50d 100644
--- a/w/static.php
+++ b/w/static.php
@@ -6,13 +6,18 @@
  *
  * Overview:
  *
- * - multiversion requires the MediaWiki script directory (/w) to be shared
- *   across all domains. Files in /w are generic and load the real MediaWiki
- *   entry point based on the currently configured version based on host name.
+ * - multiversion requires the MediaWiki script directory (/w) to be shared 
across
+ *   all domains. Files in /w are generic and load the real MediaWiki entry 
point
+ *   from the current wiki's MediaWiki version (based on request host name).
  * - MediaWiki configuration sets $wgResourceBasePath to "/w".
  * - Apache configuration rewrites "/w/skins/*", "/w/resources/*", and 
"/w/extension/*"
  *   to /w/static.php (this file).
  * - static.php streams the file from the appropiate MediaWiki branch 
directory.
+ * - For performance, Varnish caches responses from static.php in a 
hostname-agnostic
+ *   way if a hexidecimal query string was set. (E.g. verifiable hash.)
+ *   Therefore static.php MUST respond in a deterministic way for those 
requests
+ *   regardless of which wiki made the request. (Compliance is enforced via 
VCL by
+ *   hardcoding 'en.wikipedia.org' for these requesrs, per static_host config.)
  *
  * In addition to the above, this file also looks in older MediaWiki branch
  * directories in order to support references from our static HTML cache for 
30 days.
@@ -124,8 +129,11 @@
return version_compare( $b, $a );
} );
 
-   // If request has no verification hash, prefer the current wikiversion
-   if ( !$urlHash ) {
+   // If request has no or invalid verification hash, prefer the current 
wikiversion
+   // Note we can't do this for a matching verification hash because 
varnish will
+   // have already sent us to the static host instead of the individual 
wiki.
+   $validHash = $urlHash ? preg_match( '/^[a-fA-F0-9]+$/', $urlHash ) : 
false;
+   if ( !$validHash ) {
array_unshift( $branchDirs, $IP );
}
 
@@ -151,9 +159,13 @@
}
 
if ( $urlHash ) {
-   if ( strlen( $urlHash ) !== 5 ) {
+   if ( !$validHash || strlen( $urlHash ) !== 5 ) {
// Garbage query string. Give same response as 
for requests with
// no validation hash (nohash), except with a 
longer max-age.
+   //
+   // This prevents extra backend hits from 
unexpected random strings,
+   // and also keeps expected behavior for 
extensions using libraries
+   // with their own versioned cache-buster query 
strings.
$responseType = 'unknown';
} else {
// Set fallback to the newest existing version.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95639d5e45b18f6459c2889dc2633faadedfad9b
Gerrit-PatchSet: 8
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>


[MediaWiki-commits] [Gerrit] labs/striker[master]: Add a password strength meter

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

Change subject: Add a password strength meter
..


Add a password strength meter

Use the zxcvbn library from Dropbox to add a heuristic based password
strength meter to the account creation and password change workflows.
The calculation made by zxcvbn is only advisory and does not block
setting any particular password.

Bug: T153935
Change-Id: I36b5f0d38d1dd1e3fce91bb42de511a9d088976c
---
M static/css/site.css
A static/js/password-strength.js
A static/js/zxcvbn.min.js
M striker/profile/forms.py
M striker/register/forms.py
M striker/register/views.py
A striker/templates/_password-strength-meter.html
M striker/templates/profile/settings/change-password.html
M striker/templates/register/base.html
M striker/templates/register/password.html
10 files changed, 139 insertions(+), 4 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36b5f0d38d1dd1e3fce91bb42de511a9d088976c
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dpatrick 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Point SSH key goal at local key management screen

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

Change subject: Point SSH key goal at local key management screen
..


Point SSH key goal at local key management screen

WE have ssh public key management locally now, so point the user at it
rather than the hideous OpenStackManager UI on Wikitech.

Also includes a minor cosmetic change to the key management screen to
prevent adding an empty div when there are no existing ssh keys for the
account.

Bug: T144711
Change-Id: Icbe404c1ae6bc9608f9e187d7a49d20510dcd96e
---
M striker/templates/goals/ACCOUNT_SSH.html
M striker/templates/profile/settings/ssh-keys.html
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/striker/templates/goals/ACCOUNT_SSH.html 
b/striker/templates/goals/ACCOUNT_SSH.html
index 51d3b76..cff77b4 100644
--- a/striker/templates/goals/ACCOUNT_SSH.html
+++ b/striker/templates/goals/ACCOUNT_SSH.html
@@ -5,8 +5,6 @@
 
 {% block body %}
 {% blocktrans %}Labs and Tool Labs servers are accessed using https://en.wikipedia.org/wiki/Secure_Shell;>SSH. You need to upload 
an ssh public key to enable your SSH access.{% endblocktrans %}
-{% with 
url=wikitech_url|add:"/wiki/Special:Preferences#mw-prefsection-openstack" %}
 {% blocktrans %}See https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Access#Generating_and_uploading_an_SSH_key;>the
 help documentation for more information on how to generate and upload your 
public SSH key.{% endblocktrans %}
-{% trans "Add public SSH key" 
%}
-{% endwith %}
+{% trans 
"Add public SSH key" %}
 {% endblock %}
diff --git a/striker/templates/profile/settings/ssh-keys.html 
b/striker/templates/profile/settings/ssh-keys.html
index 4c19d62..f8c501d 100644
--- a/striker/templates/profile/settings/ssh-keys.html
+++ b/striker/templates/profile/settings/ssh-keys.html
@@ -5,6 +5,7 @@
 
 {% block title %}{% trans "SSH keys" %}{% endblock %}
 {% block content %}
+{% if ssh_keys %}
 
   {% for key in ssh_keys %}
   {% trans "Show" as show %}
@@ -47,6 +48,7 @@
   
   {% endfor %}
 
+{% endif %}
 
   
 {% fa_icon "square-o" 
"stack-2x" "fw" aria_hidden="true" %}{% fa_icon "key" "stack-1x" "fw" 
aria_hidden="true" %} {% trans "New SSH key" %}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbe404c1ae6bc9608f9e187d7a49d20510dcd96e
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Add SSH key importing

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

Change subject: Add SSH key importing
..


Add SSH key importing

Add a form to upload a new SSH public key and store it in LDAP.

Bug: T144711
Change-Id: Ic01693ee543779f7f5e5df272f2a3e793f478030
---
M striker/profile/forms.py
M striker/profile/urls.py
M striker/profile/views.py
M striker/templates/profile/settings/ssh-keys.html
4 files changed, 70 insertions(+), 0 deletions(-)

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



diff --git a/striker/profile/forms.py b/striker/profile/forms.py
index 1e98001..bfae5b4 100644
--- a/striker/profile/forms.py
+++ b/striker/profile/forms.py
@@ -47,3 +47,34 @@
 if hash != key_hash
 ]
 return key_hash
+
+
+class SshKeyForm(forms.Form):
+public_key = forms.CharField(
+label=_('Public key'),
+widget=forms.Textarea(
+attrs={
+'placeholder': _(
+"Begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', "
+"'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or "
+"'ecdsa-sha2-nistp521'"
+),
+}
+),
+required=True,
+)
+
+def clean_public_key(self):
+pub_key = self.cleaned_data.get('public_key').strip()
+key = utils.parse_ssh_key(pub_key)
+if key is None:
+# TODO: Try to cleanup the data and parse it again?
+# OpenStackManager checks for PuTTY's weird key format and tries
+# to extract the public key from that. I don't think that code in
+# OSM actually works though. OSM also passes the key data through
+# `ssh-keygen -i` for validation. This would have the side effect
+# of extracting the public key from an unencrypted private key.
+raise forms.ValidationError(
+_('Invalid public key.'), code='key_invalid')
+self.key = key
+return pub_key
diff --git a/striker/profile/urls.py b/striker/profile/urls.py
index d2292ea..e6a4b5a 100644
--- a/striker/profile/urls.py
+++ b/striker/profile/urls.py
@@ -50,4 +50,9 @@
 'striker.profile.views.ssh_key_delete',
 name='ssh_key_delete'
 ),
+urls.url(
+r'^settings/ssh-keys/add$',
+'striker.profile.views.ssh_key_add',
+name='ssh_key_add'
+),
 ]
diff --git a/striker/profile/views.py b/striker/profile/views.py
index 689710f..2f5c00e 100644
--- a/striker/profile/views.py
+++ b/striker/profile/views.py
@@ -81,6 +81,7 @@
 ldapuser = req.user.ldapuser
 ctx = {
 'ssh_keys': [utils.parse_ssh_key(key) for key in ldapuser.ssh_keys],
+'new_key': forms.SshKeyForm(),
 }
 for key in ctx['ssh_keys']:
 key.form = forms.SshKeyDeleteForm(
@@ -104,3 +105,22 @@
 else:
 messages.error(req, _('Key not found.'))
 return shortcuts.redirect(urlresolvers.reverse('profile:ssh_keys'))
+
+
+@login_required
+def ssh_key_add(req):
+if req.method == 'POST':
+form = forms.SshKeyForm(data=req.POST)
+if form.is_valid():
+ldapuser = req.user.ldapuser
+keys = ldapuser.ssh_keys
+keys.append(form.cleaned_data.get('public_key'))
+ldapuser.ssh_keys = keys
+ldapuser.save()
+messages.info(
+req,
+_('Added SSH key {key_hash}').format(
+key_hash=form.key.hash_sha256()))
+else:
+messages.error(req, _('Invalid public key.'))
+return shortcuts.redirect(urlresolvers.reverse('profile:ssh_keys'))
diff --git a/striker/templates/profile/settings/ssh-keys.html 
b/striker/templates/profile/settings/ssh-keys.html
index a667677..4c19d62 100644
--- a/striker/templates/profile/settings/ssh-keys.html
+++ b/striker/templates/profile/settings/ssh-keys.html
@@ -47,5 +47,19 @@
   
   {% endfor %}
 
+
+  
+{% fa_icon "square-o" 
"stack-2x" "fw" aria_hidden="true" %}{% fa_icon "key" "stack-1x" "fw" 
aria_hidden="true" %} {% trans "New SSH key" %}
+  
+  
+
+  {% csrf_token %}
+  {% bootstrap_form new_key %}
+  {% buttons %}
+  {% trans "Add SSH key" 
%}
+  {% endbuttons %}
+
+  
+
 {% endblock %}
 {# vim:sw=2:ts=2:sts=2:et: #}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic01693ee543779f7f5e5df272f2a3e793f478030
Gerrit-PatchSet: 2
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Remove some vertical whitespace on linked accounts screen

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

Change subject: Remove some vertical whitespace on linked accounts screen
..


Remove some vertical whitespace on linked accounts screen

Change-Id: I01b60b22333ba34a9745ce747730ec9146966862
---
M striker/templates/profile/settings/accounts/ldap.html
M striker/templates/profile/settings/accounts/phabricator.html
M striker/templates/profile/settings/accounts/sul.html
3 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/striker/templates/profile/settings/accounts/ldap.html 
b/striker/templates/profile/settings/accounts/ldap.html
index f151a67..60c0032 100644
--- a/striker/templates/profile/settings/accounts/ldap.html
+++ b/striker/templates/profile/settings/accounts/ldap.html
@@ -6,7 +6,7 @@
   {% fa_icon "user-circle" "lg" "fw" 
aria_hidden="true" %} {% trans "Wikitech/Labs/Gerrit LDAP account" %}
   
   
-
+
   {% trans "Username" %}{{ user.ldapname }}
   {% trans "Shell account name" %}{{ user.shellname }}
   {% trans "Email" %}{{ user.ldapemail }}
diff --git a/striker/templates/profile/settings/accounts/phabricator.html 
b/striker/templates/profile/settings/accounts/phabricator.html
index 3860a78..4c10646 100644
--- a/striker/templates/profile/settings/accounts/phabricator.html
+++ b/striker/templates/profile/settings/accounts/phabricator.html
@@ -8,14 +8,14 @@
   {% fa_icon "circle" 
"stack-2x" "fw" aria_hidden="true" %}{% fa_icon "cog" "stack-1x" "fw" "inverse" 
aria_hidden="true" %} {% trans "Phabricator account" %}
   
   
-
+
   {% trans "Username" %}{{ user.phabname }}
   {% trans "Real name" %}{{ user.phabrealname }}
   {% trans "Profile" %}{{ 
user.phaburl }}
 
   
   
-{% trans "Refresh Phabricator data" %}
+{% trans "Refresh Phabricator data" %}
   
 
 {% else %}
diff --git a/striker/templates/profile/settings/accounts/sul.html 
b/striker/templates/profile/settings/accounts/sul.html
index 52bf5f3..2957e0e 100644
--- a/striker/templates/profile/settings/accounts/sul.html
+++ b/striker/templates/profile/settings/accounts/sul.html
@@ -8,14 +8,14 @@
   {% fa_icon "wikipedia-w" "lg" "fw" 
aria_hidden="true" %} {% trans "Wikimedia account" %}
   
   
-
+
   {% trans "Username" %}{{ user.sulname }}
   {% trans "Real name" %}{{ user.realname }}
   {% trans "Email" %}{{ user.sulemail }}
 
   
   
-{% trans "Refresh OAuth credentials" %}
+{% trans "Refresh OAuth credentials" %}
   
 
 {% else %}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01b60b22333ba34a9745ce747730ec9146966862
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: MusikAnimal 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs/striker[master]: Allow changing LDAP password

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

Change subject: Allow changing LDAP password
..


Allow changing LDAP password

Bug: T153935
Change-Id: I04b1bf0b5cf7122e23364505c39689e9a691181e
---
M striker/labsauth/models.py
M striker/profile/forms.py
M striker/profile/urls.py
M striker/profile/views.py
M striker/templates/profile/settings/accounts/ldap.html
M striker/templates/profile/settings/base.html
A striker/templates/profile/settings/change-password.html
7 files changed, 139 insertions(+), 4 deletions(-)

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



diff --git a/striker/labsauth/models.py b/striker/labsauth/models.py
index 88c8d8e..771e6a8 100644
--- a/striker/labsauth/models.py
+++ b/striker/labsauth/models.py
@@ -30,6 +30,7 @@
 from django.utils.translation import ugettext_lazy as _
 
 from ldapdb.models import fields as ldap_fields
+import ldap
 import ldapdb.models
 import mwoauth
 
@@ -109,12 +110,28 @@
 verbose_name_plural = _('users')
 
 def set_password(self, raw_password):
-"""Can't change password."""
-return
+# Set password by directly manipulating the associated LDAP record.
+# The ldap-auth backend we use does not support password
+# checks/changes.
+ldapuser = self.ldapuser
+ldapuser.password = raw_password
+ldapuser.save()
 
 def check_password(self, raw_password):
-"""Can't be used directly for authn."""
-return False
+"""Return a boolean of whether the raw_password was correct."""
+# Validate the current password by doing an authbind as the user.
+# The ldap-auth backend we use does not support password
+# checks/changes.
+try:
+con = ldap.initialize(settings.AUTH_LDAP_SERVER_URI)
+if settings.AUTH_LDAP_START_TLS:
+con.start_tls_s()
+con.simple_bind_s(self.ldap_dn, raw_password)
+except ldap.INVALID_CREDENTIALS:
+return False
+else:
+con.unbind()
+return True
 
 def set_unusable_password(self):
 return
diff --git a/striker/profile/forms.py b/striker/profile/forms.py
index bfae5b4..0f33e93 100644
--- a/striker/profile/forms.py
+++ b/striker/profile/forms.py
@@ -21,6 +21,8 @@
 from django import forms
 from django.utils.translation import ugettext_lazy as _
 
+from parsley.decorators import parsleyfy
+
 from striker.profile import utils
 
 
@@ -78,3 +80,57 @@
 _('Invalid public key.'), code='key_invalid')
 self.key = key
 return pub_key
+
+
+@parsleyfy
+class PasswordChangeForm(forms.Form):
+class Meta:
+parsley_extras = {
+'confirm': {
+'equalto': 'passwd',
+'error-message': _('Passwords do not match.'),
+}
+}
+
+old_password = forms.CharField(
+label=_('Old password'),
+widget=forms.PasswordInput(
+attrs={
+'autofocus': 'autofocus',
+}
+)
+)
+passwd = forms.CharField(
+label=_('New password'),
+min_length=10,
+widget=forms.PasswordInput
+)
+confirm = forms.CharField(
+label=_('Confirm new password'),
+widget=forms.PasswordInput
+)
+
+def __init__(self, user=None, *args, **kwargs):
+self.user = user
+super(PasswordChangeForm, self).__init__(*args, **kwargs)
+
+def clean_old_password(self):
+old_password = self.cleaned_data.get('old_password')
+if not self.user.check_password(old_password):
+raise forms.ValidationError(
+_('Your old password was entered incorrectly. '
+  'Please enter it again.'),
+code='password_incorrect')
+return old_password
+
+def clean_confirm(self):
+"""Validate that both password entries match."""
+passwd = self.cleaned_data.get('passwd')
+confirm = self.cleaned_data.get('confirm')
+if passwd != confirm:
+raise forms.ValidationError(_('Passwords do not match.'))
+return confirm
+
+def save(self):
+self.user.set_password(self.cleaned_data['passwd'])
+return self.user
diff --git a/striker/profile/urls.py b/striker/profile/urls.py
index e6a4b5a..8d21080 100644
--- a/striker/profile/urls.py
+++ b/striker/profile/urls.py
@@ -55,4 +55,9 @@
 'striker.profile.views.ssh_key_add',
 name='ssh_key_add'
 ),
+urls.url(
+r'^settings/change_password$',
+'striker.profile.views.change_password',
+name='change_password'
+),
 ]
diff --git a/striker/profile/views.py b/striker/profile/views.py
index 2f5c00e..9f84b04 100644
--- a/striker/profile/views.py
+++ b/striker/profile/views.py
@@ -26,6 +26,7 @@
 from 

[MediaWiki-commits] [Gerrit] labs/striker[master]: Cleanup a few things with account registration form

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

Change subject: Cleanup a few things with account registration form
..


Cleanup a few things with account registration form

* Change the form to use clean_confirm() instead of clean()
* Move register.js to parsley-bootstrap.js so it can be reused

Change-Id: Ic9f15748101e38978d10bdbfbf29f319e22c73a7
---
R static/js/parsley-bootstrap.js
M striker/register/forms.py
M striker/templates/register/base.html
3 files changed, 5 insertions(+), 6 deletions(-)

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



diff --git a/static/js/register.js b/static/js/parsley-bootstrap.js
similarity index 100%
rename from static/js/register.js
rename to static/js/parsley-bootstrap.js
diff --git a/striker/register/forms.py b/striker/register/forms.py
index 8781da9..8e17941 100644
--- a/striker/register/forms.py
+++ b/striker/register/forms.py
@@ -22,9 +22,9 @@
 
 from django import forms
 from django.core import validators
-from django.core.exceptions import ValidationError
 from django.utils.safestring import mark_safe
 from django.utils.translation import ugettext_lazy as _
+
 from parsley.decorators import parsleyfy
 
 from striker.register import utils
@@ -193,14 +193,13 @@
 widget=forms.PasswordInput
 )
 
-def clean(self):
+def clean_confirm(self):
 """Validate that both password entries match."""
-super(Password, self).clean()
 passwd = self.cleaned_data.get('passwd')
 confirm = self.cleaned_data.get('confirm')
 if passwd != confirm:
-self.add_error(
-'confirm', ValidationError(_('Passwords do not match.')))
+raise forms.ValidationError(_('Passwords do not match.'))
+return confirm
 
 
 @parsleyfy
diff --git a/striker/templates/register/base.html 
b/striker/templates/register/base.html
index da0f929..f987b58 100644
--- a/striker/templates/register/base.html
+++ b/striker/templates/register/base.html
@@ -77,6 +77,6 @@
 {% block js %}
 {{ block.super }}
 
-
+
 {% endblock %}
 {# vim:sw=2:ts=2:sts=2:et:ft=htmldjango: #}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9f15748101e38978d10bdbfbf29f319e22c73a7
Gerrit-PatchSet: 1
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Madhuvishy 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
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]: webp: enabled by default - remove old dead code

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

Change subject: webp: enabled by default - remove old dead code
..


webp: enabled by default - remove old dead code

Bug: T27397
Change-Id: Ie88319e318d5587b57fa5b9771a8afd75603ad51
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 27a7922..00c381c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -475,9 +475,6 @@
 
 $wgFileExtensions = array_merge( $wgFileExtensions, $wmgFileExtensions );
 
-// Disable webp for now. T27397
-$wgFileExtensions = array_values( array_diff( $wgFileExtensions, [ 'webp' ] ) 
);
-
 if ( isset( $wmgUploadStashMaxAge ) ) {
$wgUploadStashMaxAge = $wmgUploadStashMaxAge;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie88319e318d5587b57fa5b9771a8afd75603ad51
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Matanya 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Use full path for PHAN env var mwext job

2017-01-11 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331791 )

Change subject: Use full path for PHAN env var mwext job
..

Use full path for PHAN env var mwext job

Change-Id: I5f054f09f809d091bada4cf0202103c6b98aa5b3
---
M jjb/mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/91/331791/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 0ebf950..121d62e 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -449,7 +449,7 @@
  - shell: |
 cd $WORKSPACE/src
 composer require etsy/phan:0.7 --prefer-dist --dev --no-progress 
--ansi --profile -v # todo don't hardcode version here
-PHAN=vendor/bin/phan ./tests/phan/bin/phan ./extensions/$EXT_NAME -m 
checkstyle
+PHAN=$WORKSPACE/src/vendor/bin/phan ./tests/phan/bin/phan 
./extensions/$EXT_NAME -m checkstyle
 mv ./extensions/$EXT_NAME/tests/phan/issues/latest 
$WORKSPACE/log/phan-issues
 publishers:
  - castor-save

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

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

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


  1   2   3   4   >