From 7f42519fd156a541bdb3517b517287f3352b5e49 Mon Sep 17 00:00:00 2001 From: trit Date: Wed, 23 Nov 2011 15:19:49 -0500 Subject: Added a couple of style tweaks and a note about function change in changelog --- system/libraries/Email.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Email.php b/system/libraries/Email.php index d24a30493..e012545d9 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -418,7 +418,7 @@ class CI_Email { * @param string * @return void */ - public function attach($filename, $disposition = 'attachment', $newname=NULL) + public function attach($filename, $disposition = 'attachment', $newname = NULL) { $this->_attach_name[] = array($filename, $newname); $this->_attach_type[] = $this->_mime_types(pathinfo($filename, PATHINFO_EXTENSION)); @@ -1152,12 +1152,7 @@ class CI_Email { for ($i=0; $i < count($this->_attach_name); $i++) { $filename = $this->_attach_name[$i][0]; - $basename = $this->_attach_name[$i][1]; - - if( ! $basename) - { - $basename = basename($filename); - } + $basename = is_null($this->_attach_name[$i][1]) ? basename($filename) : $this->_attach_name[$i][1]; $ctype = $this->_attach_type[$i]; -- cgit v1.2.3-24-g4f1b