[BUGFIX] Superfluous usage of ObjectManagerException 74/24774/2
authorOliver Hader <oliver@typo3.org>
Mon, 14 Oct 2013 22:00:53 +0000 (00:00 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 15 Oct 2013 00:07:37 +0000 (02:07 +0200)
The workspace backend module uses
\TYPO3\CMS\Extbase\Object\ObjectManagerException instead of
\TYPO3\CMS\Extbase\Object\ObjectManager.

Change-Id: Ieb30ed6cd3e8d33de7270800044b0eeebf83be90
Fixes: #52824
Releases: 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/24774
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index 87401b0..af4a437 100644 (file)
@@ -552,10 +552,10 @@ class GridDataService {
        }
 
        /**
-        * @return \TYPO3\CMS\Extbase\Object\ObjectManagerException
+        * @return \TYPO3\CMS\Extbase\Object\ObjectManager
         */
        protected function getObjectManager() {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerException');
+               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
        }
 
 }
index 2c8784a..eb8c960 100644 (file)
@@ -587,9 +587,8 @@ class WorkspaceService implements \TYPO3\CMS\Core\SingletonInterface {
                if ($uid > 0) {
                        $uid = $this->getLivePageUid($uid);
                }
-               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerException');
                /** @var $uriBuilder \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder */
-               $uriBuilder = $objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
+               $uriBuilder = $this->getObjectManager()->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
                // This seems to be very harsh to set this directly to "/typo3 but the viewOnClick also
                // has /index.php as fixed value here and dealing with the backPath is very error-prone
                // @todo make sure this would work in local extension installation too
@@ -625,7 +624,14 @@ class WorkspaceService implements \TYPO3\CMS\Core\SingletonInterface {
                return $this->pageCache[$uid];
        }
 
+       /**
+        * @return \TYPO3\CMS\Extbase\Object\ObjectManager
+        */
+       protected function getObjectManager() {
+               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+       }
+
 }
 
 
-?>
\ No newline at end of file
+?>