Minahito
minah****@users*****
2006年 1月 15日 (日) 21:14:30 JST
Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php:1.1.2.1 --- /dev/null Sun Jan 15 21:14:30 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileViewAction.class.php Sun Jan 15 21:14:30 2006 @@ -0,0 +1,35 @@ +<?php + +class LegacyRender_TplfileViewAction extends LegacyRender_Action +{ + var $mObject = null; + + function getDefaultView(&$controller, &$xoopsUser) + { + $id = isset($_REQUEST['tpl_id']) ? intval($_REQUEST['tpl_id']) : 0; + + $handler =& xoops_getmodulehandler('tplfile'); + $this->mObject =& $handler->get($id); + + if (!is_object($this->mObject)) { + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + return LEGACYRENDER_FRAME_VIEW_SUCCESS; + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $this->mObject->loadSource(); + + $render->setTemplateName("tplfile_view.html"); + $render->setAttribute('object', $this->mObject); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_OBJECT_IS_NOT_EXIST); + } +} + +?> \ No newline at end of file