Ignore:
Timestamp:
Jan 25, 2011, 4:40:30 PM (13 years ago)
Author:
patdenice
Message:

Add two triggers for captcha plugin.
Language key corrected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/classes/cf_plugin.class.php

    r7197 r8887  
    183183  protected function display_form($infos) {
    184184    global $template,$user;
     185    trigger_action('display_contactform');
    185186    $template->set_extent(realpath(cf_get_template('cf_index.tpl')), 'index');
    186187    $template->set_filenames(array(
     
    396397   
    397398    $infos = $this->create_infos_array(false);
    398     $params_ok = true;
    399399    $return = '';
    400400    $value = '';
     
    404404    } else {
    405405      $infos['cf_id'] = rand();
    406       $params_ok = false;
    407406      array_push( $infos['errors'], l10n('cf_form_error'));
    408407    }
     
    414413      } else {
    415414        array_push( $infos['errors'], l10n('cf_from_name_error'));
    416         $params_ok = false;
    417415      }
    418416    } else {
    419417      array_push( $infos['errors'], l10n('cf_from_name_error'));
    420       $params_ok = false;
    421418    }
    422419    // From mail
     
    427424        $infos['cf_from_mail'] = $value;
    428425      } else {
    429         $params_ok = false;
    430426        array_push( $infos['errors'], $return);
    431427      }
    432428    } else {
    433429      array_push( $infos['errors'], l10n('cf_mail_format_error'));
    434       $params_ok = false;
    435430    }
    436431    // Subject
     
    441436      } else {
    442437        array_push( $infos['errors'], l10n('cf_subject_error'));
    443         $params_ok = false;
    444438      }
    445439    } else {
    446440      array_push( $infos['errors'], l10n('cf_subject_error'));
    447       $params_ok = false;
    448441    }
    449442    // Message
     
    454447      } else {
    455448        array_push( $infos['errors'], l10n('cf_message_error'));
    456         $params_ok = false;
    457449      }
    458450    } else {
    459451      array_push( $infos['errors'], l10n('cf_message_error'));
    460       $params_ok = false;
    461     }
    462     return $params_ok;
     452    }
     453
     454    $infos = trigger_event('check_contactform_params', $infos);
     455
     456    return empty($infos['errors']);
    463457  }
    464458 
Note: See TracChangeset for help on using the changeset viewer.