Delete vconsole template method

This commit is contained in:
fbsanchez 2018-08-01 13:12:10 +02:00
parent e14f1580a1
commit 11372e5b94
1 changed files with 17 additions and 0 deletions

View File

@ -4196,6 +4196,23 @@ function visual_map_instanciate_template($id_layout_template, $name, $id_agent)
}
/**
* Erases given id_layout_template
* @param int $id_layout_template target template to be deleted
* @return true OK, false ERR
*/
function visual_map_delete_template($id_layout_template) {
global $config;
if (!$id_layout_template) {
return false;
}
// tlayout_template_data is erased using foreign key
return db_process_sql_delete('tlayout_template', array('id' => $id_layout_template));
}
/**
* Get a list of layout templates for given user.
*