Jump to content

Recommended Posts

Hello there, Ive been using a forum boars software called phpbb which supports modifications. I used such one and in an attempt to remove it it went horribly wrong. Anyways i attempted to get support from the support forum for it. However it hasnt seen any hits since 2007 so i doubt i'm going to see a reply to my post there. So ive come here to ask if someone could help me solve the following. Bascially i want to remove the tables and data that was created by this mod. I have the install script which is pretty small. I was wondering if anyone could reverse it to completely remove what it installed. It was written into an install.php file but if anyone can give me just the raw sql to run it would be better. However this is the code that installed it:

<?php

/**
*
* @author Tom (Tom Catullo) tom@cortello.com 
* @package umil
* @version $Id install_legend_repositioning.php 1.0.3 2010-02-16 17:45:00GMT Tom $
* @copyright (c) 2009 Cortello Group 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('mods/umil_legend_repositioning_mod');

if (!file_exists($phpbb_root_path . 'umil/umil.' . $phpEx))
{
trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR);
}

// We only allow a founder to install this MOD
if ($user->data['user_type'] != USER_FOUNDER)
{
if ($user->data['user_id'] == ANONYMOUS)
{
	login_box('', 'LOGIN');
}

trigger_error('NOT_AUTHORISED');
}

if (!class_exists('umil'))
{
include($phpbb_root_path . 'umil/umil.' . $phpEx);
}

$umil = new umil(true);

$mod = array(
'name'		=> 'Legend Repositioning',
'version'	=> '1.0.3',
'config'	=> 'legend_repositioning_version',
'enable'	=> 'legend_repositioning_enable',
);

if (confirm_box(true))
{
// Install the base 1.0.3 version
if (!$umil->config_exists($mod['config']))
{
	// Lets add a config setting for enabling/disabling the MOD and set it to true
	$umil->config_add($mod['enable'], true);

	// We must handle the version number ourselves.
	$umil->config_add($mod['config'], $mod['version']);


	$umil->table_column_add('phpbb_groups', 'group_position', array('UINT', '0'));

	// Select all groups that have no set position
	$sql = 'SELECT group_id
		FROM ' . GROUPS_TABLE . '
		WHERE group_position = 0';
	$result = $db->sql_query($sql);

	// Set default positions for groups (so that all positions are not set to 0)
	$group_position = 0;
	while ($row = $db->sql_fetchrow($result))
	{
		$group_position++;
		$sql = 'UPDATE ' . GROUPS_TABLE . '
			SET group_position = ' . $group_position . '
			WHERE group_id = ' . $row['group_id'];
		$db->sql_query($sql);
	}
	$db->sql_freeresult($result);

	// Our final action, we purge the board cache
	$umil->cache_purge();
}

// We are done
trigger_error('Done!');
}
else
{
confirm_box(false, 'INSTALL_TEST_MOD');
}

// Shouldn't get here.
redirect($phpbb_root_path . $user->page['page_name']);


?>

 

Apologies if i have posted this in the wrong area or i have not included something.

Link to comment
https://forums.phpfreaks.com/topic/230434-reversing-the-install-procedure/
Share on other sites

  • 3 weeks later...

i have no clue what the hell that code is doing. I built my own forums so i don't know anything about those open source forums. However, i am a database junkie.

 

Tell me what TABLES contain what INFORMATION that you want to have changed to what OTHER information.

 

Start with this, for the table(s) in question:

mysql> describe tbl_name;

 

Post that, and tell me what you are TRYING to do with it.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.