aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_plugins.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-11-20 12:45:37 +0000
committermistic100 <mistic@piwigo.org>2013-11-20 12:45:37 +0000
commit077eacf3de0577099c002a326ae9bfcb28fabb22 (patch)
treed34b41cd8eb1eea8f7a1d950649ea83e1b657835 /include/functions_plugins.inc.php
parente5ed169950821600f222d71f79656afb3fca143d (diff)
aliases trigger_event() in trigger_change() and trigger_action() in trigger_notify()
complete removal for 2.7 or 2.8 git-svn-id: http://piwigo.org/svn/trunk@25602 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_plugins.inc.php')
-rw-r--r--include/functions_plugins.inc.php30
1 files changed, 27 insertions, 3 deletions
diff --git a/include/functions_plugins.inc.php b/include/functions_plugins.inc.php
index f15de8f44..1f985a2ef 100644
--- a/include/functions_plugins.inc.php
+++ b/include/functions_plugins.inc.php
@@ -238,15 +238,27 @@ function remove_event_handler($event, $func,
/**
* Triggers a modifier event and calls all registered event handlers.
- * trigger_modify() is used as a modifier: it allows to transmit _$data_
+ * trigger_change() is used as a modifier: it allows to transmit _$data_
* through all handlers, thus each handler MUST return a value,
* optional _$args_ are not transmitted.
*
+ * @since 2.6
+ * @todo remove trigger_event()
+ *
* @param string $event
* @param mixed $data data to transmit to all handlers
* @param mixed $args,... optional arguments
* @return mixed $data
*/
+function trigger_change($event, $data=null)
+{
+ return call_user_func_array('trigger_event', func_get_args());
+}
+
+/**
+ * @deprecated 2.6
+ * @see trigger_change
+ */
function trigger_event($event, $data=null)
{
global $pwg_event_handlers;
@@ -279,12 +291,24 @@ function trigger_event($event, $data=null)
}
/**
- * Triggers an notifier event and calls all registered event handlers.
- * trigger_action() is only used as a notifier, no modification of data is possible
+ * Triggers a notifier event and calls all registered event handlers.
+ * 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)
+{
+ return call_user_func_array('trigger_action', func_get_args());
+}
+
+/**
+ * @deprecated 2.6
+ * @see trigger_notify
+ */
function trigger_action($event)
{
global $pwg_event_handlers;