Bug #22579 ยป 14295.diff
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;
|
||
}
|