2 namespace TYPO3\CMS\Workspaces\Hook;
38 if ($command ===
'delete') {
39 if ($table === \TYPO3\CMS\Workspaces\Service\StagesService::TABLE_STAGE) {
41 }
elseif ($table === \TYPO3\CMS\Workspaces\Service\WorkspaceService::TABLE_WORKSPACE) {
69 $fields = array(
't3ver_stage' => \TYPO3\CMS\Workspaces\Service\StagesService::STAGE_EDIT_ID);
72 $where =
't3ver_stage = ' . (int)$stageId;
73 $where .=
' AND t3ver_wsid > 0 AND pid=-1';
75 $GLOBALS[
'TYPO3_DB']->exec_UPDATEquery($tcaTable, $where, $fields);
94 $records =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'uid', $tcaTable, $where,
'',
'',
'',
'uid');
95 if (is_array($records)) {
96 foreach ($records as $recordId => $_) {
97 $command[$tcaTable][$recordId][
'version'][
'action'] =
'flush';
102 if (!empty($command)) {
104 $tceMain->start(array(), $command);
105 $tceMain->process_cmdmap();
124 $tceMain = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
125 $tceMain->stripslashes_values = 0;
137 $workspacesCache = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache(
'workspaces_cache');
138 $workspacesCache->flushByTag($workspaceId);
139 $workspacesCache->flushByTag(\TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES);