From d7db89834fad8c4d45dcf17d262799966c9c6f18 Mon Sep 17 00:00:00 2001 From: jerome Date: Wed, 24 Jun 2009 07:39:57 +0000 Subject: [PATCH] javascript MDL-16693 Tim's fix for recaptcha --- lib/recaptchalib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/recaptchalib.php b/lib/recaptchalib.php index 795e4aa32e..bcd953d1c2 100644 --- a/lib/recaptchalib.php +++ b/lib/recaptchalib.php @@ -111,7 +111,7 @@ function _recaptcha_http_post($host, $path, $data, $port = 80, $https=false) { * @return string - The HTML to be embedded in the user's form. */ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) { - global $CFG; + global $CFG, $PAGE; $recaptchatype = optional_param('recaptcha', 'image', PARAM_TEXT); @@ -143,7 +143,7 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) { $strgetanaudiocaptcha = get_string('getanaudiocaptcha', 'auth'); $strgetanimagecaptcha = get_string('getanimagecaptcha', 'auth'); - $page->requires->js($server . '/challenge?k=' . $pubkey . $errorpart, true); + $return = $PAGE->requires->js($server . '/challenge?k=' . $pubkey . $errorpart, true)->asap(); $return .= '