Commit 7366de6b authored by Loïc DAYOT's avatar Loïc DAYOT
Browse files

fix: save localgroup roles of an event

Bug was that localgroup relations and roles weren't saved after submit an event. Old ones removed not deleted, and only one new saved.
Now fixed.
parent 13c4a7b9
......@@ -711,15 +711,17 @@ class event {
else
$this->tags = "";
unset($this->localgroups);
$this->localgroups = array();
if (isset($_POST['__event_lg_id']))
{ // get localgroups
$event_lg_id = $_POST['__event_lg_id'];
$event_lg_role = $_POST['__event_lg_role'];
foreach ($_POST['__event_lg_id'] as $form_id=>$lg_id) {
$lg = new localgroup($this->db, $lg_id);
$lg->role = $event_lg_role[$form_id];
$lg = new localgroup($this->db, $lg_id);
$lg->role = $event_lg_role[$form_id];
$this->localgroups[] = $lg;
}
$this->localgroups[] = $lg;
}
return true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment