Changeset View
Changeset View
Standalone View
Standalone View
externals/mimemailparser/attachment.class.php
Context not available. | |||||
*/ | */ | ||||
public function getFileExtension() { | public function getFileExtension() { | ||||
if (!$this->extension) { | if (!$this->extension) { | ||||
$ext = substr(strrchr($this->filename, '.'), 1); | $ext = @substr(strrchr($this->filename, '.'), 1); | ||||
if ($ext == 'gz') { | if ($ext == 'gz') { | ||||
// special case, tar.gz | // special case, tar.gz | ||||
// todo: other special cases? | // todo: other special cases? | ||||
$ext = preg_match("/\.tar\.gz$/i", $ext) ? 'tar.gz' : 'gz'; | $ext = @preg_match("/\.tar\.gz$/i", $ext) ? 'tar.gz' : 'gz'; | ||||
} | } | ||||
$this->extension = $ext; | $this->extension = $ext; | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0