openrat-cms

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

commit 2d78d5875c4853dbd4b6c5957efe707a0cc0b03d
parent 24df5830355d5b2d56f74f3cc3555a81c0932eb6
Author: dankert <devnull@localhost>
Date:   Sat, 10 Nov 2007 01:56:00 +0100

Mit Status 503 reagieren, wenn Datenbank nicht vorhanden.

Diffstat:
do.php | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/do.php b/do.php @@ -171,7 +171,10 @@ header( 'Content-Type: text/html; charset='.lang('CHARSET') ); $db = Session::getDatabase(); if ( is_object( $db ) ) { - $db->connect(); + $ok = $db->connect(); + if ( !$ok ) + Http::sendStatus('503','Service Unavailable','Database is not available: '.$db->error); + Session::setDatabase( $db ); }