summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2011-12-22 18:22:50 +0100
committerAndrey Andreev <narf@bofh.bg>2011-12-22 18:22:50 +0100
commitb71e06b2a41356dbd04af257b1d8bad01519ca2a (patch)
treedbcfdaf21381801682112ba990af79fb4d0927a7 /system/libraries/Email.php
parent1bd3d887057ce807944188f8f18142c14418b2ea (diff)
Update with suggestions from philsturgeon
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 5158e859c..1066535c7 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -559,7 +559,7 @@ class CI_Email {
*/
public function set_newline($newline = "\n")
{
- $this->newline = ($newline !== "\n" AND $newline !== "\r\n" AND $newline !== "\r") ? "\n" : $newline;
+ $this->newline = in_array($newline, array("\n", "\r\n", "\r")) ? $newline : "\n";
return $this;
}
@@ -602,7 +602,7 @@ class CI_Email {
*/
protected function _get_message_id()
{
- $from = str_replace(array('>', '<'), array('', ''), $this->_headers['Return-Path']);
+ $from = str_replace(array('>', '<'), '', $this->_headers['Return-Path']);
return "<".uniqid('').strstr($from, '@').">";
}
@@ -837,7 +837,7 @@ class CI_Email {
// Standardize newlines
if (strpos($str, "\r") !== FALSE)
{
- $str = str_replace(array("\r\n", "\r"), array("\n", "\n"), $str);
+ $str = str_replace(array("\r\n", "\r"), "\n", $str);
}
// If the current word is surrounded by {unwrap} tags we'll
@@ -969,7 +969,7 @@ class CI_Email {
*/
protected function _build_message()
{
- if ($this->wordwrap === TRUE && $this->mailtype !== 'html')
+ if ($this->wordwrap === TRUE AND $this->mailtype !== 'html')
{
$this->_body = $this->word_wrap($this->_body);
}
@@ -1305,7 +1305,7 @@ class CI_Email {
$this->_build_headers();
- if ($this->bcc_batch_mode && count($this->_bcc_array) > 0 && count($this->_bcc_array) > $this->bcc_batch_size)
+ if ($this->bcc_batch_mode AND count($this->_bcc_array) > $this->bcc_batch_size)
{
return $this->batch_bcc_send();
}