aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-30 17:35:55 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-09-30 17:35:55 +0000
commitb2f1d4cdbc745ff8a58a9d9b45fc2234c0192fe5 (patch)
treeaf596da2c6a570e13a4157e48915c0160d40a081
parent66d698df72d618a2d7121a6b2d6e347e07dd8e86 (diff)
downloadelgg-b2f1d4cdbc745ff8a58a9d9b45fc2234c0192fe5.tar.gz
elgg-b2f1d4cdbc745ff8a58a9d9b45fc2234c0192fe5.tar.bz2
Closes #390: Triggers an event 'action', $action before action is included.
This is rather kludgy and we need to rethink this a bit. git-svn-id: https://code.elgg.org/elgg/trunk@2154 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/actions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index a78072f31..9eba53e67 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -53,7 +53,12 @@
(isadminloggedin()) ||
(!$CONFIG->actions[$action]['admin'])
) {
- if ($CONFIG->actions[$action]['public'] || $_SESSION['id'] != -1) {
+ if ($CONFIG->actions[$action]['public'] || $_SESSION['id'] != -1) {
+
+ // Trigger action event TODO: This is only called before the primary action is called. We need to rethink actions for 1.5
+ trigger_elgg_event('action', $action);
+
+ // Include action
if (@include($CONFIG->actions[$action]['file'])) {
} else {
register_error(sprintf(elgg_echo('actionundefined'),$action));