Skip to content

Commit

Permalink
Role name of event role not updated #1112
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Oct 17, 2021
1 parent 651f395 commit a71534e
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions adm_program/modules/dates/dates_function.php
Expand Up @@ -528,17 +528,8 @@
// if the data of the role must be changed
$role = new TableRoles($gDb, (int) $date->getValue('dat_rol_id'));

// only change name of role if no custom name was set
if(str_contains($role->getValue('rol_name'), $gL10n->get('DAT_DATE')))
{
$roleName = $gL10n->get('DAT_DATE').' '. $date->getValue('dat_begin', 'Y-m-d H:i').' - '.$datId;
}
else
{
$roleName = $role->getValue('rol_name');
}

$role->setValue('rol_name', $roleName);
$role->setValue('rol_name', $date->getDateTimePeriod(false) . ' ' . $date->getValue('dat_headline'));
$role->setValue('rol_description', substr($date->getValue('dat_description'), 0, 3999));
// role members are allowed to view lists
$role->setValue('rol_this_list_view', isset($_POST['date_right_list_view']) ? 1 : 0);
// role members are allowed to send mail to this role
Expand Down

0 comments on commit a71534e

Please sign in to comment.