<?php
/**
 * @package    DPCalendar
 * @author     Digital Peak http://www.digital-peak.com
 * @copyright  Copyright (C) 2007 - 2016 Digital Peak. All rights reserved.
 * @license    http://www.gnu.org/licenses/gpl.html GNU/GPL
 */
defined('_JEXEC') or die();

class Pkg_DPCalendarInstallerScript
{

	public function install ($parent)
	{
	}

	public function update ($parent)
	{
	}

	public function uninstall ($parent)
	{
	}

	public function preflight ($type, $parent)
	{
		// Check if the local Joomla version does fit the minimum requirement
		if (version_compare(JVERSION, '3.3') == - 1)
		{
			JFactory::getApplication()->enqueueMessage(
					'This DPCalendar version does only run on Joomla 3.3 and above, please upgrade your Joomla version or install an older version of DPCalendar!',
					'error');
			JFactory::getApplication()->redirect('index.php?option=com_installer&view=install');
			return false;
		}

		return true;
	}

	public function postflight ($type, $parent)
	{
	}
}
