From 6d5dbae53cd4b4b97da0b0c558292a7f1062a524 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Fri, 25 Jul 2008 11:13:15 -0400 Subject: [PATCH] Prefer File_Info over mime_content_type + detect mime type when uploading + some code style --- program/steps/error.inc | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/program/steps/error.inc b/program/steps/error.inc index 2d87a9d..bd6fa28 100644 --- a/program/steps/error.inc +++ b/program/steps/error.inc @@ -5,7 +5,7 @@ | program/steps/error.inc | | | | This file is part of the RoundCube Webmail client | - | Copyright (C) 2005, RoundCube Dev. - Switzerland | + | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -63,17 +63,26 @@ EOF; } +// database connection error +else if ($ERROR_CODE==603) + { + $__error_title = "DATABASE ERROR: CONNECTION FAILED!"; + $__error_text = <<<EOF +Unable to connect to the database!<br /> +Please contact your server-administrator. +EOF; + } // system error else { $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!"; $__error_text = "Please contact your server-administrator."; - + if (($CONFIG['debug_level'] & 4) && $ERROR_MESSAGE) $__error_text = $ERROR_MESSAGE; else - $__error_text = 'Error No. '.dechex($ERROR_CODE).')'; + $__error_text = sprintf('Error No. [0x%04X]', $ERROR_CODE); } @@ -88,11 +97,10 @@ -if (template_exists('error')) +if ($OUTPUT->template_exists('error')) { - $OUTPUT->scripts = array(); - $OUTPUT->script_files = array(); - parse_template('error'); + $OUTPUT->reset(); + $OUTPUT->send('error'); } @@ -115,4 +123,4 @@ </html> EOF; -?> \ No newline at end of file +?> -- Gitblit v1.9.1