[TASK] Update file type according to Iana standard 97/18297/4
authorFabien Udriot <fabien.udriot@ecodev.ch>
Fri, 15 Feb 2013 10:59:12 +0000 (11:59 +0100)
committerBenjamin Mack <benni@typo3.org>
Fri, 22 Mar 2013 17:36:20 +0000 (18:36 +0100)
This change relates to the File types in FAL.
The Iana standard http://www.iana.org/assignments/media-types
defines a list of Media types which are followed in TYPO3 CMS.
It looks the "Software" type should be deprecated and replaced by
"Application". This matches the mime-type e.g application/pdf and
sounds more comprehensive.

Change-Id: Ic2ec7173d10b6139e6e2a19fcead3086665a3aae
Fixes: #45503
Releases: 6.1
Reviewed-on: https://review.typo3.org/18297
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/cms/Configuration/TCA/tt_content.php
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Configuration/TCA/sys_file_reference.php

index 4378eea..eedd700 100644 (file)
@@ -734,7 +734,7 @@ return array(
                                                        --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                                                        --palette--;;filePalette'
                                        ),
-                                       \TYPO3\CMS\Core\Resource\File::FILETYPE_SOFTWARE => array(
+                                       \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
                                                'showitem' => '
                                                        --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                                                        --palette--;;filePalette'
index ce0f47a..a9a0f01 100644 (file)
@@ -78,26 +78,43 @@ abstract class AbstractFile implements FileInterface {
         * any other file
         */
        const FILETYPE_UNKNOWN = 0;
+
        /**
         * Any kind of text
+        * @see http://www.iana.org/assignments/media-types/text
         */
        const FILETYPE_TEXT = 1;
+
        /**
         * Any kind of image
+        * @see http://www.iana.org/assignments/media-types/image
         */
        const FILETYPE_IMAGE = 2;
+
        /**
         * Any kind of audio file
+        * @see http://www.iana.org/assignments/media-types/audio
         */
        const FILETYPE_AUDIO = 3;
+
        /**
         * Any kind of video
+        * @see http://www.iana.org/assignments/media-types/video
         */
        const FILETYPE_VIDEO = 4;
+
+       /**
+        * Any kind of application
+        * @see http://www.iana.org/assignments/media-types/application
+        */
+       const FILETYPE_APPLICATION = 5;
+
        /**
         * Any kind of software, often known as "application"
+        * @deprecated since 6.1, will be removed in 6.3. Use rather FILETYPE_APPLICATION which matches the Iana standard.
         */
        const FILETYPE_SOFTWARE = 5;
+
        /******************
         * VARIOUS FILE PROPERTY GETTERS
         ******************/
@@ -280,7 +297,7 @@ abstract class AbstractFile implements FileInterface {
                        case 'application':
 
                        case 'software':
-                               $this->properties['type'] = self::FILETYPE_SOFTWARE;
+                               $this->properties['type'] = self::FILETYPE_APPLICATION;
                                break;
                        default:
                                $this->properties['type'] = self::FILETYPE_UNKNOWN;
index af59d7d..5863bbc 100644 (file)
@@ -230,7 +230,7 @@ return array(
                                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
                                --palette--;;filePalette'
                ),
-               \TYPO3\CMS\Core\Resource\File::FILETYPE_SOFTWARE => array(
+               \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
                        'showitem' => '
                                --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.basicoverlayPalette;basicoverlayPalette,
                                --palette--;;filePalette'