function saveTask($option) { global $mainframe; $postRow = JRequest::get('post'); $task = new CbodbTask($postRow['id']); $task->setAll($postRow); $task->comment = JRequest::getVar('comment', '', 'post', 'string', JREQUEST_ALLOWRAW); $task->saveData(); $mainframe->redirect('index.php?task=showtasks&option=' . $option, 'Task saved!'); }
function checkInTaskOnLogout($memberID) { $transactionID = CbodbTransaction::getMemberTaskTransaction($memberID); $transaction = new CbodbTransaction($transactionID); $transaction->dateClosed = date("Y-m-d H:i:s", time()); $transaction->isOpen = 0; $transaction->comment = "SYSTEM MESSAGE: Task left open on logout"; $transaction->saveData(); if ($taskID > 0) { $taskID = $transaction->taskID; $task = new CbodbTask($taskID); $task->isDone = 0; $task->isOpen = 0; $task->saveData(); } }