<?php
/**
 * Install controller
 *
 * @package 	CSVIVirtueMart
 * @author 		Roland Dalmulder
 * @link 		http://www.csvimproved.com
 * @copyright 	Copyright (C) 2006 - 2012 RolandD Cyber Produksi
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: install.php 1892 2012-02-11 11:01:09Z RolandD $
 */

defined( '_JEXEC' ) or die( 'Direct Access to this location is not allowed.' );

jimport('joomla.application.component.controller');

/**
 * Install Controller
 *
 * @package    CSVIVirtueMart
 */
class CsvivirtuemartControllerInstall extends JController {
	
	/**
	 * Show the install screen 
	 * 
	 * @copyright 
	 * @author		RolandD 
	 * @todo 
	 * @see 
	 * @access 		public
	 * @param 
	 * @return 
	 * @since 		3.0
	 */
	public function install() {
		JRequest::setVar('view', 'install');
		parent::display();
	}
	
	/**
	 * Upgrade CSVI VirtueMart 
	 * 
	 * @copyright 
	 * @author 		RolandD
	 * @todo 
	 * @see 
	 * @access 		public
	 * @param 
	 * @return 
	 * @since 		3.0
	 */
	public function upgrade() {
		// Create the view object
		$view = $this->getView('install', 'json');
		
		// Standard model
		$view->setModel( $this->getModel( 'install', 'CsvivirtuemartModel' ), true );
		$view->setModel( $this->getModel( 'availablefields', 'CsvivirtuemartModel' ));
		$view->setModel( $this->getModel( 'maintenance', 'CsvivirtuemartModel' ));
		
		$view->display();
	}
}
?>
