aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions_html.inc.php8
-rw-r--r--include/functions_notification.inc.php9
-rw-r--r--include/functions_plugins.inc.php30
3 files changed, 35 insertions, 12 deletions
diff --git a/include/functions_html.inc.php b/include/functions_html.inc.php
index c0a2225be..12670c20f 100644
--- a/include/functions_html.inc.php
+++ b/include/functions_html.inc.php
@@ -335,7 +335,7 @@ function access_denied()
/**
* Exits the current script with 403 code.
- * TODO : nice display if $template loaded
+ * @todo nice display if $template loaded
*
* @param string $msg
* @param string|null $alternate_url redirect to this url
@@ -354,7 +354,7 @@ function page_forbidden($msg, $alternate_url=null)
/**
* Exits the current script with 400 code.
- * TODO : nice display if $template loaded
+ * @todo nice display if $template loaded
*
* @param string $msg
* @param string|null $alternate_url redirect to this url
@@ -373,7 +373,7 @@ function bad_request($msg, $alternate_url=null)
/**
* Exits the current script with 404 code.
- * TODO : nice display if $template loaded
+ * @todo nice display if $template loaded
*
* @param string $msg
* @param string|null $alternate_url redirect to this url
@@ -392,7 +392,7 @@ function page_not_found($msg, $alternate_url=null)
/**
* Exits the current script with 500 code.
- * TODO : nice display if $template loaded
+ * @todo nice display if $template loaded
*
* @param string $msg
* @param string|null $title
diff --git a/include/functions_notification.inc.php b/include/functions_notification.inc.php
index b8e867030..e3a2880cb 100644
--- a/include/functions_notification.inc.php
+++ b/include/functions_notification.inc.php
@@ -24,8 +24,6 @@
/**
* @package functions\notification
*/
-
-// TODO : use a cache for all data returned by custom_notification_query()
/**
@@ -54,6 +52,7 @@ function get_std_sql_where_restrict_filter($prefix_condition,
/**
* Execute custom notification query.
+ * @todo use a cache for all data returned by custom_notification_query()
*
* @param string $action 'count', 'info'
* @param string $type 'new_comments', 'unvalidated_comments', 'new_elements', 'updated_categories', 'new_users'
@@ -343,7 +342,7 @@ function new_users($start=null, $end=null)
* Takes in account: number of new comments, number of new elements, number of
* updated categories. Administrators are also informed about: number of
* unvalidated comments, number of new users.
- * TODO : number of unvalidated elements
+ * @todo number of unvalidated elements
*
* @param string $start (mysql datetime format)
* @param string $end (mysql datetime format)
@@ -388,7 +387,7 @@ function add_news_line(&$news, $count, $singular_key, $plural_key, $url='', $add
* Takes in account: number of new comments, number of new elements, number of
* updated categories. Administrators are also informed about: number of
* unvalidated comments, number of new users.
- * TODO : number of unvalidated elements
+ * @todo number of unvalidated elements
*
* @param string $start (mysql datetime format)
* @param string $end (mysql datetime format)
@@ -517,7 +516,7 @@ function get_recent_post_dates_array($args)
/**
* Returns html description about recently published elements grouped by post date.
- * TODO : clean up HTML output, currently messy and invalid !
+ * @todo clean up HTML output, currently messy and invalid !
*
* @param array $date_detail returned value of get_recent_post_dates()
* @return string
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;