Bug #19274 » 9270_4-2_branch.patch
t3lib/class.t3lib_userauthgroup.php (Arbeitskopie) | ||
---|---|---|
* @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, $deletedRecord = 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 ($deletedRecord) {
|
||
$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;
|
t3lib/class.t3lib_tcemain.php (Arbeitskopie) | ||
---|---|---|
* @param boolean If TRUE, the "deleted" flag is set to 0 again and thus, the item is undeleted.
|
||
* @return void
|
||
*/
|
||
function deleteRecord($table,$uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE,$undeleteRecord=FALSE) {
|
||
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);
|
||
$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, $undeleteRecord);
|
||
$uid = intval($uid);
|
||
if ($TCA[$table] && $uid) {
|