From 0548833c334a8a16f6573c7d0da6413504e4d457 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Tue, 19 Mar 2019 15:53:41 +0000 Subject: [PATCH] Added group key to creating subgroups. --- WEB-INF/lib/ttGroupHelper.class.php | 10 ++++++---- WEB-INF/templates/footer.tpl | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index b77edf21..ffa1e048 100644 --- a/WEB-INF/lib/ttGroupHelper.class.php +++ b/WEB-INF/lib/ttGroupHelper.class.php @@ -88,18 +88,20 @@ class ttGroupHelper { $mdb2 = getConnection(); $parent_id = $user->getGroup(); $org_id = $user->org_id; + $group_key = ttRandomString(); $name = $fields['name']; $description = $fields['description']; // We need to inherit attributes from the parent group. $attrs = ttGroupHelper::getGroupAttrs($parent_id); - $columns = '(parent_id, org_id, name, description, currency, decimal_mark, lang, date_format, time_format'. - ', week_start, tracking_mode, project_required, task_required, record_type, bcc_email'. - ', allow_ip, password_complexity, plugins, lock_spec'. - ', workday_minutes, config, created, created_ip, created_by)'; + $columns = '(parent_id, org_id, group_key, name, description, currency, decimal_mark, lang, date_format,'. + ' time_format, week_start, tracking_mode, project_required, task_required, record_type, bcc_email,'. + ' allow_ip, password_complexity, plugins, lock_spec,'. + ' workday_minutes, config, created, created_ip, created_by)'; $values = " values ($parent_id, $org_id"; + $values .= ', '.$mdb2->quote($group_key); $values .= ', '.$mdb2->quote($name); $values .= ', '.$mdb2->quote($description); $values .= ', '.$mdb2->quote($attrs['currency']); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index b15c49d3..4054a4a5 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.61.4879 | Copyright © Anuko | +  Anuko Time Tracker 1.18.61.4880 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} -- 2.20.1