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!'); }