Merge remote branch 'upstream/master'

This commit is contained in:
jennylee
2014-06-18 16:28:37 -04:00
4 changed files with 24 additions and 4 deletions

View File

@@ -198,8 +198,16 @@ class MySQLConnection extends ConnectionCommon implements Connection {
} }
}//echo $sql . '<br /><br />'; }//echo $sql . '<br /><br />';
$result = @mysql_query($sql, $this->dblink); $result = @mysql_query($sql, $this->dblink);
if (!$result) { if (!$result) {
throw new SQLException('Could not execute query', mysql_error($this->dblink), $sql); 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); return new MySQLResultSet($this, $result, $fetchmode);
} }

View File

@@ -21,6 +21,14 @@ class Applications
) { ) {
$callback = isset($callback)? $callback : "stcCallback1001"; $callback = isset($callback)? $callback : "stcCallback1001";
$dir = isset($dir)? $dir : "DESC"; $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 : ""; $sort = isset($sort)? $sort : "";
$start = isset($start)? $start : "0"; $start = isset($start)? $start : "0";
$limit = isset($limit)? $limit : "25"; $limit = isset($limit)? $limit : "25";
@@ -493,10 +501,10 @@ class Applications
//execute the query //execute the query
$oDataset = AppCacheViewPeer::doSelectRS( $Criteria ); $oDataset = AppCacheViewPeer::doSelectRS( $Criteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next(); $oDataset->next();
//g::pr($oDataset); //g::pr($oDataset);
$result = array (); $result = array ();
$result['totalCount'] = $totalCount; $result['totalCount'] = $totalCount;
$rows = array (); $rows = array ();

View File

@@ -90,6 +90,7 @@ try {
$_SESSION['PROCESS'] = $aFields['PRO_UID']; $_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = - 1; $_SESSION['TASK'] = - 1;
$_SESSION['STEP_POSITION'] = 0; $_SESSION['STEP_POSITION'] = 0;
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php'); require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
exit(); exit();
@@ -208,10 +209,12 @@ try {
break; break;
default: //APP_STATUS <> DRAFT and TO_DO default: //APP_STATUS <> DRAFT and TO_DO
$_SESSION['APPLICATION'] = $sAppUid; $_SESSION['APPLICATION'] = $sAppUid;
$_SESSION['INDEX'] = $iDelIndex != "" ? $iDelIndex : $oCase->getCurrentDelegationCase( $_GET['APP_UID'] ); $_SESSION['INDEX'] = $oCase->getCurrentDelegationCase( $_GET['APP_UID'] );
$_SESSION['PROCESS'] = $aFields['PRO_UID']; $_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = - 1; $_SESSION['TASK'] = - 1;
$_SESSION['STEP_POSITION'] = 0; $_SESSION['STEP_POSITION'] = 0;
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX']);
$_SESSION['CURRENT_TASK'] = $Fields['TAS_UID'];
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php'); require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
} }

View File

@@ -309,6 +309,7 @@ ini_set( 'soap.wsdl_cache_enabled', $config['wsdl_cache'] );
ini_set( 'date.timezone', $config['time_zone'] ); ini_set( 'date.timezone', $config['time_zone'] );
define( 'DEBUG_SQL_LOG', $config['debug_sql'] ); define( 'DEBUG_SQL_LOG', $config['debug_sql'] );
define( 'DEBUG_SQL', $config['debug'] );
define( 'DEBUG_TIME_LOG', $config['debug_time'] ); define( 'DEBUG_TIME_LOG', $config['debug_time'] );
define( 'DEBUG_CALENDAR_LOG', $config['debug_calendar'] ); define( 'DEBUG_CALENDAR_LOG', $config['debug_calendar'] );
define( 'MEMCACHED_ENABLED', $config['memcached'] ); define( 'MEMCACHED_ENABLED', $config['memcached'] );