Seems to be a bug with the moderation system. Even with the moderation option set to "Yes," all bugs submitted via vbugs.php are live for all users to see. I found a couple of issues in the code that address this. The vbugs.php is looking for the wrong option setting and bug moderation value, cleaning some global variables unnecessarily in the process.
Details for editing:
Starting at line 650 in
PHP Code:
$vbulletin->input->clean_array_gpc('p', array(
'title' => TYPE_STR,
'vbug_typeid' => TYPE_UINT,
'vbug_versionid' => TYPE_UINT,
'vbug_severityid' => TYPE_UINT,
'vbug_statusid' => TYPE_UINT,
'description' => TYPE_STR,
'moderate' => TYPE_UINT,
'subscribe' => TYPE_UINT
));
remove
PHP Code:
'vbug_statusid' => TYPE_UINT,
and
PHP Code:
'moderate' => TYPE_UINT,
Then immediately below find
PHP Code:
if($vbulletin->options['vbug_moderated'])
and change the line to
PHP Code:
if($vbulletin->options['vbug_bug_moderate'])
Below that find
PHP Code:
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "vbug (userid, title, description, vbug_statusid, postdate, vbug_severityid, vbug_typeid, vbug_versionid, moderate, lastedit, lastreplyuid)
VALUES (" . $vbulletin->userinfo['userid'] . ", '" . $db->escape_string($vbulletin->GPC['title']) . "', '" . $db->escape_string($vbulletin->GPC['description']) . "', " . $vbug_statusid . ", '" . TIMENOW . "', " . $vbulletin->GPC['vbug_severityid'] . ", " . $vbulletin->GPC['vbug_typeid'] . ", " . $vbulletin->GPC['vbug_versionid'] . ", " . $vbulletin->GPC['moderate'] . ", " . TIMENOW . ", " . $vbulletin->userinfo['userid'] . ")
");
and replace with
PHP Code:
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "vbug (userid, title, description, vbug_statusid, postdate, vbug_severityid, vbug_typeid, vbug_versionid, moderate, lastedit, lastreplyuid)
VALUES (" . $vbulletin->userinfo['userid'] . ", '" . $db->escape_string($vbulletin->GPC['title']) . "', '" . $db->escape_string($vbulletin->GPC['description']) . "', " . $vbug_statusid . ", '" . TIMENOW . "', " . $vbulletin->GPC['vbug_severityid'] . ", " . $vbulletin->GPC['vbug_typeid'] . ", " . $vbulletin->GPC['vbug_versionid'] . ", " . $moderate . ", " . TIMENOW . ", " . $vbulletin->userinfo['userid'] . ")
");