parent
4aba359e71
commit
448b812f65
@ -76,7 +76,8 @@ class CaptchaGenerator
|
||||
|
||||
// Returns the image generation URL
|
||||
if ($options['as_url']) {
|
||||
return $this->router->generate('gregwar_captcha.generate_captcha', array('key' => $options['session_key']));
|
||||
return $this->router->generate('gregwar_captcha.generate_captcha',
|
||||
array('key' => $options['session_key'], 'n' => time()));
|
||||
}
|
||||
|
||||
return 'data:image/jpeg;base64,' . base64_encode($this->generate($options));
|
||||
|
@ -3,7 +3,7 @@
|
||||
-
|
||||
{% else %}
|
||||
{% spaceless %}
|
||||
<img id="{{ image_id }}" src="{{ captcha_code }}?n={{ 'now'|date('U') }}" alt="" title="captcha" width="{{ captcha_width }}" height="{{ captcha_height }}" />
|
||||
<img id="{{ image_id }}" src="{{ captcha_code }}" alt="" title="captcha" width="{{ captcha_width }}" height="{{ captcha_height }}" />
|
||||
{% if reload %}
|
||||
<script type="text/javascript">
|
||||
function reload_{{ image_id }}() {
|
||||
|
Loading…
Reference in New Issue
Block a user