<?php
if (!isset($cache))
{
	$cache = array();
}

//if ($vbulletin->userinfo['permissions']['dbtech_vbmailpermissions'] & $vbulletin->bf_ugp_dbtech_vbmailpermissions['canview'])
//{
	// Global templates
	$cache[] = 'dbtech_vbmail_navbar_link';
	
	/*DBTECH_PRO_START*/
	if (intval($vbulletin->versionnumber) == 4)
	{	
		$cache[] = 'dbtech_vbmail_block_form';
	}
	/*DBTECH_PRO_END*/
	
	if ($vbulletin->options['dbtech_vbmail_integration'] & 1 OR $vbulletin->options['dbtech_vbmail_integration'] & 2)
	{
		$cache[] = 'dbtech_vbmail_quicklinks_link';
	}
//}

if (in_array('usercp_nav_folderbit', (array)$cache) OR in_array('usercp_nav_folderbit', (array)$globaltemplates))
{
	// UserCP templates
	$cache[] = 'dbtech_vbmail_usercp_nav_link';
	$cache[] = 'dbtech_vbmail_options';
	$cache[] = 'dbtech_vbmail_options_bit';
	$cache[] = 'dbtech_vbmail_options_bit_bit';
}

if (intval($vbulletin->versionnumber) == 3)
{
	$cache[] = 'dbtech_vbmail.css';
	
	$globaltemplates = array_merge($globaltemplates, $cache);
}
?>