vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   screwed up, can this install code be undone? (https://vborg.vbsupport.ru/showthread.php?t=250790)

BigJohnny 09-19-2010 03:26 AM

screwed up, can this install code be undone?
 
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??

Code:

$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,'pem-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);



All times are GMT. The time now is 01:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00980 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete