aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/actions/add.php
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-20 13:08:22 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-20 13:08:22 +0000
commit4be5d3949310bdec115b93d0ed3e3a4b7a1f8d57 (patch)
treeb5bfcfd4e6607f92c2ea8760134ce3979dbf9168 /mod/thewire/actions/add.php
parent94758990135b8f1031933e6b7fb3a0c1f0740437 (diff)
downloadelgg-4be5d3949310bdec115b93d0ed3e3a4b7a1f8d57.tar.gz
elgg-4be5d3949310bdec115b93d0ed3e3a4b7a1f8d57.tar.bz2
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
Diffstat (limited to 'mod/thewire/actions/add.php')
-rw-r--r--mod/thewire/actions/add.php15
1 files changed, 11 insertions, 4 deletions
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");
}