jenkins-bot has submitted this change and it was merged. Change subject: Compatibility for custom articlepath ......................................................................
Compatibility for custom articlepath If a custom articlepath is set (e.g. $wgScript?title=$1) subpages won't work, so use a fallback solution with form data. Change-Id: I3db51d537a45ecf35280bdde8351bbb4ba15fd6d --- M includes/specials/SpecialGoogleLogin.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Florianschmidtwelzow: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialGoogleLogin.php b/includes/specials/SpecialGoogleLogin.php index c204bdc..3f0d7b4 100644 --- a/includes/specials/SpecialGoogleLogin.php +++ b/includes/specials/SpecialGoogleLogin.php @@ -22,6 +22,7 @@ $db = new GoogleLoginDB; $this->mGoogleLogin = $googleLogin = new GoogleLogin; + $par = (empty( $par ) ? $request->getVal( 'action' ) : $par); $googleLogin->setLoginParameter( $request ); $client = $googleLogin->getClient(); $plus = $googleLogin->getPlus(); @@ -193,6 +194,7 @@ ), ); $htmlForm = new HTMLForm( $formElements, $this->getContext(), 'googlelogin-form' ); + $htmlForm->addHiddenField( 'action', 'Create' ); $htmlForm->addHiddenField( 'wpSecureHash', $this->mGoogleLogin->getRequestToken() ); $htmlForm->setSubmitText( wfMessage( 'googlelogin-form-create' )->text() ); $htmlForm->setAction( $this->getPageTitle( 'Create' )->getLocalUrl() ); @@ -214,6 +216,7 @@ ); $htmlForm->setSubmitText( wfMessage( 'googlelogin-form-' . strtolower( $action ) )->text() ); + $htmlForm->addHiddenField( 'action', $action ); $htmlForm->addHiddenField( 'wpSecureHash', $this->mGoogleLogin->getRequestToken() ); $htmlForm->setAction( $this->getPageTitle( $action )->getLocalUrl() ); $htmlForm->setSubmitCallback( array( 'GoogleLogin', 'submitGeneric' ) ); -- To view, visit https://gerrit.wikimedia.org/r/147680 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3db51d537a45ecf35280bdde8351bbb4ba15fd6d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GoogleLogin Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits