bind production mode view errors to admin users

This commit is contained in:
Ian 2013-05-29 15:05:16 +02:00
parent b0af9f201a
commit 68fbc2112e

View File

@ -133,10 +133,12 @@ if (!function_exists('errorToExceptionHandler')) {
exit; // make sure to exit in case of database connection errors.
}
if ($serendipity['production'] === true) {
if( serendipity_checkPermission('adminUsers') ) {
// ToDo: enhance for more special serendipity error needs
$str = '<p> == SERENDIPITY ERROR == </p>';
$str .= '<p>Please correct:</p>';
$str .= '<p>' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '</p>';
#var_dump(headers_list());
if (headers_sent()) {
serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, which hardly isn't seen by many users
} else {
@ -160,6 +162,7 @@ document.body.insertBefore(fragment, document.body.childNodes[0]);
}
}
}
}
if (!function_exists('file_get_contents')) {
function file_get_contents($filename, $use_include_path = 0) {