function _comment_follow(&$args, $ctx)
{
    $comment = $ctx->stash('comment');
    if (empty($comment)) {
        return;
    }
    $blog = $ctx->stash('blog');
    $nofollow = false;
    if (!empty($blog) && $blog->blog_nofollow_urls) {
        if ($blog->blog_follow_auth_links) {
            $cmntr = $ctx->stash('commenter');
            if (!isset($cmntr) && isset($comment->comment_commenter_id)) {
                $cmntr = $comment->commenter();
                if (!empty($cmntr)) {
                    $ctx->stash('commenter', $cmntr);
                }
            }
            if (empty($cmntr) || !empty($cmntr) && !is_trusted($cmntr, $ctx, $blog->blog_id)) {
                $nofollow = true;
            }
        } else {
            $nofollow = true;
        }
    }
    if ($nofollow) {
        $curr_tag = $ctx->_tag_stack[count($ctx->_tag_stack) - 1];
        if (isset($curr_tag[1]['nofollowfy'])) {
            $args['nofollowfy'] = $curr_tag[1]['nofollowfy'];
        } else {
            $args['nofollowfy'] = "1";
        }
    }
}
function _comment_follow(&$args, $ctx)
{
    $comment = $ctx->stash('comment');
    if (empty($comment)) {
        return;
    }
    $blog = $ctx->stash('blog');
    if (!empty($blog) && $blog['blog_nofollow_urls']) {
        if ($blog['blog_follow_auth_links']) {
            $cmntr = $ctx->stash('commenter');
            if (!isset($cmntr) && isset($comment['comment_commenter_id'])) {
                $cmntr = $ctx->mt->db->fetch_author($comment['comment_commenter_id']);
                if (!empty($cmntr)) {
                    $ctx->stash('commenter', $cmntr);
                }
            }
            if (empty($cmntr) || !empty($cmntr) && !is_trusted($cmntr, $ctx, $blog['blog_id'])) {
                $args['nofollowfy'] = 1;
            }
        } else {
            $args['nofollowfy'] = 1;
        }
    }
}