aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/actions.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index 57da1389f..b715577a9 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -124,9 +124,15 @@ function actions_init($event, $object_type, $object) {
*
* @return unknown
*/
-function validate_action_token($visibleerrors = true) {
- $token = get_input('__elgg_token');
- $ts = get_input('__elgg_ts');
+function validate_action_token($visibleerrors = TRUE, $token = NULL, $ts = NULL) {
+ if (!$token) {
+ $token = get_input('__elgg_token');
+ }
+
+ if (!$ts) {
+ $ts = get_input('__elgg_ts');
+ }
+
$session_id = session_id();
if (($token) && ($ts) && ($session_id)) {