openrat-cms

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

commit 6b8040ea4d14dcd3fe57d3eff36dcc61e4542e3c
parent 7d6bdfd6d69450e41602087cfc1d769430642c78
Author: dankert <devnull@localhost>
Date:   Wed, 19 Jan 2011 00:32:32 +0100

Fix: Notice vermeiden.

Diffstat:
action/LoginAction.class.php | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/action/LoginAction.class.php b/action/LoginAction.class.php @@ -98,13 +98,20 @@ class LoginAction extends Action $db = db_connection(); - if ( !is_object($db) || !$db->available ) + if ( !is_object($db) ) { - $this->addNotice('database',$db->conf['comment'],'DATABASE_CONNECTION_ERROR',OR_NOTICE_ERROR,array(),array('Database Error: '.$db->error)); + $this->addNotice('database','','DATABASE_CONNECTION_ERROR',OR_NOTICE_ERROR,array(),array('no connection')); //$this->callSubAction('showlogin'); return false; } + if ( !$db->available ) + { + $this->addNotice('database',$db->conf['comment'],'DATABASE_CONNECTION_ERROR',OR_NOTICE_ERROR,array(),array('Database Error: '.$db->error)); + //$this->callSubAction('showlogin'); + return false; + } + // Zeichensatz der Datenbank benutzen if ( isset($db->conf['charset']) ) $charset = $db->conf['charset'];