<?php
//
//	file: db_update.php
//	author: abdev
//	begin: 12/12/2010
//	version: 0.0.2 - 12/19/2010
//	licence: http://opensource.org/licenses/gpl-license.php GNU Public License
//

// ignore
define('IN_PHPBB', true);
define('UMIL_AUTO', 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();

if ( !file_exists($phpbb_root_path . 'umil/umil_auto.' . $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);
}

// language file which will be included when installing
$language_file = 'mods/info_acp_ltt';

// name of the mod
$mod_name = 'LTT';

// name of the config variable
$version_config_name = 'ltt_version';

// array of versions and actions within each
$versions = array(
	'1.0.2' => array(),

	'1.0.1' => array(),

	'1.0.0' => array(
		'config_add' => array(
			array('ltt_max_chars', 25),
			array('ltt_url', 0),
		),
	),
);

// include the UMIL Auto file, it handles the rest
include $phpbb_root_path . 'umil/umil_auto.' . $phpEx;

// clear cache
cache_purge('', 0);
cache_purge('template', 0);
