diff -urN -X wiki-diff.excluded ../../cvs/phase3/includes/SpecialUserlogin.php ../../Wiki/includes/SpecialUserlogin.php --- ../../cvs/phase3/includes/SpecialUserlogin.php 2005-12-26 11:29:22.000000000 +0100 +++ ../../Wiki/includes/SpecialUserlogin.php 2005-12-30 13:15:54.000000000 +0100 @@ -5,6 +5,9 @@ * @subpackage SpecialPage */ +/* currently in extension, should be moved to includes ?! */ +require_once('extensions/captcha/captcha-class.php'); + /** * constructor */ @@ -28,6 +31,7 @@ var $mName, $mPassword, $mRetype, $mReturnto, $mCookieCheck, $mPosted; var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword; var $mLoginattempt, $mRemember, $mEmail, $mDomain; + var $mCaptcha; /** * Constructor @@ -39,6 +43,7 @@ $this->mType = $request->getText( 'type' ); $this->mName = $request->getText( 'wpName' ); + $this->mCaptcha = $request->getText( 'wpCaptcha' ); $this->mPassword = $request->getText( 'wpPassword' ); $this->mRetype = $request->getText( 'wpRetype' ); $this->mDomain = $request->getText( 'wpDomain' ); @@ -203,7 +208,16 @@ $this->mainLoginForm( wfMsg( 'badretype' ) ); return false; } - + + // 2005-12-30 /TR + $cap = new captcha(); + if ($cap->verify($this->mCaptcha) != true) { + /* there should be a new message for i18n @ LanguageXX.php */ + $this->mainLoginForm( "Additional captcha authentication failed!" ); + return false; + } + unset($cap); + $name = trim( $this->mName ); $u = User::newFromName( $name ); if ( is_null( $u ) ) { diff -urN -X wiki-diff.excluded ../../cvs/phase3/includes/templates/Userlogin.php ../../Wiki/includes/templates/Userlogin.php --- ../../cvs/phase3/includes/templates/Userlogin.php 2005-12-03 17:51:26.000000000 +0100 +++ ../../Wiki/includes/templates/Userlogin.php 2005-12-30 14:25:15.000000000 +0100 @@ -89,6 +89,7 @@ class UsercreateTemplate extends QuickTemplate { function execute() { + global $wgScriptPath; if( $this->data['message'] ) { ?>