aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-09 16:51:57 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-09 16:51:57 +0000
commit1a0b866ce9db77abdd49c65def81a4c40393dbe0 (patch)
tree8c1421e235c6a22316f74b475dc3cf354161c1ca /engine/lib
parent849fb29545faf3d3e0d97febfbd7dac7506424bb (diff)
downloadelgg-1a0b866ce9db77abdd49c65def81a4c40393dbe0.tar.gz
elgg-1a0b866ce9db77abdd49c65def81a4c40393dbe0.tar.bz2
Non-default view types now preserved when forwarding.
git-svn-id: https://code.elgg.org/elgg/trunk@3199 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 392f6cd8b..cf3bea742 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -37,6 +37,13 @@
$location = $CONFIG->url . $location;
}
+ // Preserve current viewtype
+ $viewtype = elgg_get_viewtype();
+ if (($viewtype) && (strcmp($viewtype, 'default')!=0)) {
+ $sep = "?";
+ if (strpos($location, '?')>0) $sep = "&";
+ $location .= "{$sep}view=$viewtype";
+ }
header("Location: {$location}");
exit;