BigJohnny
09-19-2010, 03:26 AM
I installed a mod for 3.6 that ended up somehow screwing with all of my css entries.
They are all reverted but the mod didn't come with uninstall code.
It's the members who have visited today for 3.6, and im running 3.8.3
I dont know what this code is for or doing anyway, so is there anyway to undo the effects of this code on my DB??
$info['cvs'] = trim(substr(substr($arr['cvs'],10),0,-1));
if ($vbulletin->options['pemdata'])
{
$data = unserialize($vbulletin->options['pemdata']);
$prev = $data[$info['productid']];
$data[$info['productid']] = $info;
$productdata = $db->escape_string(serialize($data));
$db->query_write("
UPDATE ".TABLE_PREFIX."setting SET value = '$productdata' where varname = 'pemdata'
");
}
else
{
$data[$info['productid']] = $info;
$productdata = $db->escape_string(serialize($data));
$db->query_write("
REPLACE INTO ".TABLE_PREFIX."phrase
(varname, fieldname, product, text)
VALUES ('setting_pemdata_desc','vbsettings','pem-dummy-product','Leave this setting alone.'),
('setting_pemdata_title','vbsettings','pem-dummy-product','Modification Version Data')
");
$db->query_write("
REPLACE INTO ".TABLE_PREFIX."setting
(varname, value, optioncode, displayorder, grouptitle, defaultvalue, volatile, product)
VALUES ('pemdata','$productdata','',999,'version','',1,'p em-dummy-product')
");
}
$rebuild['options'] = true;
$rebuild['phrases'] = true;
$db->query_write("DELETE FROM ".TABLE_PREFIX."setting WHERE product = '".$db->escape_string($info['productid'])."'");
$info['url'] = 'https://vborg.vbsupport.ru/misc.php?do=producthelp&pid='.$info['productid'];
$info['versioncheckurl'] = 'https://vborg.vbsupport.ru/misc.php?do=productcheck&pid='.$info['productid'];
$db->hide_errors();
$indexfound = false;
echo "<center>Checking for Index</center>"; vbflush();
$indexdata = $vbulletin->db->query_read_slave("SHOW INDEX FROM " . TABLE_PREFIX . "user");
while ($indexlist = $vbulletin->db->fetch_array($indexdata))
{
if ($indexlist['Key_name'] == 'lastactivity')
{
$indexfound = true;
}
}
if (!$indexfound)
{
echo "<center>Adding Index</center>"; vbflush();
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD INDEX (lastactivity)");
}
$db->show_errors();
// Display Version Information //
echo "<br /><b>";
echo "<center>{$info['title']}</center>";
echo "<br />";
echo "<center>Installed : Version {$info['version']} ; Revision {$info['cvs']}</center>";
echo "<br /></b>";
if ($prev['cvs'])
{
echo "<center>( Replacing : Version {$prev['version']} ; Revision {$prev['cvs']} )</center><br />";
}
// Wait //
vbflush();
echo "<br /><br />";
vbflush();
sleep(5);
They are all reverted but the mod didn't come with uninstall code.
It's the members who have visited today for 3.6, and im running 3.8.3
I dont know what this code is for or doing anyway, so is there anyway to undo the effects of this code on my DB??
$info['cvs'] = trim(substr(substr($arr['cvs'],10),0,-1));
if ($vbulletin->options['pemdata'])
{
$data = unserialize($vbulletin->options['pemdata']);
$prev = $data[$info['productid']];
$data[$info['productid']] = $info;
$productdata = $db->escape_string(serialize($data));
$db->query_write("
UPDATE ".TABLE_PREFIX."setting SET value = '$productdata' where varname = 'pemdata'
");
}
else
{
$data[$info['productid']] = $info;
$productdata = $db->escape_string(serialize($data));
$db->query_write("
REPLACE INTO ".TABLE_PREFIX."phrase
(varname, fieldname, product, text)
VALUES ('setting_pemdata_desc','vbsettings','pem-dummy-product','Leave this setting alone.'),
('setting_pemdata_title','vbsettings','pem-dummy-product','Modification Version Data')
");
$db->query_write("
REPLACE INTO ".TABLE_PREFIX."setting
(varname, value, optioncode, displayorder, grouptitle, defaultvalue, volatile, product)
VALUES ('pemdata','$productdata','',999,'version','',1,'p em-dummy-product')
");
}
$rebuild['options'] = true;
$rebuild['phrases'] = true;
$db->query_write("DELETE FROM ".TABLE_PREFIX."setting WHERE product = '".$db->escape_string($info['productid'])."'");
$info['url'] = 'https://vborg.vbsupport.ru/misc.php?do=producthelp&pid='.$info['productid'];
$info['versioncheckurl'] = 'https://vborg.vbsupport.ru/misc.php?do=productcheck&pid='.$info['productid'];
$db->hide_errors();
$indexfound = false;
echo "<center>Checking for Index</center>"; vbflush();
$indexdata = $vbulletin->db->query_read_slave("SHOW INDEX FROM " . TABLE_PREFIX . "user");
while ($indexlist = $vbulletin->db->fetch_array($indexdata))
{
if ($indexlist['Key_name'] == 'lastactivity')
{
$indexfound = true;
}
}
if (!$indexfound)
{
echo "<center>Adding Index</center>"; vbflush();
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD INDEX (lastactivity)");
}
$db->show_errors();
// Display Version Information //
echo "<br /><b>";
echo "<center>{$info['title']}</center>";
echo "<br />";
echo "<center>Installed : Version {$info['version']} ; Revision {$info['cvs']}</center>";
echo "<br /></b>";
if ($prev['cvs'])
{
echo "<center>( Replacing : Version {$prev['version']} ; Revision {$prev['cvs']} )</center><br />";
}
// Wait //
vbflush();
echo "<br /><br />";
vbflush();
sleep(5);