Project

General

Profile

Feature #20880 ยป selectVersions.patch

Administrator Admin, 2009-08-14 10:42

View differences:

class.t3lib_befunc.php 2009-08-14 09:45:16.000000000 +0200
if ($TCA[$table] && $TCA[$table]['ctrl']['versioningWS']) {
// Select all versions of record:
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
$fields,
$table,
'((pid=-1 AND t3ver_oid='.intval($uid).($workspace!=0?' AND t3ver_wsid='.intval($workspace):'').') OR uid='.intval($uid).')'.
($includeDeletedRecords ? '' : t3lib_BEfunc::deleteClause($table)),
'',
't3ver_id DESC'
);
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['selectVersionsQuery'][$table])) {
$classRef = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['selectVersionsQuery'][$table];
$params = Array(
'table' => $table,
'uid' => $uid,
'fields' => $fields,
'workspace' => $workspace,
'includeDeletedRecords' => $includeDeletedRecords
);
$sql = t3lib_div::callUserFunction($classRef,$params,$this);
} else {
// Build query to select all versions of record:
$sql = $GLOBALS['TYPO3_DB']->SELECTquery(
$fields,
$table,
'((pid=-1 AND t3ver_oid='.intval($uid).($workspace!=0?' AND t3ver_wsid='.intval($workspace):'').') OR uid='.intval($uid).')'.
($includeDeletedRecords ? '' : t3lib_BEfunc::deleteClause($table)),
'',
't3ver_id DESC'
);
}
// Execute query
$res = $GLOBALS['TYPO3_DB']->sql_query($sql);
// Add rows to output array:
$realPid = 0;
    (1-1/1)