]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/XMLPage.pm
minor changes
[ndwebbie.git] / ND / Web / XMLPage.pm
index c040c76c671d2a06f605e470f068c44b2ff7314a..ccdb7c511a07897dbf5777ba78b2ecc8da6475a2 100644 (file)
@@ -27,7 +27,7 @@ use ND::Include;
 use ND::Web::Page;
 use ND::Web::Include;
 
-our @ISA = qw/ND::Web::Page/;
+use base qw/ND::Web::Page/;
 
 sub noAccess () {
        HTML::Template->new(filename => 'templates/NoAccess.tmpl', global_vars => 1, cache => 1);
@@ -80,6 +80,9 @@ sub render : method {
        $self->process;
 
        my $type = 'text/html';
+       if ($self->{HTTP_ACCEPT} =~ m{application/xhtml\+xml}){
+               $type = 'application/xhtml+xml'
+       }
        my $body;
        if ($self->{XML}){
                $type = 'text/xml';
@@ -118,18 +121,12 @@ sub render : method {
                my ($css) = $DBH->selectrow_array(q{SELECT css FROM users WHERE uid = $1},undef,$ND::UID);
                $template->param(CSS => $css);
                $template->param(TITLE => $self->{TITLE});
-
        }
        $template->param(Error => $ND::ERROR);
        $template->param(BODY => $body->output);
        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;