From 19f33bc9ebc93f326e9aa31581327e48217757d6 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 21 Jul 2010 13:22:58 +0000 Subject: Merged pervious commit to 1.8. git-svn-id: http://code.elgg.org/elgg/trunk@6754 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/actions.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'engine') 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)) { -- cgit v1.2.3