Merge branch 'w50_MDL-27364_m23_recaptchahttps' of git://github.com/skodak/moodle

This commit is contained in:
Aparup Banerjee 2011-12-09 11:07:20 +08:00
commit 70a7b8e1cd

View File

@ -34,10 +34,13 @@ class MoodleQuickForm_recaptcha extends HTML_QuickForm_input {
* </code>
*/
function MoodleQuickForm_recaptcha($elementName = null, $elementLabel = null, $attributes = null) {
global $CFG;
parent::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
$this->_type = 'recaptcha';
if (!empty($attributes['https'])) {
$this->_https = $attributes['https'];
if (!empty($attributes['https']) or strpos($CFG->httpswwwroot, 'https:') === 0) {
$this->_https = true;
} else {
$this->_https = false;
}
}