9270_editorsUndelete.patch

Administrator Admin, 2009-06-15 06:35

Download (1.91 KB)

View differences:

t3lib/class.t3lib_userauthgroup.php (Arbeitskopie)
547 547
	 * @param	string		Table name
548 548
	 * @param	mixed		If integer, then this is the ID of the record. If Array this just represents fields in the record.
549 549
	 * @param	boolean		Set, if testing a new (non-existing) record array. Will disable certain checks that doesn't make much sense in that context.
550
	 * @param	boolean		Set, if testing a deleted record array.
550 551
	 * @return	boolean		True if OK, otherwise false
551 552
	 */
552
	function recordEditAccessInternals($table,$idOrRow,$newRecord=FALSE)	{
553
	function recordEditAccessInternals($table, $idOrRow, $newRecord=FALSE, $deletedRecord=FALSE)	{
553 554
		global $TCA;
554 555

  
555 556
		if (isset($TCA[$table]))	{
......
560 561

  
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 ($deletedRecord) {
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;
t3lib/class.t3lib_tcemain.php (Arbeitskopie)
3992 3992
		global $TCA;
3993 3993

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

  
3997 3997
		$uid = intval($uid);
3998 3998
		if ($TCA[$table] && $uid)	{