Minahito
minah****@users*****
2006年 10月 10日 (火) 19:55:47 JST
Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.10.2.1 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.10.2.2 --- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.10.2.1 Sat Oct 7 18:25:40 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Tue Oct 10 19:55:47 2006 @@ -1,7 +1,7 @@ <?php /** * @package Legacy - * @version $Id: BlockEditAction.class.php,v 1.1.2.10.2.1 2006/10/07 09:25:40 minahito Exp $ + * @version $Id: BlockEditAction.class.php,v 1.1.2.10.2.2 2006/10/10 10:55:47 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -182,28 +182,18 @@ // // Get html of option form rendered. // - if ($this->mObject->get('func_file') && $this->mObject->get('edit_func')) { - $func_file = XOOPS_MODULE_PATH . "/" . $this->mObject->get('dirname') . "/blocks/" . $this->mObject->get('func_file'); - if (file_exists($func_file)) { - require $func_file; - $edit_func = $this->mObject->get('edit_func'); - - $options = explode('|', $this->mObject->get('options')); - - if (function_exists($edit_func)) { - // - // load language file. - // - $root =& XCube_Root::getSingleton(); - $langManager =& $root->getLanguageManager(); - $langManager->loadBlockMessageCatalog($this->mObject->get('dirname')); - - $this->_mOptionForm = call_user_func($edit_func, $options); - } - } - } + $this->_mOptionForm = $this->_getOptionForm(); $render->setAttribute('optionForm', $this->_mOptionForm); } + + /** + * Gets rendered HTML buffer of the block optional edit form. + */ + function _getOptionForm() + { + $block =& Legacy_BlockUtils::createBlockProcedure($this->mObject); + return $block->getOptionForm(); + } function executeViewSuccess(&$controller, &$xoopsUser, &$render) {