From: Nik Okuntseff Date: Tue, 19 Mar 2019 15:28:02 +0000 (+0000) Subject: Started to create group keys upon group creation. X-Git-Tag: timetracker_1.19-1~157 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c5461f26c2b9b04044747c9f78fd710627067c83;p=timetracker.git Started to create group keys upon group creation. --- diff --git a/WEB-INF/lib/ttAdmin.class.php b/WEB-INF/lib/ttAdmin.class.php index 383eb44c..f5323322 100644 --- a/WEB-INF/lib/ttAdmin.class.php +++ b/WEB-INF/lib/ttAdmin.class.php @@ -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; diff --git a/WEB-INF/lib/ttRegistrator.class.php b/WEB-INF/lib/ttRegistrator.class.php index 1664461b..b122d015 100644 --- a/WEB-INF/lib/ttRegistrator.class.php +++ b/WEB-INF/lib/ttRegistrator.class.php @@ -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; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index d6be8733..b15c49d3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.61.4878 | Copyright © Anuko | +  Anuko Time Tracker 1.18.61.4879 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}