aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Controller.pm
diff options
context:
space:
mode:
authorpurge <purge@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-10-02 08:51:59 +0000
committerpurge <purge@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-10-02 08:51:59 +0000
commit08c27c5b18df934a3f052d50a9e4ab361ddc4f3e (patch)
tree48dd7b10c3de9be7dbb63ab013677762219164f2 /lib/Reaction/UI/Controller.pm
parentbbf88e0ddb212f945a9641b80746e20cbafe3378 (diff)
downloadreaction-08c27c5b18df934a3f052d50a9e4ab361ddc4f3e.tar.gz
reaction-08c27c5b18df934a3f052d50a9e4ab361ddc4f3e.zip
allow redirect_to a url parameter
Diffstat (limited to 'lib/Reaction/UI/Controller.pm')
-rw-r--r--lib/Reaction/UI/Controller.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Reaction/UI/Controller.pm b/lib/Reaction/UI/Controller.pm
index 2d1b843..8222215 100644
--- a/lib/Reaction/UI/Controller.pm
+++ b/lib/Reaction/UI/Controller.pm
@@ -55,7 +55,7 @@ sub pop_viewports_to {
}
sub redirect_to {
- my ($self, $c, $to, $cap, $args, $attrs) = @_;
+ my ($self, $c, $to, $cap, $args, $attrs, $domain) = @_;
#the confess calls could be changed later to $c->log ?
my $action;
@@ -76,6 +76,7 @@ sub redirect_to {
$args ||= $c->req->args;
$attrs ||= {};
my $uri = $c->uri_for($action, $cap, @$args, $attrs);
+ $uri->host($domain) if $domain;
$c->res->redirect($uri);
}