]> ruin.nu Git - ndwebbie.git/commitdiff
Motd isn't used anymore
authorMichael Andreen <harv@ruin.nu>
Sun, 20 Jul 2008 12:27:31 +0000 (14:27 +0200)
committerMichael Andreen <harv@ruin.nu>
Sun, 20 Jul 2008 12:27:31 +0000 (14:27 +0200)
NDWeb/Pages/Motd.pm [deleted file]
templates/motd.tmpl [deleted file]
templates/xml.tmpl [deleted file]

diff --git a/NDWeb/Pages/Motd.pm b/NDWeb/Pages/Motd.pm
deleted file mode 100644 (file)
index 5e7889d..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#**************************************************************************
-#   Copyright (C) 2006 by Michael Andreen <harvATruinDOTnu>               *
-#                                                                         *
-#   This program is free software; you can redistribute it and/or modify  *
-#   it under the terms of the GNU General Public License as published by  *
-#   the Free Software Foundation; either version 2 of the License, or     *
-#   (at your option) any later version.                                   *
-#                                                                         *
-#   This program is distributed in the hope that it will be useful,       *
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
-#   GNU General Public License for more details.                          *
-#                                                                         *
-#   You should have received a copy of the GNU General Public License     *
-#   along with this program; if not, write to the                         *
-#   Free Software Foundation, Inc.,                                       *
-#   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
-#**************************************************************************/
-
-package NDWeb::Pages::Motd;
-use strict;
-use warnings FATAL => 'all';
-use ND::Include;
-use CGI qw/:standard/;
-use NDWeb::Include;
-
-use base qw/NDWeb::XMLPage/;
-
-$NDWeb::Page::PAGES{motd} = __PACKAGE__;
-
-sub render_body {
-       my $self = shift;
-       my ($BODY) = @_;
-       $self->{TITLE} = 'Edit MOTD';
-       my $DBH = $self->{DBH};
-
-       return $self->noAccess unless $self->isHC;
-
-       if (defined param 'cmd' and param('cmd') eq 'change'){
-               $DBH->begin_work;
-               my $query = $DBH->prepare(q{UPDATE misc SET value= ? WHERE id='MOTD'});
-               my $motd = escapeHTML(param('motd'));
-               $query->execute($motd);
-               log_message $ND::UID,"Updated MOTD";
-               $DBH->commit;
-               $BODY->param(MOTD => $motd);
-       }else{
-               my ($motd) = $DBH->selectrow_array(q{SELECT value FROM misc WHERE id='MOTD'});
-               $BODY->param(MOTD => $motd);
-       }
-       return $BODY;
-}
-
-1;
diff --git a/templates/motd.tmpl b/templates/motd.tmpl
deleted file mode 100644 (file)
index 327564c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<form action="<TMPL_VAR NAME=PAGE>" method="post"><fieldset> <legend>Motd</legend>
-       <textarea rows="25" cols="80" name="motd"><TMPL_VAR NAME=MOTD></textarea>
-       <input type="hidden" name="cmd" value="change"/>
-       <input type="hidden" name="page" value="motd"/>
-       <br/><input type="submit" value="Change"/>
-</fieldset></form>
diff --git a/templates/xml.tmpl b/templates/xml.tmpl
deleted file mode 100644 (file)
index 09c1ee8..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<TMPL_VAR NAME=Error>
-<TMPL_VAR NAME=BODY>