mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Update Unit tests
This commit is contained in:
@@ -42,11 +42,11 @@ class system_file extends \SplFileInfo
|
||||
, 'avi' => 'video/avi'
|
||||
, 'bmp' => 'image/bmp'
|
||||
, 'bz2' => 'application/x-bzip'
|
||||
, 'cr2' => 'image/x-canon-cr2'
|
||||
, '3fr' => 'image/x-tika-hasselblad'
|
||||
, 'arw' => 'image/x-tika-sony'
|
||||
, 'bay' => 'image/x-tika-casio'
|
||||
, 'cap' => 'image/x-tika-phaseone'
|
||||
, 'cr2' => 'image/x-tika-canon'
|
||||
, 'crw' => 'image/x-tika-canon'
|
||||
, 'dcs' => 'image/x-tika-kodak'
|
||||
, 'dcr' => 'image/x-tika-kodak'
|
||||
@@ -335,105 +335,32 @@ class system_file extends \SplFileInfo
|
||||
*/
|
||||
public function get_phrasea_type()
|
||||
{
|
||||
switch ($this->get_mime()) {
|
||||
case 'image/png':
|
||||
case 'image/gif':
|
||||
case 'image/bmp':
|
||||
case 'image/x-ms-bmp':
|
||||
case 'image/jpeg':
|
||||
case 'image/pjpeg':
|
||||
case 'image/psd':
|
||||
case 'image/photoshop':
|
||||
case 'image/vnd.adobe.photoshop':
|
||||
case 'image/ai':
|
||||
case 'image/illustrator':
|
||||
case 'image/vnd.adobe.illustrator':
|
||||
case 'image/tiff':
|
||||
case 'image/x-photoshop':
|
||||
case 'application/postscript':
|
||||
case 'image/x-tika-canon':
|
||||
case 'image/x-canon-cr2':
|
||||
case 'image/x-tika-casio':
|
||||
case 'image/x-tika-dng':
|
||||
case 'image/x-tika-epson':
|
||||
case 'image/x-tika-fuji':
|
||||
case 'image/x-tika-hasselblad':
|
||||
case 'image/x-tika-imacon':
|
||||
case 'image/x-tika-kodak':
|
||||
case 'image/x-tika-leaf':
|
||||
case 'image/x-tika-logitech':
|
||||
case 'image/x-tika-mamiya':
|
||||
case 'image/x-tika-minolta':
|
||||
case 'image/x-tika-nikon':
|
||||
case 'image/x-tika-olympus':
|
||||
case 'image/x-tika-panasonic':
|
||||
case 'image/x-tika-pentax':
|
||||
case 'image/x-tika-phaseone':
|
||||
case 'image/x-tika-rawzor':
|
||||
case 'image/x-tika-red':
|
||||
case 'image/x-tika-sigma':
|
||||
case 'image/x-tika-sony':
|
||||
case 'image/x-portable-pixmap':
|
||||
switch (true) {
|
||||
case strpos($this->get_mime(), 'image/') === 0:
|
||||
case $this->get_mime() == 'application/postscript':
|
||||
$type = 'image';
|
||||
break;
|
||||
|
||||
case 'video/mpeg':
|
||||
case 'video/mp4':
|
||||
case 'video/x-ms-wmv':
|
||||
case 'video/x-ms-wmx':
|
||||
case 'video/avi':
|
||||
case 'video/mp2p':
|
||||
case 'video/mp4':
|
||||
case 'video/x-ms-asf':
|
||||
case 'video/quicktime':
|
||||
case 'video/matroska':
|
||||
case 'video/x-msvideo':
|
||||
case 'video/x-ms-video':
|
||||
case 'video/x-flv':
|
||||
case 'video/avi':
|
||||
case 'video/3gpp':
|
||||
case 'video/x-m4v':
|
||||
case 'application/vnd.rn-realmedia':
|
||||
case strpos($this->get_mime(), 'video/') === 0:
|
||||
case $this->get_mime() == 'application/vnd.rn-realmedia':
|
||||
$type = 'video';
|
||||
break;
|
||||
|
||||
case 'audio/aiff':
|
||||
case 'audio/aiff':
|
||||
case 'audio/x-mpegurl':
|
||||
case 'audio/mid':
|
||||
case 'audio/mid':
|
||||
case 'audio/mpeg':
|
||||
case 'audio/ogg':
|
||||
case 'audio/mp4':
|
||||
case 'audio/scpls':
|
||||
case 'audio/vnd.rn-realaudio':
|
||||
case 'audio/x-pn-realaudio':
|
||||
case 'audio/wav':
|
||||
case 'audio/x-wav':
|
||||
case 'audio/x-ms-wma':
|
||||
case 'audio/x-flac':
|
||||
case strpos($this->get_mime(), 'audio/') === 0:
|
||||
$type = 'audio';
|
||||
break;
|
||||
|
||||
case 'text/plain':
|
||||
case 'application/msword':
|
||||
case 'application/access':
|
||||
case 'application/pdf':
|
||||
case 'application/excel':
|
||||
case 'application/vnd.ms-powerpoint':
|
||||
case 'application/vnd.oasis.opendocument.formula':
|
||||
case 'application/vnd.oasis.opendocument.text-master':
|
||||
case 'application/vnd.oasis.opendocument.database':
|
||||
case 'application/vnd.oasis.opendocument.formula':
|
||||
case 'application/vnd.oasis.opendocument.chart':
|
||||
case 'application/vnd.oasis.opendocument.graphics':
|
||||
case 'application/vnd.oasis.opendocument.presentation':
|
||||
case 'application/vnd.oasis.opendocument.speadsheet':
|
||||
case 'application/vnd.oasis.opendocument.text':
|
||||
case strpos($this->get_mime(), 'application/vnd.oasis.opendocument') === 0:
|
||||
case strpos($this->get_mime(), 'application/vnd.ms-') === 0:
|
||||
case $this->get_mime() == 'text/plain':
|
||||
case $this->get_mime() == 'application/msword':
|
||||
case $this->get_mime() == 'application/access':
|
||||
case $this->get_mime() == 'application/pdf':
|
||||
case $this->get_mime() == 'application/excel':
|
||||
$type = 'document';
|
||||
break;
|
||||
|
||||
case 'application/x-shockwave-flash':
|
||||
case $this->get_mime() == 'application/x-shockwave-flash':
|
||||
$type = 'flash';
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user