BUG-14984 Improvement value DEBUG_SQL
This commit is contained in:
@@ -198,8 +198,12 @@ class MySQLConnection extends ConnectionCommon implements Connection {
|
||||
}
|
||||
}//echo $sql . '<br /><br />';
|
||||
$result = @mysql_query($sql, $this->dblink);
|
||||
|
||||
if (!$result) {
|
||||
if (isset($_SESSION['PROCESSMAKER_ENV']['debug_sql']) && $_SESSION['PROCESSMAKER_ENV']['debug_sql'] == 1) {
|
||||
if (!defined('DEBUG_SQL')) {
|
||||
define('DEBUG_SQL', 0);
|
||||
}
|
||||
if (DEBUG_SQL == 1) {
|
||||
throw new SQLException('Could not execute query', mysql_error($this->dblink), $sql);
|
||||
} else {
|
||||
throw new SQLException('It is not possible to execute the query. Please contact your system administrator');
|
||||
|
||||
@@ -309,6 +309,7 @@ ini_set( 'soap.wsdl_cache_enabled', $config['wsdl_cache'] );
|
||||
ini_set( 'date.timezone', $config['time_zone'] );
|
||||
|
||||
define( 'DEBUG_SQL_LOG', $config['debug_sql'] );
|
||||
define( 'DEBUG_SQL', $config['debug'] );
|
||||
define( 'DEBUG_TIME_LOG', $config['debug_time'] );
|
||||
define( 'DEBUG_CALENDAR_LOG', $config['debug_calendar'] );
|
||||
define( 'MEMCACHED_ENABLED', $config['memcached'] );
|
||||
|
||||
Reference in New Issue
Block a user