[BUGFIX] Make class name consistent
[Packages/TYPO3.CMS.git] / typo3 / sysext / workspaces / Classes / Service / Tcemain.php
index 947f1ca..460f6b8 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 2010 Workspaces Team (http://forge.typo3.org/projects/show/typo3v4-workspaces)
+ *  (c) 2010-2011 Workspaces Team (http://forge.typo3.org/projects/show/typo3v4-workspaces)
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -31,7 +31,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_Tcemain {
+class Tx_Workspaces_Service_Tcemain {
 
        /**
         * In case a sys_workspace_stage record is deleted we do a hard reset
@@ -49,7 +49,7 @@ class tx_Workspaces_Service_Tcemain {
                if ($command === 'delete') {
                        if ($table === Tx_Workspaces_Service_Stages::TABLE_STAGE) {
                                $this->resetStageOfElements($id);
-                       } elseif ($table === tx_Workspaces_Service_Workspaces::TABLE_WORKSPACE) {
+                       } elseif ($table === Tx_Workspaces_Service_Workspaces::TABLE_WORKSPACE) {
                                $this->flushWorkspaceElements($id);
                        }
                }
@@ -149,22 +149,9 @@ class tx_Workspaces_Service_Tcemain {
         * @return void
         */
        protected function flushWorkspaceCacheEntriesByWorkspaceId($workspaceId) {
-               if (TYPO3_UseCachingFramework === TRUE) {
-                       try {
-                               $GLOBALS['typo3CacheFactory']->create(
-                                       'workspaces_cache',
-                                       't3lib_cache_frontend_StringFrontend',
-                                       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['sys_workspace_cache']['backend'],
-                                       $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['sys_workspace_cache']['options']);
-                       } catch (t3lib_cache_exception_DuplicateIdentifier $e) {
-                               // do nothing, a workspace cache already exists
-                       }
-       
-                       $workspacesCache = $GLOBALS['typo3CacheManager']->getCache('workspaces_cache');
-       
-                       $workspacesCache->flushByTag($workspaceId);
-                       $workspacesCache->flushByTag(tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
-               }
+               $workspacesCache = $GLOBALS['typo3CacheManager']->getCache('workspaces_cache');
+               $workspacesCache->flushByTag($workspaceId);
+               $workspacesCache->flushByTag(Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
        }
 }