Well, now I see that Todi's private check would work when the privacy flag is set from the admin panel, but doesn't do anything for bugs created from vbugs.php, which doesn't even insert data for that column.
So..... starting at line 650, assuming you've made my changes above for moderation, find:
PHP Code:
$vbulletin->input->clean_array_gpc('p', array(
'title' => TYPE_STR,
'vbug_typeid' => TYPE_UINT,
'vbug_versionid' => TYPE_UINT,
'vbug_severityid' => TYPE_UINT,
'description' => TYPE_STR,
'subscribe' => TYPE_UINT
));
and replace with:
PHP Code:
$vbulletin->input->clean_array_gpc('p', array(
'title' => TYPE_STR,
'vbug_typeid' => TYPE_UINT,
'vbug_versionid' => TYPE_UINT,
'vbug_severityid' => TYPE_UINT,
'description' => TYPE_STR,
'subscribe' => TYPE_UINT,
'private' => TYPE_UINT
));
Then below 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'] . ", " . $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, private)
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'] . ", " . $vbulletin->GPC['private'] . ")
");
Anything else?