Beispiel #1
0
    if (!$arResult["GROUP"]) {
        return;
    }
}
if (!$arResult["USER"]) {
    $rsUser = CUser::GetByID($loggedInUserId);
    $arResult["USER"] = $rsUser->GetNext();
}
$arResult['MAX_UPLOAD_FILES_IN_COMMENTS'] = (int) COption::GetOptionString('tasks', 'MAX_UPLOAD_FILES_IN_COMMENTS');
$arTask = null;
try {
    $oTask = new CTaskItem($arParams['TASK_ID'], $loggedInUserId);
    $arTask = $oTask->getData();
    $arTask['~TAGS'] = $oTask->getTags();
    $arTask['~FILES'] = $arTask['FILES'] = $oTask->getFiles();
    $arTask['~DEPENDS_ON'] = $arTask['DEPENDS_ON'] = $oTask->getDependsOn();
    $arTask['TAGS'] = array_map('htmlspecialcharsbx', $arTask['~TAGS']);
    // Get the fact FORUM_ID from task
    if ($arTask['FORUM_ID'] >= 1) {
        $arResult['FORUM_ID'] = $arTask['FORUM_ID'];
    }
} catch (Exception $e) {
    $arTask = null;
}
if (isset($_REQUEST["ACTION"]) && check_bitrix_sessid()) {
    if ($arTask) {
        $action = $_REQUEST['ACTION'];
        $taskID = $arTask["ID"];
        $redirectTo = null;
        try {
            if ($action == "delete") {