*
* @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');
* 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')) {
* @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();
}
} else {
$workspaceMenu[] = '<li>' . $stateUncheckedIcon . ' ' .
- $GLOBALS['LANG']->getLL('bookmark_noWSfound', true) .
+ $GLOBALS['LANG']->getLL('bookmark_noWSfound', TRUE) .
'</li>';
}
// 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>';
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
$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");
}
$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();
} 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);
$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');
'itemCls' => 'x-check-group-alt',
'columns' => 1,
'style' => 'max-height: 200px',
- 'autoScroll' => true,
+ 'autoScroll' => TRUE,
'items' => array(
$this->getReceipientsOfStage($nextStageId)
)
*/
public function publishWorkspace(stdclass $parameters) {
$result = array(
- 'init' => false,
+ 'init' => FALSE,
'total' => 0,
'processed' => 0,
- 'error' => false
+ 'error' => FALSE
);
try {
*/
public function flushWorkspace(stdclass $parameters) {
$result = array(
- 'init' => false,
+ 'init' => FALSE,
'total' => 0,
'processed' => 0,
- 'error' => false
+ 'error' => FALSE
);
try {
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:
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
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
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
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/workspaces/Classes/Reports/StatusProvider.php']);
}
-?>
+?>
\ No newline at end of file
}
}
+?>
\ No newline at end of file
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;
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;
}
/**
* 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());
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;
* 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
*/
// 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 = '';
*/
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';
}
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 ';
}
* @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));
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;
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
'default' => 'mimetypes-x-sys_workspace'
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
- 'versioningWS_alwaysAllowLiveEdit' => true,
- 'dividers2tabs' => true
+ 'versioningWS_alwaysAllowLiveEdit' => TRUE,
+ 'dividers2tabs' => TRUE
)
);
'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 ;)