| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <?php 2 # MantisBT - A PHP based bugtracking system 3 4 # MantisBT is free software: you can redistribute it and/or modify 5 # it under the terms of the GNU General Public License as published by 6 # the Free Software Foundation, either version 2 of the License, or 7 # (at your option) any later version. 8 # 9 # MantisBT is distributed in the hope that it will be useful, 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # GNU General Public License for more details. 13 # 14 # You should have received a copy of the GNU General Public License 15 # along with MantisBT. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * @package MantisBT 19 * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 20 * @copyright Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net 21 * @link http://www.mantisbt.org 22 * 23 * @uses check_api.php 24 * @uses config_api.php 25 * @uses utility_api.php 26 */ 27 28 if ( !defined( 'CHECK_EMAIL_INC_ALLOW' ) ) { 29 return; 30 } 31 32 /** 33 * MantisBT Check API 34 */ 35 require_once ( 'check_api.php' ); 36 require_api( 'config_api.php' ); 37 require_api( 'utility_api.php' ); 38 39 check_print_section_header_row( 'Email' ); 40 41 $t_email_options = array( 42 'webmaster_email', 43 'from_email', 44 'return_path_email' 45 ); 46 47 foreach( $t_email_options as $t_email_option ) { 48 $t_email = config_get_global( $t_email_option ); 49 check_print_test_row( 50 $t_email_option . ' configuration option has a valid email address specified', 51 !preg_match( '/@example\.com$/', $t_email ), 52 array( false => 'You need to specify a valid email address for the ' . $t_email_option . ' configuration option.' ) 53 ); 54 } 55 56 check_print_test_warn_row( 57 'Email addresses are validated', 58 config_get_global( 'validate_email' ), 59 array( false => 'You have disabled email validation checks. For security reasons it is suggested that you enable these validation checks.' ) 60 ); 61 62 if( is_windows_server() && config_get_global( 'validate_email' ) && !config_get_global( 'use_ldap_email' ) ) { 63 check_print_test_row( 64 'Require at least PHP 5.3.0 if the server type is Windows and the check_mx_record configuration option is enabled', 65 config_get_global( 'check_mx_record' ) && version_compare( phpversion(), '5.3.0', '>=' ), 66 array( false => 'Versions of PHP prior to 5.3.0 are unable to check MX records when validating email addresses.' ) 67 ); 68 } 69 70 check_print_test_row( 71 'send_reset_password = ON requires allow_blank_email = OFF', 72 !config_get_global( 'send_reset_password' ) || !config_get_global( 'allow_blank_email' ) 73 ); 74 75 check_print_test_row( 76 'send_reset_password = ON requires enable_email_notification = ON', 77 !config_get_global( 'send_reset_password' ) || config_get_global( 'enable_email_notification' ) 78 ); 79 80 check_print_test_row( 81 'allow_signup = ON requires enable_email_notification = ON', 82 !config_get_global( 'allow_signup' ) || config_get_global( 'enable_email_notification' ) 83 ); 84 85 check_print_test_row( 86 'allow_signup = ON requires send_reset_password = ON', 87 !config_get_global( 'allow_signup' ) || config_get_global( 'send_reset_password' ) 88 );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |