9270_trunk.patch

Administrator Admin, 2009-08-21 13:32

Download (2.24 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
		if (isset($TCA[$table]))	{
......
560 561
				// Fetching the record if the $idOrRow variable was not an array on input:
561 562
			if (!is_array($idOrRow))	{
562
				$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow);
563
				if ($deletedRecord) {
564
					$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow, '*', '', FALSE);
565
				} else {
566
					$idOrRow = t3lib_BEfunc::getRecord($table, $idOrRow);
567
				}
563 568
				if (!is_array($idOrRow))	{
564 569
					$this->errorMsg = 'ERROR: Record could not be fetched.';
565 570
					return FALSE;
t3lib/class.t3lib_tcemain.php (Arbeitskopie)
4058 4058
	 * @param	boolean		If TRUE, the "deleted" flag is set to 0 again and thus, the item is undeleted.
4059 4059
	 * @return	void
4060 4060
	 */
4061
	function deleteRecord($table,$uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE,$undeleteRecord=FALSE)	{
4061
	function deleteRecord($table,$uid, $noRecordCheck = FALSE, $forceHardDelete = FALSE, $undeleteRecord = FALSE) {
4062 4062
		global $TCA;
4063 4063
			// Checking if there is anything else disallowing deleting the record by checking if editing is allowed
4064
		$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table,$uid);
4064
		$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, $undeleteRecord);
4065 4065
		$uid = intval($uid);
4066 4066
		if ($TCA[$table] && $uid)	{