--- class.t3lib_tcemain_orig.php 2006-05-30 09:58:40.000000000 +0200 +++ class.t3lib_tcemain.php 2006-07-04 15:03:38.000000000 +0200 @@ -3412,7 +3412,7 @@ * @return void */ function version_swap($table,$id,$swapWith,$swapIntoWS=0) { - global $TCA; + global $TCA,$TYPO3_CONF_VARS; /* Version ID swapping principles: @@ -3520,7 +3520,13 @@ unlink($lockFileName); } } - + + if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['version_swap'])) { + foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['version_swap'] as $funcName) { + $_params = array('table' => $table, 'orig_id' => $id, 'id' => $swapWith); + t3lib_div::callUserFunction($funcName,$_params,$this); + } + } if (!count($sqlErrors)) { // Checking for delete: @@ -3583,6 +3589,8 @@ * @return void */ function version_clearWSID($table,$id) { + global $TYPO3_CONF_VARS; + if ($errorCode = $this->BE_USER->workspaceCannotEditOfflineVersion($table, $id)) { $this->newlog('Attempt to reset workspace for record failed: '.$errorCode,1); } elseif ($this->checkRecordUpdateAccess($table,$id)) { @@ -3596,8 +3604,13 @@ if ((int)$liveRec['t3ver_state']===1) { $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,'uid='.intval($liveRec['uid']),$sArray); $this->deleteEl($table, $liveRec['uid'], TRUE); // THIS assumes that the record was placeholder ONLY for ONE record (namely $id) + } + if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['version_swap'])) { + foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['version_swap'] as $funcName) { + $_params = array('table' => $table, 'orig_id' => $id, 'id' => $liveRec); + t3lib_div::callUserFunction($funcName,$_params,$this); + } } - // If "deleted" flag is set for the version that got released it doesn't make sense to keep that "placeholder" anymore and we delete it completly. $wsRec = t3lib_BEfunc::getRecord($table,$id); if ((int)$wsRec['t3ver_state']===2) {