Bartosz Dziewoński has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332133 )
Change subject: Unbreak creation of owner-only consumers ...................................................................... Unbreak creation of owner-only consumers Bug: T155344 Change-Id: I2c2b1ed99a052338c0cf86dae1481aec0947a97f --- M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth refs/changes/33/332133/1 diff --git a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php index a83b5c6..ad96093 100644 --- a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php +++ b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php @@ -208,6 +208,10 @@ function( array $data, \IContextSource $context ) use ( $control ) { $data['grants'] = \FormatJson::encode( // adapt form to controller preg_replace( '/^grant-/', '', $data['grants'] ) ); + // 'callbackUrl' must be present, otherwise MWOAuthSubmitControl::validateFields() fails. + if ( $data['ownerOnly'] && !isset( $data['callbackUrl'] ) ) { + $data['callbackUrl'] = ''; + } $control->setInputParameters( $data ); return $control->submit(); -- To view, visit https://gerrit.wikimedia.org/r/332133 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c2b1ed99a052338c0cf86dae1481aec0947a97f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OAuth Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits