Changeset 431 in t29-www for lib


Ignore:
Timestamp:
Jun 20, 2013, 1:55:19 PM (9 years ago)
Author:
sven
Message:

Anmeldesystem veraendert auf Heriberts Wunsch:

  • Anmeldebuttons nun bei jedem Termin
  • Anmeldebuttons auffälliger gemacht
  • Interna: Anmeldungssystem unabhängiger von Recaptcha-Keys-File gemacht
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/mail/mailer.php

    r416 r431  
    77$maillib = dirname(__FILE__);
    88require "$maillib/recaptchalib.php";
    9 require "$maillib/recaptcha_keys.php";
     9
     10$key_file = "$maillib/recaptcha_keys.php";
     11$recaptcha_keys_loaded = null;
     12if(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;
    1019 
    1120// This script can be used as standalone or libary.
     
    137146        // the system
    138147        public function run() {
     148                global $recaptcha_keys_loaded;
     149       
    139150                if(empty($this->_values)) {
    140151                        $this->print_usage();
     
    148159               
    149160                // 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()) {
    151162                        return false;
    152163                }
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License