Added group key to creating subgroups.
authorNik Okuntseff <support@anuko.com>
Tue, 19 Mar 2019 15:53:41 +0000 (15:53 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 19 Mar 2019 15:53:41 +0000 (15:53 +0000)
WEB-INF/lib/ttGroupHelper.class.php
WEB-INF/templates/footer.tpl

index b77edf2..ffa1e04 100644 (file)
@@ -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']);
index b15c49d..4054a4a 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.61.4879 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.61.4880 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>