From: jerome Date: Wed, 24 Jun 2009 07:39:57 +0000 (+0000) Subject: javascript MDL-16693 Tim's fix for recaptcha X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d7db89834fad8c4d45dcf17d262799966c9c6f18;p=moodle.git javascript MDL-16693 Tim's fix for recaptcha --- 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 .= '