Permalink
Browse files

Merge branch 'w50_MDL-27364_m23_recaptchahttps' of git://github.com/s…

…kodak/moodle
  • Loading branch information...
2 parents 29459d8 + b608b22 commit 70a7b8e1cd2b3774276ef9d12b21cbe4cdd86b36 @nebgor nebgor committed Dec 9, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/form/recaptcha.php
View
7 lib/form/recaptcha.php
@@ -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;
}
}

0 comments on commit 70a7b8e

Please sign in to comment.