Fixed vconsole template name & group_id
This commit is contained in:
parent
92911e8fb8
commit
dd0d9e4fa5
|
@ -4101,7 +4101,7 @@ function visual_map_get_elements($id_layout) {
|
|||
* @param int $id_layout existing visual console
|
||||
* @return true OK, false not OK
|
||||
*/
|
||||
function visual_map_create_template($id_layout, $name) {
|
||||
function visual_map_create_template($id_layout, $name, $id_group) {
|
||||
global $config;
|
||||
|
||||
$layout = visual_map_get_definition($id_layout);
|
||||
|
@ -4113,6 +4113,13 @@ function visual_map_create_template($id_layout, $name) {
|
|||
// rm id
|
||||
unset($template_skel["id"]);
|
||||
|
||||
// Update fields
|
||||
if (!empty($name)) {
|
||||
$template_skel["name"] = $name;
|
||||
}
|
||||
|
||||
$template_skel["id_group"] = $id_group;
|
||||
|
||||
$template_id = db_process_sql_insert('tlayout_template', $template_skel);
|
||||
|
||||
foreach ($layout_data as $item) {
|
||||
|
|
Loading…
Reference in New Issue