<?php
/**
 * @version $Id: ModuleUpdateAction.class.php,v 1.1.2.4 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/ModuleUpdater.class.php";
require_once XOOPS_BASE_PATH . "/admin/forms/ModuleUpdateForm.class.php";

class Legacy_ModuleUpdateAction extends Legacy_AbstractModuleInstallAction
{
	function &_getInstaller($dirname)
	{
		$installer =& new Legacy_ModuleUpdater($dirname);
		return $installer;
	}
	
	function _setupActionForm()
	{
		$this->mActionForm =& new Legacy_ModuleUpdateForm();
		$this->mActionForm->prepare();
	}
	
	function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
	{
		$renderer->setTemplateName("module_update_success.html");
		$renderer->setAttribute('log',$this->mLog->mMessages);
	}

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

?>