Add recursivity to install profiles mechanism and a default "production" profile - refs #1483

1.10.x
Yannick Warnier 10 years ago
parent d46921717e
commit 8316506e8c
  1. 4
      main/install/install.lib.php
  2. 5
      main/install/profiles/hr.json
  3. 11
      main/install/profiles/prod.json

@ -2567,6 +2567,9 @@ function installProfileSettings(
return false;
}
$settings = $params->params;
if (!empty($params->parent)) {
$res = installProfileSettings($params->parent);
}
foreach ($settings as $id => $param) {
$sql = "UPDATE settings_current
SET selected_value = '".$param->selected_value."'
@ -2576,4 +2579,5 @@ function installProfileSettings(
}
Database::query($sql);
}
return true;
}

@ -1,11 +1,12 @@
{
"id": 1,
"name": "HR",
"parent": "prod",
"params": [
{
"variable": "show_link_bug_notification",
"variable": "allow_skills_tool",
"subkey": "",
"selected_value": "false"
"selected_value": "true"
}
]
}

@ -0,0 +1,11 @@
{
"id": 1,
"name": "Production",
"params": [
{
"variable": "show_link_bug_notification",
"subkey": "",
"selected_value": "false"
}
]
}
Loading…
Cancel
Save