[Mediawiki-l] extension not working in mw1.5

FxParlant f-x.p at laposte.net
Sat Nov 26 09:40:19 UTC 2005


Hi,

It has been a month now that I try to upgrade from 1.3 to 1.5 Everything
is OK now, except the captcha system.

The authimage code is pretty simple:

function checkAICode($code)
{
  global $sess_key_name;

  require_once("extensions/authimage-inc/class.verificator.php");
  $veri = new VeriFicator($code);
  $verified = $veri->verified();

  $return = ($verified == 1) ? 1 : 0;
  if(!isset($_SESSION[$sess_key_name])) {
    $return = 0;
  } else {
     unset($_SESSION[$sess_key_name]);

  }

  return $return;
}

But in EditPage.php, whatever the call to checkAICode doesn't work:
if ( checkAICode($_POST['code']) )

or using the request:
$this->authImageCode = $request->getVal( 'code'  ); //importFormData
if ( checkAICode($this->authImageCode) )


Quite a few people have asked me by mail how to do this, which means
that some mediawiki need this to prevent from spamming.

*The code for the highest mediawiki version was developped by miEro
(and works for: MediaWiki: 1.4.5 PHP: 4.3.10-16 (apache2handler) MySQL:
4.1.11-Debian_4sarge2-log)
http://wiki.matfyz.cz/wiki/MediaWiki:Tuning

*I've let my draft of instructions  for mediawiki 1.5 at:
http://www.fxparlant.net/Captcha15

*My code for the mediawiki 1.3 can be found at:
http://www.fxparlant.net/Category:Mediawiki#Captcha
(works for: MediaWiki: 1.3.9 PHP: 4.4.0 (cgi) MySQL
(http://www.mysql.com/): 4.0.26)

I hope a mediawiki nerds will tell me/us what has been changed in 1.5
and explain how to make this spam protection work with current and
future versions.

Thanks for your help
François




More information about the MediaWiki-l mailing list