Project

General

Profile

Bug #21270 ยป 12235.diff

Administrator Admin, 2009-10-14 18:24

View differences:

t3lib/class.t3lib_admin.php (working copy)
// Remove preceding "-1," for non-versioned tables
$pid_list_tmp = preg_replace('/^\-1,/','',$pid_list_tmp);
}
$garbage = NULL;
$label = $TCA[$table]['ctrl']['label'];
$garbage = $GLOBALS['TYPO3_DB']->exec_SELECTquery (
'uid,pid,'.$TCA[$table]['ctrl']['label'],
$table,
'pid NOT IN ('.$pid_list_tmp.')'
);
$lostIdList = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($garbage)) {
$this->lRecords[$table][$row['uid']]=Array('uid'=>$row['uid'], 'pid'=>$row['pid'], 'title'=> strip_tags($row[$TCA[$table]['ctrl']['label']]) );
$lostIdList[]=$row['uid'];
if ($label && $pid_list_tmp) {
$garbage = $GLOBALS['TYPO3_DB']->exec_SELECTquery (
'uid,pid,'.$TCA[$table]['ctrl']['label'],
$table,
'pid NOT IN ('.$pid_list_tmp.')'
);
}
if ($garbage) {
$lostIdList = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($garbage)) {
$this->lRecords[$table][$row['uid']]=Array('uid'=>$row['uid'], 'pid'=>$row['pid'], 'title'=> strip_tags($row[$TCA[$table]['ctrl']['label']]) );
$lostIdList[]=$row['uid'];
}
$GLOBALS['TYPO3_DB']->sql_free_result($garbage);
}
if ($table=='pages') {
$this->lostPagesList=implode(',',$lostIdList);
}
    (1-1/1)