[FEATURE] ext:install Show number of folder structure errors in menu 36/24136/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 29 Sep 2013 18:20:52 +0000 (20:20 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 29 Sep 2013 20:03:00 +0000 (22:03 +0200)
Similar to the environment status the number of folder structure
errors are now shown in the left menu.

Change-Id: I665c32e8a3c4389941437a2bb6caeb32b862b673
Resolves: #52368
Releases: 6.2
Reviewed-on: https://review.typo3.org/24136
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Markus Klein
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/install/Classes/Controller/Action/AbstractAction.php
typo3/sysext/install/Resources/Private/Partials/Action/Common/Left.html

index b56ea7c..85c1e4c 100644 (file)
@@ -74,11 +74,18 @@ abstract class AbstractAction {
         * @return string content
         */
        protected function initializeHandle() {
-                       // Count of failed status checks will be displayed in the left navigation menu
-               $statusCheck = $this->objectManager->get('TYPO3\\CMS\\Install\\SystemEnvironment\\Check');
-               $statusObjects = $statusCheck->getStatus();
                $statusUtility = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\StatusUtility');
-               $statusObjectsWithErrorStatus = $statusUtility->filterBySeverity($statusObjects, 'error');
+
+               // Count of failed environment checks are displayed in the left navigation menu
+               $environmentStatus = $this->objectManager->get('TYPO3\\CMS\\Install\\SystemEnvironment\\Check')->getStatus();
+               $environmentErrors = $statusUtility->filterBySeverity($environmentStatus, 'error');
+
+               // Count of folder structure errors are displayed in left navigation menu
+               /** @var $folderStructureFacade \TYPO3\CMS\Install\FolderStructure\StructureFacade */
+               $folderStructureFacade = $this->objectManager->get('TYPO3\\CMS\\Install\\FolderStructure\\DefaultFactory')->getStructure();
+               $folderStructureErrors = $statusUtility->filterBySeverity($folderStructureFacade->getStatus(), 'error');
+
+               // Context service distinguishes between standalone and backend context
                $contextService = $this->objectManager->get('TYPO3\\CMS\\Install\\Service\\ContextService');
 
                $viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
@@ -98,7 +105,8 @@ abstract class AbstractAction {
                        ->assign('messages', $this->messages)
                        ->assign('typo3Version', TYPO3_version)
                        ->assign('siteName', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
-                       ->assign('statusObjectsWithErrorStatus', $statusObjectsWithErrorStatus);
+                       ->assign('environmentErrors', $environmentErrors)
+                       ->assign('folderStructureErrors', $folderStructureErrors);
        }
 
        /**
@@ -229,4 +237,4 @@ abstract class AbstractAction {
                return $saltFactory->getHashedPassword($password);
        }
 }
-?>
+?>
\ No newline at end of file
index 283bbd5..6d3ab6f 100644 (file)
@@ -13,8 +13,8 @@
                <li id="t3-install-menu-systemEnvironment" class="{f:if(condition:'{action} == \'systemEnvironment\'', then:'act')}">
                        <a href="Install.php?install[action]=systemEnvironment&install[context]={context}&install[controller]=tool">
                                System environment
-                               <f:if condition="{statusObjectsWithErrorStatus}">
-                                       <span class="t3-install-menu-errorCount"><f:count>{statusObjectsWithErrorStatus}</f:count></span>
+                               <f:if condition="{environmentErrors}">
+                                       <span class="t3-install-menu-errorCount"><f:count>{environmentErrors}</f:count></span>
                                </f:if>
                        </a>
                </li>
@@ -26,6 +26,9 @@
                <li id="t3-install-menu-folderStructure" class="{f:if(condition:'{action} == \'folderStructure\'', then:'act')}">
                        <a href="Install.php?install[action]=folderStructure&install[context]={context}&install[controller]=tool">
                                Folder structure
+                               <f:if condition="{folderStructureErrors}">
+                                       <span class="t3-install-menu-errorCount"><f:count>{folderStructureErrors}</f:count></span>
+                               </f:if>
                        </a>
                </li>
                <li id="t3-install-menu-testSetup" class="{f:if(condition:'{action} == \'testSetup\'', then:'act')}">