openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 551f06a74e8e1720572b6cfe9cdb40229e499464
parent bd947c6ed85dcb92a9053b80498f21b1a4357c3a
Author: dankert <devnull@localhost>
Date:   Sat,  1 Dec 2007 00:41:27 +0100

?berfl?ssig gewordene Formular-Klassen entfernt.

Diffstat:
formClasses/AbstractForm.class.php | 75---------------------------------------------------------------------------
formClasses/LoginForm.class.php | 48------------------------------------------------
2 files changed, 0 insertions(+), 123 deletions(-)

diff --git a/formClasses/AbstractForm.class.php b/formClasses/AbstractForm.class.php @@ -1,74 +0,0 @@ -<?php -// $Id$ -// --------------------------------------------------------------------------- -// OpenRat Content Management System -// Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de -// -// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// --------------------------------------------------------------------------- - - -/** - * Abstrakte Formularklasse - * - * @author $Author$ - * @version $Revision$ - * @package openrat.forms - */ - -class AbstractForm -{ - var $errors = array(); - var $httpParameter = array(); - - - function AbstractForm() - { - $vars = array_keys(get_class_vars(get_class($this))); - global $REQ; - foreach( $vars as $key ) - if ( isset($REQ[$key]) ) - $this->$key=$REQ[$key]; - } - - - function addError( $feld,$error ) - { - $this->errors[ $feld ] = $error; - } - - - function validate() - { - die( get_class($this).': method validate() must be implemented by subclass' ); - } - - - function hasErrors() - { - return count($this->errors) == 0; - } - - - function getErrors() - { - global $inputErrors; - $inputErrors = $this->errors; - - return $this->errors; - } -} - -?>- \ No newline at end of file diff --git a/formClasses/LoginForm.class.php b/formClasses/LoginForm.class.php @@ -1,47 +0,0 @@ -<?php -// $Id$ -// --------------------------------------------------------------------------- -// OpenRat Content Management System -// Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de -// -// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// --------------------------------------------------------------------------- - - -/** - * Login-Formular - * - * @author $Author$ - * @version $Revision$ - * @package openrat.forms - */ - -class LoginForm extends AbstractForm -{ - var $login_name; - var $login_password; - - - function validate() - { - if ( $this->login_name == '' ) - $this->addError('login_name','LOGIN_ERROR_LOGIN_NAME_REQUIRED'); - - if ( $this->login_password == '' ) - $this->addError('login_password','LOGIN_ERROR_LOGIN_PASSWORD_REQUIRED'); - } -} - -?>- \ No newline at end of file