[!!!][TASK] Drop ContentAdapter 24/38224/3
authorMarkus Klein <klein.t3@reelworx.at>
Wed, 25 Mar 2015 23:44:40 +0000 (00:44 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Fri, 27 Mar 2015 21:08:59 +0000 (22:08 +0100)
The TYPO3 configuration option [FE][activateContentAdapter]
and the associated code is now dropped from Core as it served
as a bridge between v4 and v6.

Releases: master
Resolves: #66034
Change-Id: I1bd0c8518b32a3db4d3649d2d0ac9cc6b72cf33c
Reviewed-on: http://review.typo3.org/38224
Reviewed-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Classes/Resource/Service/FrontendContentAdapterService.php [deleted file]
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/FactoryConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-66034-DropContentAdapter.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Resource/Service/FrontendContentAdapterServiceTest.php [deleted file]
typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php
typo3/sysext/reports/Classes/Report/Status/FalStatus.php
typo3/sysext/reports/reports/locallang.xlf

diff --git a/typo3/sysext/core/Classes/Resource/Service/FrontendContentAdapterService.php b/typo3/sysext/core/Classes/Resource/Service/FrontendContentAdapterService.php
deleted file mode 100644 (file)
index 1e7b92e..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Resource\Service;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Tslib content adapter to modify $row array ($cObj->data[]) for backwards compatibility
- *
- * @author Ingmar Schlecht <ingmar@typo3.org>
- * @license http://www.gnu.org/copyleft/gpl.html
- */
-class FrontendContentAdapterService {
-
-       /**
-        * Array containing all keys that are allowed in the migrateFields array.
-        *
-        * @var array
-        */
-       static protected $availableMigrationFields = array(
-               'paths',
-               'titleTexts',
-               'captions',
-               'links',
-               'alternativeTexts'
-       );
-
-       /**
-        * The name of the table
-        *
-        * @var string
-        */
-       static protected $migrateFields = array(
-               'tt_content' => array(
-                       'image' => array(
-                               'paths' => 'image',
-                               'titleTexts' => 'titleText',
-                               'captions' => 'imagecaption',
-                               'links' => 'image_link',
-                               'alternativeTexts' => 'altText',
-                               '__typeMatch' => array(
-                                       'typeField' => 'CType',
-                                       'types' => array('image', 'textpic'),
-                               )
-                       ),
-                       'media' => array(
-                               'paths' => 'media',
-                               'captions' => 'imagecaption',
-                               '__typeMatch' => array(
-                                       'typeField' => 'CType',
-                                       'types' => array('uploads'),
-                               )
-                       )
-               ),
-               'pages' => array(
-                       'media' => array(
-                               'paths' => 'media'
-                       )
-               )
-       );
-
-       /**
-        * Modifies the DB row in the CONTENT cObj of \TYPO3\CMS\\Frontend\ContentObject for supplying
-        * backwards compatibility for some file fields which have switched to using
-        * the new File API instead of the old uploads/ folder for storing files.
-        *
-        * This method is called by the render() method of \TYPO3\CMS\Frontend\ContentObject\ContentContentObject
-        *
-        * @param array $row typically an array, but can also be null (in extensions or e.g. FLUID viewhelpers)
-        * @param string $table the database table where the record is from
-        * @throws \RuntimeException
-        * @return void
-        */
-       static public function modifyDBRow(&$row, $table) {
-               if (isset($row['_MIGRATED']) && $row['_MIGRATED'] === TRUE) {
-                       return;
-               }
-               if (array_key_exists($table, static::$migrateFields)) {
-                       foreach (static::$migrateFields[$table] as $migrateFieldName => $oldFieldNames) {
-                               if ($row !== NULL && isset($row[$migrateFieldName]) && self::fieldIsInType($migrateFieldName, $table, $row)) {
-                                       $files = self::getPageRepository()->getFileReferences($table, $migrateFieldName, $row);
-                                       $fileFieldContents = array(
-                                               'paths' => array(),
-                                               'titleTexts' => array(),
-                                               'captions' => array(),
-                                               'links' => array(),
-                                               'alternativeTexts' => array(),
-                                               $migrateFieldName . '_fileUids' => array(),
-                                               $migrateFieldName . '_fileReferenceUids' => array(),
-                                       );
-                                       $oldFieldNames[$migrateFieldName . '_fileUids'] = $migrateFieldName . '_fileUids';
-                                       $oldFieldNames[$migrateFieldName . '_fileReferenceUids'] = $migrateFieldName . '_fileReferenceUids';
-
-                                       foreach ($files as $file) {
-                                               /** @var $file \TYPO3\CMS\Core\Resource\FileReference */
-                                               $fileProperties = $file->getProperties();
-                                               $fileFieldContents['paths'][] = '../../' . $file->getPublicUrl();
-                                               $fileFieldContents['titleTexts'][] = $fileProperties['title'];
-                                               $fileFieldContents['captions'][] = $fileProperties['description'];
-                                               $fileFieldContents['links'][] = $fileProperties['link'];
-                                               $fileFieldContents['alternativeTexts'][] = $fileProperties['alternative'];
-                                               $fileFieldContents[$migrateFieldName . '_fileUids'][] = $file->getOriginalFile()->getUid();
-                                               $fileFieldContents[$migrateFieldName . '_fileReferenceUids'][] = $file->getUid();
-                                       }
-                                       foreach ($oldFieldNames as $oldFieldType => $oldFieldName) {
-                                               if ($oldFieldType === '__typeMatch') {
-                                                       continue;
-                                               }
-                                               if ($oldFieldType === 'paths' || substr($oldFieldType, -9) == '_fileUids' || substr($oldFieldType, -18) == '_fileReferenceUids') {
-                                                       // For paths and uids, make comma separated list
-                                                       $fieldContents = implode(',', $fileFieldContents[$oldFieldType]);
-                                               } else {
-                                                       // For all other fields, separate by newline
-                                                       $fieldContents = implode(LF, $fileFieldContents[$oldFieldType]);
-                                               }
-                                               $row[$oldFieldName] = $fieldContents;
-                                       }
-                               }
-                       }
-               }
-               $row['_MIGRATED'] = TRUE;
-       }
-
-       /**
-        * Registers an additional record type for an existing migration configuration.
-        *
-        * For use in ext_localconf.php files.
-        *
-        * @param string $table Name of the table in the migration configuration
-        * @param string $field Name of the field in the migration configuration
-        * @param string $additionalType The additional type for which the migration should be applied
-        * @throws \RuntimeException
-        * @return void
-        */
-       static public function registerAdditionalTypeForMigration($table, $field, $additionalType) {
-
-               if (!isset(static::$migrateFields[$table][$field]['__typeMatch'])) {
-                       throw new \RuntimeException(
-                               'Additional types can only be added when there is already an existing type match configuration for the given table and field. '
-                               . 'Table: "' . $table . '", Field: "' . $field . '", Additional Type: "' . $additionalType . '"',
-                               1377600978
-                       );
-               }
-
-               self::$migrateFields[$table][$field]['__typeMatch']['types'][] = $additionalType;
-       }
-
-       /**
-        * Registers an additional field for migration.
-        *
-        * For use in ext_localconf.php files
-        *
-        * @param string $table Name of the table in the migration configuration
-        * @param string $field Name of the field in the migration configuration
-        * @param string $migrationField The file property that should be migrated, see $availableMigrateFields for available settings
-        * @param string $oldFieldName The name of the field in which the file property should be available
-        * @param string $typeField Optional field that switches the record type, will only have an effect if $types array is provided
-        * @param array $types The record types for which the migration should be active
-        * @throws \InvalidArgumentException
-        */
-       static public function registerFieldForMigration($table, $field, $migrationField, $oldFieldName, $typeField = NULL, array $types = array()) {
-
-               if (array_search($migrationField, static::$availableMigrationFields) === FALSE) {
-                       throw new \InvalidArgumentException('The value for $migrationField "' . $migrationField . '" is invalid.' .
-                               ' Valid values can be found in the $availableMigrationFields array.', 1377600978);
-               }
-
-               self::$migrateFields[$table][$field][$migrationField] = $oldFieldName;
-
-               if (isset($typeField) && (count($types) > 0)) {
-                       self::$migrateFields[$table][$field]['__typeMatch']['types'] = $types;
-                       self::$migrateFields[$table][$field]['__typeMatch']['typeField'] = (string)$typeField;
-               }
-       }
-
-       /**
-        * Check if fieldis in type
-        *
-        * @param string $fieldName
-        * @param string $table
-        * @param array $row
-        * @return bool
-        */
-       static protected function fieldIsInType($fieldName, $table, array $row) {
-               $fieldConfiguration = static::$migrateFields[$table][$fieldName];
-               if (empty($fieldConfiguration['__typeMatch'])) {
-                       return TRUE;
-               } else {
-                       return in_array($row[$fieldConfiguration['__typeMatch']['typeField']], $fieldConfiguration['__typeMatch']['types']);
-               }
-       }
-
-       /**
-        * @return \TYPO3\CMS\Frontend\Page\PageRepository
-        */
-       static protected function getPageRepository() {
-               return $GLOBALS['TSFE']->sys_page;
-       }
-
-}
index 8de3aa1..6fa5feb 100644 (file)
@@ -742,7 +742,6 @@ return array(
                'XCLASS' => array()
        ),
        'FE' => array( // Configuration for the TypoScript frontend (FE). Nothing here relates to the administration backend!
-               'activateContentAdapter' => TRUE,               // Boolean: TYPO3 Frontend can transform tt_content and pages records using FAL back to into a format like DB records have been in pre 6.x, so legacy Typoscript can work with it. <strong><em>WARNING: THIS IS SLOW!</em></strong>
                'png_to_gif' => FALSE,          // Boolean: Enables conversion back to gif of all png-files generated in the frontend libraries. Notice that this leaves an increased number of temporary files in typo3temp/
                'addAllowedPaths' => '',                // Additional relative paths (comma-list) to allow TypoScript resources be in. Should be prepended with '/'. If not, then any path where the first part is like this path will match. That is: 'myfolder/ , myarchive' will match eg. 'myfolder/', 'myarchive/', 'myarchive_one/', 'myarchive_2/' ... No check is done to see if this directory actually exists in the root of the site. Paths are matched by simply checking if these strings equals the first part of any TypoScript resource filepath. (See class template, function init() in \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser)
                'debug' => FALSE,               // Boolean: If set, some debug HTML-comments may be output somewhere. Can also be set by TypoScript.
index 8f142a3..a65908f 100644 (file)
@@ -35,7 +35,6 @@ return array(
        ),
        'FE' => array(
                'loginSecurityLevel' => 'rsa',
-               'activateContentAdapter' => FALSE,
        ),
        'GFX' => array(
                'jpg_quality' => '80',
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-66034-DropContentAdapter.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-66034-DropContentAdapter.rst
new file mode 100644 (file)
index 0000000..6e30659
--- /dev/null
@@ -0,0 +1,19 @@
+=======================================
+Breaking: #66034 - Drop Content Adapter
+=======================================
+
+Description
+===========
+
+The TYPO3 configuration option [FE][activateContentAdapter] and the associated code is now dropped from Core.
+This option was used to transform FAL fields back to old file fields.
+
+Impact
+======
+
+Any installation using TypoScript referring to old file columns as  present *before* TYPO3 CMS 6.x will stop working.
+
+Migration
+=========
+
+Change your TypoScript to use the new content object FILES to retrieve files.
diff --git a/typo3/sysext/core/Tests/Unit/Resource/Service/FrontendContentAdapterServiceTest.php b/typo3/sysext/core/Tests/Unit/Resource/Service/FrontendContentAdapterServiceTest.php
deleted file mode 100644 (file)
index 102dd2c..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\Unit\Resource\Service;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Tests for the Frontend Content Adapter
- */
-class FrontendContentAdapterServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
-       /**
-       /**
-        * @var array A backup of registered singleton instances
-        */
-       protected $singletonInstances = array();
-
-       /**
-        * @var \TYPO3\CMS\Frontend\Page\PageRepository|\PHPUnit_Framework_MockObject_MockObject
-        */
-       protected $pageRepositoryMock;
-
-       /**
-        * Saving the singletons
-        */
-       protected function setUp() {
-               $this->pageRepositoryMock = $this->getMock(\TYPO3\CMS\Frontend\Page\PageRepository::class);
-               $GLOBALS['TSFE'] = new \stdClass;
-               $GLOBALS['TSFE']->sys_page = $this->pageRepositoryMock;
-       }
-
-       /**
-        * @test
-        */
-       public function emptyRelationResetsLegacyFields() {
-               $this->pageRepositoryMock->expects($this->any())
-                       ->method('getFileReferences')
-                       ->will($this->returnValue(array()));
-               $dbRow = array(
-                       'CType' => 'image',
-                       'image' => '1'
-               );
-
-               \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::modifyDBRow($dbRow, 'tt_content');
-               $this->assertEmpty($dbRow['image']);
-       }
-
-       /**
-        * @test
-        */
-       public function imageFieldIsFilledWithPathOfImage() {
-               $fileReference = $this->getMock(\TYPO3\CMS\Core\Resource\FileReference::class, array(), array(), '', FALSE);
-               $fileReference->expects($this->any())
-                       ->method('getOriginalFile')
-                       ->will($this->returnValue($this->getMock(\TYPO3\CMS\Core\Resource\File::class, array(), array(), '', FALSE)));
-               $fileReference->expects($this->any())
-                       ->method('getPublicUrl')
-                       ->will($this->returnValue('path/to/file'));
-               $this->pageRepositoryMock->expects($this->any())
-                       ->method('getFileReferences')
-                       ->will($this->returnValue(array($fileReference)));
-               $dbRow = array(
-                       'CType' => 'image',
-                       'image' => '1'
-               );
-
-               \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::modifyDBRow($dbRow, 'tt_content');
-               $this->assertSame('../../path/to/file', $dbRow['image']);
-       }
-
-       public function conteRowsOfDifferentTypesDataProvider() {
-               $filePropertiesImage = array(
-                       'title' => 'Image',
-                       'description' => 'IMAGE DESCRIPTION',
-               );
-
-               $filePropertiesMedia = array(
-                       'title' => 'Media',
-                       'description' => 'MEDIA DESCRIPTION',
-               );
-
-               return array(
-                       'Image Element' => array(
-                               array(
-                                       'CType' => 'image',
-                                       'image' => '',
-                                       'media' => '',
-                               ),
-                               'IMAGE DESCRIPTION',
-                               $filePropertiesImage
-                       ),
-                       'Textpic Element' => array(
-                               array(
-                                       'CType' => 'textpic',
-                                       'image' => '',
-                                       'media' => '',
-                               ),
-                               'IMAGE DESCRIPTION',
-                               $filePropertiesImage
-                       ),
-                       'Uploads Element' => array(
-                               array(
-                                       'CType' => 'uploads',
-                                       'image' => '',
-                                       'media' => '',
-                               ),
-                               'MEDIA DESCRIPTION',
-                               $filePropertiesMedia
-                       ),
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider conteRowsOfDifferentTypesDataProvider
-        */
-       public function migrationOfLegacyFieldsIsOnlyDoneWhenRelationFieldIsVisibleInType($dbRow, $expectedCaption, $fileProperties) {
-               $fileReference = $this->getMock(\TYPO3\CMS\Core\Resource\FileReference::class, array(), array(), '', FALSE);
-               $fileReference->expects($this->once())
-                       ->method('getProperties')
-                       ->will($this->returnValue($fileProperties));
-               $fileReference->expects($this->any())
-                       ->method('getOriginalFile')
-                       ->will($this->returnValue($this->getMock(\TYPO3\CMS\Core\Resource\File::class, array(), array(), '', FALSE)));
-               $fileReference->expects($this->any())
-                       ->method('getPublicUrl')
-                       ->will($this->returnValue('path/to/file'));
-               $this->pageRepositoryMock->expects($this->any())
-                       ->method('getFileReferences')
-                       ->will($this->returnValue(array($fileReference)));
-
-               \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::modifyDBRow($dbRow, 'tt_content');
-               $this->assertSame($expectedCaption, $dbRow['imagecaption']);
-       }
-
-       /**
-        * @test
-        */
-       public function registerAdditionalTypeForMigrationAddsTypeToArray() {
-
-               $migrateFields = array(
-                       'testtable' => array(
-                               'testfield' => array(
-                                       'paths' => 'oldfield',
-                                       '__typeMatch' => array(
-                                               'typeField' => 'mytypefield',
-                                               'types' => array('mytype'),
-                                       )
-                               )
-                       ),
-               );
-
-               $expectedResult = array(
-                       'testtable' => array(
-                               'testfield' => array(
-                                       'paths' => 'oldfield',
-                                       '__typeMatch' => array(
-                                               'typeField' => 'mytypefield',
-                                               'types' => array('mytype', 'mytype2'),
-                                       )
-                               )
-                       ),
-               );
-
-               $frontendContentAdapterService = $this->getAccessibleFrontendContentAdapterServiceWithEmptyConfiguration();
-               $frontendContentAdapterService->_setStatic('migrateFields', $migrateFields);
-               $frontendContentAdapterService->registerAdditionalTypeForMigration('testtable', 'testfield', 'mytype2');
-               $this->assertEquals($expectedResult, $frontendContentAdapterService->_getStatic('migrateFields'));
-       }
-
-       /**
-        * @test
-        * @expectedException \RuntimeException
-        */
-       public function registerAdditionalTypeForMigrationThrowsExceptionIfNoConfigurationAvailable() {
-               $frontendContentAdapterService = $this->getAccessibleFrontendContentAdapterServiceWithEmptyConfiguration();
-               $frontendContentAdapterService->registerAdditionalTypeForMigration('testtable', 'testfield', 'mytype2');
-       }
-
-       /**
-        * @test
-        * @expectedException \RuntimeException
-        */
-       public function registerAdditionalTypeForMigrationThrowsExceptionIfNoTypeConfigurationAvailable() {
-
-               $migrateFields = array(
-                       'testtable' => array(
-                               'testfield' => array(
-                                       'paths' => 'oldfield',
-                               )
-                       ),
-               );
-
-               $frontendContentAdapterService = $this->getAccessibleFrontendContentAdapterServiceWithEmptyConfiguration();
-               $frontendContentAdapterService->_setStatic('migrateFields', $migrateFields);
-               $frontendContentAdapterService->registerAdditionalTypeForMigration('testtable', 'testfield', 'mytype2');
-       }
-
-       /**
-        * @test
-        * @dataProvider registerFieldForMigrationAddsCorrectConfigurationDataProvider
-        */
-       public function registerFieldForMigrationAddsCorrectConfiguration($expectedResult, $table, $field, $migrationFields, $oldFieldName, $typeField, $types) {
-               $frontendContentAdapterService = $this->getAccessibleFrontendContentAdapterServiceWithEmptyConfiguration();
-               $frontendContentAdapterService::registerFieldForMigration($table, $field, $migrationFields, $oldFieldName, $typeField, $types);
-               $newConfiguration = $frontendContentAdapterService->_getStatic('migrateFields');
-               $this->assertEquals($expectedResult, $newConfiguration);
-       }
-
-       /**
-        * Data provider for registerFieldForMigrationAddsCorrectConfiguration
-        *
-        * @return array
-        */
-       public function registerFieldForMigrationAddsCorrectConfigurationDataProvider() {
-               return array(
-                       'table without type column' => array(
-                               array(
-                                       'tablename' => array(
-                                               'newfield' => array(
-                                                       'paths' => 'oldfield',
-                                               ),
-                                       ),
-                               ),
-                               'tablename',
-                               'newfield',
-                               'paths',
-                               'oldfield',
-                               NULL,
-                               array()
-                       ),
-                       'table with type column' => array(
-                               array(
-                                       'tablename' => array(
-                                               'newfield' => array(
-                                                       'paths' => 'oldfield',
-                                                       '__typeMatch' => array(
-                                                               'typeField' => 'typecolumn',
-                                                               'types' => array('firsttype'),
-                                                       )
-                                               ),
-                                       ),
-                               ),
-                               'tablename',
-                               'newfield',
-                               'paths',
-                               'oldfield',
-                               'typecolumn',
-                               array('firsttype'),
-                       ),
-               );
-       }
-
-       /**
-        * @test
-        * @expectedException \InvalidArgumentException
-        */
-       public function registerFieldForMigrationThrowsExceptionForInvalidMigrationField() {
-               $frontendContentAdapterService = $this->getAccessibleFrontendContentAdapterServiceWithEmptyConfiguration();
-               $frontendContentAdapterService::registerFieldForMigration('table', 'field', 'invalidfield', 'oldfield');
-       }
-
-       /**
-        * Creates an accessible mock of the FrontendContentAdapterService class
-        * and sets the migrateFields property to an empty array.
-        *
-        * @return \TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface
-        */
-       protected function getAccessibleFrontendContentAdapterServiceWithEmptyConfiguration() {
-               $frontendContentAdapterService = $this->getAccessibleMock(\TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService::class, array('dummy'));
-               $frontendContentAdapterService->_setStatic('migrateFields', array());
-               return $frontendContentAdapterService;
-       }
-
-}
index bd75463..a68b4cd 100644 (file)
@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Frontend\ContentObject;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -100,9 +99,6 @@ class ContentContentObject extends AbstractContentObject {
                                                                $_procObj->modifyDBRow($row, $conf['table']);
                                                        }
                                                }
-                                               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['activateContentAdapter']) {
-                                                       FrontendContentAdapterService::modifyDBRow($row, $conf['table']);
-                                               }
                                                if (!$GLOBALS['TSFE']->recordRegister[($conf['table'] . ':' . $row['uid'])]) {
                                                        $this->cObj->currentRecordNumber++;
                                                        $cObj->parentRecordNumber = $this->cObj->currentRecordNumber;
index ef3ebc2..7171bd6 100644 (file)
@@ -28,7 +28,6 @@ use TYPO3\CMS\Core\Resource\FileReference;
 use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
-use TYPO3\CMS\Core\Resource\Service\FrontendContentAdapterService;
 use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\TypoScript\TemplateService;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
@@ -657,9 +656,6 @@ class ContentObjectRenderer {
         * @return void
         */
        public function start($data, $table = '') {
-               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['activateContentAdapter'] && is_array($data) && !empty($data) && !empty($table)) {
-                       FrontendContentAdapterService::modifyDBRow($data, $table);
-               }
                $this->data = $data;
                $this->table = $table;
                $this->currentRecord = $table ? $table . ':' . $this->data['uid'] : '';
@@ -5471,8 +5467,6 @@ class ContentObjectRenderer {
                                                if (isset($importedFile) && !empty($importedFile) && !empty($fileArray['import'])) {
                                                        $file = $fileArray['import'] . $file;
                                                }
-                                               // clean ../ sections of the path and resolve to proper string. This is necessary for the Tx_File_BackwardsCompatibility_TslibContentAdapter to work.
-                                               $file = GeneralUtility::resolveBackPath($file);
                                                $fileObject = $this->getResourceFactory()->retrieveFileOrFolderObject($file);
                                        }
                                } catch (Exception $exception) {
index ee5f72b..bedef5b 100644 (file)
@@ -80,6 +80,8 @@ class SilentConfigurationUpgradeService {
                'SYS/useCachingFramework',
                // #65912
                'FE/allowedTempPaths',
+               // #66034
+               'FE/activateContentAdapter',
        );
 
        /**
index 175616c..4fd3601 100644 (file)
@@ -31,7 +31,6 @@ class FalStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
        public function getStatus() {
                $statuses = array(
                        'MissingFiles' => $this->getMissingFilesStatus(),
-                       'ContentAdapter' => $this->getContentAdapterStatus(),
                );
                return $statuses;
        }
@@ -96,28 +95,4 @@ class FalStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
                return GeneralUtility::makeInstance(\TYPO3\CMS\Reports\Status::class, $GLOBALS['LANG']->getLL('status_missingFiles'), $value, $message, $severity);
        }
 
-       /**
-        * Checks if content adapter is active
-        *
-        * @return \TYPO3\CMS\Reports\Status An object representing whether the content adapter is active or not
-        */
-       protected function getContentAdapterStatus() {
-               $value = $GLOBALS['LANG']->getLL('status_disabled');
-               $message = '';
-               $severity = \TYPO3\CMS\Reports\Status::OK;
-               if ($GLOBALS['TYPO3_CONF_VARS']['FE']['activateContentAdapter']) {
-                       $value = $GLOBALS['LANG']->getLL('status_enabled');
-                       $message = '<p>' . $GLOBALS['LANG']->getLL('status_contentAdapterActiveMessage') . '</p>';
-                       $severity = \TYPO3\CMS\Reports\Status::WARNING;
-               }
-               return GeneralUtility::makeInstance(
-                       \TYPO3\CMS\Reports\Status::class,
-                       $GLOBALS['LANG']->getLL('status_contentAdapterActive'),
-                       $value,
-                       $message,
-                       $severity
-               );
-
-       }
-
 }
index ee6c5f6..649ddc3 100644 (file)
@@ -69,7 +69,7 @@
                        <trans-unit id="status_missingFiles" xml:space="preserve">
                                <source>Files flagged as missing</source>
                        </trans-unit>
-                       <trans-unit id="status_contentAdapterActive" xml:space="preserve">
+                       <trans-unit id="status_contentAdapterActive" xml:space="preserve" deprecated="since CMS 7, remove with CMS 8">
                                <source>Content Adapter is active</source>
                        </trans-unit>
                        <trans-unit id="status_missingFilesCount" xml:space="preserve">
@@ -78,7 +78,7 @@
                        <trans-unit id="status_missingFilesMessage" xml:space="preserve">
                                <source>These files are flagged as missing. Restore the files and run the indexer to reset the missing flag.</source>
                        </trans-unit>
-                       <trans-unit id="status_contentAdapterActiveMessage" xml:space="preserve">
+                       <trans-unit id="status_contentAdapterActiveMessage" xml:space="preserve" deprecated="since CMS 7, remove with CMS 8">
                                <source>The Install Tool option [FE][activateContentAdapter] is active to provide compatibility with TypoScript from TYPO3 4.x regarding file handling. This has quite an impact on the performance of frontend rendering. Change TypoScript to support FAL in handling files and disable the setting to increase performance.</source>
                        </trans-unit>
                        <trans-unit id="status_memcachedConfiguration" xml:space="preserve">