Exemplo n.º 1
0
function DelComment_Children($id)
{
    global $zbp;
    $cmt = $zbp->GetCommentByID($id);
    foreach ($cmt->Comments as $comment) {
        if (Count($comment->Comments) > 0) {
            DelComment_Children($comment->ID);
        }
        $comment->Del();
    }
}
Exemplo n.º 2
0
/**
 * 删除评论下的子评论
 * @param int $id 父评论ID
 */
function DelComment_Children($id)
{
    global $zbp;
    $cmt = $zbp->GetCommentByID($id);
    foreach ($cmt->Comments as $comment) {
        if (Count($comment->Comments) > 0) {
            DelComment_Children($comment->ID);
        }
        if ($comment->IsChecking == false) {
            CountCommentNums(-1, 0);
        } else {
            CountCommentNums(-1, -1);
        }
        $comment->Del();
    }
}