Skip to content
Snippets Groups Projects
Commit d3adcfab authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

simplification: redirection is never used

parent 0cefdf76
No related branches found
No related tags found
No related merge requests found
......@@ -159,49 +159,41 @@ sub respond {
unless ($key eq 'out');
}
## An action may redirect to an external URL
if ($self->{url_redirection}) {
## Parse template
my $tt2 = Template->new(
{
ENCODING => 'iso-8859-1', ## le défaut apparemment
FILTERS => {
encode_utf8 =>
[ \&IdPAccountManager::Tools::encode_utf8, 0 ],
escape_quotes =>
[ \&IdPAccountManager::Tools::escape_quotes, 0 ]
},
INCLUDE_PATH => $self->{configuration}->{root_manager_dir} . ':'
. $self->{configuration}->{root_manager_dir}
. '/templates/accountProfiles',
#DEBUG => 'all',
#DEBUG => 'caller',
#DEBUG => 'parser'
}
);
printf "Location: %s\n\n", $self->{url_redirection};
my $template;
## nobanner is used to do AJAX to get only pieces of HTML to load in the web client
if ($self->{in}->{style} eq 'nobanner') {
$template = 'templates/web/index-nobanner.tt2.html';
} else {
$template = 'templates/web/index.tt2.html';
}
## Parse template
my $tt2 = Template->new(
{
ENCODING => 'iso-8859-1', ## le défaut apparemment
FILTERS => {
encode_utf8 =>
[ \&IdPAccountManager::Tools::encode_utf8, 0 ],
escape_quotes =>
[ \&IdPAccountManager::Tools::escape_quotes, 0 ]
},
INCLUDE_PATH => $self->{configuration}->{root_manager_dir} . ':'
. $self->{configuration}->{root_manager_dir}
. '/templates/accountProfiles',
#DEBUG => 'all',
#DEBUG => 'caller',
#DEBUG => 'parser'
}
unless ($tt2->process($template, $self->{out}, \*STDOUT)) {
printf "Content-type: text/plain\n\n Error: %s", $tt2->error();
$self->{logger}->log(
level => LOG_ERROR,
message => sprintf("Web parser error : %s", $tt2->error())
);
my $template;
## nobanner is used to do AJAX to get only pieces of HTML to load in the web client
if ($self->{in}->{style} eq 'nobanner') {
$template = 'templates/web/index-nobanner.tt2.html';
} else {
$template = 'templates/web/index.tt2.html';
}
unless ($tt2->process($template, $self->{out}, \*STDOUT)) {
printf "Content-type: text/plain\n\n Error: %s", $tt2->error();
$self->{logger}->log(
level => LOG_ERROR,
message => sprintf("Web parser error : %s", $tt2->error())
);
}
}
## Ignore some type of errors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment