projects
/
timetracker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15d237d
)
Fixed export and import for locking specification.
author
Nik Okuntseff
<support@anuko.com>
Fri, 1 Apr 2016 18:23:40 +0000
(18:23 +0000)
committer
Nik Okuntseff
<support@anuko.com>
Fri, 1 Apr 2016 18:23:40 +0000
(18:23 +0000)
WEB-INF/lib/ttExportHelper.class.php
patch
|
blob
|
history
WEB-INF/lib/ttImportHelper.class.php
patch
|
blob
|
history
WEB-INF/lib/ttTeamHelper.class.php
patch
|
blob
|
history
WEB-INF/templates/footer.tpl
patch
|
blob
|
history
diff --git
a/WEB-INF/lib/ttExportHelper.class.php
b/WEB-INF/lib/ttExportHelper.class.php
index
d641f3f
..
634987a
100644
(file)
--- a/
WEB-INF/lib/ttExportHelper.class.php
+++ b/
WEB-INF/lib/ttExportHelper.class.php
@@
-46,10
+46,10
@@
class ttExportHelper {
// createDataFile creates a file with all data for a given team.
function createDataFile($compress = false) {
// createDataFile creates a file with all data for a given team.
function createDataFile($compress = false) {
-
global $user;
+ global $user;
// Create a temporary file.
// Create a temporary file.
-
$dirName = dirname(TEMPLATE_DIR . '_c/.');
+ $dirName = dirname(TEMPLATE_DIR . '_c/.');
$tmp_file = tempnam($dirName, 'tt');
// Open the file for writing.
$tmp_file = tempnam($dirName, 'tt');
// Open the file for writing.
@@
-61,7
+61,7
@@
class ttExportHelper {
fwrite($file, "<pack>\n");
// Write team info.
fwrite($file, "<pack>\n");
// Write team info.
- fwrite($file, "<team currency=\"".$user->currency."\" lock_interval=\"".$user->lock_interval."\" lang=\"".$user->lang."\" decimal_mark=\"".$user->decimal_mark."\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format."\" week_start=\"".$user->week_start.
+ fwrite($file, "<team currency=\"".$user->currency."\" lock_
spec=\"".$user->lock_spec."\" lock_
interval=\"".$user->lock_interval."\" lang=\"".$user->lang."\" decimal_mark=\"".$user->decimal_mark."\" date_format=\"".$user->date_format."\" time_format=\"".$user->time_format."\" week_start=\"".$user->week_start.
"\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" record_type=\"".$user->record_type."\">\n");
fwrite($file, " <name><![CDATA[".$user->team."]]></name>\n");
fwrite($file, " <address><![CDATA[".$user->address."]]></address>\n");
"\" plugins=\"".$user->plugins."\" tracking_mode=\"".$user->tracking_mode."\" record_type=\"".$user->record_type."\">\n");
fwrite($file, " <name><![CDATA[".$user->team."]]></name>\n");
fwrite($file, " <address><![CDATA[".$user->address."]]></address>\n");
diff --git
a/WEB-INF/lib/ttImportHelper.class.php
b/WEB-INF/lib/ttImportHelper.class.php
index
91d6b39
..
806dfdb
100644
(file)
--- a/
WEB-INF/lib/ttImportHelper.class.php
+++ b/
WEB-INF/lib/ttImportHelper.class.php
@@
-117,6
+117,7
@@
class ttImportHelper {
'name' => $this->teamData['NAME'],
'address' => $this->teamData['ADDRESS'],
'currency' => $this->teamData['CURRENCY'],
'name' => $this->teamData['NAME'],
'address' => $this->teamData['ADDRESS'],
'currency' => $this->teamData['CURRENCY'],
+ 'lock_spec' => $this->teamData['LOCK_SPEC'],
'lock_interval' => $this->teamData['LOCK_INTERVAL'],
'lang' => $this->teamData['LANG'],
'decimal_mark' => $this->teamData['DECIMAL_MARK'],
'lock_interval' => $this->teamData['LOCK_INTERVAL'],
'lang' => $this->teamData['LANG'],
'decimal_mark' => $this->teamData['DECIMAL_MARK'],
diff --git
a/WEB-INF/lib/ttTeamHelper.class.php
b/WEB-INF/lib/ttTeamHelper.class.php
index
8cc9660
..
5b25174
100644
(file)
--- a/
WEB-INF/lib/ttTeamHelper.class.php
+++ b/
WEB-INF/lib/ttTeamHelper.class.php
@@
-602,6
+602,15
@@
class ttTeamHelper {
$mdb2 = getConnection();
$mdb2 = getConnection();
+ $lock_spec = $fields['lock_spec'];
+ if ($lock_spec !== null) {
+ $lockspec_f = ', lock_spec';
+ $lockspec_v = ', ' . $mdb2->quote($lock_spec);
+ } else {
+ $lockspec_f = '';
+ $lockspec_v = '';
+ }
+
if ($fields['lock_interval'] !== null) {
$locktime_f = ', locktime';
$locktime_v = ", " . (int)$fields['lock_interval'];
if ($fields['lock_interval'] !== null) {
$locktime_f = ', locktime';
$locktime_v = ", " . (int)$fields['lock_interval'];
@@
-615,11
+624,11
@@
class ttTeamHelper {
global $i18n;
$lang = $i18n->lang;
}
global $i18n;
$lang = $i18n->lang;
}
-
+
$decimal_mark = $fields['decimal_mark'];
if ($decimal_mark !== null) {
$decimal_mark_f = ', decimal_mark';
$decimal_mark = $fields['decimal_mark'];
if ($decimal_mark !== null) {
$decimal_mark_f = ', decimal_mark';
- $decimal_mark_v = ', ' . $mdb2->quote($decimal_mark);
+ $decimal_mark_v = ', ' . $mdb2->quote($decimal_mark);
} else {
$decimal_mark_f = '';
$decimal_mark_v = '';
} else {
$decimal_mark_f = '';
$decimal_mark_v = '';
@@
-688,11
+697,11
@@
class ttTeamHelper {
$record_type_v = '';
}
$record_type_v = '';
}
- $sql = "insert into tt_teams (name, address, currency $locktime_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f)
+ $sql = "insert into tt_teams (name, address, currency $lock
spec_f $lock
time_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f)
values(".
$mdb2->quote(trim($fields['name'])).
", ".$mdb2->quote(trim($fields['address'])).
values(".
$mdb2->quote(trim($fields['name'])).
", ".$mdb2->quote(trim($fields['address'])).
- ", ".$mdb2->quote(trim($fields['currency']))." $locktime_v, ".$mdb2->quote($lang).
+ ", ".$mdb2->quote(trim($fields['currency']))." $lock
spec_v $lock
time_v, ".$mdb2->quote($lang).
"$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v)";
$affected = $mdb2->exec($sql);
"$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v)";
$affected = $mdb2->exec($sql);
diff --git
a/WEB-INF/templates/footer.tpl
b/WEB-INF/templates/footer.tpl
index
4075ce3
..
408ffcf
100644
(file)
--- a/
WEB-INF/templates/footer.tpl
+++ b/
WEB-INF/templates/footer.tpl
@@
-12,7
+12,7
@@
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.9.22.34
69
| Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.9.22.34
70
| Copyright © <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>
<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>