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

Back to archive index

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


Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php
diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.1
--- /dev/null	Wed May 17 16:19:47 2006
+++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php	Wed May 17 16:19:47 2006
@@ -0,0 +1,67 @@
+<?php
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileCloneForm.class.php";
+require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractEditAction.class.php";
+
+class LegacyRender_TplfileCloneAction extends LegacyRender_AbstractEditAction
+{
+	var $mTargetObject = null;
+	
+	function _getId()
+	{
+		return isset($_REQUEST['tpl_id']) ? intval($_REQUEST['tpl_id']) : 0;
+	}
+	
+	function &_getHandler()
+	{
+		$handler = xoops_getmodulehandler('tplfile');
+		return $handler;
+	}
+
+	function _setupObject()
+	{
+		$id = $this->_getId();
+		
+		$this->mObjectHandler =& $this->_getHandler();
+		$obj =& $this->mObjectHandler->get($id);
+		
+		if (is_object($obj) && $obj->get('tpl_tplset') == 'default') {
+			$this->mObject =& $obj->createClone(xoops_getrequest('tpl_tplset'));
+		}
+	}
+	
+	function isEnableCreate()
+	{
+		return false;
+	}
+	
+	function _setupActionForm()
+	{
+		$this->mActionForm =& new LegacyRender_TplfileCloneForm();
+		$this->mActionForm->prepare();
+	}
+
+	function executeViewInput(&$controller, &$xoopsUser, &$render)
+	{
+		$render->setTemplateName("tplfile_clone.html");
+		$render->setAttribute('actionForm', $this->mActionForm);
+		$render->setAttribute('object', $this->mObject);
+		$render->setAttribute('tpl_id', xoops_getrequest('tpl_id'));
+	}
+
+	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=${tplset}&tpl_module=${module}");
+	}
+
+	function executeViewError(&$controller, &$xoopsUser, &$render)
+	{
+		redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
+	}
+}
+
+?>


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