From d1c319bdb10bd19cc6871826b1e9ec9aa6dece75 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 12 Aug 2004 14:29:45 +0000 Subject: [PATCH] fixed alan ritari's patch --- docs/changelog/6.x.x.txt | 2 -- lib/WebGUI.pm | 9 +-------- lib/WebGUI/Wobject/WSClient.pm | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 53ee7287a..23c8d1494 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -44,8 +44,6 @@ - BugFix: [ 999799 ] Fixed Package deletion/copy bug in 6.1.1 - BugFix: [ 997885 ] Root move left bug. - Changed 'lft' and 'rgt' database field names to 'nestedSetLeft' and 'nestedSetRight'. (Martin Kamerbeek) - - wobject can force 302 redirect after all page processing by setting - $session{page}{redirectURL} 6.1.1 - bugfix [ 991313 ] Manage Translations doesn't work diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 42e4b0f13..98eeae53d 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -176,14 +176,7 @@ sub page { } $cache->set($output, $ttl) if ($useCache); } - my $httpHeader; - - # allow a wobject to force a redirect by setting {page}{redirectURL} - if ($session{'page'}{'redirectURL'}) { - $httpHeader = WebGUI::Session::httpRedirect(WebGUI::Macro::process($session{'page'}{'redirectURL'})); - } else { - $httpHeader = WebGUI::HTTP::getHeader(); - } + my $httpHeader = WebGUI::HTTP::getHeader(); # This allows an operation or wobject to write directly to the browser. if ($session{page}{empty}) { diff --git a/lib/WebGUI/Wobject/WSClient.pm b/lib/WebGUI/Wobject/WSClient.pm index 781ab687d..c865f4f0d 100644 --- a/lib/WebGUI/Wobject/WSClient.pm +++ b/lib/WebGUI/Wobject/WSClient.pm @@ -491,7 +491,7 @@ sub www_view { # to do it this way, but it certainly is the least obtrusive to default # webgui flow. This feature currently requires a patched WebGUI.pm file. if ($session{'form'}{'redirectURL'}) { - $session{'page'}{'redirectURL'} = $session{'form'}{'redirectURL'}; + WebGUI::HTTP::setRedirect($session{'form'}{'redirectURL'}); } $var{'results'} = \@result;