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:
@@ -2633,7 +2633,7 @@ class Bootstrap
|
||||
$langServer = $locale['LOCALE'];
|
||||
$language = explode('-', $langServer);
|
||||
$language = head($language);
|
||||
if ($language === $acceptLanguage) {
|
||||
if ($language === $acceptLanguage || $langServer === $acceptLanguage) {
|
||||
$inLang = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ function cliListIds($command, $args)
|
||||
$workspaces = get_workspaces_from_args($command);
|
||||
|
||||
foreach ($workspaces as $index => $workspace) {
|
||||
$hostPort1 = explode(":", $workspace->dbInfo['DB_HOST']);
|
||||
$hostPort = $hostPort1[0] . (isset($hostPort[1]) ? ";port=" . $hostPort[1] : "");
|
||||
$hostPort = explode(":", $workspace->dbInfo['DB_HOST']);
|
||||
$hostPort = $hostPort[0] . (isset($hostPort[1]) ? ";port=" . $hostPort[1] : "");
|
||||
$connectionString = sprintf(
|
||||
"%s:host=%s;dbname=%s",
|
||||
$workspace->dbInfo['DB_ADAPTER'],
|
||||
|
||||
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user