예제 #1
0
    if (!$comment->isValid()) {
        $gBitSystem->fatalError(tra("Invalid Comment"), NULL, NULL, HttpStatusCodes::HTTP_GONE);
    }
    switch ($_REQUEST['action']) {
        case 1:
            // Aprove
            $comment->modApprove();
            break;
        case 2:
            // Reject
            $comment->modReject();
            break;
        case 3:
            //Moderate
            $comment->loadMetaData();
            $comment->modWarn($_REQUEST['warning_message']);
        default:
            break;
    }
}
// Finally - load up our topic
$thread = new BitBoardTopic($_REQUEST['t']);
$thread->load();
if (!$thread->isValid()) {
    $gBitSystem->fatalError(tra("Unknown discussion"), NULL, NULL, HttpStatusCodes::HTTP_GONE);
}
$thread->verifyViewPermission();
// load up the root board we need it
$gBoard = new BitBoard(null, $thread->mInfo['board_content_id']);
$gBoard->load();
$gBitSmarty->assignByRef('board', $gBoard);