aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fripost/Panel/Login.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Fripost/Panel/Login.pm')
-rw-r--r--lib/Fripost/Panel/Login.pm16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/Fripost/Panel/Login.pm b/lib/Fripost/Panel/Login.pm
index a147371..1483e06 100644
--- a/lib/Fripost/Panel/Login.pm
+++ b/lib/Fripost/Panel/Login.pm
@@ -20,7 +20,6 @@ use CGI::Application::Plugin::Redirect;
use CGI::Application::Plugin::ConfigAuto 'cfg';
use Fripost::Schema;
-use File::Spec::Functions qw/catfile catdir/;
use HTML::Entities;
use Net::IDN::Encode qw/email_to_ascii/;
@@ -92,12 +91,11 @@ sub setup {
my $self = shift;
$self->header_props( -charset=>'utf-8' );
- $self->tmpl_path( catdir ( $self->cfg('pwd'), $self->cfg('tmpl_path') ) );
+ $self->tmpl_path( $self->cfg('tmpl_path') );
$self->mode_param( sub {
my $self = shift;
my $q = $self->query;
- print STDERR $ENV{PATH_INFO} . '?' . $q->query_string, "\n";
# The user just logged in
return 'okay' if defined $q->param('login');
@@ -135,9 +133,9 @@ sub setup {
# wanted to visit.
sub okay : Runmode {
my $self = shift;
- my $destination = $self->query->param('destination') //
- $self->query->url;
- return $self->redirect($destination);
+ my $redirect = $self->query->param('redirect') //
+ $self->query->url;
+ return $self->redirect($redirect);
}
@@ -154,8 +152,8 @@ sub login : Runmode {
$self->query->param('a') eq 'login';
# Where the users wants to go
- $self->query->param( destination => $self->query->self_url)
- unless defined $self->query->param('destination');
+ $self->query->param( redirect => $self->query->self_url)
+ unless defined $self->query->param('redirect');
return $self->login_box;
}
@@ -167,7 +165,7 @@ sub login_box {
my $template = $self->load_tmpl( 'login.html', cache => 1, utf8 => 1 );
$template->param( error => $self->authen->login_attempts );
- $template->param( destination => $self->query->param('destination') );
+ $template->param( redirect => $self->query->param('redirect') );
return $template->output;
}