[BUGFIX] Make class name consistent
authorTolleiv Nietsch <info@tolleiv.de>
Mon, 22 Aug 2011 10:40:58 +0000 (12:40 +0200)
committerTolleiv Nietsch <info@tolleiv.de>
Tue, 13 Sep 2011 06:22:04 +0000 (08:22 +0200)
Our classnames are mixed betweem Tx_ and tx_ - some others
don't even follow the general naming scheme. The patch moves
all to the proper naming with Tx_.

Change-Id: I6049923420414303c3985b6ff96a80ec1be9ef7f
Resolves: #25704
Branches: 4.6

21 files changed:
typo3/sysext/workspaces/Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php [deleted file]
typo3/sysext/workspaces/Classes/BackendUserInterface/class.tx_workspaces_pagetree_collectionsprocessor.php [deleted file]
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Controller/ReviewController.php
typo3/sysext/workspaces/Classes/ExtDirect/AbstractHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/MassActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/PagetreeCollectionsProcessor.php [new file with mode: 0644]
typo3/sysext/workspaces/Classes/ExtDirect/Server.php
typo3/sysext/workspaces/Classes/ExtDirect/ToolbarMenu.php
typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php [new file with mode: 0644]
typo3/sysext/workspaces/Classes/Service/AutoPublish.php
typo3/sysext/workspaces/Classes/Service/AutoPublishTask.php
typo3/sysext/workspaces/Classes/Service/Befunc.php
typo3/sysext/workspaces/Classes/Service/Fehooks.php
typo3/sysext/workspaces/Classes/Service/GridData.php
typo3/sysext/workspaces/Classes/Service/Tcemain.php
typo3/sysext/workspaces/Classes/Service/Workspaces.php
typo3/sysext/workspaces/Tests/Service/WorkspaceTest.php
typo3/sysext/workspaces/ext_localconf.php
typo3/sysext/workspaces/ext_tables.php

diff --git a/typo3/sysext/workspaces/Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php b/typo3/sysext/workspaces/Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php
deleted file mode 100644 (file)
index 25fb3e9..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2007-2011 Ingo Renner <ingo@typo3.org>
-*  (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
-*  free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2 of the License, or
-*  (at your option) any later version.
-*
-*  The GNU General Public License can be found at
-*  http://www.gnu.org/copyleft/gpl.html.
-*  A copy is found in the textfile GPL.txt and important notices to the license
-*  from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-*  This script is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-*  GNU General Public License for more details.
-*
-*  This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-
-if(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) {
-       require_once(PATH_typo3 . 'interfaces/interface.backend_toolbaritem.php');
-}
-
-/**
- * class to render the workspace selector
- *
- * @author     Ingo Renner <ingo@typo3.org>
- * @package Workspaces
- * @subpackage BackendUserInterface
- */
-class WorkspaceSelectorToolbarItem implements backend_toolbarItem {
-
-       protected $changeWorkspace;
-       protected $changeWorkspacePreview;
-
-       /**
-        * reference back to the backend object
-        *
-        * @var TYPO3backend
-        */
-       protected $backendReference;
-
-       protected $checkAccess = NULL;
-
-       /**
-        * constructor
-        *
-        * @param       TYPO3backend    TYPO3 backend object reference
-        */
-       public function __construct(TYPO3backend &$backendReference = NULL) {
-               $this->backendReference       = $backendReference;
-               $this->changeWorkspace        = t3lib_div::_GP('changeWorkspace');
-               $this->changeWorkspacePreview = t3lib_div::_GP('changeWorkspacePreview');
-
-               $pageRenderer = t3lib_div::makeInstance('t3lib_pageRenderer');
-               $this->backendReference->addJavaScript("TYPO3.Workspaces = { workspaceTitle : '" . htmlspecialchars(tx_Workspaces_Service_Workspaces::getWorkspaceTitle($GLOBALS['BE_USER']->workspace)) . "'};\n");
-       }
-
-       /**
-        * checks whether the user has access to this toolbar item
-        *
-        * @see         typo3/alt_shortcut.php
-        * @return  boolean  TRUE if user has access, FALSE if not
-        */
-       public function checkAccess() {
-               if (t3lib_extMgm::isLoaded('workspaces')) {
-                       if ($this->checkAccess == NULL) {
-                                       $availableWorkspaces = tx_Workspaces_Service_Workspaces::getAvailableWorkspaces();
-                                       if (count($availableWorkspaces) > 0) {
-                                               $this->checkAccess = TRUE;
-                                       } else {
-                                               $this->checkAccess = FALSE;
-                                       }
-                       }
-                       return $this->checkAccess;
-               }
-               return FALSE;
-       }
-
-       /**
-        * Creates the selector for workspaces
-        *
-        * @return      string          workspace selector as HTML select
-        */
-       public function render() {
-               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:toolbarItems.workspace', TRUE);
-               $this->addJavascriptToBackend();
-               $availableWorkspaces = tx_Workspaces_Service_Workspaces::getAvailableWorkspaces();
-               $workspaceMenu       = array();
-
-               $stateCheckedIcon = t3lib_iconWorks::getSpriteIcon('status-status-checked');
-
-               $stateUncheckedIcon = t3lib_iconWorks::getSpriteIcon('empty-empty', array(
-                       'title' => $GLOBALS['LANG']->getLL('bookmark_inactive')
-               ));
-
-               $workspaceMenu[] = '<a href="#" class="toolbar-item">' .
-                       t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-workspace', array('title' => $title)) .
-                               '</a>';
-               $workspaceMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
-
-               if (count($availableWorkspaces)) {
-                       foreach($availableWorkspaces as $workspaceId => $label) {
-                               $selected = '';
-                               $icon = $stateUncheckedIcon;
-                               if((int) $GLOBALS['BE_USER']->workspace === $workspaceId) {
-                                       $selected = ' class="selected"';
-                                       $icon = $stateCheckedIcon;
-                               }
-
-                               $workspaceMenu[] = '<li' . $selected . '>' . $icon .
-                                       ' <a href="backend.php?changeWorkspace=' .
-                                       intval($workspaceId) . '" id="ws-' . intval($workspaceId) .
-                                       '" class="ws">' . $label . '</a></li>';
-                       }
-               } else {
-                       $workspaceMenu[] = '<li>' . $stateUncheckedIcon . ' ' .
-                               $GLOBALS['LANG']->getLL('bookmark_noWSfound', TRUE) .
-                               '</li>';
-               }
-
-               if ($GLOBALS['BE_USER']->check('modules', 'web_WorkspacesWorkspaces')) {
-                               // go to workspace module link
-                       $workspaceMenu[] = '<li class="divider">' . $stateUncheckedIcon . ' ' .
-                               '<a href="javascript:top.goToModule(\'web_WorkspacesWorkspaces\');" target="content" id="goToWsModule">' .
-                               ' '. $GLOBALS['LANG']->getLL('bookmark_workspace', TRUE) . '</a></li>';
-               }
-
-               $workspaceMenu[] = '</ul>';
-
-               return implode(LF, $workspaceMenu);
-       }
-
-       /**
-        * adds the necessary JavaScript to the backend
-        *
-        * @return      void
-        */
-       protected function addJavascriptToBackend() {
-               $this->backendReference->addJavascriptFile(t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/JavaScript/workspacemenu.js');
-       }
-
-       /**
-        * returns additional attributes for the list item in the toolbar
-        *
-        * @return      string          list item HTML attibutes
-        */
-       public function getAdditionalAttributes() {
-               return ' id="workspace-selector-menu"';
-       }
-}
-
-
-if(!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
-       $GLOBALS['TYPO3backend']->addToolbarItem('workSpaceSelector', 'WorkspaceSelectorToolbarItem');
-}
-
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Classes/BackendUserInterface/class.tx_workspaces_pagetree_collectionsprocessor.php b/typo3/sysext/workspaces/Classes/BackendUserInterface/class.tx_workspaces_pagetree_collectionsprocessor.php
deleted file mode 100644 (file)
index aa32c65..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2011 Tolleiv Nietsch <typo3@tolleiv.de>
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *  A copy is found in the textfile GPL.txt and important notices to the license
- *  from the author is found in LICENSE.txt distributed with these scripts.
- *
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Interface for classes which perform pre or post processing
- *
- * @author Tolleiv Nietsch <typo3@tolleiv.de>
- * @package    TYPO3
- * @subpackage t3lib
- */
-class tx_workspaces_pagetree_CollectionsProcessor implements t3lib_tree_pagetree_interfaces_CollectionProcessor {
-
-       /**
-        * @abstract
-        * @param  t3lib_tree_pagetree_Node $node
-        * @param  int $mountPoint
-        * @param  int $level
-        * @param  t3lib_tree_pagetree_NodeCollection $nodeCollection
-        * @return void
-        */
-       public function postProcessGetNodes($node, $mountPoint, $level, $nodeCollection) {
-               foreach($nodeCollection as $node) {
-                       /** @var $node t3lib_tree_Node */
-                       $this->highlightVersionizedElements($node);
-               }
-       }
-
-       /**
-        * @abstract
-        * @param  t3lib_tree_pagetree_Node $node
-        * @param  string $searchFilter
-        * @param  int $mountPoint
-        * @param  t3lib_tree_pagetree_NodeCollection $nodeCollection
-        * @return void
-        */
-       public function postProcessFilteredNodes($node, $searchFilter, $mountPoint, $nodeCollection) {
-               foreach($nodeCollection as $node) {
-                       /** @var $node t3lib_tree_Node */
-                       $this->highlightVersionizedElements($node);
-               }
-       }
-
-       /**
-        * @abstract
-        * @param  string $searchFilter
-        * @param  t3lib_tree_pagetree_NodeCollection $nodeCollection
-        * @return void
-        */
-       public function postProcessGetTreeMounts($searchFilter, $nodeCollection) {
-               foreach($nodeCollection as $node) {
-                       /** @var $node t3lib_tree_Node */
-                       $this->highlightVersionizedElements($node);
-               }
-       }
-
-       /**
-        * Sets the CSS Class on all pages which have versioned records
-        * in the current workspace
-        *
-        * @param t3lib_tree_Node $node
-        * @return void
-        */
-       protected function highlightVersionizedElements(t3lib_tree_Node $node) {
-               if (!$node->getCls() && count(t3lib_BEfunc::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $node->getId(), TRUE)))        {
-                       $node->setCls('ver-versions');
-               }
-       }
-}
-
-?>
\ No newline at end of file
index e3809fd..0dcf64c 100644 (file)
@@ -40,7 +40,7 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
        protected $stageService;
 
        /**
-        * @var tx_Workspaces_Service_Workspaces
+        * @var Tx_Workspaces_Service_Workspaces
         */
        protected $workspaceService;
 
@@ -52,7 +52,7 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
        protected function initializeAction() {
                parent::initializeAction();
                $this->stageService = t3lib_div::makeInstance('Tx_Workspaces_Service_Stages');
-               $this->workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $this->workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $this->template->setExtDirectStateProvider();
 
                $resourcePath = t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/StyleSheet/preview.css';
@@ -113,8 +113,8 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
                list(, $nextStage) = $this->stageService->getNextStageForElementCollection($workspaceItemsArray);
                list(, $previousStage) = $this->stageService->getPreviousStageForElementCollection($workspaceItemsArray);
 
-               /** @var $wsService tx_Workspaces_Service_Workspaces */
-               $wsService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               /** @var $wsService Tx_Workspaces_Service_Workspaces */
+               $wsService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $wsList = $wsService->getAvailableWorkspaces();
                $activeWorkspace = $GLOBALS['BE_USER']->workspace;
 
@@ -139,7 +139,7 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
 
                // @todo - handle new pages here
                // branchpoints are not handled anymore because this feature is not supposed anymore
-               if (tx_Workspaces_Service_Workspaces::isNewPage($this->pageId)) {
+               if (Tx_Workspaces_Service_Workspaces::isNewPage($this->pageId)) {
                        $wsNewPageUri = $uriBuilder->uriFor('newPage', array(), 'Tx_Workspaces_Controller_PreviewController', 'workspaces', 'web_workspacesworkspaces');
                        $wsNewPageParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Preview';
                        $this->view->assign('liveUrl', $wsSettingsPath . $wsNewPageUri . $wsNewPageParams);
index 5ea3734..7946a9e 100644 (file)
@@ -34,7 +34,7 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
         * @return void
         */
        public function indexAction() {
-               $wsService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $wsService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $this->view->assign('showGrid', !($GLOBALS['BE_USER']->workspace === 0 && !$GLOBALS['BE_USER']->isAdmin()));
                $this->view->assign('showAllWorkspaceTab', $GLOBALS['BE_USER']->isAdmin());
                $this->view->assign('pageUid', t3lib_div::_GP('id'));
@@ -60,7 +60,7 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
                                        $GLOBALS['BE_USER']->setWorkspace($activeWorkspace);
                                        $performWorkspaceSwitch = TRUE;
                                        t3lib_BEfunc::setUpdateSignal('updatePageTree');
-                               } elseif ($switchWs == tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
+                               } elseif ($switchWs == Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
                                        $this->redirect('fullIndex');
                                }
                        }
@@ -69,7 +69,7 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
                $this->view->assign('performWorkspaceSwitch', $performWorkspaceSwitch);
                $this->view->assign('workspaceList', $wsList);
                $this->view->assign('activeWorkspaceUid', $activeWorkspace);
-               $this->view->assign('activeWorkspaceTitle', tx_Workspaces_Service_Workspaces::getWorkspaceTitle($activeWorkspace));
+               $this->view->assign('activeWorkspaceTitle', Tx_Workspaces_Service_Workspaces::getWorkspaceTitle($activeWorkspace));
                $this->view->assign('showPreviewLink', $wsService->canCreatePreviewLink( t3lib_div::_GP('id'), $activeWorkspace));
                $GLOBALS['BE_USER']->setAndSaveSessionData('tx_workspace_activeWorkspace', $activeWorkspace);
        }
@@ -84,15 +84,15 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
                if (!$GLOBALS['BE_USER']->isAdmin()) {
                        $this->redirect('index');
                } else {
-                       $wsService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+                       $wsService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                        $this->view->assign('pageUid', t3lib_div::_GP('id'));
                        $this->view->assign('showGrid', TRUE);
                        $this->view->assign('showLegend', TRUE);
                        $this->view->assign('showAllWorkspaceTab', $GLOBALS['BE_USER']->isAdmin());
                        $this->view->assign('workspaceList', $wsService->getAvailableWorkspaces());
-                       $this->view->assign('activeWorkspaceUid', tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
+                       $this->view->assign('activeWorkspaceUid', Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
                        $this->view->assign('showPreviewLink', FALSE);
-                       $GLOBALS['BE_USER']->setAndSaveSessionData('tx_workspace_activeWorkspace', tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
+                       $GLOBALS['BE_USER']->setAndSaveSessionData('tx_workspace_activeWorkspace', Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
                                // set flag for javascript
                        $this->pageRenderer->addInlineSetting('Workspaces', 'allView', '1');
                }
@@ -106,7 +106,7 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
         */
        public function singleIndexAction() {
 
-               $wsService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $wsService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $wsList = $wsService->getAvailableWorkspaces();
                $activeWorkspace = $GLOBALS['BE_USER']->workspace;
 
@@ -132,7 +132,7 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
 
                $this->template->setExtDirectStateProvider();
 
-               if (tx_Workspaces_Service_Workspaces::isOldStyleWorkspaceUsed()) {
+               if (Tx_Workspaces_Service_Workspaces::isOldStyleWorkspaceUsed()) {
                        $message = t3lib_div::makeInstance(
                                't3lib_FlashMessage',
                                $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:warning.oldStyleWorkspaceInUser'),
index f6e1de6..77080eb 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage ExtDirect
  */
-abstract class tx_Workspaces_ExtDirect_AbstractHandler {
+abstract class Tx_Workspaces_ExtDirect_AbstractHandler {
        /**
         * Gets the current workspace ID.
         *
@@ -65,10 +65,10 @@ abstract class tx_Workspaces_ExtDirect_AbstractHandler {
        /**
         * Gets an instance of the workspaces service.
         *
-        * @return tx_Workspaces_Service_Workspaces
+        * @return Tx_Workspaces_Service_Workspaces
         */
        protected function getWorkspaceService() {
-               return t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               return t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
        }
 }
 
index d2e3c25..ca776f7 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage ExtDirect
  */
-class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_AbstractHandler {
+class Tx_Workspaces_ExtDirect_ActionHandler extends Tx_Workspaces_ExtDirect_AbstractHandler {
 
        /**
         * @var Tx_Workspaces_Service_Stages
@@ -99,7 +99,7 @@ class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_Abst
         * @return void
         */
        public function viewSingleRecord($table, $uid) {
-               return tx_Workspaces_Service_Workspaces::viewSingleRecord($table, $uid);
+               return Tx_Workspaces_Service_Workspaces::viewSingleRecord($table, $uid);
        }
 
        /**
@@ -278,8 +278,8 @@ class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_Abst
         */
        public function discardStagesFromPage($pageId) {
                $cmdMapArray      = array();
-                       /** @var $workspaceService tx_Workspaces_Service_Workspaces */
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+                       /** @var $workspaceService Tx_Workspaces_Service_Workspaces */
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                        /** @var $stageService Tx_Workspaces_Service_Stages */
                $stageService     = t3lib_div::makeInstance('Tx_Workspaces_Service_Stages');
                $workspaceItemsArray = $workspaceService->selectVersionsInWorkspace($stageService->getWorkspaceId(), $filter = 1, $stage = -99, $pageId, $recursionLevel = 0, $selectionType = 'tables_modify');
@@ -657,7 +657,7 @@ class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_Abst
         * @author Michael Klapper <development@morphodo.com>
         */
        public function sendPageToPreviousStage($id) {
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $workspaceItemsArray = $workspaceService->selectVersionsInWorkspace($this->stageService->getWorkspaceId(), $filter = 1, $stage = -99, $id, $recursionLevel = 0, $selectionType = 'tables_modify');
                list($currentStage, $previousStage) = $this->getStageService()->getPreviousStageForElementCollection($workspaceItemsArray);
 
@@ -681,7 +681,7 @@ class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_Abst
         * @author Michael Klapper <development@morphodo.com>
         */
        public function sendPageToNextStage($id) {
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $workspaceItemsArray = $workspaceService->selectVersionsInWorkspace($this->stageService->getWorkspaceId(), $filter = 1, $stage = -99, $id, $recursionLevel = 0, $selectionType = 'tables_modify');
                list($currentStage, $nextStage) = $this->getStageService()->getNextStageForElementCollection($workspaceItemsArray);
                        // get only the relevant items for processing
@@ -706,7 +706,7 @@ class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_Abst
        public function updateStageChangeButtons($id) {
 
                $stageService = t3lib_div::makeInstance('Tx_Workspaces_Service_Stages');
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
 
                        // fetch the next and previous stage
                $workspaceItemsArray   = $workspaceService->selectVersionsInWorkspace($stageService->getWorkspaceId(), $filter = 1, $stage = -99, $id, $recursionLevel = 0, $selectionType = 'tables_modify');
index 186500b..5d2665f 100644 (file)
@@ -34,7 +34,7 @@
  * @package Workspaces
  * @subpackage ExtDirect
  */
-class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_AbstractHandler {
+class Tx_Workspaces_ExtDirect_MassActionHandler extends Tx_Workspaces_ExtDirect_AbstractHandler {
        const MAX_RECORDS_TO_PROCESS = 30;
 
        /**
@@ -54,7 +54,7 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
                $currentWorkspace = $this->getCurrentWorkspace();
 
                        // in case we're working within "All Workspaces" we can't provide Mass Actions
-               if ($currentWorkspace != tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
+               if ($currentWorkspace != Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
                        $publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($currentWorkspace);
                        if ($publishAccess && !($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1)) {
                                $actions[] = array('action' => 'publish', 'title' => $GLOBALS['LANG']->sL($this->pathToLocallang . ':label_doaction_publish')
@@ -65,7 +65,7 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
                                }
                        }
 
-                       if ($currentWorkspace !== tx_Workspaces_Service_Workspaces::LIVE_WORKSPACE_ID) {
+                       if ($currentWorkspace !== Tx_Workspaces_Service_Workspaces::LIVE_WORKSPACE_ID) {
                                $actions[] = array('action' => 'discard', 'title' => $GLOBALS['LANG']->sL($this->pathToLocallang . ':label_doaction_discard')
                                );
                        }
@@ -142,7 +142,7 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
         * @return integer
         */
        protected function initPublishData($workspace, $swap) {
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                        // workspace might be -98 a.k.a "All Workspaces but that's save here
                $publishData = $workspaceService->getCmdArrayForPublishWS($workspace, $swap);
                $recordCount = 0;
@@ -164,7 +164,7 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
         * @return integer
         */
        protected function initFlushData($workspace) {
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                        // workspace might be -98 a.k.a "All Workspaces but that's save here
                $flushData = $workspaceService->getCmdArrayForFlushWS($workspace);
                $recordCount = 0;
diff --git a/typo3/sysext/workspaces/Classes/ExtDirect/PagetreeCollectionsProcessor.php b/typo3/sysext/workspaces/Classes/ExtDirect/PagetreeCollectionsProcessor.php
new file mode 100644 (file)
index 0000000..c8e62b6
--- /dev/null
@@ -0,0 +1,94 @@
+<?php
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2011 Tolleiv Nietsch <typo3@tolleiv.de>
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
+/**
+ * Interface for classes which perform pre or post processing
+ *
+ * @author Tolleiv Nietsch <typo3@tolleiv.de>
+ * @package    TYPO3
+ * @subpackage t3lib
+ */
+class Tx_Workspaces_ExtDirect_PagetreeCollectionsProcessor implements t3lib_tree_pagetree_interfaces_CollectionProcessor {
+
+       /**
+        * @abstract
+        * @param  t3lib_tree_pagetree_Node $node
+        * @param  int $mountPoint
+        * @param  int $level
+        * @param  t3lib_tree_pagetree_NodeCollection $nodeCollection
+        * @return void
+        */
+       public function postProcessGetNodes($node, $mountPoint, $level, $nodeCollection) {
+               foreach($nodeCollection as $node) {
+                       /** @var $node t3lib_tree_Node */
+                       $this->highlightVersionizedElements($node);
+               }
+       }
+
+       /**
+        * @abstract
+        * @param  t3lib_tree_pagetree_Node $node
+        * @param  string $searchFilter
+        * @param  int $mountPoint
+        * @param  t3lib_tree_pagetree_NodeCollection $nodeCollection
+        * @return void
+        */
+       public function postProcessFilteredNodes($node, $searchFilter, $mountPoint, $nodeCollection) {
+               foreach($nodeCollection as $node) {
+                       /** @var $node t3lib_tree_Node */
+                       $this->highlightVersionizedElements($node);
+               }
+       }
+
+       /**
+        * @abstract
+        * @param  string $searchFilter
+        * @param  t3lib_tree_pagetree_NodeCollection $nodeCollection
+        * @return void
+        */
+       public function postProcessGetTreeMounts($searchFilter, $nodeCollection) {
+               foreach($nodeCollection as $node) {
+                       /** @var $node t3lib_tree_Node */
+                       $this->highlightVersionizedElements($node);
+               }
+       }
+
+       /**
+        * Sets the CSS Class on all pages which have versioned records
+        * in the current workspace
+        *
+        * @param t3lib_tree_Node $node
+        * @return void
+        */
+       protected function highlightVersionizedElements(t3lib_tree_Node $node) {
+               if (!$node->getCls() && count(t3lib_BEfunc::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $node->getId(), TRUE)))        {
+                       $node->setCls('ver-versions');
+               }
+       }
+}
+
+?>
\ No newline at end of file
index 83e5896..facd2bf 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage ExtDirect
  */
-class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHandler {
+class Tx_Workspaces_ExtDirect_Server extends Tx_Workspaces_ExtDirect_AbstractHandler {
        /**
         * Get List of workspace changes
         *
@@ -41,10 +41,10 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
                        // To avoid too much work we use -1 to indicate that every page is relevant
                $pageId = $parameter->id > 0 ? $parameter->id : -1;
 
-               $wslibObj = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $wslibObj = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
                $versions = $wslibObj->selectVersionsInWorkspace($this->getCurrentWorkspace(), 0, -99, $pageId, $parameter->depth);
 
-               $workspacesService = t3lib_div::makeInstance('tx_Workspaces_Service_GridData');
+               $workspacesService = t3lib_div::makeInstance('Tx_Workspaces_Service_GridData');
                $data = $workspacesService->generateGridListFromVersions($versions, $parameter, $this->getCurrentWorkspace());
                return $data;
        }
@@ -58,7 +58,7 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
        public function getStageActions($parameter) {
                $currentWorkspace = $this->getCurrentWorkspace();
                $stages = array();
-               if ($currentWorkspace != tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
+               if ($currentWorkspace != Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES) {
                        $stagesService = t3lib_div::makeInstance('Tx_Workspaces_Service_Stages');
                        $stages = $stagesService->getStagesForWSUser();
                }
index cad55e0..54ab4b2 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage ExtDirect
  */
-class tx_Workspaces_ExtDirect_ToolbarMenu {
+class Tx_Workspaces_ExtDirect_ToolbarMenu {
 
        /**
         * @param $parameter
@@ -52,7 +52,7 @@ class tx_Workspaces_ExtDirect_ToolbarMenu {
 
                $GLOBALS['BE_USER']->setWorkspace($workspaceId);
                return array(
-                       'title' => tx_Workspaces_Service_Workspaces::getWorkspaceTitle($workspaceId),
+                       'title' => Tx_Workspaces_Service_Workspaces::getWorkspaceTitle($workspaceId),
                        'id' => $workspaceId
                );
        }
diff --git a/typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php b/typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php
new file mode 100644 (file)
index 0000000..a6fd52d
--- /dev/null
@@ -0,0 +1,171 @@
+<?php
+/***************************************************************
+*  Copyright notice
+*
+*  (c) 2007-2011 Ingo Renner <ingo@typo3.org>
+*  (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
+*  free software; you can redistribute it and/or modify
+*  it under the terms of the GNU General Public License as published by
+*  the Free Software Foundation; either version 2 of the License, or
+*  (at your option) any later version.
+*
+*  The GNU General Public License can be found at
+*  http://www.gnu.org/copyleft/gpl.html.
+*  A copy is found in the textfile GPL.txt and important notices to the license
+*  from the author is found in LICENSE.txt distributed with these scripts.
+*
+*
+*  This script is distributed in the hope that it will be useful,
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*  GNU General Public License for more details.
+*
+*  This copyright notice MUST APPEAR in all copies of the script!
+***************************************************************/
+
+if(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) {
+       require_once(PATH_typo3 . 'interfaces/interface.backend_toolbaritem.php');
+}
+
+/**
+ * class to render the workspace selector
+ *
+ * @author     Ingo Renner <ingo@typo3.org>
+ * @package Workspaces
+ * @subpackage ExtDirect
+ */
+class Tx_Workspaces_ExtDirect_WorkspaceSelectorToolbarItem implements backend_toolbarItem {
+
+       protected $changeWorkspace;
+       protected $changeWorkspacePreview;
+
+       /**
+        * reference back to the backend object
+        *
+        * @var TYPO3backend
+        */
+       protected $backendReference;
+
+       protected $checkAccess = NULL;
+
+       /**
+        * constructor
+        *
+        * @param       TYPO3backend    TYPO3 backend object reference
+        */
+       public function __construct(TYPO3backend &$backendReference = NULL) {
+               $this->backendReference       = $backendReference;
+               $this->changeWorkspace        = t3lib_div::_GP('changeWorkspace');
+               $this->changeWorkspacePreview = t3lib_div::_GP('changeWorkspacePreview');
+
+               $pageRenderer = t3lib_div::makeInstance('t3lib_pageRenderer');
+               $this->backendReference->addJavaScript("TYPO3.Workspaces = { workspaceTitle : '" . htmlspecialchars(Tx_Workspaces_Service_Workspaces::getWorkspaceTitle($GLOBALS['BE_USER']->workspace)) . "'};\n");
+       }
+
+       /**
+        * checks whether the user has access to this toolbar item
+        *
+        * @see         typo3/alt_shortcut.php
+        * @return  boolean  TRUE if user has access, FALSE if not
+        */
+       public function checkAccess() {
+               if (t3lib_extMgm::isLoaded('workspaces')) {
+                       if ($this->checkAccess == NULL) {
+                                       $availableWorkspaces = Tx_Workspaces_Service_Workspaces::getAvailableWorkspaces();
+                                       if (count($availableWorkspaces) > 0) {
+                                               $this->checkAccess = TRUE;
+                                       } else {
+                                               $this->checkAccess = FALSE;
+                                       }
+                       }
+                       return $this->checkAccess;
+               }
+               return FALSE;
+       }
+
+       /**
+        * Creates the selector for workspaces
+        *
+        * @return      string          workspace selector as HTML select
+        */
+       public function render() {
+               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:toolbarItems.workspace', TRUE);
+               $this->addJavascriptToBackend();
+               $availableWorkspaces = Tx_Workspaces_Service_Workspaces::getAvailableWorkspaces();
+               $workspaceMenu       = array();
+
+               $stateCheckedIcon = t3lib_iconWorks::getSpriteIcon('status-status-checked');
+
+               $stateUncheckedIcon = t3lib_iconWorks::getSpriteIcon('empty-empty', array(
+                       'title' => $GLOBALS['LANG']->getLL('bookmark_inactive')
+               ));
+
+               $workspaceMenu[] = '<a href="#" class="toolbar-item">' .
+                       t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-workspace', array('title' => $title)) .
+                               '</a>';
+               $workspaceMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
+
+               if (count($availableWorkspaces)) {
+                       foreach($availableWorkspaces as $workspaceId => $label) {
+                               $selected = '';
+                               $icon = $stateUncheckedIcon;
+                               if((int) $GLOBALS['BE_USER']->workspace === $workspaceId) {
+                                       $selected = ' class="selected"';
+                                       $icon = $stateCheckedIcon;
+                               }
+
+                               $workspaceMenu[] = '<li' . $selected . '>' . $icon .
+                                       ' <a href="backend.php?changeWorkspace=' .
+                                       intval($workspaceId) . '" id="ws-' . intval($workspaceId) .
+                                       '" class="ws">' . $label . '</a></li>';
+                       }
+               } else {
+                       $workspaceMenu[] = '<li>' . $stateUncheckedIcon . ' ' .
+                               $GLOBALS['LANG']->getLL('bookmark_noWSfound', TRUE) .
+                               '</li>';
+               }
+
+               if ($GLOBALS['BE_USER']->check('modules', 'web_WorkspacesWorkspaces')) {
+                               // go to workspace module link
+                       $workspaceMenu[] = '<li class="divider">' . $stateUncheckedIcon . ' ' .
+                               '<a href="javascript:top.goToModule(\'web_WorkspacesWorkspaces\');" target="content" id="goToWsModule">' .
+                               ' '. $GLOBALS['LANG']->getLL('bookmark_workspace', TRUE) . '</a></li>';
+               }
+
+               $workspaceMenu[] = '</ul>';
+
+               return implode(LF, $workspaceMenu);
+       }
+
+       /**
+        * adds the necessary JavaScript to the backend
+        *
+        * @return      void
+        */
+       protected function addJavascriptToBackend() {
+               $this->backendReference->addJavascriptFile(t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/JavaScript/workspacemenu.js');
+       }
+
+       /**
+        * returns additional attributes for the list item in the toolbar
+        *
+        * @return      string          list item HTML attibutes
+        */
+       public function getAdditionalAttributes() {
+               return ' id="workspace-selector-menu"';
+       }
+}
+
+
+if(!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
+       $GLOBALS['TYPO3backend']->addToolbarItem('workSpaceSelector', 'Tx_Workspaces_ExtDirect_WorkspaceSelectorToolbarItem');
+}
+
+
+if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/Tx_Workspaces_ExtDirect_WorkspaceSelectorToolbarItem.php'])) {
+       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/Tx_Workspaces_ExtDirect_WorkspaceSelectorToolbarItem.php']);
+}
+?>
\ No newline at end of file
index 32af77f..9c5c91f 100644 (file)
@@ -29,7 +29,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_AutoPublish {
+class Tx_Workspaces_Service_AutoPublish {
        /**
         * This method is called by the Scheduler task that triggers
         * the autopublication process
@@ -57,7 +57,7 @@ class tx_Workspaces_Service_AutoPublish {
                                t3lib_BEfunc::deleteClause('sys_workspace')
                        );
 
-               $workspaceService = t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               $workspaceService = t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
 
                foreach ($workspaces as $rec) {
 
index 0472814..afa15fe 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_AutoPublishTask extends tx_scheduler_Task {
+class Tx_Workspaces_Service_AutoPublishTask extends tx_scheduler_Task {
 
        /**
         * Method executed from the Scheduler.
@@ -40,7 +40,7 @@ class tx_Workspaces_Service_AutoPublishTask extends tx_scheduler_Task {
         * @return      void
         */
        public function execute() {
-               $autopubObj = t3lib_div::makeInstance('tx_Workspaces_Service_AutoPublish');
+               $autopubObj = t3lib_div::makeInstance('Tx_Workspaces_Service_AutoPublish');
                        // Publish the workspaces that need to be
                $autopubObj->autoPublishWorkspaces();
                        // There's no feedback from the publishing process,
index aaa87a8..b001234 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_Befunc {
+class Tx_Workspaces_Service_Befunc {
 
        /**
         * Hooks into the t3lib_beFunc::viewOnClick and redirects to the workspace preview
@@ -58,20 +58,20 @@ class tx_Workspaces_Service_Befunc {
         * @throws InvalidArgumentException
         * @param integer $uid
         * @return integer
-        * @deprecated since TYPO3 4.6 - use tx_Workspaces_Service_Workspaces::getLivePageUid() instead
+        * @deprecated since TYPO3 4.6 - use Tx_Workspaces_Service_Workspaces::getLivePageUid() instead
         */
        protected function getLivePageUid($uid) {
-               t3lib_div::deprecationLog(__METHOD__ . ' is deprected since TYPO3 4.6 - use tx_Workspaces_Service_Workspaces::getLivePageUid() instead');
+               t3lib_div::deprecationLog(__METHOD__ . ' is deprected since TYPO3 4.6 - use Tx_Workspaces_Service_Workspaces::getLivePageUid() instead');
                return $this->getWorkspaceService()->getLivePageUid($uid);
        }
 
        /**
         * Gets an instance of the workspaces service.
         *
-        * @return tx_Workspaces_Service_Workspaces
+        * @return Tx_Workspaces_Service_Workspaces
         */
        protected function getWorkspaceService() {
-               return t3lib_div::makeInstance('tx_Workspaces_Service_Workspaces');
+               return t3lib_div::makeInstance('Tx_Workspaces_Service_Workspaces');
        }
 
        /**
index 59dbcd8..addb852 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_Fehooks {
+class Tx_Workspaces_Service_Fehooks {
 
        /**
         * @param tslib_fe $pObj
index cb4dd9b..e880188 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_GridData {
+class Tx_Workspaces_Service_GridData {
        protected $currentWorkspace = NULL;
        protected $dataArray = array();
        protected $sort = '';
@@ -112,7 +112,7 @@ class tx_Workspaces_Service_GridData {
                                                $recordState = $this->workspaceState($versionRecord['t3ver_state']);
                                        }
                                        $isDeletedPage = ($table == 'pages' && $recordState == 'deleted');
-                                       $viewUrl =  tx_Workspaces_Service_Workspaces::viewSingleRecord($table, $record['t3ver_oid'], $origRecord);
+                                       $viewUrl =  Tx_Workspaces_Service_Workspaces::viewSingleRecord($table, $record['t3ver_oid'], $origRecord);
 
                                        $pctChange = $this->calculateChangePercentage($table, $origRecord, $versionRecord);
                                        $versionArray['uid'] = $record['uid'];
@@ -123,7 +123,7 @@ class tx_Workspaces_Service_GridData {
                                        $versionArray['change'] = $pctChange;
                                        $versionArray['path_Live'] = htmlspecialchars(t3lib_BEfunc::getRecordPath($record['livepid'], '', 999));
                                        $versionArray['path_Workspace'] = htmlspecialchars(t3lib_BEfunc::getRecordPath($record['wspid'], '', 999));
-                                       $versionArray['workspace_Title'] = htmlspecialchars(tx_Workspaces_Service_Workspaces::getWorkspaceTitle($versionRecord['t3ver_wsid']));
+                                       $versionArray['workspace_Title'] = htmlspecialchars(Tx_Workspaces_Service_Workspaces::getWorkspaceTitle($versionRecord['t3ver_wsid']));
 
                                        $versionArray['workspace_Tstamp'] = $versionRecord['tstamp'];
                                        $versionArray['workspace_Formated_Tstamp'] = t3lib_BEfunc::datetime($versionRecord['tstamp']);
@@ -278,7 +278,7 @@ class tx_Workspaces_Service_GridData {
                                        break;
                        }
                } else {
-                       t3lib_div::sysLog('Try to sort "' . $this->sort . '" in "tx_Workspaces_Service_GridData::sortDataArray" but $this->dataArray is empty! This might be the Bug #26422 which could not reproduced yet.', 3);
+                       t3lib_div::sysLog('Try to sort "' . $this->sort . '" in "Tx_Workspaces_Service_GridData::sortDataArray" but $this->dataArray is empty! This might be the Bug #26422 which could not reproduced yet.', 3);
                }
        }
 
index cc32175..460f6b8 100644 (file)
@@ -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);
                        }
                }
@@ -151,7 +151,7 @@ class tx_Workspaces_Service_Tcemain {
        protected function flushWorkspaceCacheEntriesByWorkspaceId($workspaceId) {
                $workspacesCache = $GLOBALS['typo3CacheManager']->getCache('workspaces_cache');
                $workspacesCache->flushByTag($workspaceId);
-               $workspacesCache->flushByTag(tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
+               $workspacesCache->flushByTag(Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES);
        }
 }
 
index 51ec1d6..4c05e7e 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_Workspaces implements t3lib_Singleton {
+class Tx_Workspaces_Service_Workspaces implements t3lib_Singleton {
        /**
         * @var array
         */
index 193c4ac..586657b 100644 (file)
@@ -30,7 +30,7 @@
  * @package Workspaces
  * @subpackage Service
  */
-class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase {
+class Tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase {
 
        /**
         * @test
@@ -38,7 +38,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
        public function emptyWorkspaceReturnsEmptyArray() {
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
 
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
                $result = $service->selectVersionsInWorkspace(90);
                $this->assertTrue(empty($result), "The workspace 90 contains no changes and the result was supposed to be empty");
                $this->assertTrue(is_array($result), "Even the empty result from workspace 90 is supposed to be an array");
@@ -51,7 +51,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
 
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 2);
                $this->assertTrue(is_array($result), "The result from workspace 91 is supposed to be an array");
                $this->assertEquals(1, sizeof($result['pages']), "The result is supposed to contain one version for this page in workspace 91");
@@ -66,8 +66,8 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
 
-               $service = new tx_Workspaces_Service_Workspaces();
-               $result = $service->selectVersionsInWorkspace(tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES, 0, -99, 2);
+               $service = new Tx_Workspaces_Service_Workspaces();
+               $result = $service->selectVersionsInWorkspace(Tx_Workspaces_Service_Workspaces::SELECT_ALL_WORKSPACES, 0, -99, 2);
                $this->assertTrue(is_array($result), "The result from workspace 91 is supposed to be an array");
                $this->assertEquals(2, sizeof($result['pages']), "The result is supposed to contain one version for this page in workspace 91");
        }
@@ -79,7 +79,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
 
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 1, 99);
                $this->assertTrue(is_array($result), "The result from workspace 91 is supposed to be an array");
                $this->assertEquals(4, sizeof($result['pages']), "The result is supposed to contain four versions for this page in workspace 91");
@@ -92,7 +92,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
 
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
 
                        // testing stage 1
                $result = $service->selectVersionsInWorkspace(91, 0, 1, 1, 99);
@@ -116,7 +116,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
 
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
 
                        // testing all "draft" records
                $result = $service->selectVersionsInWorkspace(91, 1, -99, 1, 99);
@@ -143,7 +143,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbMovedContent.xml');
 
                        // Test if the placeholder can be found when we ask using recursion (same result)
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 2, 99);
 
                $this->assertEquals(0, sizeof($result['pages']), "Changes should not show up in this branch of the tree within workspace 91");
@@ -158,7 +158,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbMovedContent.xml');
 
                        // Test if the placeholder can be found when we ask using recursion (same result)
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 5, 99);
                $this->assertEquals(1, sizeof($result['pages']), "Wrong amount of page versions found within workspace 91");
                $this->assertEquals(103, $result['pages'][0]['uid'], "Wrong move-to pointer found for page 3 in workspace 91");
@@ -178,7 +178,7 @@ class tx_Workspaces_Service_WorkspacesTest extends tx_phpunit_database_testcase
                $this->importDataSet(dirname(__FILE__) . '/fixtures/dbMovedContent.xml');
 
                        // Test if the placeholder can be found when we ask using recursion (same result)
-               $service = new tx_Workspaces_Service_Workspaces();
+               $service = new Tx_Workspaces_Service_Workspaces();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 3, 99);
 
                $this->assertEquals(1, sizeof($result), "Wrong amount of versions found within workspace 91");
index 20f13eb..c228af9 100644 (file)
@@ -4,22 +4,22 @@ if (!defined ('TYPO3_MODE')) {
        die ('Access denied.');
 }
 if(TYPO3_MODE == 'BE') {
-       $workspaceSelectorToolbarItemClassPath = t3lib_extMgm::extPath('workspaces', 'Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php');
+       $workspaceSelectorToolbarItemClassPath = t3lib_extMgm::extPath('workspaces', 'Classes/ExtDirect/WorkspaceSelectorToolbarItem.php');
 
        $GLOBALS['TYPO3_CONF_VARS']['typo3/backend.php']['additionalBackendItems'][] = $workspaceSelectorToolbarItemClassPath;
 
 }
        // Register the autopublishing task
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['tx_Workspaces_Service_AutoPublishTask'] = array(
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['Tx_Workspaces_Service_AutoPublishTask'] = array(
        'extension'        => $_EXTKEY,
        'title'            => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml:autopublishTask.name',
        'description'      => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml:autopublishTask.description'
 );
 
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['workspaces'] = 'EXT:workspaces/Classes/Service/Tcemain.php:tx_Workspaces_Service_Tcemain';
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass']['workspaces'] = 'EXT:workspaces/Classes/Service/Befunc.php:tx_Workspaces_Service_Befunc';
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']['workspaces'] = 'EXT:workspaces/Classes/Service/Fehooks.php:tx_Workspaces_Service_Fehooks->hook_eofe';
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']['workspaces'] = 'EXT:workspaces/Classes/Service/Befunc.php:tx_Workspaces_Service_Befunc->makeEditForm_accessCheck';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass']['workspaces'] = 'EXT:workspaces/Classes/Service/Tcemain.php:Tx_Workspaces_Service_Tcemain';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['viewOnClickClass']['workspaces'] = 'EXT:workspaces/Classes/Service/Befunc.php:Tx_Workspaces_Service_Befunc';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']['workspaces'] = 'EXT:workspaces/Classes/Service/Fehooks.php:Tx_Workspaces_Service_Fehooks->hook_eofe';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']['workspaces'] = 'EXT:workspaces/Classes/Service/Befunc.php:Tx_Workspaces_Service_Befunc->makeEditForm_accessCheck';
 
        // Register workspaces cache if not already done in localconf.php or a previously loaded extension.
        // We do not set frontend and backend: The cache manager uses t3lib_cache_frontend_VariableFrontend
@@ -31,7 +31,7 @@ if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations
 
 t3lib_extMgm::addUserTSConfig('options.workspaces.considerReferences = 1');
 
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'][] = 'EXT:workspaces/Classes/BackendUserInterface/class.tx_workspaces_pagetree_collectionsprocessor.php:tx_workspaces_pagetree_collectionsprocessor';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'][] = 'EXT:workspaces/Classes/ExtDirect/PagetreeCollectionsProcessor.php:Tx_Workspaces_ExtDirect_PagetreeCollectionsProcessor';
 t3lib_extMgm::addUserTSConfig('options.workspaces.considerReferences = 1');
 
 
index eaaebdd..e26a443 100644 (file)
@@ -26,31 +26,31 @@ if (TYPO3_MODE == 'BE' && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_INSTALL)) {
        );
 
                // register ExtDirect
-       t3lib_extMgm::registerExtDirectComponent(
-               'TYPO3.Workspaces.ExtDirect',
-               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/Server.php:tx_Workspaces_ExtDirect_Server',
-               'web_WorkspacesWorkspaces',
-               'user,group'
-       );
+       t3lib_extMgm::registerExtDirectComponent(
+               'TYPO3.Workspaces.ExtDirect',
+               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/Server.php:Tx_Workspaces_ExtDirect_Server',
+               'web_WorkspacesWorkspaces',
+               'user,group'
+       );
 
-       t3lib_extMgm::registerExtDirectComponent(
-               'TYPO3.Workspaces.ExtDirectActions',
-               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ActionHandler.php:tx_Workspaces_ExtDirect_ActionHandler',
-               'web_WorkspacesWorkspaces',
-               'user,group'
-       );
+       t3lib_extMgm::registerExtDirectComponent(
+               'TYPO3.Workspaces.ExtDirectActions',
+                t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ActionHandler.php:Tx_Workspaces_ExtDirect_ActionHandler',
+               'web_WorkspacesWorkspaces',
+               'user,group'
+       );
 
-       t3lib_extMgm::registerExtDirectComponent(
-               'TYPO3.Workspaces.ExtDirectMassActions',
-               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/MassActionHandler.php:tx_Workspaces_ExtDirect_MassActionHandler',
-               'web_WorkspacesWorkspaces',
-               'user,group'
-       );
+       t3lib_extMgm::registerExtDirectComponent(
+               'TYPO3.Workspaces.ExtDirectMassActions',
+               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/MassActionHandler.php:Tx_Workspaces_ExtDirect_MassActionHandler',
+               'web_WorkspacesWorkspaces',
+               'user,group'
+       );
 
-       t3lib_extMgm::registerExtDirectComponent(
-               'TYPO3.Ajax.ExtDirect.ToolbarMenu',
-               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ToolbarMenu.php:tx_Workspaces_ExtDirect_ToolbarMenu'
-       );
+       t3lib_extMgm::registerExtDirectComponent(
+               'TYPO3.Ajax.ExtDirect.ToolbarMenu',
+               t3lib_extMgm::extPath($_EXTKEY) . 'Classes/ExtDirect/ToolbarMenu.php:Tx_Workspaces_ExtDirect_ToolbarMenu'
+       );
 
                // register the reports statusprovider
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['configuration'][] = 'Tx_Workspaces_Reports_StatusProvider';