Unfortunatelly this is very buggy and does not work as downloaded.
There are several problems in support.php where
Code:
if($vbulletin->options["microsupport_products"])
should read
Code:
if($vbulletin->options["microsupport_departments"])
sometimes and many calls for department and product IDs do not even have this conditional.
Also there is a serious bug in the getRecordById function in microsupport/includes/functions.php causing empty return values from this function.
There may be other bugs also, since I have stopped trying to debug the scripts after that.
Do not download it unless a new version has been posted by the programmer and QA has been done seriously.
Edit:
Debugged the getRecordById function:
Replace
Code:
function getRecordById($tablename, $id, $rowname = 'id')
{
global $db, $vbulletin;
$result = $db->query_read("SELECT * FROM ".TABLE_PREFIX."".$tablename." WHERE ".$rowname."=".$id." LIMIT 1");
if(!$result) return array ("id" => 0, "name" => '');
if(mysql_num_rows($result) == 0) return array ("id" => 0, "name" => '');
$ret = array();
while($row = mysql_fetch_assoc($result)) {
$ret = $row;
}
mysql_free_result($result);
return $ret;
}
with
Code:
function getRecordById($tablename, $id, $rowname = 'id')
{
global $db, $vbulletin;
$result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . $tablename . " WHERE " . $rowname . " = " . $id . " LIMIT 1");
if($db->num_rows($result) == 0) return array ("id" => 0, "name" => '');
$ret = array();
while($row = $db->fetch_array($result)) {
$ret = $row;
}
$db->free_result($result);
return $ret;
}
But as said, there are likely more bugs in this mod.