This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via 32a7203e2796d9bf46791d9aa344451d29997b36 (commit)
from e1e9653c58c06c2f156578e320d98017a08cfce1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 32a7203e2796d9bf46791d9aa344451d29997b36
Author: Ivan1986 <iva...@li...>
Date: Thu Jun 17 16:18:29 2010 +0400
Убрана ненужная проверка на наличие файла из симплы
diff --git a/lib/DbSimple/Connect.php b/lib/DbSimple/Connect.php
index f74bee8..db6a7d6 100644
--- a/lib/DbSimple/Connect.php
+++ b/lib/DbSimple/Connect.php
@@ -106,17 +106,17 @@ class DbSimple_Connect
{
$parsed = $this->parseDSN($dsn);
if (!$parsed)
- $this->errorHandler('Ошибка разбора строки DSN',$dsn);
+ $this->errorHandler('Ошибка разбора строки DSN', $dsn);
+ if (!isset($parsed['scheme']))
+ $this->errorHandler('Невозможно загрузить драйвер базы данных', $parsed);
$this->shema = ucfirst($parsed['scheme']);
- if (!isset($parsed['scheme']) || !is_file(dirname(__FILE__).'/'.$this->shema.'.php'))
- $this->errorHandler('Невозможно загрузить драйвер базы данных',$parsed);
require_once dirname(__FILE__).'/'.$this->shema.'.php';
$class = 'DbSimple_'.$this->shema;
$this->DbSimple = new $class($parsed);
if (isset($parsed['prefix']))
$this->DbSimple->setIdentPrefix($parsed['prefix']);
$this->DbSimple->setCachePrefix('db_'.md5($parsed['dsn']).'_');
- $this->DbSimple->setErrorHandler(array(&$this, 'errorHandler'), QFW::$config['QFW']['ErrorStack']);
+ $this->DbSimple->setErrorHandler(array(&$this, 'errorHandler'), false);
}
/**
@@ -128,7 +128,15 @@ class DbSimple_Connect
{
// Если использовалась @, ничего не делать.
if (!error_reporting()) return;
- if (QFW::$config['QFW']['release'])
+ if (!empty($GLOBALS['prod']) || (defined('IN_CRON') && IN_CRON) )
+ {
+ error_log(date('Y-m-d H:i:s').': '.$msg."\n",
+ 3, ROOTPATH.'/log/sql.log');
+ error_log(date('Y-m-d H:i:s').': '.print_r($info, true)."\n",
+ 3, ROOTPATH.'/log/sql.log');
+ redirect('/forum/');
+ }
+ if (class_exists('QFW') && QFW::$config['QFW']['release'])
{
require_once LIBPATH.'/Log.php';
Log::log('SQL Error - '.$msg,'sql');
-----------------------------------------------------------------------
Summary of changes:
lib/DbSimple/Connect.php | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
hooks/post-receive
--
quickfw
|