Minahito
minah****@users*****
2006年 10月 7日 (土) 15:49:27 JST
Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.13 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.13.2.1 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.13 Tue Jul 11 12:05:13 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Sat Oct 7 15:49:27 2006 @@ -1,7 +1,7 @@ <?php /** * @package legacyRender - * @version $Id: TplfileListAction.class.php,v 1.1.2.13 2006/07/11 03:05:13 minahito Exp $ + * @version $Id: TplfileListAction.class.php,v 1.1.2.13.2.1 2006/10/07 06:49:27 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -118,16 +118,18 @@ // // [Warning] Access to a private property of XCube_FormFile. // - $source = file_get_contents($formFile->_mTmpFileName); - $obj->Source->set('tpl_source', $source); - $obj->set('tpl_lastmodified', time()); - $obj->set('tpl_lastimported', time()); - - $successFlag &= $handler->insert($obj); - - $xoopsTpl =& new XoopsTpl(); - $xoopsTpl->clear_cache('db:' . $obj->get('tpl_file')); - $xoopsTpl->clear_compiled_tpl('db:' . $obj->get('tpl_file')); + if ($formFile != null) { + $source = file_get_contents($formFile->_mTmpFileName); + $obj->Source->set('tpl_source', $source); + $obj->set('tpl_lastmodified', time()); + $obj->set('tpl_lastimported', time()); + + $successFlag &= $handler->insert($obj); + + $xoopsTpl =& new XoopsTpl(); + $xoopsTpl->clear_cache('db:' . $obj->get('tpl_file')); + $xoopsTpl->clear_compiled_tpl('db:' . $obj->get('tpl_file')); + } unset($obj); unset($formFile);