[TYPO3-core] [REMINDER #3] RFC: hook request in t3lib/t3lib_userauthgroup.php

Ingmar Schlecht ingmar at typo3.org
Tue Mar 27 16:24:26 CEST 2007


+1, patch looks good.

cheers
Ingmar

Dmitry Dulepov schrieb:
> Hi!
> 
> Oliver Hader wrote:
>> Please use the array key "idOrRow" instead of "row" because in other
>> hook functions this might be an integer - just to keep the meaning of
>> the variable. Furthermore you could please integrate the variable
>> $newRecord (boolean) as given in the parameters of the method
>> recordEditAccessInternals(...) to the $params array.
>>
>> +1 for the patch, if you could adapt the mentioned two changes
> 
> New patch is attached for convenience :)
> 
> 
> ------------------------------------------------------------------------
> 
> Index: t3lib/class.t3lib_userauthgroup.php
> ===================================================================
> --- t3lib/class.t3lib_userauthgroup.php	(revision 2195)
> +++ t3lib/class.t3lib_userauthgroup.php	(working copy)
> @@ -611,6 +611,20 @@
>  				// Checking record permissions
>  			// THIS is where we can include a check for "perms_" fields for other records than pages...
>  
> +				// Process any hooks
> +			if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['recordEditAccessInternals']))	{
> +				foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['recordEditAccessInternals'] as $funcRef)	{
> +					$params = array(
> +						'table' => $table,
> +						'idOrRow' => $idOrRow,
> +						'newRecord' => $newRecord
> +					);
> +					if (!t3lib_div::callUserFunction($funcRef, $params, $this)) {
> +						return FALSE;
> +					}
> +				}
> +			}
> +
>  				// Finally, return true if all is well.
>  			return TRUE;
>  		}


More information about the TYPO3-team-core mailing list