9270_4-1_branch.patch

Administrator Admin, 2009-08-21 13:34

Download (2.19 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
		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 ($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)
3429 3429
	 * @param	boolean		If TRUE, the "deleted" flag is set to 0 again and thus, the item is undeleted.
3430 3430
	 * @return	void
3431 3431
	 */
3432
	function deleteRecord($table,$uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE,$undeleteRecord=FALSE)	{
3432
	function deleteRecord($table, $uid, $noRecordCheck=FALSE, $forceHardDelete=FALSE, $undeleteRecord=FALSE) {
3433 3433
		global $TCA;
3434 3434
		// Checking if there is anything disallowing edit
3435
		$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table,$uid);
3435
		$mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, FALSE, $undeleteRecord);
3436 3436
		$uid = intval($uid);
3437 3437
		if ($TCA[$table] && $uid)	{