BUG 7922 "SRP: wrapped: Could not execute query.." SOLVED

(Fixes for import feature)
According the solution raised on the meeting
- the default selection for db connetions is workflow instead REPORT
- the prefix PMT for all pmtables was added
This commit is contained in:
Erik Amaru Ortiz
2011-11-25 10:06:42 -04:00
parent 7e4a313f60
commit b2017995b4
4 changed files with 8 additions and 15 deletions

View File

@@ -319,7 +319,8 @@ class AdditionalTables extends BaseAdditionalTables {
function getAllData($sUID, $start=NULL, $limit=NULL)
{
$aData = $this->load($sUID, true);
$addTab = new AdditionalTables();
$aData = $addTab->load($sUID, true);
$aData['DBS_UID'] = $aData['DBS_UID'] ? $aData['DBS_UID'] : 'workflow';
$sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
$sClassName = ($aData['ADD_TAB_CLASS_NAME'] != '' ? $aData['ADD_TAB_CLASS_NAME'] : $this->getPHPName($aData['ADD_TAB_NAME']));

View File

@@ -80,7 +80,7 @@ class pmTablesProxy extends HttpProxyController
$addTables['rows'][$i]['NUM_ROWS'] = 0;
}
//removing the prefix "PMT" to aalow alphabetical order
//removing the prefix "PMT" to allow alphabetical order (just in view)
if (substr($addTables['rows'][$i]['ADD_TAB_NAME'], 0, 4) == 'PMT_') {
$addTables['rows'][$i]['ADD_TAB_NAME'] = substr($addTables['rows'][$i]['ADD_TAB_NAME'], 4);
}
@@ -213,11 +213,6 @@ class pmTablesProxy extends HttpProxyController
$data['PRO_UID'] = trim($data['PRO_UID']);
$data['columns'] = G::json_decode(stripslashes($httpData->columns)); //decofing data columns
// forcing to use the PMT prefix for all new tables
if ($data['REP_TAB_UID'] == '' || (isset($httpData->forceUid) && $httpData->forceUid)) { //new report table
$data['REP_TAB_NAME'] = sprintf('%s_%s', 'PMT', $data['REP_TAB_NAME']);
}
$isReportTable = $data['PRO_UID'] != '' ? true : false;
$oAdditionalTables = new AdditionalTables();
$oFields = new Fields();
@@ -973,7 +968,7 @@ class pmTablesProxy extends HttpProxyController
public function export($httpData)
{
require_once 'classes/model/AdditionalTables.php';
$at = new AdditionalTables();
$tablesToExport = G::json_decode(stripslashes($httpData->rows));
try{
@@ -995,8 +990,9 @@ class pmTablesProxy extends HttpProxyController
$EXPORT_TRACEBACK = Array();
$c = 0;
foreach ($tablesToExport as $table) {
$at = new additionalTables();
$tableRecord = $at->load($table->ADD_TAB_UID);
$tableData = $at->getAllData($table->ADD_TAB_UID);
$table->ADD_TAB_NAME = $tableRecord['ADD_TAB_NAME'];
$rows = $tableData['rows'];
$count = $tableData['count'];
@@ -1082,10 +1078,6 @@ class pmTablesProxy extends HttpProxyController
$meta = "<pre>".$META."</pre>";
$filename = $filenameOnly;
$link = $filenameLink;
// $G_PUBLISH = new Publisher();
// $G_PUBLISH->AddContent('xmlform', 'xmlform', 'additionalTables/doExport', '', $aFields, '');
// G::RenderPage('publish', 'raw');
$result->success = true;
$result->filename = $filenameOnly;

View File

@@ -730,7 +730,7 @@ function createReportTable()
params: {
REP_TAB_UID : TABLE !== false ? TABLE.ADD_TAB_UID : '',
PRO_UID : '',
REP_TAB_NAME : tableName,
REP_TAB_NAME : TABLE !== false ? tableName : 'PMT_' + tableName,
REP_TAB_DSC : tableDescription,
REP_TAB_CONNECTION : 'workflow',
REP_TAB_TYPE : '',

View File

@@ -990,7 +990,7 @@ function createReportTable()
params: {
REP_TAB_UID : TABLE !== false ? TABLE.ADD_TAB_UID : '',
PRO_UID : PRO_UID !== false? PRO_UID : Ext.getCmp('PROCESS').getValue(),
REP_TAB_NAME : tableName,
REP_TAB_NAME : TABLE !== false ? tableName : 'PMT_' + tableName,,
REP_TAB_DSC : tableDescription,
REP_TAB_CONNECTION : Ext.getCmp('REP_TAB_CONNECTION').getValue(),
REP_TAB_TYPE : Ext.getCmp('REP_TAB_TYPE').getValue(),