$kb_closed])); } $ticket = ticketForModal($_GET['ticket_id'] ?? 0, 2); $ticket_id = intval($ticket['ticket_id']); $kb_use_ai = aiReady('Documentation'); $kb_form_mode = 'add'; $kb_form = [ 'kb_article_title' => mb_substr((string) $ticket['ticket_subject'], 0, 200), 'kb_article_review_months' => 12, 'kb_article_published_at' => null, // Without AI: what was asked, as words - the steps are for the agent to write 'kb_article_content' => $kb_use_ai ? '' : '
' . nl2br(escapeHtml(aiHtmlToText($ticket['ticket_details'], 2000))) . '