Пример #1
0
            // unapproving a thread so do not decremement the counters of any other posts in this thread
            $firstpost["{$post['threadid']}"] = true;
        } else {
            if (!empty($firstpost["{$post['threadid']}"])) {
                $postarray["{$post['postid']}"]['skippostcount'] = true;
            }
        }
    }
    if (empty($postarray)) {
        eval(standard_error(fetch_error('no_applicable_posts_selected')));
    }
    foreach ($postarray as $postid => $post) {
        $foruminfo = fetch_foruminfo($post['forumid']);
        $tinfo = array('threadid' => $post['threadid'], 'forumid' => $post['forumid'], 'visible' => $post['thread_visible'], 'firstpostid' => $post['firstpostid']);
        // Can't send $thread without considering that thread_visible may change if we approve the first post of a thread
        unapprove_post($postid, $foruminfo['countposts'] and !$post['skippostcount'], true, $post, $tinfo, false);
    }
    foreach (array_keys($threadlist) as $threadid) {
        build_thread_counters($threadid);
    }
    foreach (array_keys($forumlist) as $forumid) {
        build_forum_counters($forumid);
    }
    // empty cookie
    setcookie('vbulletin_inlinepost', '', TIMENOW - 3600, '/');
    ($hook = vBulletinHook::fetch_hook('inlinemod_unapproveposts')) ? eval($hook) : false;
    eval(print_standard_redirect('redirect_inline_unapprovedposts', true, $forceredirect));
}
// ############################### start do merge posts ###############################
if ($_POST['do'] == 'domergeposts') {
    $vbulletin->input->clean_array_gpc('p', array('username' => TYPE_NOHTML, 'postid' => TYPE_UINT, 'title' => TYPE_STR, 'reason' => TYPE_NOHTML, 'wysiwyg' => TYPE_BOOL, 'message' => TYPE_STR, 'parseurl' => TYPE_BOOL, 'signature' => TYPE_BOOL, 'disablesmilies' => TYPE_BOOL));
Пример #2
0
	if (empty($postarray))
	{
		eval(standard_error(fetch_error('no_applicable_posts_selected')));
	}

	foreach ($postarray AS $postid => $post)
	{
		$foruminfo = fetch_foruminfo($post['forumid']);
		$tinfo = array(
			'threadid'    => $post['threadid'],
			'forumid'     => $post['forumid'],
			'visible'     => $post['thread_visible'],
			'firstpostid' => $post['firstpostid']
		);
		// Can't send $thread without considering that thread_visible may change if we approve the first post of a thread
		unapprove_post($postid, ($foruminfo['countposts'] AND !$post['skippostcount']), true, $post, $tinfo, false);
	}

	foreach (array_keys($threadlist) AS $threadid)
	{
		build_thread_counters($threadid);
	}

	foreach (array_keys($forumlist) AS $forumid)
	{
		build_forum_counters($forumid);
	}

	// empty cookie
	setcookie('vbulletin_inlinepost', '', TIMENOW - 3600, '/');