[Shuttlebb-svn] SF.net SVN: shuttlebb: [86] branch
Brought to you by:
afterlife69,
danb00
|
From: <aft...@us...> - 2006-12-10 09:24:30
|
Revision: 86
http://svn.sourceforge.net/shuttlebb/?rev=86&view=rev
Author: afterlife69
Date: 2006-12-10 01:24:27 -0800 (Sun, 10 Dec 2006)
Log Message:
-----------
started work on message_handler
Modified Paths:
--------------
branch/sources/class_message.php
Added Paths:
-----------
branch/language/english/global.php
branch/sources/cache/index.html
branch/sources/captcha/index.html
branch/sources/dbal/index.html
branch/sources/error/
branch/sources/error/index.html
branch/sources/error/templates/
branch/sources/error/templates/index.html
branch/sources/index.html
branch/template/Default/cache/%%E2^E2A^E2AEC254%%module_index.html
Added: branch/language/english/global.php
===================================================================
--- branch/language/english/global.php (rev 0)
+++ branch/language/english/global.php 2006-12-10 09:24:27 UTC (rev 86)
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Base language entries
+ *
+ * This is the base for all modules language
+ *
+ * $Id$
+ * $Rev$
+ * $Date$
+ */
+
+if ( ! define ( 'IN_SBB' ) )
+{
+ return;
+}
+
+$lang = array(
+ 'Board_Index' => 'Board Index'
+);
+
+?>
\ No newline at end of file
Property changes on: branch/language/english/global.php
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branch/sources/cache/index.html
===================================================================
Property changes on: branch/sources/cache/index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branch/sources/captcha/index.html
===================================================================
Property changes on: branch/sources/captcha/index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: branch/sources/class_message.php
===================================================================
--- branch/sources/class_message.php 2006-12-06 05:34:36 UTC (rev 85)
+++ branch/sources/class_message.php 2006-12-10 09:24:27 UTC (rev 86)
@@ -20,55 +20,112 @@
* @author ShuttleBB Development Team <dev...@sh...>
* @author Dean Newman <web...@au...>
*/
-class class_message
+class message_handler
{
- var $code;
var $message;
+ var $title;
+ var $level;
+
var $line;
var $file;
var $sql;
- var $level;
- function class_message($message, $code = false, $line = false, $file = false, $sql = false, $level = false)
+ function message_handler($level, $message, $title = '', $line = '', $file = '', $sql = '')
{
- global $config;
+
}
- function insert_log()
+ function report()
{
- global $config;
-
- switch ( $config['error_report_level'] )
+ global $db;
+
+ switch ( $this->level )
{
- default:
+ //
+ // Critical error, log via email and sql or file
+ //
case ERROR_CRITICAL:
-
+ ( is_object($db) ) ? $this->sql_insert_log() : $this->file_insert_log();
+ $this->mail_insert_log();
break;
- case ERROR_TEMPLATE:
-
+ //
+ // Major error, logs via sql or file
+ //
+ case ERROR_MAJOR:
+ ( is_object($db) ) ? $this->sql_insert_log() : $this->file_insert_log();
break;
- case ERROR_DATABASE:
-
+ //
+ // Minor error, logs via sql or file
+ //
+ case ERROR_MINOR:
+ ( is_object($db) ) ? $this->sql_insert_log() : $this->file_insert_log();
break;
- case ERROR_CACHE:
-
- break;
- case ERROR_ALL:
-
- break;
}
+
+ return;
}
- function output()
+ function sql_insert_log()
{
- global $template;
- global $config;
}
-}
-
-function trigger_message($message, $code, $title)
-{
+ function file_insert_log()
+ {
+ }
+
+ function mail_insert_log()
+ {
+ }
+
+ function render()
+ {
+ global $template, $db;
+
+ /**
+ * If the template object is not set
+ */
+ if ( ! is_object($template) )
+ {
+ /**
+ * Build the smarty object
+ *
+ * @link http://smarty.php.net
+ */
+ $template = new Smarty; // Construct the smarty template object
+ $template->plugin_dir = (INC_PATH . 'smarty/plugins/'); // Set the plugins directory
+ $template->template_dir = (INC_PATH . 'error/templates/'); // Set the template directory
+ $template->cache_dir = ($template->template_dir . 'cache/'); // Set the caching directory
+ $template->compile_dir = ($template->template_dir . 'compile/'); // Set the template compilation directory
+ $template->config_dir = ($template->template_dir . 'config/'); // Set the configuration directory
+ $template->debugging = false; // Turn debugging console off
+ $template->compile_check = true; // Turn the compile check on
+ $template->caching = true; // Turn overall caching on
+ $template->force_compile = false; // Never force compiling
+ }
+
+ /**
+ * Delete current output
+ */
+ ob_end_clean();
+
+ /**
+ * Render template
+ */
+ $template->assign('error', array(
+ 'level' => $this->level,
+ 'title' => $this->title,
+ 'message' => $this->message,
+ 'line' => $this->line,
+ 'file' => $this->file,
+ 'sql' => $this->sql)
+ );
+
+ $template->display('error_' . $this->level . '.html');
+
+ $db->sql_close();
+
+ exit;
+ }
}
?>
\ No newline at end of file
Added: branch/sources/dbal/index.html
===================================================================
Property changes on: branch/sources/dbal/index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branch/sources/error/index.html
===================================================================
Property changes on: branch/sources/error/index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branch/sources/error/templates/index.html
===================================================================
Property changes on: branch/sources/error/templates/index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branch/sources/index.html
===================================================================
Property changes on: branch/sources/index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: branch/template/Default/cache/%%E2^E2A^E2AEC254%%module_index.html
===================================================================
--- branch/template/Default/cache/%%E2^E2A^E2AEC254%%module_index.html (rev 0)
+++ branch/template/Default/cache/%%E2^E2A^E2AEC254%%module_index.html 2006-12-10 09:24:27 UTC (rev 86)
@@ -0,0 +1,9 @@
+139
+a:4:{s:8:"template";a:1:{s:17:"module_index.html";b:1;}s:9:"timestamp";i:1165688284;s:7:"expires";i:1165691884;s:13:"cache_serials";a:0:{}}<!--
+/*
+ * $Id$
+ * $Date$
+ * $Rev$
+ */ -->
+
+ You are not logged in!
Property changes on: branch/template/Default/cache/%%E2^E2A^E2AEC254%%module_index.html
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|