From 536e2679e884eb2c9f450a88a4d681c47e343586 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 18 Feb 2005 19:53:34 +0000 Subject: [PATCH] more bug fixes --- docs/upgrades/upgrade_6.2.11-6.3.0.pl | 2 +- lib/WebGUI/Session.pm | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/upgrades/upgrade_6.2.11-6.3.0.pl b/docs/upgrades/upgrade_6.2.11-6.3.0.pl index 7112d9782..052717a93 100644 --- a/docs/upgrades/upgrade_6.2.11-6.3.0.pl +++ b/docs/upgrades/upgrade_6.2.11-6.3.0.pl @@ -1439,7 +1439,7 @@ sub walkTree { $groupIdEdit = $wobject->{groupIdEdit}; $ownerId = $wobject->{ownerId}; } - $className = 'WebGUI::Asset::Wobject::'.$wobject->{namespace}; + my $className = 'WebGUI::Asset::Wobject::'.$wobject->{namespace}; WebGUI::SQL->write("insert into asset (assetId, parentId, lineage, className, state, title, menuTitle, url, startDate, endDate, isHidden, ownerUserId, groupIdView, groupIdEdit, encryptPage, assetSize) values (".quote($wobjectId).", ".quote($pageId).", ".quote($wobjectLineage).", ".quote($className).",'published',".quote($wobject->{title}||'Untitled').", diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 47d7d0563..571b10c79 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -153,10 +153,19 @@ Cleans up a WebGUI session information from memory and disconnects from any reso =cut sub close { - $session{'dbh'}->disconnect(); + $session{asset}->DESTROY() if (exists $session{asset}); + foreach my $slavedbh (@{$session{slave}}) { + $slavedbh->disconnect(); + } + $session{dbh}->disconnect() if (exists $session{dbh}); + $session{cgi}->DESTROY() if (exists $session{cgi}); undef %session; $ENV{PATH_INFO} = "/"; #work around to fix a bug in mod_perl (win32) } +#------------------------------------------------------------------- +sub DESTROY { + WebGUI::Session::close(); +} #-------------------------------------------------------------------