Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2010, 03:26 AM
BigJohnny's Avatar
BigJohnny BigJohnny is offline
 
Join Date: Jun 2006
Location: Canada
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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);
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:57 PM.


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.01626 seconds
  • Memory Usage 2,163KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete