Updated profiler default visibility

Updated comments blocks

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2012-06-03 22:25:54 +02:00
commit 50538bd332
5 changed files with 12 additions and 19 deletions

View file

@ -15,4 +15,4 @@ SetEnv DEPRECATION On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
</IfModule>
</IfModule>

View file

@ -28,9 +28,6 @@
*
*/
define('DEBUG', true);
define('DEPRECATION', true);
if (!defined('PHP_VERSION_ID')) {
$version = explode('.',PHP_VERSION);
define('PHP_VERSION_ID', (((int)$version[0]) * 10000 + ((int)$version[1]) * 100 + ((int)$version[2])));
@ -95,7 +92,9 @@ if (defined('IN_ADMIN')) {
include ROOT_PATH . 'includes/constants.php';
Wootook_Core_ErrorProfiler::register();
if (defined('DEBUG')) {
Wootook_Core_ErrorProfiler::register();
}
Wootook_Core_Helper_Config_Events::registerEvents();
if (!Wootook::$isInstalled) {

View file

@ -389,6 +389,7 @@ class Wootook
$adapter = Wootook_Core_Database_ConnectionManager::getSingleton()
->getConnection('core_read');
} catch (Wootook_Core_Exception_Database_AdapterError $e) {
// This may also occur when the pdo_sqlite driver isn't loaded
self::$isInstalled = false;
Wootook_Core_ErrorProfiler::getSingleton()->addException($e);
return $config;

View file

@ -165,11 +165,6 @@ class Wootook_Core_Database_ConnectionManager
$options = array();
}
$hostname = $params->hostname;
$username = $params->username;
$password = $params->password;
$database = $params->database;
if (empty($params->hostname) || empty($params->username) || empty($params->database)) {
return null;
}
@ -181,14 +176,10 @@ class Wootook_Core_Database_ConnectionManager
$options = $event->getData('options');
try {
$connection = $this->load($engine, false, array($params, $options));
} catch (Wootook_Core_Exception_Database_AdapterError $e) {
//Wootook_Core_ErrorProfiler::getSingleton()->addException($e);
return null;
}
$connection = $this->load($engine, false, array($params, $options));
if (!$connection) {
throw new Wootook_Core_Exception_DataAccessException('Could not find data connection handler.');
throw new Wootook_Core_Exception_Database_AdapterError('Could not find data connection handler.');
}
if (($prefix = Wootook::getConfig("resource/database/{$connectionName}/table_prefix")) !== null) {

View file

@ -48,7 +48,7 @@ class Wootook_Core_ErrorProfiler
private $_listen = true;
private $_mute = false;
private $_mute = true;
/**
*
@ -410,7 +410,9 @@ JS_EOF;
set_error_handler(array(self::getSingleton(), 'errorManager'));
set_exception_handler(array(self::getSingleton(), 'exceptionManager'));
self::getSingleton()->_mute = false;
if (defined('DEBUG')) {
self::getSingleton()->_mute = false;
}
if (self::$_isTraceRegistered === false && defined('DEBUG')) {
self::$_isTraceRegistered = true;