r101658 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101657‎ | r101658 | r101659 >
Date:18:52, 2 November 2011
Author:preilly
Status:ok
Tags:
Comment:
fix for bug 32149 mobilefrontend beta opt-in form redirects to / instead of the site main page
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /trunk/extensions/MobileFrontend/views/information/optin.html.php (modified) (history)
  • /trunk/extensions/MobileFrontend/views/information/optout.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -754,6 +754,7 @@
755755 $htmlTitle = self::$messages['mobile-frontend-opt-in-title'];
756756 $explainOptIn = self::$messages['mobile-frontend-opt-in-explain'];
757757 $optInMessage = self::$messages['mobile-frontend-opt-in-message'];
 758+ $formAction = wfExpandUrl( Title::newMainPage()->getFullURL(), PROTO_CURRENT );
758759 require( 'views/layout/_search_webkit.html.php' );
759760 require( 'views/layout/_footmenu_default.html.php' );
760761 require( 'views/information/optin.html.php' );
@@ -778,6 +779,7 @@
779780 $htmlTitle = self::$messages['mobile-frontend-opt-out-title'];
780781 $explainOptOut = self::$messages['mobile-frontend-opt-out-explain'];
781782 $optOutMessage = self::$messages['mobile-frontend-opt-out-message'];
 783+ $formAction = wfExpandUrl( Title::newMainPage()->getFullURL(), PROTO_CURRENT );
782784 require( 'views/layout/_search_webkit.html.php' );
783785 require( 'views/layout/_footmenu_default.html.php' );
784786 require( 'views/information/optout.html.php' );
Index: trunk/extensions/MobileFrontend/views/information/optin.html.php
@@ -7,7 +7,7 @@
88 {$explainOptIn}
99 </p>
1010 <div id='disableButtons'>
11 - <form action='/' method='get'>
 11+ <form action='{$formAction}' method='get'>
1212 <input name='mobileaction' type='hidden' value='opt_in_cookie' />
1313 <button id='disableButton' type='submit'>{$yesButton}</button>
1414 </form>
Index: trunk/extensions/MobileFrontend/views/information/optout.html.php
@@ -7,7 +7,7 @@
88 {$explainOptOut}
99 </p>
1010 <div id='disableButtons'>
11 - <form action='/' method='get'>
 11+ <form action='{$formAction}' method='get'>
1212 <input name='mobileaction' type='hidden' value='opt_out_cookie' />
1313 <button id='disableButton' type='submit'>{$yesButton}</button>
1414 </form>

Follow-up revisions

RevisionCommit summaryAuthorDate
r1016591.18wmf1: MFT r101658preilly18:53, 2 November 2011

Status & tagging log