BUG-14984 Improvement value DEBUG_SQL

This commit is contained in:
Marco Antonio Nina
2014-06-17 10:28:54 -04:00
parent 7989457678
commit 31309ee648
2 changed files with 6 additions and 1 deletions

View File

@@ -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');

View File

@@ -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'] );