Florianschmidtwelzow has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/80/147680/1

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: newchange
Gerrit-Change-Id: I3db51d537a45ecf35280bdde8351bbb4ba15fd6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>

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

Reply via email to