[xoops-cvslog 3078] CVS update: xoops2jp/html/modules/legacyRender/admin/actions

Back to archive index

Minahito minah****@users*****
2006年 5月 17日 (水) 16:27:04 JST


Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php
diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.1
--- /dev/null	Wed May 17 16:27:04 2006
+++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php	Wed May 17 16:27:04 2006
@@ -0,0 +1,56 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractDeleteAction.class.php";
+require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileAdminDeleteForm.class.php";
+
+class LegacyRender_TplfileDeleteAction extends LegacyRender_AbstractDeleteAction
+{
+	function _getId()
+	{
+		return isset($_REQUEST['tpl_id']) ? intval($_REQUEST['tpl_id']) : 0;
+	}
+
+	function &_getHandler()
+	{
+		$handler =& xoops_getmodulehandler('tplfile');
+		return $handler;
+	}
+
+	function _setupObject()
+	{
+		parent::_setupObject();
+		if ($this->mObject != null && $this->mObject->get('tpl_tplset') == 'default') {
+			$this->mObject = null;
+		}
+	}
+
+	function _setupActionForm()
+	{
+		$this->mActionForm =& new LegacyRender_TplfileAdminDeleteForm();
+		$this->mActionForm->prepare();
+	}
+
+	function executeViewInput(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("tplfile_delete.html");
+		$render->setAttribute('actionForm', $this->mActionForm);
+		#cubson::lazy_load('tplfile', $this->mObject);
+		$render->setAttribute('object', $this->mObject);
+	}
+
+	function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+	{
+		$tplset = $this->mObject->get('tpl_tplset');
+		$module = $this->mObject->get('tpl_module');
+		$controller->executeForward("./index.php?action=TplfileList&tpl_tplset=" . $this->mObject->get('tpl_tplset'));
+	}
+
+	function executeViewError(&$controller, &$xoopsUser, &$render)
+	{
+		redirect_header("./index.php?action=TplfileList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
+	}
+}
+
+?>


xoops-cvslog メーリングリストの案内
Back to archive index