[TASK] Add warning in Reports module if content adapter is active 24/28724/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 24 Mar 2014 20:25:56 +0000 (21:25 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Mon, 24 Mar 2014 21:37:20 +0000 (22:37 +0100)
The setting [FE][activateContentAdapter] has a large impact on
performance. A warning in the Reports module will encourage
integrators to adapt TypoScript to increase performance.

Resolves: #57249
Releases: 6.2
Change-Id: I935b86ba701d3b0dbac3b807a1ae9312bff223fc
Reviewed-on: https://review.typo3.org/28724
Reviewed-by: Wouter Wolters
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/reports/Classes/Report/Status/FalStatus.php
typo3/sysext/reports/reports/locallang.xlf

index 467f945..1b0c7cd 100644 (file)
@@ -40,7 +40,8 @@ class FalStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
         */
        public function getStatus() {
                $statuses = array(
-                       'MissingFiles' => $this->getMissingFilesStatus()
+                       'MissingFiles' => $this->getMissingFilesStatus(),
+                       'ContentAdapter' => $this->getContentAdapterStatus(),
                );
                return $statuses;
        }
@@ -104,4 +105,28 @@ class FalStatus implements \TYPO3\CMS\Reports\StatusProviderInterface {
 
                return GeneralUtility::makeInstance('TYPO3\\CMS\\Reports\\Status', $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',
+                       $GLOBALS['LANG']->getLL('status_contentAdapterActive'),
+                       $value,
+                       $message,
+                       $severity
+               );
+
+       }
 }
index cc69edd..1fc1b17 100644 (file)
                        <trans-unit id="status_missingFiles" xml:space="preserve">
                                <source>Files flagged as missing</source>
                        </trans-unit>
+                       <trans-unit id="status_contentAdapterActive" xml:space="preserve">
+                               <source>Content Adapter is active</source>
+                       </trans-unit>
                        <trans-unit id="status_missingFilesCount" xml:space="preserve">
                                <source>%1$s files</source>
                        </trans-unit>
                        <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">
+                               <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">
                                <source>Memcached Configuration</source>
                        </trans-unit>