<?php
/**
* @version 			SEBLOD 2.x Core ~ $Id: pkg_script.php sebastienheraud $
* @package			SEBLOD (App Builder & CCK) // SEBLOD nano (Form Builder)
* @url				http://www.seblod.com
* @editor			Octopoos - www.octopoos.com
* @copyright		Copyright (C) 2012 SEBLOD. All Rights Reserved.
* @license 			GNU General Public License version 2 or later; see _LICENSE.php
**/

// No Direct Access
defined( '_JEXEC' ) or die;

// Script
class pkg_cckInstallerScript
{
	// install
	function install( $parent )
	{
	}
	
	// uninstall
	function uninstall( $parent )
	{
	}
	
	// update
	function update( $parent )
	{
	}
	
	// preflight
	function preflight( $type, $parent )
	{
		$version	=	new JVersion;
		
		if ( version_compare( $version->getShortVersion(), '2.5.1', 'lt' ) ) {
			Jerror::raiseWarning( null, 'You should upgrade your site with Joomla 2.5.1 (or +) before installing SEBLOD 2.2(+).' );
			return false;
		}
		
		set_time_limit( 0 );
	}
	
	// postflight
	function postflight( $type, $parent )
	{
	}
}
?>