2 namespace TYPO3\CMS\Version\Utility;
36 if ($wsid >= -1 && $wsid !== 0) {
41 if ($workspaceRec[
'publish_access'] & 1) {
48 foreach ($versions as $table => $records) {
49 foreach ($records as $rec) {
51 $cmd[$table][$rec[
't3ver_oid']][
'version'] = array(
53 'swapWith' => $rec[
'uid'],
54 'swapIntoWS' => $doSwap ? 1 : 0
76 $filter = (int)$filter;
77 $pageId = (int)$pageId;
80 foreach (
$GLOBALS[
'TCA'] as $table => $cfg) {
81 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
84 $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');
86 $output[$table] = $recs;
110 $currentAdminStatus =
$GLOBALS[
'BE_USER']->user[
'admin'];
111 $GLOBALS[
'BE_USER']->user[
'admin'] = 1;
113 $workspaces =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'uid,swap_modes,publish_time,unpublish_time',
'sys_workspace',
'pid=0
115 ((publish_time!=0 AND publish_time<=' . (
int)
$GLOBALS[
'EXEC_TIME'] .
')
117 foreach ($workspaces as $rec) {
119 $fieldArray = $rec[
'publish_time'] != 0 ? array(
'publish_time' => 0) : array(
'unpublish_time' => 0);
120 $GLOBALS[
'TYPO3_DB']->exec_UPDATEquery(
'sys_workspace',
'uid=' . (
int)$rec[
'uid'], $fieldArray);
125 $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
126 $tce->stripslashes_values = 0;
127 $tce->start(array(), $cmd);
128 $tce->process_cmdmap();
131 $GLOBALS[
'BE_USER']->user[
'admin'] = $currentAdminStatus;