]> ruin.nu Git - ndwebbie.git/commitdiff
MOTD class
authorMichael Andreen <harv@ruin.nu>
Fri, 19 Jan 2007 12:33:31 +0000 (12:33 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 19 Jan 2007 12:33:31 +0000 (12:33 +0000)
ND/Web/Pages/Motd.pm
startup.pl

index a0ad8a4ee1811a8cc56e2498c60ee7882fea77e1..80a011ba6d25bde6edf4c2c6909a650f00dd3dd2 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};
+our @ISA = 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;
index dc3ab6c721740842528010e63bf71375fef56358..62a89b52105ce7c5bfa456427ad468b03ac268b3 100644 (file)
@@ -44,7 +44,7 @@ use ND::Web::Pages::Alliances;
 use ND::Web::Pages::MemberIntel;
 use ND::Web::Pages::Resources;
 use ND::Web::Pages::PlanetNaps;
-#use ND::Web::Pages::Motd;
+use ND::Web::Pages::Motd;
 #use ND::Web::Pages::Forum;
 #use ND::Web::Pages::Settings;
 use ND::Web::Pages::Graph;