Merged in bugfix/PMCORE-3663 (pull request #8385)

PMCORE-3663 [27018] No translation on the left bar on the Home Tab - France

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Roly Gutierrez
2022-02-17 18:02:41 +00:00
committed by Julio Cesar Laura Avendaño
3 changed files with 19 additions and 11 deletions

View File

@@ -455,9 +455,25 @@ class WorkspaceTools
$this->dbRbacUser = $values["DB_RBAC_USER"];
$this->dbRbacPass = $values["DB_RBAC_PASS"];
$this->setDataBaseConnectionPropertiesForEloquent();
return $this->dbInfo = $values;
}
/**
* This used for eloquent model.
*/
public function setDataBaseConnectionPropertiesForEloquent(): void
{
$dbHost = explode(':', $this->dbHost);
config(['database.connections.workflow.host' => $dbHost[0]]);
config(['database.connections.workflow.database' => $this->dbName]);
config(['database.connections.workflow.username' => $this->dbUser]);
config(['database.connections.workflow.password' => $this->dbPass]);
if (count($dbHost) > 1) {
config(['database.connections.workflow.port' => $dbHost[1]]);
}
}
private function resetDBInfoCallback($matches)
{
/* This function changes the values of defines while keeping their formatting
@@ -5084,14 +5100,6 @@ class WorkspaceTools
) {
// Initialize DB connections
$this->initPropel();
$dbHost = explode(':', $this->dbHost);
config(['database.connections.workflow.host' => $dbHost[0]]);
config(['database.connections.workflow.database' => $this->dbName]);
config(['database.connections.workflow.username' => $this->dbUser]);
config(['database.connections.workflow.password' => $this->dbPass]);
if (count($dbHost) > 1) {
config(['database.connections.workflow.port' => $dbHost[1]]);
}
// Get fields and some specific field types
$fields = [];