BUG 000 momentarily reverted to rc5 fro pmTables (fixes)

This commit is contained in:
Erik Amaru Ortiz
2011-09-05 16:40:47 -04:00
parent f56d333bf7
commit f35f3bb39f
3 changed files with 21 additions and 9 deletions

View File

@@ -506,15 +506,19 @@ class pmTablesProxy extends HttpProxyController
$primaryKeys = $additionalTables->getPrimaryKeys();
foreach ($result['rows'] as $i => $row) {
$primaryKeysValues = array();
foreach ($primaryKeys as $key) {
$primaryKeysValues[] = isset($row[$key['FLD_NAME']]) ? $row[$key['FLD_NAME']] : '';
if ($result) {
foreach ($result['rows'] as $i => $row) {
$primaryKeysValues = array();
foreach ($primaryKeys as $key) {
$primaryKeysValues[] = isset($row[$key['FLD_NAME']]) ? $row[$key['FLD_NAME']] : '';
}
$result['rows'][$i]['__index__'] = G::encrypt(implode('-', $primaryKeysValues), 'pmtable');
}
$result['rows'][$i]['__index__'] = G::encrypt(implode('-', $primaryKeysValues), 'pmtable');
}
else {
$result['rows'] = array();
}
return $result;
}

View File

@@ -15,6 +15,7 @@ var smodel;
var infoGrid;
var _fields;
var isReport;
var editor;
Ext.onReady(function(){
@@ -141,7 +142,9 @@ Ext.onReady(function(){
afteredit : {
fn:function(rowEditor, obj, data, rowIndex ){
if (data.phantom === true) {
store.reload(); // <-- (just for old pmtables class engine) only if it is an insert
setTimeout(function(){
store.reload();
}, 1100); // <-- (just for old pmtables class engine) only if it is an insert
}
}
}
@@ -325,7 +328,7 @@ DoNothing = function(){};
var props = function(){};
NewPMTableRow = function(){
if (editor.editing) {
if (!editor || editor.editing) {
return false;
}
var PMRow = infoGrid.getStore().recordType;

View File

@@ -662,6 +662,11 @@ function createReportTable()
PMExt.error(_('ID_ERROR'),_('ID_PMTABLES_ALERT1') + ' <b>' + row.data['field_name']+'</b>');
return false;
}
if (row.data['field_name'] == 'DESC') {
PMExt.error(_('ID_ERROR'), 'The word "DESC" is reserved by the database engine please set another one.');
return false;
}
// validate that fieldname is not empty
if(row.data['field_name'].trim() == '') {