Started to create group keys upon group creation.
authorNik Okuntseff <support@anuko.com>
Tue, 19 Mar 2019 15:28:02 +0000 (15:28 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 19 Mar 2019 15:28:02 +0000 (15:28 +0000)
WEB-INF/lib/ttAdmin.class.php
WEB-INF/lib/ttRegistrator.class.php
WEB-INF/templates/footer.tpl

index 383eb44..f532332 100644 (file)
@@ -245,6 +245,7 @@ class ttAdmin {
     global $user;
     $mdb2 = getConnection();
 
+    $group_key = $mdb2->quote(ttRandomString());
     $name = $mdb2->quote($fields['group_name']);
     $currency = $mdb2->quote($fields['currency']);
     $lang = $mdb2->quote($fields['lang']);
@@ -252,8 +253,8 @@ class ttAdmin {
     $created_ip = $mdb2->quote($_SERVER['REMOTE_ADDR']);
     $created_by = $user->id;
 
-    $sql = "insert into tt_groups (name, currency, lang, created, created_ip, created_by)".
-      " values($name, $currency, $lang, $created, $created_ip, $created_by)";
+    $sql = "insert into tt_groups (group_key, name, currency, lang, created, created_ip, created_by)".
+      " values($group_key, $name, $currency, $lang, $created, $created_ip, $created_by)";
     $affected = $mdb2->exec($sql);
     if (is_a($affected, 'PEAR_Error')) return false;
 
index 1664461..b122d01 100644 (file)
@@ -145,13 +145,15 @@ class ttRegistrator {
   function createGroup() {
     $mdb2 = getConnection();
 
+    $group_key = $mdb2->quote(ttRandomString());
     $name = $mdb2->quote($this->group_name);
     $currency = $mdb2->quote($this->currency);
     $lang = $mdb2->quote($this->lang);
     $created = 'now()';
     $created_ip = $mdb2->quote($_SERVER['REMOTE_ADDR']);
 
-    $sql = "insert into tt_groups (name, currency, lang, created, created_ip) values($name, $currency, $lang, $created, $created_ip)";
+    $sql = "insert into tt_groups (group_key, name, currency, lang, created, created_ip)".
+      " values($group_key, $name, $currency, $lang, $created, $created_ip)";
     $affected = $mdb2->exec($sql);
     if (is_a($affected, 'PEAR_Error')) return false;
 
index d6be873..b15c49d 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.4878 | 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.4879 | 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>