Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (revision 3418) +++ t3lib/class.t3lib_tceforms.php (working copy) @@ -5628,11 +5628,23 @@ case 'VERSION': switch((string)$parts[1]) { case 'IS': - if (strtolower($parts[2])=='true') { - $output = intval($row['pid'])==-1 ? TRUE : FALSE; - } elseif (strtolower($parts[2])=='false') { - $output = !(intval($row['pid'])==-1) ? TRUE : FALSE; + $_isNewRecord=(intval($row['uid'])>0) ? false: true; + //Detection of Version can be done be detecting workspace of the user + $_isUserInWorkspace=($GLOBALS['BE_USER']->workspace >0)? true: false; + if (intval($row['pid'])==-1 || intval($row['_ORIG_pid'])==-1) { + $_isRecordDetectedAsVersion=true; } + else { + $_isRecordDetectedAsVersion=false; + } + //(new records in a workspace are not handled as versionrecord) + // if its no new version we detect versions like thie: if editor is in workspace: always true | if editor is in Live ws: true if pid ==-1 + $isVersion=($_isUserInWorkspace || $_isRecordDetectedAsVersion) && !$_isNewRecord; + if (strtolower($parts[2])=='true') { + $output = $isVersion; + } elseif (strtolower($parts[2])=='false') { + $output = !$isVersion; + } break; } break;