### Eclipse Workspace Patch 1.0 #P typo3_core_trunk Index: typo3/sysext/version/ext_conf_template.txt =================================================================== --- typo3/sysext/version/ext_conf_template.txt (revision 0) +++ typo3/sysext/version/ext_conf_template.txt (revision 0) @@ -0,0 +1,3 @@ + + # cat=basic//10; type=boolean; label= Show draft workspace: Show draft workspace in workspace menu +showDraftWorkspace = 0 \ No newline at end of file Index: t3lib/class.t3lib_userauthgroup.php =================================================================== --- t3lib/class.t3lib_userauthgroup.php (revision 7799) +++ t3lib/class.t3lib_userauthgroup.php (working copy) @@ -1562,7 +1567,23 @@ */ function checkWorkspace($wsRec,$fields='uid,title,adminusers,members,reviewers,publish_access,stagechg_notification') { $retVal = FALSE; - + + // Show draft workspace only if enabled in version extension + if(t3lib_extMgm::isLoaded('version')) { + $versionExtconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['version']); + if(!$versionExtconf['showDraftWorkspace']) { + if (!is_array($wsRec)) { + if ((string)$wsRec === '-1') { + return false; + } + } else { + if ((string)$wsRec['uid'] === '-1') { + return false; + } + } + } + } + // If not array, look up workspace record: if (!is_array($wsRec)) { switch((string)$wsRec) {