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

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-21 18:38:39 -04:00
parent bf9d9b5a7b
commit ff4ee1b33d
3 changed files with 48 additions and 17 deletions

View File

@@ -79,6 +79,11 @@ class pmTablesProxy extends HttpProxyController
else {
$addTables['rows'][$i]['NUM_ROWS'] = 0;
}
//removing the prefix "PMT" to aalow alphabetical order
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);
}
}
catch (Exception $e) {
$addTables['rows'][$i]['NUM_ROWS'] = G::LoadTranslation('ID_TABLE_NOT_FOUND');
@@ -207,6 +212,12 @@ class pmTablesProxy extends HttpProxyController
$data = (array) $httpData;
$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();