38 if ($wsid >= -1 && $wsid !== 0) {
42 $workspaceRec = BackendUtility::getRecord(
'sys_workspace', $wsid);
43 if ($workspaceRec[
'publish_access'] & 1) {
50 foreach ($versions as $table => $records) {
51 foreach ($records as $rec) {
53 $cmd[$table][$rec[
't3ver_oid']][
'version'] = array(
55 'swapWith' => $rec[
'uid'],
56 'swapIntoWS' => $doSwap ? 1 : 0
78 $filter = (int)$filter;
79 $pageId = (int)$pageId;
82 foreach (
$GLOBALS[
'TCA'] as $table => $cfg) {
83 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
86 $recs =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'A.uid, A.t3ver_oid, B.pid AS realpid', $table .
' A,' . $table .
' B',
'A.pid=-1' . ($pageId != -1 ? ($table ===
'pages' ?
' AND B.uid=' . $pageId :
' AND B.pid=' . $pageId) :
'') . ($wsid > -98 ?
' AND A.t3ver_wsid=' . $wsid : ($wsid === -98 ?
' AND A.t3ver_wsid!=0' :
'')) . ($filter === 1 ?
' AND A.t3ver_count=0' : ($filter === 2 ?
' AND A.t3ver_count>0' :
'')) . ($stage != -99 ?
' AND A.t3ver_stage=' . (
int)$stage :
'') .
' AND B.pid>=0' .
' AND A.t3ver_oid=B.uid' .
BackendUtility::deleteClause($table,
'A') .
BackendUtility::deleteClause($table,
'B'),
'',
'B.uid');
88 $output[$table] = $recs;
112 $currentAdminStatus =
$GLOBALS[
'BE_USER']->user[
'admin'];
113 $GLOBALS[
'BE_USER']->user[
'admin'] = 1;
115 $workspaces =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'uid,swap_modes,publish_time,unpublish_time',
'sys_workspace',
'pid=0 117 ((publish_time!=0 AND publish_time<=' . (
int)
$GLOBALS[
'EXEC_TIME'] .
') 119 foreach ($workspaces as $rec) {
121 $fieldArray = $rec[
'publish_time'] != 0 ? array(
'publish_time' => 0) : array(
'unpublish_time' => 0);
122 $GLOBALS[
'TYPO3_DB']->exec_UPDATEquery(
'sys_workspace',
'uid=' . (
int)$rec[
'uid'], $fieldArray);
128 $tce->stripslashes_values = 0;
129 $tce->start(array(), $cmd);
130 $tce->process_cmdmap();
133 $GLOBALS[
'BE_USER']->user[
'admin'] = $currentAdminStatus;
selectVersionsInWorkspace($wsid, $filter=0, $stage=-99, $pageId=-1)
static makeInstance($className)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getCmdArrayForPublishWS($wsid, $doSwap, $pageId=0)
static deleteClause($table, $tableAlias='')