From bbbbad20de5f318a099fb82ae56071073b0596a6 Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 10 Mar 2008 15:13:39 +0000 Subject: some new views git-svn-id: https://code.elgg.org/elgg/trunk@137 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 78 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'engine') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index f7b71268a..8c187ef8b 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -189,7 +189,7 @@ */ function page_draw($title, $body) { - return elgg_view('pageshell', array( + return elgg_view('pageshells/pageshell', array( 'title' => $title, 'body' => $body, 'sysmessages' => system_messages(null,"") @@ -447,43 +447,43 @@ /** * Error handling */ - - /** - * PHP Error handler function. - * This function acts as a wrapper to catch and report PHP error messages. - * - * @see http://www.php.net/set-error-handler - * @param int $errno The level of the error raised - * @param string $errmsg The error message - * @param string $filename The filename the error was raised in - * @param int $linenum The line number the error was raised at - * @param array $vars An array that points to the active symbol table at the point that the error occurred - */ - function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) - { - $error = date("Y-m-d H:i:s (T)") . ": \"" . $errmsg . "\" in file " . $filename . " (line " . $linenum . ")"; - - switch ($errno) { - case E_USER_ERROR: - error_log("ERROR: " . $error); - register_error("ERROR: " . $error); - - // Since this is a fatal error, we want to stop any further execution but do so gracefully. - throw new Exception("ERROR: " . $error); - break; - - case E_WARNING : - case E_USER_WARNING : - error_log("WARNING: " . $error); - // register_error("WARNING: " . $error); - break; - - default: - error_log("DEBUG: " . $error); - // register_error("DEBUG: " . $error); + + /** + * PHP Error handler function. + * This function acts as a wrapper to catch and report PHP error messages. + * + * @see http://www.php.net/set-error-handler + * @param int $errno The level of the error raised + * @param string $errmsg The error message + * @param string $filename The filename the error was raised in + * @param int $linenum The line number the error was raised at + * @param array $vars An array that points to the active symbol table at the point that the error occurred + */ + function __elgg_php_error_handler($errno, $errmsg, $filename, $linenum, $vars) + { + $error = date("Y-m-d H:i:s (T)") . ": \"" . $errmsg . "\" in file " . $filename . " (line " . $linenum . ")"; + + switch ($errno) { + case E_USER_ERROR: + error_log("ERROR: " . $error); + register_error("ERROR: " . $error); + + // Since this is a fatal error, we want to stop any further execution but do so gracefully. + throw new Exception("ERROR: " . $error); + break; + + case E_WARNING : + case E_USER_WARNING : + error_log("WARNING: " . $error); + // register_error("WARNING: " . $error); + break; + + default: + error_log("DEBUG: " . $error); + // register_error("DEBUG: " . $error); } - return true; + return true; } /** @@ -495,12 +495,12 @@ */ function __elgg_php_exception_handler($exception) { - - error_log("*** FATAL EXCEPTION *** : " . $exception); + + error_log("*** FATAL EXCEPTION *** : " . $exception); $body = elgg_view("messages/exceptions/exception",array('object' => $exception)); echo page_draw("We've encountered a problem.", $body); - } + } ?> \ No newline at end of file -- cgit v1.2.3