more session related bug fixes

This commit is contained in:
JT Smith 2006-01-14 21:30:49 +00:00
parent c8f1327be0
commit b1ab07d24f
6 changed files with 38 additions and 38 deletions

View file

@ -198,10 +198,14 @@ sub commit {
#-------------------------------------------------------------------
=head2 connect ( dsn, user, pass, session )
=head2 connect ( session, dsn, user, pass )
Constructor. Connects to the database using DBI.
=head2 session
A reference to the active WebGUI::Session object.
=head2 dsn
The Database Service Name of the database you wish to connect to. It looks like 'DBI:mysql:dbname;host=localhost'.
@ -214,18 +218,14 @@ The username to use to connect to the database defined by dsn.
The password to use to connect to the database defined by dsn.
=head2 session
A reference to the active WebGUI::Session object.
=cut
sub connect {
my $class = shift;
my $session = shift;
my $dsn = shift;
my $user = shift;
my $pass = shift;
my $session = shift;
my $dbh = DBI->connect($dsn,$user,$pass,{RaiseError=>0,AutoCommit=>1 }) or $session->errorHandler->fatal("Couldn't connect to database.");
if ( $dsn =~ /Oracle/ ) { # Set Oracle specific attributes
$dbh->{LongReadLen} = 512 * 1024;