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

Back to archive index

Minahito minah****@users*****
2006年 7月 11日 (火) 12:04:58 JST


Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php
diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.8 xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.9
--- xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.8	Sat May 27 22:10:07 2006
+++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php	Tue Jul 11 12:04:58 2006
@@ -1,20 +1,24 @@
 <?php
+/**
+ * @package legacyRender
+ * @version $Id: TplfileEditAction.class.php,v 1.1.2.9 2006/07/11 03:04:58 minahito Exp $
+ */
 
 if (!defined('XOOPS_ROOT_PATH')) exit();
 
+require_once XOOPS_MODULE_PATH . "/legacyRender/class/AbstractEditAction.class.php";
 require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileEditForm.class.php";
-require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractEditAction.class.php";
 
 class LegacyRender_TplfileEditAction extends LegacyRender_AbstractEditAction
 {
 	function _getId()
 	{
-		return isset($_REQUEST['tpl_id']) ? intval($_REQUEST['tpl_id']) : 0;
+		return xoops_getrequest('tpl_id');
 	}
 	
 	function &_getHandler()
 	{
-		$handler = xoops_getmodulehandler('tplfile');
+		$handler =& xoops_getmodulehandler('tplfile');
 		return $handler;
 	}
 
@@ -29,7 +33,7 @@
 	
 	function _setupActionForm()
 	{
-		$this->mActionForm =& new TplfileEditForm();
+		$this->mActionForm =& new LegacyRender_TplfileEditForm();
 		$this->mActionForm->prepare();
 	}
 
@@ -47,8 +51,12 @@
 
 	function executeViewSuccess(&$controller, &$xoopsUser, &$render)
 	{
+		//
+		// This class knows the db template mechanism, because this is in
+		// LegacyRender.
+		//
 		require_once XOOPS_ROOT_PATH . "/class/template.php";
-		
+
 		$xoopsTpl =& new XoopsTpl();
 		$xoopsTpl->clear_cache('db:' . $this->mObject->get('tpl_file'));
 		$xoopsTpl->clear_compiled_tpl('db:' . $this->mObject->get('tpl_file'));
@@ -60,7 +68,14 @@
 
 	function executeViewError(&$controller, &$xoopsUser, &$render)
 	{
-		redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
+		$controller->executeRedirect("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED);
+	}
+
+	function executeViewCancel(&$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}");
 	}
 }
 


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