X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FPages%2FMotd.pm;h=2914191611461933035ead519d32a81f286eb7b3;hb=571b019af4b9e3e051447f82135bb630a4fb4db8;hp=a0ad8a4ee1811a8cc56e2498c60ee7882fea77e1;hpb=9ce5a8529e75cb109ed9ba3fc788c94ef47b1080;p=ndwebbie.git diff --git a/ND/Web/Pages/Motd.pm b/ND/Web/Pages/Motd.pm index a0ad8a4..2914191 100644 --- a/ND/Web/Pages/Motd.pm +++ b/ND/Web/Pages/Motd.pm @@ -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;