Changeset 431 in t29-www for lib/mail/mailer.php
- Timestamp:
- Jun 20, 2013, 1:55:19 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/mail/mailer.php
r416 r431 7 7 $maillib = dirname(__FILE__); 8 8 require "$maillib/recaptchalib.php"; 9 require "$maillib/recaptcha_keys.php"; 9 10 $key_file = "$maillib/recaptcha_keys.php"; 11 $recaptcha_keys_loaded = null; 12 if(file_exists($key_file)) { 13 include $key_file; 14 // now in global scope: 15 // $publickey, recaptcha_get_answer, recaptcha_get_html etc. 16 $recaptcha_keys_loaded = true; 17 } else 18 $recaptcha_keys_loaded = false; 10 19 11 20 // This script can be used as standalone or libary. … … 137 146 // the system 138 147 public function run() { 148 global $recaptcha_keys_loaded; 149 139 150 if(empty($this->_values)) { 140 151 $this->print_usage(); … … 148 159 149 160 // show captcha validation, if neccessary 150 if($ this->enable_captcha_check && !$this->check_captcha()) {161 if($recaptcha_keys_loaded && $this->enable_captcha_check && !$this->check_captcha()) { 151 162 return false; 152 163 }
Note: See TracChangeset
for help on using the changeset viewer.