Commit a707666e authored by Yadd's avatar Yadd

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 { ...@@ -43,7 +43,8 @@ sub lastCfg {
sub dbh { sub dbh {
my $self = shift; my $self = shift;
$self->{dbiTable} ||= "lmconfig"; $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->{dbiChain}, $self->{dbiUser},
$self->{dbiPassword}, { RaiseError => 1 } $self->{dbiPassword}, { RaiseError => 1 }
); );
......
...@@ -130,8 +130,8 @@ sub header { ...@@ -130,8 +130,8 @@ sub header {
# CGI.pm overload to add Lemonldap::NG cookie # CGI.pm overload to add Lemonldap::NG cookie
sub redirect { sub redirect {
my $self = shift; my $self = shift;
if ( $_[0]->{cookie} ) { if ( $self->{cookie} ) {
$self->SUPER::redirect( @_, -cookie => $_[0]->{cookie} ); $self->SUPER::redirect( @_, -cookie => $self->{cookie} );
} }
else { else {
$self->SUPER::redirect(@_); $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