9270_4-2_branch.patch

Administrator Admin, 2009-08-21 13:33

Download (2.25 KB)

View differences:

t3lib/class.t3lib_userauthgroup.php (Arbeitskopie)
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, $deletedRecord = FALSE) {
554 555
		global $TCA;
555 556

  
556 557
		if (isset($TCA[$table]))	{
......
561 562

  
562 563
				// Fetching the record if the $idOrRow variable was not an array on input:
563 564
			if (!is_array($idOrRow))	{
564
				$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow);
565
				if ($deletedRecord) {
566
					$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow, '*', '', FALSE);
567
				} else {
568
					$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow);
569
				}
565 570
				if (!is_array($idOrRow))	{
566 571
					$this->errorMsg = 'ERROR: Record could not be fetched.';
567 572
					return FALSE;
t3lib/class.t3lib_tcemain.php (Arbeitskopie)
4001 4001
	 * @param	boolean		If TRUE, the "deleted" flag is set to 0 again and thus, the item is undeleted.
4002 4002
	 * @return	void
4003 4003
	 */
4004
	function deleteRecord($table,$uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE,$undeleteRecord=FALSE)	{
4004
	function deleteRecord($table,$uid, $noRecordCheck = FALSE, $forceHardDelete = FALSE, $undeleteRecord = FALSE) {
4005 4005
		global $TCA;
4006 4006

  
4007 4007
			// Checking if there is anything else disallowing deleting the record by checking if editing is allowed
4008
		$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table,$uid);
4008
		$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, $undeleteRecord);
4009 4009

  
4010 4010
		$uid = intval($uid);
4011 4011
		if ($TCA[$table] && $uid)	{