From 4be5d3949310bdec115b93d0ed3e3a4b7a1f8d57 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 20 Feb 2009 13:08:22 +0000 Subject: tweak to the add to wire action to make sure forward takes the user to the correct place git-svn-id: https://code.elgg.org/elgg/trunk@2854 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/thewire/actions/add.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'mod') diff --git a/mod/thewire/actions/add.php b/mod/thewire/actions/add.php index b6bae6bc3..8c441c0a2 100644 --- a/mod/thewire/actions/add.php +++ b/mod/thewire/actions/add.php @@ -17,6 +17,7 @@ $body = get_input('note'); $tags = get_input('thewiretags'); $access_id = get_input('access_id'); + $location = get_input('location'); $method = get_input('method'); $parent = (int)get_input('parent', 0); if(!$parent) @@ -32,10 +33,13 @@ // Otherwise, save the thewire post } else { - + if (!thewire_save_post($body, $access_id, $parent, $method)) { register_error(elgg_echo("thewire:error")); - forward("mod/thewire/add.php"); + if($location == "activity") + forward("mod/riverdashboard/"); + else + forward("mod/thewire/add.php"); } // Now let's add tags. We can pass an array directly to the object property! Easy. @@ -46,8 +50,11 @@ // Success message system_message(elgg_echo("thewire:posted")); - // Forward to the main thewire page - forward("mod/thewire/everyone.php"); + // Forward + if($location == "activity") + forward("mod/riverdashboard/"); + else + forward("mod/thewire/add.php"); } -- cgit v1.2.3