Merged in norah/processmaker/BUG-16288 (pull request #1267)

PM-16288 PM falla al crear grilla como tabla de PM sobre oracle
This commit is contained in:
Julio Cesar Laura Avendaño
2014-12-10 16:40:30 -04:00
2 changed files with 13 additions and 6 deletions

View File

@@ -154,8 +154,9 @@ class dbConnections
$result = DbSourcePeer::doSelectRS( $c );
$result->next();
$row = $result->getRow();
while ($row = $result->getRow()) {
if (trim( $pProUid ) == trim( $row[1] )) {
if ((trim( $pProUid ) == trim( $row[1] )) && ($row[2] == 'mysql')) {
$connections[] = Array ('DBS_UID' => $row[0],'DBS_NAME' => '[' . $row[3] . '] ' . $row[2] . ': ' . $row[4]
);
}

View File

@@ -116,13 +116,19 @@ class pmTablesProxy extends HttpProxyController
$proUid = $_POST['PRO_UID'];
$dbConn = new DbConnections();
$dbConnections = $dbConn->getConnectionsProUid( $proUid );
$defaultConnections = array (array ('DBS_UID' => 'workflow','DBS_NAME' => 'Workflow'
),array ('DBS_UID' => 'rp','DBS_NAME' => 'REPORT'
)
);
$workSpace = new workspaceTools(SYS_SYS);
$workspaceDB = $workSpace->getDBInfo();
if ($workspaceDB['DB_NAME'] == $workspaceDB['DB_RBAC_NAME']) {
$defaultConnections = array (array ('DBS_UID' => 'workflow','DBS_NAME' => 'Workflow'));
} else {
$defaultConnections = array (array ('DBS_UID' => 'workflow','DBS_NAME' => 'Workflow'),
array ('DBS_UID' => 'rp','DBS_NAME' => 'REPORT'));
}
$dbConnections = array_merge( $defaultConnections, $dbConnections );
return $dbConnections;
}