Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
29459d8
)
Merge branch 'w50_MDL-27364_m23_recaptchahttps' of git://github.com/skodak/moodle
author
Aparup Banerjee
<aparup@moodle.com>
Fri, 9 Dec 2011 03:07:20 +0000
(11:07 +0800)
committer
Aparup Banerjee
<aparup@moodle.com>
Fri, 9 Dec 2011 03:07:20 +0000
(11:07 +0800)
lib/form/recaptcha.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/form/recaptcha.php
b/lib/form/recaptcha.php
index
79b2cb1
..
0282efd
100644
(file)
--- a/
lib/form/recaptcha.php
+++ b/
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;
}
}