From: anuko Date: Sun, 31 Dec 2017 16:07:24 +0000 (+0000) Subject: Temporary fix for not billable entries in week view. X-Git-Tag: timetracker_1.19-1~1412 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=88a1f19a4593e960d7f15225d446f6dcada26dbc;p=timetracker.git Temporary fix for not billable entries in week view. --- diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index e5aed81d..1e692c31 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -53,11 +53,11 @@ class Table extends FormElement { } function setKeyField($value) { - $this->mKeyField = $value; + $this->mKeyField = $value; } function setData($data) { - if (is_array($data) && isset($data[0]) && is_array($data[0])) + if (is_array($data) && isset($data[0]) && is_array($data[0])) $this->mData = &$data; } diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index e726b92f..ba678fcb 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -810,9 +810,9 @@ class ttTeamHelper { $inactive_teams = array(); $mdb2 = getConnection(); - // Get all team ids for teams created or modified more than 1 year ago. + // Get all team ids for teams created or modified more than 6 months ago. // $ts = date('Y-m-d', strtotime('-1 year')); - $ts = date('Y-m-d', strtotime('-4 month')); + $ts = date('Y-m-d', strtotime('-6 month')); $sql = "select id from tt_teams where timestamp < '$ts' order by id"; $res = $mdb2->query($sql); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 1d0b382e..da58a09b 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.3.3712| Copyright © Anuko | +  Anuko Time Tracker 1.13.4.3713| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index 3cb4ea73..bc1e4717 100644 --- a/week.php +++ b/week.php @@ -126,14 +126,13 @@ class LabelCellRenderer extends DefaultCellRenderer { $this->setOptions(array('style'=>'text-align: center; font-weight: bold;')); } // Special handling for not billable entries. - /* // TODO: this does not work and should be coded properly. if ($row > 0) { - $row_id = $table->getValueAt($row,1+$column)['row_id']; + $row_id = $table->getValueAtName($row,'row_id'); $billable = ttTimeHelper::parseFromWeekViewRow($row_id, 'bl'); if (!$billable) { - $this->setOptions(array('class'=>'not_billable')); // TODO: Should not we add options instead? How does it work exactly? + $this->setOptions(array('style'=>'color: red;')); // TODO: style it properly in CSS. } - }*/ + } $this->setValue(htmlspecialchars($value)); // This escapes HTML for output. return $this->toString(); }