Merge code from github.com to bitbucket.org 2014-06-20 12:20
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,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";
|
||||||
@@ -494,10 +502,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 ();
|
||||||
|
|||||||
@@ -1107,8 +1107,10 @@ class System
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Workspace environment configuration
|
// Workspace environment configuration
|
||||||
if (($wsConf = @parse_ini_file($wsIniFile)) !== false) {
|
if (file_exists($wsIniFile) ) {
|
||||||
$config = array_merge($config, $wsConf);
|
if (($wsConf = @parse_ini_file($wsIniFile)) !== false) {
|
||||||
|
$config = array_merge($config, $wsConf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// validation debug config, only binary value is valid; debug = 1, to enable
|
// validation debug config, only binary value is valid; debug = 1, to enable
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ class AdditionalTables extends BaseAdditionalTables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllData($sUID, $start = null, $limit = null, $keyOrderUppercase = true, $filter = '')
|
public function getAllData($sUID, $start = null, $limit = null, $keyOrderUppercase = true, $filter = '', $appUid = false)
|
||||||
{
|
{
|
||||||
$addTab = new AdditionalTables();
|
$addTab = new AdditionalTables();
|
||||||
$aData = $addTab->load($sUID, true);
|
$aData = $addTab->load($sUID, true);
|
||||||
@@ -421,17 +421,17 @@ class AdditionalTables extends BaseAdditionalTables
|
|||||||
$closure = '';
|
$closure = '';
|
||||||
$types = array('INTEGER', 'BIGINT', 'SMALLINT', 'TINYINT', 'DECIMAL', 'DOUBLE', 'FLOAT', 'REAL');
|
$types = array('INTEGER', 'BIGINT', 'SMALLINT', 'TINYINT', 'DECIMAL', 'DOUBLE', 'FLOAT', 'REAL');
|
||||||
foreach ($aData['FIELDS'] as $aField) {
|
foreach ($aData['FIELDS'] as $aField) {
|
||||||
if ($aField['FLD_NAME'] != 'APP_UID') {
|
if (($appUid == false && $aField['FLD_NAME'] != 'APP_UID') || ($appUid == true)) {
|
||||||
if (in_array($aField['FLD_TYPE'], $types)) {
|
if (in_array($aField['FLD_TYPE'], $types)) {
|
||||||
if (is_numeric($filter)) {
|
if (is_numeric($filter)) {
|
||||||
$stringOr = $stringOr . '$a = $oCriteria->getNewCriterion(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ', "' . $filter . '", Criteria::EQUAL)' . $closure . ';';
|
$stringOr = $stringOr . '$a = $oCriteria->getNewCriterion(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ', "' . $filter . '", Criteria::EQUAL)' . $closure . ';';
|
||||||
$closure = '->addOr($a)';
|
$closure = '->addOr($a)';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$stringOr = $stringOr . '$a = $oCriteria->getNewCriterion(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ', "%' . $filter . '%", Criteria::LIKE)' . $closure . ';';
|
$stringOr = $stringOr . '$a = $oCriteria->getNewCriterion(' . $sClassPeerName . '::' . $aField['FLD_NAME'] . ', "%' . $filter . '%", Criteria::LIKE)' . $closure . ';';
|
||||||
$closure = '->addOr($a)';
|
$closure = '->addOr($a)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$stringOr = $stringOr . '$oCriteria->add($a);';
|
$stringOr = $stringOr . '$oCriteria->add($a);';
|
||||||
eval($stringOr);
|
eval($stringOr);
|
||||||
|
|||||||
@@ -410,6 +410,7 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
* @param string $httpData->id
|
* @param string $httpData->id
|
||||||
* @param string $httpData->start
|
* @param string $httpData->start
|
||||||
* @param string $httpData->limit
|
* @param string $httpData->limit
|
||||||
|
* @param string $httpData->appUid
|
||||||
*/
|
*/
|
||||||
public function dataView ($httpData)
|
public function dataView ($httpData)
|
||||||
{
|
{
|
||||||
@@ -421,13 +422,14 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||||
$start = isset( $httpData->start ) ? $httpData->start : 0;
|
$start = isset( $httpData->start ) ? $httpData->start : 0;
|
||||||
$limit = isset( $httpData->limit ) ? $httpData->limit : $limit_size;
|
$limit = isset( $httpData->limit ) ? $httpData->limit : $limit_size;
|
||||||
|
$appUid = isset( $httpData->appUid ) ? $httpData->appUid : false;
|
||||||
|
$appUid = ($appUid == "true") ? true : false;
|
||||||
$filter = isset( $httpData->textFilter ) ? $httpData->textFilter : '';
|
$filter = isset( $httpData->textFilter ) ? $httpData->textFilter : '';
|
||||||
|
|
||||||
$additionalTables = new AdditionalTables();
|
$additionalTables = new AdditionalTables();
|
||||||
$table = $additionalTables->load( $httpData->id, true );
|
$table = $additionalTables->load( $httpData->id, true );
|
||||||
|
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$result = $additionalTables->getAllData( $httpData->id, $start, $limit, true, $filter);
|
$result = $additionalTables->getAllData( $httpData->id, $start, $limit, true, $filter, $appUid);
|
||||||
} else {
|
} else {
|
||||||
$result = $additionalTables->getAllData( $httpData->id, $start, $limit );
|
$result = $additionalTables->getAllData( $httpData->id, $start, $limit );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,11 @@ Ext.onReady(function(){
|
|||||||
handler: DoSearch
|
handler: DoSearch
|
||||||
});
|
});
|
||||||
|
|
||||||
|
appUidSearch = new Ext.form.Checkbox ({
|
||||||
|
id: 'appUidSearch',
|
||||||
|
boxLabel : 'Search also in the APP_UID field'
|
||||||
|
});
|
||||||
|
|
||||||
contextMenu = new Ext.menu.Menu({
|
contextMenu = new Ext.menu.Menu({
|
||||||
items : [ editButton, deleteButton ]
|
items : [ editButton, deleteButton ]
|
||||||
});
|
});
|
||||||
@@ -386,6 +391,7 @@ Ext.onReady(function(){
|
|||||||
importButton,
|
importButton,
|
||||||
exportButton,
|
exportButton,
|
||||||
'->',
|
'->',
|
||||||
|
appUidSearch,
|
||||||
searchText,
|
searchText,
|
||||||
clearTextButton,
|
clearTextButton,
|
||||||
searchButton
|
searchButton
|
||||||
@@ -394,6 +400,7 @@ Ext.onReady(function(){
|
|||||||
else
|
else
|
||||||
tbar = [genDataReportButton,
|
tbar = [genDataReportButton,
|
||||||
'->',
|
'->',
|
||||||
|
appUidSearch,
|
||||||
searchText,
|
searchText,
|
||||||
clearTextButton,
|
clearTextButton,
|
||||||
searchButton];
|
searchButton];
|
||||||
@@ -466,12 +473,13 @@ onMessageContextMenu = function (grid, rowIndex, e) {
|
|||||||
//Do Search Function
|
//Do Search Function
|
||||||
DoSearch = function(){
|
DoSearch = function(){
|
||||||
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||||
infoGrid.store.load({params: {start : 0 , limit : pageSize }});
|
infoGrid.store.load({params: {start : 0 , limit : pageSize , appUid : appUidSearch.getValue() }});
|
||||||
};
|
};
|
||||||
|
|
||||||
//Load Grid By Default
|
//Load Grid By Default
|
||||||
GridByDefault = function(){
|
GridByDefault = function(){
|
||||||
searchText.reset();
|
searchText.reset();
|
||||||
|
appUidSearch.reset();
|
||||||
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
infoGrid.store.setBaseParam('textFilter', searchText.getValue());
|
||||||
infoGrid.store.load();
|
infoGrid.store.load();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -313,6 +313,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'] );
|
||||||
|
|||||||
Reference in New Issue
Block a user