Commit a707666e authored by Xavier Guimard's avatar Xavier Guimard

LEMONLDAP::NG : little bug in Portal/Simple.pm, timeout avoidance in

                Manager/Conf/DBI.pm and new feature in Handler: port can
                be fixed in redirection to avoid some Apache problems.


git-svn-id: svn://svn.forge.objectweb.org/svnroot/lemonldap/branches/lemonldap-ng_version_0_8-bugfixes@178 1dbb9719-a921-0410-b57f-c3a383c2c641
parent f737150d
......@@ -43,7 +43,8 @@ sub lastCfg {
sub dbh {
my $self = shift;
$self->{dbiTable} ||= "lmconfig";
return $self->{dbh} ||= DBI->connect_cached(
return $self->{dbh} if ( $self->{dbh} and $self->{dbh}->ping );
return DBI->connect_cached(
$self->{dbiChain}, $self->{dbiUser},
$self->{dbiPassword}, { RaiseError => 1 }
);
......
......@@ -130,8 +130,8 @@ sub header {
# CGI.pm overload to add Lemonldap::NG cookie
sub redirect {
my $self = shift;
if ( $_[0]->{cookie} ) {
$self->SUPER::redirect( @_, -cookie => $_[0]->{cookie} );
if ( $self->{cookie} ) {
$self->SUPER::redirect( @_, -cookie => $self->{cookie} );
}
else {
$self->SUPER::redirect(@_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment