[TASK] Report problem if compatibility6 is loaded 46/38346/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 30 Mar 2015 12:13:02 +0000 (14:13 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 30 Mar 2015 12:42:08 +0000 (14:42 +0200)
Reports module should show a warning if EXT:compatibility6 is loaded
since this implies known performance drawbacks.

Releases: master
Resolves: #66145
Change-Id: Ib76d1f4562e11a36533d9b27d6b675d95ff70be8
Reviewed-on: http://review.typo3.org/38346
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/reports/Classes/Report/Status/Typo3Status.php
typo3/sysext/reports/reports/locallang.xlf

index 3496233..cac9c63 100644 (file)
@@ -32,6 +32,7 @@ class Typo3Status implements \TYPO3\CMS\Reports\StatusProviderInterface {
                $statuses = array(
                        'oldXclassStatus' => $this->getOldXclassUsageStatus(),
                        'registeredXclass' => $this->getRegisteredXclassStatus(),
+                       'compatibility6' => $this->getCompatibility6Status(),
                );
                return $statuses;
        }
@@ -69,7 +70,7 @@ class Typo3Status implements \TYPO3\CMS\Reports\StatusProviderInterface {
        }
 
        /**
-        * List any Xclasses registered in the stystem
+        * List any Xclasses registered in the system
         *
         * @return \TYPO3\CMS\Reports\Status
         */
@@ -110,4 +111,29 @@ class Typo3Status implements \TYPO3\CMS\Reports\StatusProviderInterface {
                        $severity
                );
        }
+
+       /**
+        * Check for usage of EXT:compatibility6
+        *
+        * @return \TYPO3\CMS\Reports\Status
+        */
+       protected function getCompatibility6Status() {
+               $message = '';
+               $value = $GLOBALS['LANG']->getLL('status_disabled');
+               $severity = ReportStatus::OK;
+
+               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('compatibility6')) {
+                       $value = $GLOBALS['LANG']->getLL('status_enabled');
+                       $message = $GLOBALS['LANG']->getLL('status_compatibility6Usage_message');
+                       $severity = ReportStatus::WARNING;
+               }
+
+               return GeneralUtility::makeInstance(
+                       ReportStatus::class,
+                       $GLOBALS['LANG']->getLL('status_compatibility6Usage'),
+                       $value,
+                       $message,
+                       $severity
+               );
+       }
 }
index 649ddc3..927a6fe 100644 (file)
@@ -288,6 +288,12 @@ You can increase the size to 8MB (default on unix) by adding to the httpd.conf:
                        <trans-unit id="status_xclassUsageFound_message_detail" xml:space="preserve">
                                <source>%2s registers an XCLASS of %1s</source>
                        </trans-unit>
+                       <trans-unit id="status_compatibility6Usage" xml:space="preserve">
+                               <source>Extension compatibility6</source>
+                       </trans-unit>
+                       <trans-unit id="status_compatibility6Usage_message" xml:space="preserve">
+                               <source>Extension compatibility6 is loaded. You should check that every third-party extension is natively compatible with this version of TYPO3 and then unload this compatibility extension. As long as this compatibility extension is loaded, you will suffer performance drawbacks</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>