Bug #16166 » t3lib_tcemain_publish_and_swap.diff
class.t3lib_tcemain.php 2006-07-04 15:03:38.000000000 +0200 | ||
---|---|---|
* @return void
|
||
*/
|
||
function version_swap($table,$id,$swapWith,$swapIntoWS=0) {
|
||
global $TCA;
|
||
global $TCA,$TYPO3_CONF_VARS;
|
||
/*
|
||
Version ID swapping principles:
|
||
... | ... | |
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:
|
||
... | ... | |
* @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)) {
|
||
... | ... | |
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) {
|