aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_plugins.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-06-02 07:55:46 +0000
committermistic100 <mistic@piwigo.org>2014-06-02 07:55:46 +0000
commit4bd32005b56f6ec741ceeed0a1745fe89f291085 (patch)
treee2ee9bb68d07822bb7c0122831a0ce313a5af2d2 /include/functions_plugins.inc.php
parentf98edc7a2e423bed534977107e4cb892180cb946 (diff)
feature 3010 : replace trigger_action/event by trigger_notify/change
git-svn-id: http://piwigo.org/svn/trunk@28587 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions_plugins.inc.php30
1 files changed, 4 insertions, 26 deletions
diff --git a/include/functions_plugins.inc.php b/include/functions_plugins.inc.php
index 4b9992395..91e5ec9fe 100644
--- a/include/functions_plugins.inc.php
+++ b/include/functions_plugins.inc.php
@@ -246,7 +246,6 @@ function remove_event_handler($event, $func,
* optional _$args_ are not transmitted.
*
* @since 2.6
- * @todo remove trigger_event()
*
* @param string $event
* @param mixed $data data to transmit to all handlers
@@ -255,21 +254,11 @@ function remove_event_handler($event, $func,
*/
function trigger_change($event, $data=null)
{
- $args = func_get_args();
- return call_user_func_array('trigger_event', $args);
-}
-
-/**
- * @deprecated 2.6
- * @see trigger_change
- */
-function trigger_event($event, $data=null)
-{
global $pwg_event_handlers;
if (isset($pwg_event_handlers['trigger']))
{// debugging
- trigger_action('trigger',
+ trigger_notify('trigger',
array('type'=>'event', 'event'=>$event, 'data'=>$data)
);
}
@@ -298,7 +287,7 @@ function trigger_event($event, $data=null)
if (isset($pwg_event_handlers['trigger']))
{// debugging
- trigger_action('trigger',
+ trigger_notify('trigger',
array('type'=>'post_event', 'event'=>$event, 'data'=>$data)
);
}
@@ -311,28 +300,17 @@ function trigger_event($event, $data=null)
* trigger_notify() is only used as a notifier, no modification of data is possible
*
* @since 2.6
- * @todo remove trigger_action()
*
* @param string $event
* @param mixed $args,... optional arguments
*/
function trigger_notify($event)
{
- $args = func_get_args();
- return call_user_func_array('trigger_action', $args);
-}
-
-/**
- * @deprecated 2.6
- * @see trigger_notify
- */
-function trigger_action($event)
-{
global $pwg_event_handlers;
if (isset($pwg_event_handlers['trigger']) and $event!='trigger')
{// debugging - avoid recursive calls
- trigger_action('trigger',
+ trigger_notify('trigger',
array('type'=>'action', 'event'=>$event, 'data'=>null)
);
}
@@ -455,7 +433,7 @@ function load_plugins()
{// include main from a function to avoid using same function context
load_plugin($plugin);
}
- trigger_action('plugins_loaded');
+ trigger_notify('plugins_loaded');
}
}