3
You are correct ghia. That is actually where I started. As I worked through how the class is supposed to work I eventually narrowed it down to the setConfig method that appears to be the problem.
The image.php file contains the code which renders the image and makes the tag assignment. Here is the specific code I am looking at:
function loadImage()
{
$ret = "<img id='" . ($this->config['name']) . "' src='" . XOOPS_URL . "/" . $this->config["imageurl"] . "' onclick="this.src='" . XOOPS_URL . "/" . $this->config["imageurl"] . "?refresh='+Math.random()"."" style='cursor: pointer; vertical-align: middle;' alt='' />";
return $ret;
}
From what I have been able to figure out I believe that once the "name" value is assigned in the config array contained in the config.php it can not be changed. This is based on the following found in xoopscaptcha.php:
function setConfig($name, $val)
{
if (isset($this->$name)) {
$this->$name = $val;
} else {
$this->config[$name] = $val;
}
return true;
}
As soon as the config array is loaded $this->name is also assigned so performing the setConfig can reassign $this->name but not $this->config["name"].