<?php
//
//	file: db_update.php
//	author: abdev
//	begin: 12/12/2010
//	version: 0.0.10 - 12/12/2013
//	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';

// logo image
$logo_img = 'images/ltt_logo_small.png';

// array of versions and actions within each
$versions = array(
	'1.1.6' => array(

		'table_index_add' => array(
			array('phpbb_topics', 'topic_last_post_id', array('topic_last_post_id')),
		),

		'cache_purge' => array(''),
	),

	'1.1.5' => array(),

	'1.1.2-PL1' => array(
		'cache_purge' => array(''),
	),

	'1.1.2' => array(),

	'1.1.1' => array(),

	'1.1.0' => array(
		'config_add' => array(
			array('ltt_icons', 1),
		),
		'cache_purge' => array(''),
	),

	'1.0.3' => 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;
