From: Nik Okuntseff Date: Tue, 19 Mar 2019 16:02:38 +0000 (+0000) Subject: Adjusted export-import to work with groups keys. X-Git-Tag: timetracker_1.19-1~155 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=957db67a316e7ab82eee99fb0698186bf4b4c589;p=timetracker.git Adjusted export-import to work with groups keys. --- diff --git a/WEB-INF/lib/ttGroupExportHelper.class.php b/WEB-INF/lib/ttGroupExportHelper.class.php index 9f0465d9..8a7b7e77 100644 --- a/WEB-INF/lib/ttGroupExportHelper.class.php +++ b/WEB-INF/lib/ttGroupExportHelper.class.php @@ -123,7 +123,8 @@ class ttGroupExportHelper { // Write group info. $group = $this->getGroupAttrs(); - $group_part = "current_group_id = $this->createGroup(array( 'parent_id' => $this->current_group_id, // Note: after insert current_group_id changes. 'org_id' => $this->org_id, + 'group_key' => $attrs['GROUP_KEY'], 'name' => $attrs['NAME'], 'description' => $attrs['DESCRIPTION'], 'currency' => $attrs['CURRENCY'], @@ -686,14 +687,15 @@ class ttOrgImportHelper { global $i18n; $mdb2 = getConnection(); - $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 ('; $values .= $mdb2->quote($fields['parent_id']); $values .= ', '.$mdb2->quote($fields['org_id']); + $values .= ', '.$mdb2->quote(trim($fields['group_key'])); $values .= ', '.$mdb2->quote(trim($fields['name'])); $values .= ', '.$mdb2->quote(trim($fields['description'])); $values .= ', '.$mdb2->quote(trim($fields['currency'])); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 4054a4a5..060b8e02 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.61.4880 | Copyright © Anuko | +  Anuko Time Tracker 1.18.61.4881 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve}