Merge pull request #2455 from marcoAntonioNina/BUG-14984
BUG-14984 Improvement value DEBUG_SQL
This commit is contained in:
@@ -198,8 +198,16 @@ class MySQLConnection extends ConnectionCommon implements Connection {
|
||||
}
|
||||
}//echo $sql . '<br /><br />';
|
||||
$result = @mysql_query($sql, $this->dblink);
|
||||
|
||||
if (!$result) {
|
||||
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');
|
||||
}
|
||||
}
|
||||
return new MySQLResultSet($this, $result, $fetchmode);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,14 @@ class Applications
|
||||
) {
|
||||
$callback = isset($callback)? $callback : "stcCallback1001";
|
||||
$dir = isset($dir)? $dir : "DESC";
|
||||
|
||||
if (isset($sort)) {
|
||||
G::LoadClass('phpSqlParser');
|
||||
$parser = new PHPSQLParser($sort);
|
||||
$sort = $parser->parsed;
|
||||
$sort = $sort[''][0];
|
||||
}
|
||||
|
||||
$sort = isset($sort)? $sort : "";
|
||||
$start = isset($start)? $start : "0";
|
||||
$limit = isset($limit)? $limit : "25";
|
||||
|
||||
@@ -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