From: <nuc...@us...> - 2008-02-11 18:48:31
|
Revision: 4994 http://mantisbt.svn.sourceforge.net/mantisbt/?rev=4994&view=rev Author: nuclear_eclipse Date: 2008-02-11 10:47:25 -0800 (Mon, 11 Feb 2008) Log Message: ----------- Allow execute type events to recieve parameters. Modified Paths: -------------- trunk/mantisbt/core/event_api.php Modified: trunk/mantisbt/core/event_api.php =================================================================== --- trunk/mantisbt/core/event_api.php 2008-02-11 15:23:02 UTC (rev 4993) +++ trunk/mantisbt/core/event_api.php 2008-02-11 18:47:25 UTC (rev 4994) @@ -128,7 +128,7 @@ switch ( $t_type ) { case EVENT_TYPE_EXECUTE: - return event_type_execute( $p_name, $t_callbacks ); + return event_type_execute( $p_name, $t_callbacks, $p_params ); case EVENT_TYPE_OUTPUT: return event_type_output( $p_name, $t_callbacks, $p_params ); @@ -178,15 +178,16 @@ /** * Process an execute event type. - * All callbacks will be called with no parameters, and their + * All callbacks will be called with parameters, and their * return values will be ignored. * @param string Event name * @param array Array of callback function/plugin basename key/value pairs + * @param array Callback parameters */ -function event_type_execute( $p_event, $p_callbacks ) { +function event_type_execute( $p_event, $p_callbacks, $p_params ) { foreach( $p_callbacks as $t_plugin => $t_callbacks ) { foreach( $t_callbacks as $t_callback ) { - event_callback( $p_event, $t_callback, $t_plugin ); + event_callback( $p_event, $t_callback, $t_plugin, $p_params ); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |