diff options
author | Petr Heralecky <petr@heralecky.cz> | 2014-01-10 16:40:54 +0100 |
---|---|---|
committer | Petr Heralecky <petr@heralecky.cz> | 2014-01-10 16:40:54 +0100 |
commit | ceb03af631c145d0694ef6f72e84517e18b7b092 (patch) | |
tree | 466d1cfd48324ec1a00aa7f7b81865372a5c0622 /system | |
parent | 232ea658e1f31d6c82a9ed9dae1bb3b292b6eb24 (diff) |
rename src to file
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Email.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 71edc3b41..37a628259 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -710,39 +710,39 @@ class CI_Email { /** * Assign file attachments * - * @param string $src can be path, url or buffered content + * @param string $file can be path, url or buffered content * @param string $disposition = 'attachment' * @param string $newname = NULL * @param string $mime = '' * @return CI_Email */ - public function attach($src, $disposition = '', $newname = NULL, $mime = '') + public function attach($file, $disposition = '', $newname = NULL, $mime = '') { if ($mime === '') { - if (strpos($src,'http://')!==0 && ! file_exists($src) ) + if (strpos($file,'http://')!==0 && ! file_exists($file) ) { - $this->_set_error_message('lang:email_attachment_missing', $src); + $this->_set_error_message('lang:email_attachment_missing', $file); return FALSE; } - if ( ! $fp = @fopen($src, FOPEN_READ)) + if ( ! $fp = @fopen($file, FOPEN_READ)) { - $this->_set_error_message('lang:email_attachment_unreadable', $src); + $this->_set_error_message('lang:email_attachment_unreadable', $file); return FALSE; } $file_content = stream_get_contents($fp); - $mime = $this->_mime_types(pathinfo($src, PATHINFO_EXTENSION)); + $mime = $this->_mime_types(pathinfo($file, PATHINFO_EXTENSION)); fclose($fp); } else { - $file_content =& $src; // buffered file + $file_content =& $file; // buffered file } $this->_attachments[] = array( - 'name' => array($src, $newname), + 'name' => array($file, $newname), 'disposition' => empty($disposition) ? 'attachment' : $disposition, // Can also be 'inline' Not sure if it matters 'type' => $mime, 'content' => chunk_split(base64_encode($file_content)) |