Project

General

Profile

Bug #19274 » typo3_bug_9270.patch

Administrator Admin, 2008-11-11 11:02

View differences:

t3lib/class.t3lib_tcemain.php 2008-11-11 10:58:52.000000000 +0100
function deleteRecord($table,$uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE,$undeleteRecord=FALSE) {
global $TCA;
// Checking if there is anything else disallowing deleting the record by checking if editing is allowed
$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table,$uid);
// Checking if there is anything else disallowing deleting the record by checking if editing is allowed
$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table,$uid, FALSE, $undeleteRecord);
$uid = intval($uid);
if ($TCA[$table] && $uid) {
t3lib/class.t3lib_userauthgroup.php 2008-11-11 10:56:49.000000000 +0100
* @param string Table name
* @param mixed If integer, then this is the ID of the record. If Array this just represents fields in the record.
* @param boolean Set, if testing a new (non-existing) record array. Will disable certain checks that doesn't make much sense in that context.
* @param boolean Set, if testing a deleted record array.
* @return boolean True if OK, otherwise false
*/
function recordEditAccessInternals($table,$idOrRow,$newRecord=FALSE) {
function recordEditAccessInternals($table,$idOrRow,$newRecord=FALSE,$deletedRecords=FALSE) {
global $TCA;
if (isset($TCA[$table])) {
......
// Fetching the record if the $idOrRow variable was not an array on input:
if (!is_array($idOrRow)) {
$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow);
if ($deletedRecords) {
$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow, '*', '', false);
} else {
$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow);
}
if (!is_array($idOrRow)) {
$this->errorMsg = 'ERROR: Record could not be fetched.';
return FALSE;
(1-1/5)