typo3_bug_9270.patch

Administrator Admin, 2008-11-11 11:02

Download (2.66 KB)

View differences:

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