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:
@@ -154,8 +154,9 @@ class dbConnections
|
|||||||
$result = DbSourcePeer::doSelectRS( $c );
|
$result = DbSourcePeer::doSelectRS( $c );
|
||||||
$result->next();
|
$result->next();
|
||||||
$row = $result->getRow();
|
$row = $result->getRow();
|
||||||
|
|
||||||
while ($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]
|
$connections[] = Array ('DBS_UID' => $row[0],'DBS_NAME' => '[' . $row[3] . '] ' . $row[2] . ': ' . $row[4]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,13 +116,19 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
$proUid = $_POST['PRO_UID'];
|
$proUid = $_POST['PRO_UID'];
|
||||||
$dbConn = new DbConnections();
|
$dbConn = new DbConnections();
|
||||||
$dbConnections = $dbConn->getConnectionsProUid( $proUid );
|
$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 );
|
$dbConnections = array_merge( $defaultConnections, $dbConnections );
|
||||||
|
|
||||||
return $dbConnections;
|
return $dbConnections;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user