From 5e3726ff43b99bfb5a4b873429d8e4faba0fe10f Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 20 Nov 2008 21:52:35 +0000 Subject: [PATCH] ENHANCEMENT Added more known file extensions (tiff, js, html, css, ico) to File->getFileType() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66320 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- filesystem/File.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/filesystem/File.php b/filesystem/File.php index 279e87220..64cc6ecbe 100755 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -480,6 +480,8 @@ class File extends DataObject { 'jpg' => 'JPEG image - good for photos', 'jpeg' => 'JPEG image - good for photos', 'png' => 'PNG image - good general-purpose format', + 'ico' => 'Icon image', + 'tiff' => 'Tagged image format', 'doc' => 'Word document', 'xls' => 'Excel spreadsheet', 'zip' => 'ZIP compressed file', @@ -490,7 +492,11 @@ class File extends DataObject { 'wav' => 'WAV audo file', 'avi' => 'AVI video file', 'mpg' => 'MPEG video file', - 'mpeg' => 'MPEG video file' + 'mpeg' => 'MPEG video file', + 'js' => 'Javascript file', + 'css' => 'CSS file', + 'html' => 'HTML file', + 'htm' => 'HTML file' ); $ext = $this->getExtension();