- $records = ttWeekViewHelper::getRecordsForInterval($user->getActiveUser(), $pastWeekStartDate, $pastWeekEndDate);
+ $records = ttWeekViewHelper::getRecordsForInterval($user->getUser(), $pastWeekStartDate, $pastWeekEndDate);
// Handle potential situation of no records by re-trying for up to 4 more previous weeks (after a long vacation, etc.).
if (!$records) {
for ($i = 0; $i < 4; $i++) {
// Handle potential situation of no records by re-trying for up to 4 more previous weeks (after a long vacation, etc.).
if (!$records) {
for ($i = 0; $i < 4; $i++) {
- $records = ttWeekViewHelper::getRecordsForInterval($user->getActiveUser(), $pastWeekStartDate, $pastWeekEndDate);
+ $records = ttWeekViewHelper::getRecordsForInterval($user->getUser(), $pastWeekStartDate, $pastWeekEndDate);
$fields4insert['date'] = $entry_date;
$fields4insert['duration'] = $fields['duration'];
$fields4insert['client'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cl');
$fields4insert['date'] = $entry_date;
$fields4insert['duration'] = $fields['duration'];
$fields4insert['client'] = ttWeekViewHelper::parseFromWeekViewRow($fields['row_id'], 'cl');
$sql = "update tt_log set duration = '$duration' where id = $tt_log_id and user_id = $user_id";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
$sql = "update tt_log set duration = '$duration' where id = $tt_log_id and user_id = $user_id";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
$sql = "update tt_log set comment = ".$mdb2->quote($fields['comment'])." where id = $tt_log_id and user_id = $user_id";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))
$sql = "update tt_log set comment = ".$mdb2->quote($fields['comment'])." where id = $tt_log_id and user_id = $user_id";
$affected = $mdb2->exec($sql);
if (is_a($affected, 'PEAR_Error'))