} $reportthread = ($rpforumid = $vbulletin->options['rpforumid'] and $rpforuminfo = fetch_foruminfo($rpforumid)); $reportemail = ($vbulletin->options['enableemail'] and $vbulletin->options['rpemail']); if (!$reportthread and !$reportemail) { eval(standard_error(fetch_error('emaildisabled'))); } $vbulletin->input->clean_array_gpc('r', array('return_node' => TYPE_UINT)); if ($vbulletin->GPC['return_node']) { $report_type = 'article_comment'; $content = new vBCms_Item_Content_Article($vbulletin->GPC['return_node']); $reportobj = new vB_ReportItem_ArticleComment($vbulletin); $reportobj->set_extrainfo('node', $vbulletin->GPC['return_node']); $reportobj->set_extrainfo('forum', $foruminfo); $reportobj->set_extrainfo('thread', $threadinfo); // check cms permissions on the article if (!$content->canView()) { print_no_permission(); } define('CMS_SCRIPT', true); vB_View::registerTemplater(vB_View::OT_XHTML, new vB_Templater_vB()); vBCms_NavBar::prepareNavBar($content); } else { $report_type = 'post'; $reportobj = new vB_ReportItem_Post($vbulletin); $reportobj->set_extrainfo('forum', $foruminfo); $reportobj->set_extrainfo('thread', $threadinfo); $forumperms = fetch_permissions($threadinfo['forumid']); if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) or !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) or $threadinfo['postuserid'] != $vbulletin->userinfo['userid'] and !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'])) { print_no_permission(); } // check if there is a forum password and if so, ensure the user has it set