r36793 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36792‎ | r36793 | r36794 >
Date:22:46, 29 June 2008
Author:daniel
Status:old
Tags:
Comment:
use wfSetupSessision as soon as captcha is shown
Modified paths:
  • /trunk/extensions/ContactPage/SpecialContact.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContactPage/SpecialContact.php
@@ -60,8 +60,6 @@
6161 wfDebug( "$fname: success.\n" );
6262 $f->showSuccess( );
6363 } else if ( "submit" == $action && $wgRequest->wasPosted() ) {#
64 - wfSetupSession(); #NOTE: make sure we have a session. May be required for captchas to work.
65 -
6664 $token = $wgRequest->getVal( 'wpEditToken' );
6765
6866 if( $wgUser->isAnon() ) {
@@ -202,6 +200,8 @@
203201 if ( !$wgCaptcha ) return ""; //no captcha installed
204202 if ( !@$wgCaptchaTriggers['contactpage'] ) return ""; //don't trigger on contact form
205203
 204+ wfSetupSession(); #NOTE: make sure we have a session. May be required for captchas to work.
 205+
206206 return "<div class='captcha'>" .
207207 $wgCaptcha->getForm() .
208208 wfMsgWikiHtml( 'contactpage-captcha' ) .

Status & tagging log