method stopTrack documentation in bbn\Appui\Task

Stops a track.

function($id_task, $message = false, $id_user = false) { $now = time(); if ( ($active_track = $this->getActiveTrack($id_user)) && ($active_track['id_task'] === $id_task) ){ $ok = true; if ( !empty($message) && !($id_note = $this->comment($id_task, [ 'title' => X::_('Report tracker').' '.date('d M Y H:i', strtotime($active_track['start'])).' - '.date('d M Y H:i', $now), 'text' => $message ])) ){ $ok = false; } if ( $ok ){ $ok = $this->db->update('bbn_tasks_sessions', [ 'length' => $now - strtotime($active_track['start']), 'id_note' => $id_note ?: NULL ], [ 'id' => $active_track['id'] ]); } } return (bool)$ok; }

Stops a track. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.