[TASK] Reapply direct changes of TYPO3 Core
authorOliver Hader <oliver@typo3.org>
Tue, 10 May 2011 10:53:49 +0000 (12:53 +0200)
committerOliver Hader <oliver@typo3.org>
Tue, 10 May 2011 10:55:58 +0000 (12:55 +0200)
Commits 59900b6682cc043d7541b3e26380cb3dd843d14b..50cbf2640caad79144d3d9c2d511030a78c7cc9c

Change-Id: I2171bcb0997d69f99d52c899b3dda91da90ebfeb
Resolves: #26728

13 files changed:
typo3/sysext/workspaces/Classes/BackendUserInterface/WorkspaceSelectorToolbarItem.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Controller/ReviewController.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/MassActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/Server.php
typo3/sysext/workspaces/Classes/ExtDirect/ToolbarMenu.php
typo3/sysext/workspaces/Classes/Reports/StatusProvider.php
typo3/sysext/workspaces/Classes/Service/Fehooks.php
typo3/sysext/workspaces/Classes/Service/GridData.php
typo3/sysext/workspaces/Classes/Service/Stages.php
typo3/sysext/workspaces/Classes/Service/Workspaces.php
typo3/sysext/workspaces/ext_tables.php

index d58b40c..25fb3e9 100644 (file)
@@ -56,7 +56,7 @@ class WorkspaceSelectorToolbarItem implements backend_toolbarItem {
         *
         * @param       TYPO3backend    TYPO3 backend object reference
         */
-       public function __construct(TYPO3backend &$backendReference = null) {
+       public function __construct(TYPO3backend &$backendReference = NULL) {
                $this->backendReference       = $backendReference;
                $this->changeWorkspace        = t3lib_div::_GP('changeWorkspace');
                $this->changeWorkspacePreview = t3lib_div::_GP('changeWorkspacePreview');
@@ -69,7 +69,7 @@ class WorkspaceSelectorToolbarItem implements backend_toolbarItem {
         * 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
+        * @return  boolean  TRUE if user has access, FALSE if not
         */
        public function checkAccess() {
                if (t3lib_extMgm::isLoaded('workspaces')) {
@@ -92,7 +92,7 @@ class WorkspaceSelectorToolbarItem implements backend_toolbarItem {
         * @return      string          workspace selector as HTML select
         */
        public function render() {
-               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:toolbarItems.workspace', true);
+               $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:toolbarItems.workspace', TRUE);
                $this->addJavascriptToBackend();
                $availableWorkspaces = tx_Workspaces_Service_Workspaces::getAvailableWorkspaces();
                $workspaceMenu       = array();
@@ -124,7 +124,7 @@ class WorkspaceSelectorToolbarItem implements backend_toolbarItem {
                        }
                } else {
                        $workspaceMenu[] = '<li>' . $stateUncheckedIcon . ' ' .
-                               $GLOBALS['LANG']->getLL('bookmark_noWSfound', true) .
+                               $GLOBALS['LANG']->getLL('bookmark_noWSfound', TRUE) .
                                '</li>';
                }
 
@@ -132,7 +132,7 @@ class WorkspaceSelectorToolbarItem implements backend_toolbarItem {
                                // 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>';
+                               ' '. $GLOBALS['LANG']->getLL('bookmark_workspace', TRUE) . '</a></li>';
                }
 
                $workspaceMenu[] = '</ul>';
@@ -168,4 +168,4 @@ if(!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
 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
index c304ca3..2acd211 100644 (file)
@@ -107,15 +107,15 @@ class Tx_Workspaces_Controller_PreviewController extends Tx_Workspaces_Controlle
                $this->view->assign('backendDomain', t3lib_div::getIndpEnv('TYPO3_HOST_ONLY'));
                $GLOBALS['BE_USER']->setAndSaveSessionData('workspaces.backend_domain', t3lib_div::getIndpEnv('TYPO3_HOST_ONLY'));
                $this->pageRenderer->addJsInlineCode("workspaces.preview.lll" , "TYPO3.LLL.Workspaces = {
-                       visualPreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.visualPreview', true) . "',
-                       listView: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.listView', true) . "',
-                       livePreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.livePreview', true) . "',
-                       livePreviewDetail: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.livePreviewDetail', true) . "',
-                       workspacePreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.workspacePreview', true) . "',
-                       workspacePreviewDetail: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.workspacePreviewDetail', true) . "',
-                       modeSlider: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeSlider', true) . "',
-                       modeVbox: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeVbox', true) . "',
-                       modeHbox: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeHbox', true) . "'
+                       visualPreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.visualPreview', TRUE) . "',
+                       listView: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.listView', TRUE) . "',
+                       livePreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.livePreview', TRUE) . "',
+                       livePreviewDetail: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.livePreviewDetail', TRUE) . "',
+                       workspacePreview: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.workspacePreview', TRUE) . "',
+                       workspacePreviewDetail: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.workspacePreviewDetail', TRUE) . "',
+                       modeSlider: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeSlider', TRUE) . "',
+                       modeVbox: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeVbox', TRUE) . "',
+                       modeHbox: '" . $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:preview.modeHbox', TRUE) . "'
                };\n");
        }
 
index 1e2646c..f0b7a7a 100644 (file)
@@ -45,7 +45,7 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
                $performWorkspaceSwitch = FALSE;
 
                if (!$GLOBALS['BE_USER']->isAdmin()) {
-                       $wsCur = array($activeWorkspace => true);
+                       $wsCur = array($activeWorkspace => TRUE);
                        $wsList = array_intersect_key($wsList, $wsCur);
                } else {
                        $wsList = $wsService->getAvailableWorkspaces();
@@ -81,8 +81,8 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
                } else {
                        $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('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);
@@ -105,12 +105,12 @@ class Tx_Workspaces_Controller_ReviewController extends Tx_Workspaces_Controller
                $wsList = $wsService->getAvailableWorkspaces();
                $activeWorkspace = $GLOBALS['BE_USER']->workspace;
 
-               $wsCur = array($activeWorkspace => true);
+               $wsCur = array($activeWorkspace => TRUE);
                $wsList = array_intersect_key($wsList, $wsCur);
 
                $this->view->assign('pageUid', t3lib_div::_GP('id'));
-               $this->view->assign('showGrid', true);
-               $this->view->assign('showAllWorkspaceTab', false);
+               $this->view->assign('showGrid', TRUE);
+               $this->view->assign('showAllWorkspaceTab', FALSE);
                $this->view->assign('workspaceList', $wsList);
                $this->view->assign('backendDomain', t3lib_div::getIndpEnv('TYPO3_HOST_ONLY'));
                $this->pageRenderer->addInlineSetting('Workspaces', 'singleView', '1');
index e348d0c..4a730db 100644 (file)
@@ -425,7 +425,7 @@ class tx_Workspaces_ExtDirect_ActionHandler extends tx_Workspaces_ExtDirect_Abst
                                        'itemCls' => 'x-check-group-alt',
                                        'columns' => 1,
                                        'style' => 'max-height: 200px',
-                                       'autoScroll' => true,
+                                       'autoScroll' => TRUE,
                                        'items' => array(
                                                $this->getReceipientsOfStage($nextStageId)
                                        )
index f78a977..186500b 100644 (file)
@@ -86,10 +86,10 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
         */
        public function publishWorkspace(stdclass $parameters) {
                $result = array(
-                       'init' => false,
+                       'init' => FALSE,
                        'total' => 0,
                        'processed' => 0,
-                       'error' => false
+                       'error' => FALSE
                );
 
                try {
@@ -114,10 +114,10 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
         */
        public function flushWorkspace(stdclass $parameters) {
                $result = array(
-                       'init' => false,
+                       'init' => FALSE,
                        'total' => 0,
                        'processed' => 0,
-                       'error' => false
+                       'error' => FALSE
                );
 
                try {
@@ -206,7 +206,7 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
 
                if ($numRecs == 0) {
                                // All done
-                       $GLOBALS['BE_USER']->setAndSaveSessionData('workspaceMassAction', null);
+                       $GLOBALS['BE_USER']->setAndSaveSessionData('workspaceMassAction', NULL);
                        $GLOBALS['BE_USER']->setAndSaveSessionData('workspaceMassAction_total', 0);
                } else {
                                // Execute the commands:
@@ -239,4 +239,4 @@ class tx_Workspaces_ExtDirect_MassActionHandler extends tx_Workspaces_ExtDirect_
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/MassActionHandler.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/MassActionHandler.php']);
 }
-?>
+?>
\ No newline at end of file
index 75c5956..a08792b 100644 (file)
@@ -204,4 +204,4 @@ class tx_Workspaces_ExtDirect_Server extends tx_Workspaces_ExtDirect_AbstractHan
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/Server.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/Server.php']);
 }
-?>
+?>
\ No newline at end of file
index 5d3d721..cad55e0 100644 (file)
@@ -61,4 +61,5 @@ class tx_Workspaces_ExtDirect_ToolbarMenu {
 
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/ToolbarMenu.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/ExtDirect/ToolbarMenu.php']);
-}
\ No newline at end of file
+}
+?>
\ No newline at end of file
index 4784f23..b226922 100644 (file)
@@ -85,4 +85,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Reports/StatusProvider.php']);
 }
 
-?>
+?>
\ No newline at end of file
index 7bc3496..59dbcd8 100644 (file)
@@ -55,3 +55,4 @@ class tx_Workspaces_Service_Fehooks {
 
        }
 }
+?>
\ No newline at end of file
index 6226326..0d18f81 100644 (file)
@@ -137,7 +137,7 @@ class tx_Workspaces_Service_GridData {
 
                                        if ($swapAccess && $swapStage != 0 && $versionRecord['t3ver_stage'] == $swapStage) {
                                                $versionArray['allowedAction_swap'] = $stagesObj->isNextStageAllowedForUser($swapStage);
-                                       } else if ($swapAccess && $swapStage == 0) {
+                                       } elseif ($swapAccess && $swapStage == 0) {
                                                $versionArray['allowedAction_swap'] = TRUE;
                                        } else {
                                                $versionArray['allowedAction_swap'] = FALSE;
index 70d6539..c5d5aae 100644 (file)
@@ -169,7 +169,7 @@ class Tx_Workspaces_Service_Stages {
                                foreach ($workspaceStageRecs as $workspaceStageRec) {
                                        if ($this->isStageAllowedForUser($workspaceStageRec['uid'])) {
                                                $stagesForWSUserData[$workspaceStageRec['uid']] = $workspaceStageRec;
-                                       } else if ($workspaceStageRec['uid'] == self::STAGE_PUBLISH_EXECUTE_ID && $GLOBALS['BE_USER']->workspacePublishAccess($this->getWorkspaceId())) {
+                                       } elseif ($workspaceStageRec['uid'] == self::STAGE_PUBLISH_EXECUTE_ID && $GLOBALS['BE_USER']->workspacePublishAccess($this->getWorkspaceId())) {
                                                $allowedStages[] = $workspaceStageRec;
                                                $stagesForWSUserData[$workspaceStageRec['uid']] = $workspaceStageRec;
                                        }
@@ -195,7 +195,7 @@ class Tx_Workspaces_Service_Stages {
        /**
         * Check if given workspace has custom staging activated
         *
-        * @return bool true or false
+        * @return bool TRUE or FALSE
         */
        public function checkCustomStagingForWS() {
                $workspaceRec = t3lib_BEfunc::getRecord('sys_workspace', $this->getWorkspaceId());
@@ -225,7 +225,7 @@ class Tx_Workspaces_Service_Stages {
                        default:
                                $stageTitle = $this->getPropertyOfCurrentWorkspaceStage($ver_stage, 'title');
 
-                               if ($stageTitle == null) {
+                               if ($stageTitle == NULL) {
                                        $stageTitle = $GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:error.getStageTitle.stageNotFound');
                                }
                                break;
index 3a18e3b..c37d0ea 100644 (file)
@@ -141,7 +141,7 @@ class tx_Workspaces_Service_Workspaces {
         * Building tcemain CMD-array for releasing all versions in a workspace.
         *
         * @param       integer         Real workspace ID, cannot be ONLINE (zero).
-        * @param       boolean         Run Flush (true) or ClearWSID (false) command
+        * @param       boolean         Run Flush (TRUE) or ClearWSID (FALSE) command
         * @param       integer         $pageId: ...
         * @return      array           Command array for tcemain
         */
@@ -190,7 +190,7 @@ class tx_Workspaces_Service_Workspaces {
                        // Contains either nothing or a list with live-uids
                if ($pageId != -1 && $recursionLevel > 0) {
                        $pageList = $this->getTreeUids($pageId, $wsid, $recursionLevel);
-               } else if ($pageId != -1) {
+               } elseif ($pageId != -1) {
                        $pageList = $pageId;
                } else {
                        $pageList = '';
@@ -243,7 +243,7 @@ class tx_Workspaces_Service_Workspaces {
                 */
                if ($wsid > self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid=' . $wsid;
-               } else if ($wsid === self::SELECT_ALL_WORKSPACES) {
+               } elseif ($wsid === self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid!=0';
                }
 
@@ -298,7 +298,7 @@ class tx_Workspaces_Service_Workspaces {
 
                if ($wsid > self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid=' . $wsid . ' AND C.t3ver_wsid=' . $wsid;
-               } else if ($wsid === self::SELECT_ALL_WORKSPACES) {
+               } elseif ($wsid === self::SELECT_ALL_WORKSPACES) {
                        $where .= ' AND A.t3ver_wsid!=0 AND C.t3ver_wsid!=0 ';
                }
 
@@ -504,7 +504,7 @@ class tx_Workspaces_Service_Workspaces {
         * @param  $record
         * @return string
         */
-       public static function viewSingleRecord($table, $uid, $record=null) {
+       public static function viewSingleRecord($table, $uid, $record=NULL) {
                $viewUrl = '';
                if ($table == 'pages') {
                        $viewUrl = t3lib_BEfunc::viewOnClick(t3lib_BEfunc::getLiveVersionIdOfRecord('pages', $uid));
@@ -515,7 +515,7 @@ class tx_Workspaces_Service_Workspaces {
                        if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['viewSingleRecord'])) {
                                $_params = array('table' => $table, 'uid' => $uid, 'record' => $record);
                                $_funcRef = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['workspaces']['viewSingleRecord'];
-                               $viewUrl = t3lib_div::callUserFunction($_funcRef, $_params, null);
+                               $viewUrl = t3lib_div::callUserFunction($_funcRef, $_params, NULL);
                        }
                }
                return $viewUrl;
@@ -547,4 +547,4 @@ class tx_Workspaces_Service_Workspaces {
 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Service/Workspaces.php'])) {
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Service/Workspaces.php']);
 }
-?>
+?>
\ No newline at end of file
index 55073e3..849f6d6 100644 (file)
@@ -53,8 +53,8 @@ $TCA['sys_workspace'] = array(
                        'default' => 'mimetypes-x-sys_workspace'
                ),
                'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
-               'versioningWS_alwaysAllowLiveEdit' => true,
-               'dividers2tabs' => true
+               'versioningWS_alwaysAllowLiveEdit' => TRUE,
+               'dividers2tabs' => TRUE
        )
 );
 
@@ -78,7 +78,7 @@ $TCA['sys_workspace_stage'] = array(
                        'default' => 'mimetypes-x-sys_workspace'
                ),
                'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
-               'versioningWS_alwaysAllowLiveEdit' => true,
+               'versioningWS_alwaysAllowLiveEdit' => TRUE,
        )
 );
        // todo move icons to Core sprite or keep them here and remove the todo note ;)