diff options
| author | James Atkinson <thefinn@users.sourceforge.net> | 2003-01-30 20:02:09 +0000 |
|---|---|---|
| committer | James Atkinson <thefinn@users.sourceforge.net> | 2003-01-30 20:02:09 +0000 |
| commit | a0d0d1da780f7aa4770f5811affa2a7706d544ad (patch) | |
| tree | 840a51fb63423ad7ed39a78f4ce08c311d5948d7 /phpBB | |
| parent | 83e97693a4473e6cefb15bd9127a7ac2dfa2423b (diff) | |
| download | forums-a0d0d1da780f7aa4770f5811affa2a7706d544ad.tar forums-a0d0d1da780f7aa4770f5811affa2a7706d544ad.tar.gz forums-a0d0d1da780f7aa4770f5811affa2a7706d544ad.tar.bz2 forums-a0d0d1da780f7aa4770f5811affa2a7706d544ad.tar.xz forums-a0d0d1da780f7aa4770f5811affa2a7706d544ad.zip | |
Changes for UCP and registration, pretty minor overall. Fixed emailer to use
trigger_error insted of message_die.
emailer still needs some clean-up
git-svn-id: file:///svn/phpbb/trunk@3430 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
| -rwxr-xr-x | phpBB/includes/emailer.php | 26 | ||||
| -rw-r--r-- | phpBB/includes/functions.php | 2 |
2 files changed, 14 insertions, 14 deletions
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php index d54e40eb69..0d86df6d82 100755 --- a/phpBB/includes/emailer.php +++ b/phpBB/includes/emailer.php @@ -96,15 +96,15 @@ class emailer $template_lang = $config['default_lang']; } - $this->tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.txt'; + $this->tpl_file = $phpbb_root_path . 'language/' . $template_lang . '/email/' . $template_file . '.txt'; if ( !file_exists($this->tpl_file) ) { - message_die(ERROR, 'Could not find email template file ' . $template_file); + trigger_error('Could not find email template file ' . $template_file); } if ( !$this->load_msg() ) { - message_die(ERROR, 'Could not load email template file ' . $template_file); + trigger_error('Could not load email template file ' . $template_file); } return true; @@ -117,12 +117,12 @@ class emailer { if ( $this->tpl_file == NULL ) { - message_die(ERROR, 'No template file set'); + trigger_error('No template file set'); } if ( !($fd = fopen($this->tpl_file, 'r')) ) { - message_die(ERROR, 'Failed opening template file'); + trigger_error('Failed opening template file'); } $this->msg .= fread($fd, filesize($this->tpl_file)); @@ -173,7 +173,7 @@ class emailer if ( $this->address == NULL ) { - message_die(ERROR, 'No email address set'); + trigger_error('No email address set'); } if ( !$this->parse_email() ) @@ -191,7 +191,7 @@ class emailer if ( !$result ) { - message_die(ERROR, 'Failed sending email'); + trigger_error('Failed sending email'); } return true; @@ -312,13 +312,13 @@ function server_parse($socket, $response) { if( !( $server_response = fgets($socket, 256) ) ) { - message_die(ERROR, 'Could not get mail server response codes'); + trigger_error('Could not get mail server response codes'); } } if( !( substr($server_response, 0, 3) == $response ) ) { - message_die(ERROR, "Ran into problems sending Mail. Response: $server_response"); + trigger_error("Ran into problems sending Mail. Response: $server_response"); } } @@ -388,15 +388,15 @@ function smtpmail($mail_to, $subject, $message, $headers = '') } if(trim($mail_to) == '') { - message_die(ERROR, 'No email address specified'); + trigger_error('No email address specified'); } if(trim($subject) == '') { - message_die(ERROR, 'No email Subject specified'); + trigger_error('No email Subject specified'); } if(trim($message) == '') { - message_die(ERROR, 'Email message was blank'); + trigger_error('Email message was blank'); } $mail_to_array = explode(",", $mail_to); @@ -406,7 +406,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '') // if( !$socket = fsockopen($config['smtp_host'], 25, $errno, $errstr, 20) ) { - message_die(ERROR, "Could not connect to smtp host : $errno : $errstr"); + trigger_error("Could not connect to smtp host : $errno : $errstr"); } server_parse($socket, "220"); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d760bf83d0..724ede0da5 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -36,7 +36,7 @@ function set_config($config_name, $config_value, $is_dynamic = FALSE) WHERE config_name = "' . $config_name . '"'); $sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value) - VALUES ('$config_name', '" . $db->sql_escape($config_value) . "'"; + VALUES ('$config_name', '" . $db->sql_escape($config_value) . "')"; $db->sql_query($sql); } |
