Aleksander Machniak
2013-12-25 c97625e02a95ebd995af8a06c27229581a071ddd
program/steps/utils/error.inc
@@ -5,7 +5,7 @@
 | program/steps/utils/error.inc                                         |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2005-2012, The Roundcube Dev Team                       |
 | Copyright (C) 2005-2013, The Roundcube Dev Team                       |
 |                                                                       |
 | Licensed under the GNU General Public License version 3 or            |
 | any later version with exceptions for skins & plugins.                |
@@ -44,21 +44,21 @@
// authorization error
else if ($ERROR_CODE==401) {
  $__error_title = "AUTHORIZATION FAILED";
  $__error_text  = "Could not verify that you are authorized to access this service!<br />\n".
                   "Please contact your server-administrator.";
    $__error_text  = "Could not verify that you are authorized to access this service!<br />\n"
        . "Please contact your server-administrator.";
}
// forbidden due to request check
else if ($ERROR_CODE==403) {
  $__error_title = "REQUEST CHECK FAILED";
  $__error_text  = "Access to this service was denied due to failing security checks!<br />\n".
                   "Please contact your server-administrator.";
    $__error_text  = "Access to this service was denied due to failing security checks!<br />\n"
        . "Please contact your server-administrator.";
}
// failed request (wrong step in URL)
else if ($ERROR_CODE==404) {
  $__error_title = "REQUEST FAILED/FILE NOT FOUND";
  $request_url = htmlentities($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
    $__error_title = "REQUEST FAILED/FILE NOT FOUND";
  $__error_text  = <<<EOF
The requested page was not found!<br />
Please contact your server-administrator.
@@ -69,8 +69,7 @@
}
// database connection error
else if ($ERROR_CODE==601)
{
else if ($ERROR_CODE == 601) {
  $__error_title = "CONFIGURATION ERROR";
  $__error_text  =  nl2br($ERROR_MESSAGE) . "<br />Please read the INSTALL instructions!";
}
@@ -86,10 +85,12 @@
  $__error_title = "SERVICE CURRENTLY NOT AVAILABLE!";
  $__error_text  = "Please contact your server-administrator.";
  if (($rcmail->config->get('debug_level') & 4) && $ERROR_MESSAGE)
    if (($rcmail->config->get('debug_level') & 4) && $ERROR_MESSAGE) {
    $__error_text = $ERROR_MESSAGE;
  else
    }
    else {
    $__error_text = sprintf('Error No. [%s]', $ERROR_CODE);
    }
}
$HTTP_ERR_CODE = $ERROR_CODE && $ERROR_CODE < 600 ? $ERROR_CODE : 500;
@@ -137,4 +138,3 @@
EOF;
exit;