function filemgmt_comments($firstcomment) { global $_USER, $_CONF; $comment_id = "filemgmt-" . intval($_GET['lid']); $file = $_GET['filename']; if ($firstcomment) { $story = $comment_id; $pid = 0; $type = "filemgmt"; echo COM_refresh($_CONF['site_url'] . "/comment.php?sid={$story}&pid={$pid}&type={$type}"); } else { $display = COM_siteHeader() . COM_userComments($comment_id, $file, 'filemgmt', '', 'nested'); $display .= COM_siteFooter(); } echo $display; exit; }
function filemgmt_comments($firstcomment) { global $_CONF; $lid = 0; if (isset($_GET['lid'])) { $lid = COM_applyFilter($_GET['lid'], true); } $comment_id = "filemgmt-" . $lid; $file = ''; if (isset($_GET['filename'])) { $file = COM_applyFilter($_GET['filename']); } if ($firstcomment) { $story = $comment_id; $pid = 0; $type = "filemgmt"; echo COM_refresh($_CONF['site_url'] . "/comment.php?sid={$story}&pid={$pid}&type={$type}"); exit; } $display = COM_userComments($comment_id, $file, 'filemgmt', '', 'nested'); if (function_exists('COM_createHTMLDocument')) { $display = COM_createHTMLDocument($display); } else { $display = COM_siteHeader() . $display . COM_siteFooter(); } COM_output($display); exit; }