cvs: bugtracker /htdocs offline.html /htdocs/index index.php
| From: | Barry Carlyon | Date: | Tue, 19 Aug 2008 10:40:46 +0000 |
| Subject: | cvs: bugtracker /htdocs offline.html /htdocs/index index.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2462@lists.php.net to get a copy of this message | ||
bcarlyon Tue Aug 19 10:40:46 2008 UTC
Removed files:
/bugtracker/htdocs offline.html
Modified files:
/bugtracker/htdocs/index index.php
Log:
Use the template engine to spit out the error if the database is offline
http://cvs.php.net/viewvc.cgi/bugtracker/htdocs/index/index.php?r1=1.26&r2=1.27&diff_format=u
Index: bugtracker/htdocs/index/index.php
diff -u bugtracker/htdocs/index/index.php:1.26 bugtracker/htdocs/index/index.php:1.27
--- bugtracker/htdocs/index/index.php:1.26 Wed Aug 13 22:33:33 2008
+++ bugtracker/htdocs/index/index.php Tue Aug 19 10:40:44 2008
@@ -37,7 +37,7 @@
* @author Barry Carlyon <bcarlyon@php.net>
* @copyright 2008-2008 Barry Carlyon
* @license http://www.opensource.org/licenses/bsd-license.php
BSD License
-* @version CVS: $Id: index.php,v 1.26 2008/08/13 22:33:33 bcarlyon Exp $
+* @version CVS: $Id: index.php,v 1.27 2008/08/19 10:40:44 bcarlyon Exp $
* @link http://gsoc.barrycarlyon.servegame.org/
*/
@@ -58,21 +58,21 @@
error_reporting(E_ALL);
$old_error_handler = set_error_handler("theerrorhandler",E_ALL);
+include('template.php');
//database time
$db = new db();
$dbtest = $db->test_connect();
+$template = new template();
if ($dbtest == 'offline' || !$dbtest)
{
+ trigger_error('The database is currently offline', E_USER_ERROR);
//arg! were offline
- include($_SERVER['DOCUMENT_ROOT'] . 'offline.html');
- exit;
}
//if that is ok lets boot the class in the ass!
//V3 template engine
-include('template.php');
include('user.php');
include('email.php');
include('bug.php');
@@ -80,7 +80,6 @@
include('cache.php');
include('session.php');
-$template = new template();
$user = new user();
$email = new email();
$bug = new bug();