From 3e5b256c6eba74cc4cf6aa69b5fb949f3799e8ce Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 24 Apr 2014 18:06:53 +0200 Subject: [PATCH] PHRAS-87 #close PHRAS-87 #time 1h --- .../Border/MimeGuesserConfiguration.php | 2 -- lib/Alchemy/Phrasea/Media/MimeTypeGuesser.php | 35 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 lib/Alchemy/Phrasea/Media/MimeTypeGuesser.php diff --git a/lib/Alchemy/Phrasea/Border/MimeGuesserConfiguration.php b/lib/Alchemy/Phrasea/Border/MimeGuesserConfiguration.php index ebf39721d5..e870d91c7b 100644 --- a/lib/Alchemy/Phrasea/Border/MimeGuesserConfiguration.php +++ b/lib/Alchemy/Phrasea/Border/MimeGuesserConfiguration.php @@ -40,8 +40,6 @@ class MimeGuesserConfiguration $guesser->register(new AudioMimeTypeGuesser()); $guesser->register(new VideoMimeTypeGuesser()); - $guesser->register(new AlchemyMimeTypeGuesser()); - if ($this->conf->isSetup()) { $conf = $this->conf->getConfig(); diff --git a/lib/Alchemy/Phrasea/Media/MimeTypeGuesser.php b/lib/Alchemy/Phrasea/Media/MimeTypeGuesser.php deleted file mode 100644 index 1ab737d814..0000000000 --- a/lib/Alchemy/Phrasea/Media/MimeTypeGuesser.php +++ /dev/null @@ -1,35 +0,0 @@ - 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mov' => 'video/quicktime', - 'dv' => 'video/x-dv', - 'xls' => 'application/vnd.ms-excel', - 'doc' => 'application/msword', - 'ppt' => 'application/vnd.ms-powerpoint', - 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - ); - - /** - * {@inheritdoc} - */ - public function guess($path) - { - $extension = strtolower(pathinfo($path, PATHINFO_EXTENSION)); - - if (array_key_exists($extension, static::$mimeTypes)) { - return static::$mimeTypes[$extension]; - } - - return null; - } -}