summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrit <tritrei@gmail.com>2011-11-23 23:22:44 +0100
committertrit <tritrei@gmail.com>2011-11-23 23:22:44 +0100
commitd52699842f598d185b1388f4c6b72d2d63e21e64 (patch)
tree24d47315a90e8c197a344e9c5cae5a3e179b0a1f
parentb2b510dd441d6fc450c046a2fcb0b3742d6a7e04 (diff)
Switch disposition set to ternary operation
-rw-r--r--system/libraries/Email.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 3c679ce48..631b62e86 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -420,14 +420,9 @@ class CI_Email {
*/
public function attach($filename, $disposition = '', $newname = NULL)
{
- if(empty($disposition))
- {
- $disposition = 'attachment';
- }
-
$this->_attach_name[] = array($filename, $newname);
$this->_attach_type[] = $this->_mime_types(pathinfo($filename, PATHINFO_EXTENSION));
- $this->_attach_disp[] = $disposition; // Can also be 'inline' Not sure if it matters
+ $this->_attach_disp[] = empty($disposition) ? 'attachment' : $disposition; // Can also be 'inline' Not sure if it matters
return $this;
}