function editTask($option) { global $mainframe; $cid = JRequest::getVar('cid', array(0), '', 'array'); $id = $cid[0]; $task = new CbodbTask($id); if ($task->itemID > 0) { $item = CbodbItem::getItemFromTag($task->itemID); } else { $item = NULL; } HTML_cbodb::editTask($option, $task, $item); }