Project

General

Profile

Bug #22579 ยป 14295.diff

Administrator Admin, 2010-05-04 09:45

View differences:

t3lib/class.t3lib_tcemain.php (working copy)
* @return boolean Whether the record can be undeleted
*/
public function isRecordUndeletable($table, $uid) {
$result = false;
$record = t3lib_BEfunc::getRecord($table, $uid, 'pid', '', false);
$result = FALSE;
$record = t3lib_BEfunc::getRecord($table, $uid, 'pid', '', FALSE);
if ($record['pid']) {
$page = t3lib_BEfunc::getRecord('pages', $record['pid'], 'deleted, title, uid', '', false);
$page = t3lib_BEfunc::getRecord('pages', $record['pid'], 'deleted, title, uid', '', FALSE);
// The page containing the record is not deleted, thus the record can be undeleted:
if (!$page['deleted']) {
$result = true;
$result = TRUE;
// The page containing the record is deleted and has to be undeleted first:
} else {
$this->log(
......
$page['title'] . ' (UID: ' . $page['uid'] . ')" first'
);
}
} else {
// The page containing the record is on rootlevel, so there is no parent record to check, and the record can be undeleted:
$result = TRUE;
}
return $result;
}
    (1-1/1)