<?php
/**
 * @version $Id: ModuleUninstallAction.class.php,v 1.1.2.5 2006/03/28 13:28:35 minahito Exp $
 */

if (!defined('XOOPS_ROOT_PATH')) exit();

require_once XOOPS_BASE_PATH . "/admin/actions/AbstractModuleInstallAction.class.php";
require_once XOOPS_BASE_PATH . "/admin/class/ModuleUninstaller.class.php";
require_once XOOPS_BASE_PATH . "/admin/forms/ModuleUninstallForm.class.php";

/**
 * Uninstall module
 */
class Legacy_ModuleUninstallAction extends Legacy_AbstractModuleInstallAction
{
	function &_getInstaller($dirname)
	{
		$installer =& new Legacy_ModuleUninstaller($dirname);
		return $installer;
	}
	
	function _setupActionForm()
	{
		$this->mActionForm =& new Legacy_ModuleUninstallForm();
		$this->mActionForm->prepare();
	}

	function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
	{
		$renderer->setTemplateName("module_uninstall_success.html");
		$renderer->setAttribute('log',$this->mLog->mMessages);
	}

	function executeViewIndex(&$controller,&$xoopsUser,&$renderer)
	{
		$renderer->setTemplateName("module_uninstall.html");
		$renderer->setAttribute('actionForm',$this->mActionForm);
		$renderer->setAttribute('module',$this->mModuleObject);
	}

	function executeViewInput(&$controller,&$xoopsUser,&$renderer)
	{
		$this->executeViewIndex(&$controller,&$xoopsUser,&$renderer);
	}
}

?>