aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-05 15:28:39 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-05 15:28:39 +0000
commit321d737a3d1b515327e322a3059b933d555eff86 (patch)
tree2ef6fed300271e6522f203357d35541931476fb5 /engine/lib
parent9db74f4db6957383e9bdf68bbab61a669b435fa8 (diff)
downloadelgg-321d737a3d1b515327e322a3059b933d555eff86.tar.gz
elgg-321d737a3d1b515327e322a3059b933d555eff86.tar.bz2
Closes #196: Stores last forwarded page in session, this is used by logon to forward page to correct location.
Also fixed current_page_url() which was introducing a superfluous "/" before $_SERVER['REQUEST_URI'] git-svn-id: https://code.elgg.org/elgg/trunk@1712 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 1bd9843f6..e2a599511 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -25,13 +25,18 @@
*/
function forward($location = "") {
-
- if (!headers_sent()) {
+ global $CONFIG;
+ if (!headers_sent()) {
+
+ $_SESSION['last_forward_from'] = current_page_url();
+
$_SESSION['messages'] = system_messages();
- if (substr_count($location, 'http://') == 0) {
- global $CONFIG;
+ if (substr_count($location, 'http://') == 0) {
+
$location = $CONFIG->url . $location;
- }
+ }
+
+
header("Location: {$location}");
exit;
}
@@ -56,7 +61,7 @@
if (($url['user']) || $url['pass']) $page .="@";
$page .= $url['host'];
- $page = trim($page, "/"); $page.="/";
+ $page = trim($page, "/"); //$page.="/";
$page .= $_SERVER['REQUEST_URI'];