]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Pages/Motd.pm
use base instead of setting @ISA manually
[ndwebbie.git] / ND / Web / Pages / Motd.pm
index a0ad8a4ee1811a8cc56e2498c60ee7882fea77e1..2914191611461933035ead519d32a81f286eb7b3 100644 (file)
@@ -24,23 +24,17 @@ use ND::Include;
 use CGI qw/:standard/;
 use ND::Web::Include;
 
-$ND::PAGES{motd} = {parse => \&parse, process => \&process, render=> \&render};
+use base qw/ND::Web::XMLPage/;
 
-sub parse {
-       my ($uri) = @_;
-}
-
-sub process {
-
-}
-
-sub render {
-       my ($DBH,$BODY) = @_;
-
-       $ND::TEMPLATE->param(TITLE => 'Edit MOTD');
+$ND::Web::Page::PAGES{motd} = __PACKAGE__;
 
+sub render_body {
+       my $self = shift;
+       my ($BODY) = @_;
+       $self->{TITLE} = 'Edit MOTD';
+       my $DBH = $self->{DBH};
 
-       return $ND::NOACCESS unless isHC();
+       return $self->noAccess unless $self->isHC;
 
        if (defined param 'cmd' and param('cmd') eq 'change'){
                $DBH->begin_work;