From 3d97e565abf2ca07f76a85362bc3369a14df3fc9 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 7 Aug 2008 13:43:42 +0000 Subject: Refs #210: Will trigger a plugin hook 'action_gatekeeper:permissions:check'. git-svn-id: https://code.elgg.org/elgg/trunk@1758 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/actions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engine') diff --git a/engine/lib/actions.php b/engine/lib/actions.php index f5cd55271..26d56104b 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -137,7 +137,13 @@ // Validate time to ensure its not crazy if (($ts>$now-$hour) && ($ts<$now+$hour)) { - return true; + $returnval = true; // We have already got this far, so unless anything else says something to the contry we assume we're ok + + return trigger_plugin_hook('action_gatekeeper:permissions:check', 'all', array( + 'action' => $action, + 'token' => $token, + 'time' => $ts + ), $returnval); } else register_error(elgg_echo('actiongatekeeper:timeerror')); -- cgit v1.2.3