Minahito
minah****@users*****
2006年 10月 10日 (火) 17:55:43 JST
Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.24.2.1 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.24.2.2 --- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.24.2.1 Thu Oct 5 18:07:09 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Tue Oct 10 17:55:43 2006 @@ -195,20 +195,32 @@ $blockHandler =& xoops_gethandler('block'); $blockObj =& $blockHandler->create(); - $blockObj->setVar('mid', $module->getVar('mid')); - $blockObj->setVar('options', $options); - $blockObj->setVar('name', $block['name']); - $blockObj->setVar('title', $block['name']); - $blockObj->setVar('block_type', 'M'); - $blockObj->setVar('c_type', 1); - $blockObj->setVar('isactive', 1); - $blockObj->setVar('dirname', $module->getVar('dirname')); - $blockObj->setVar('func_file', $block['file']); - $blockObj->setVar('show_func', $block['show_func']); - $blockObj->setVar('edit_func', $edit_func); - $blockObj->setVar('template', $template); - $blockObj->setVar('last_modified', time()); - $blockObj->setVar('visible', $visible); + $blockObj->set('mid', $module->getVar('mid')); + $blockObj->set('options', $options); + $blockObj->set('name', $block['name']); + $blockObj->set('title', $block['name']); + $blockObj->set('block_type', 'M'); + $blockObj->set('c_type', 1); + $blockObj->set('isactive', 1); + $blockObj->set('dirname', $module->getVar('dirname')); + $blockObj->set('func_file', $block['file']); + + // + // IMPORTANT CONVENTION + // + $show_func = ""; + if (isset($block['class'])) { + $show_func = "cl::" . $block['class']; + } + else { + $show_func = $block['show_func']; + } + + $blockObj->set('show_func', $show_func); + $blockObj->set('edit_func', $edit_func); + $blockObj->set('template', $template); + $blockObj->set('last_modified', time()); + $blockObj->set('visible', $visible); return $blockObj; } @@ -327,7 +339,7 @@ function unInstallBlock(&$block, &$log) { $blockHandler =& xoops_gethandler('block'); $blockHandler->delete($block); - $log->addReport("Uninstall block '".$block->getVar('name')); + $log->addReport(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_UNINSTALLATION_BLOCK_SUCCESSFUL, $block->get('name')); // // delete permission //