]> ruin.nu Git - ndwebbie.git/commitdiff
connection to db is done in handler, so should do potential rollback and disconnect...
authorMichael Andreen <harv@ruin.nu>
Sat, 20 Jan 2007 12:58:13 +0000 (12:58 +0000)
committerMichael Andreen <harv@ruin.nu>
Sat, 20 Jan 2007 12:58:13 +0000 (12:58 +0000)
ND.pm
ND/Web/XMLPage.pm

diff --git a/ND.pm b/ND.pm
index 50629e8efab535a072d2558359579659b1f959bd..28bd90ea0a177f5281b9deddd327cd33ec2f4810 100755 (executable)
--- a/ND.pm
+++ b/ND.pm
@@ -46,6 +46,9 @@ sub handler {
        $page = ND::Web::Page->new(PAGE => $page, DBH => $ND::DBH, URI => $ENV{REQUEST_URI});
        $page->render;
 
+       $ND::DBH->rollback unless $ND::DBH->{AutoCommit};
+       $ND::DBH->disconnect;
+
        return Apache2::Const::OK;
 }
 
index 2a876a4cbff879584af9340606726bedb4e5f183..561fdc8f608c9535c91219eb13239916ca76ce56 100644 (file)
@@ -125,11 +125,6 @@ sub render : method {
        my $output = $template->output;
        print header(-type=> $type, -charset => 'utf-8', -Content_Length => length $output);
        print $output;
-
-
-       $DBH->rollback unless $DBH->{AutoCommit};
-       $DBH->disconnect;
-
 };
 
 1;