On vBulletin 4.2 there is a problem with the feature that prevents doubleposting.
When posting in the same thread twice within the time the administrator has set to merge the posts, you get a database error on the second post. The postid already exists in the browerosinfo table.
I've corrected this problem by adding some code to the "save on new post" plugin of this product (new code is bold and red):
Code:
global $db;
$useragent = $_SERVER ? $_SERVER['HTTP_USER_AGENT'] : $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
$ua = strtolower($useragent);
$ua_browser = 'unknown';
$ua_os = 'unknown';
// Browser detection:
if (strpos($ua, 'epiphany') !== false) $ua_browser = 'epiphany';
else if (strpos($ua, 'galeon') !== false) $ua_browser = 'galeon';
code deleted just to make this post readable. Do not delete this code in the plugin!!!
else if (strpos($ua, 'macintosh') !== false || strpos($ua, 'mac') !== false) $ua_os = 'macos';
$browser = $ua_browser;
$os = $ua_os;
$double = $db->query_first("
SELECT postid
FROM " . TABLE_PREFIX . "browserosinfo
WHERE postid =" . $post['postid']
);
if (empty($double))
{
$vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "browserosinfo (postid, OS, browser) VALUES (" . $post['postid'] . ",'$os' ,'$browser')");
}