Minahito
minah****@users*****
2006年 10月 17日 (火) 01:01:05 JST
Index: xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php diff -u xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php:1.1.2.1 xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php:1.1.2.2 --- xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php:1.1.2.1 Sat Oct 14 23:55:22 2006 +++ xoops2jp/html/modules/legacy/class/Legacy_Utils.class.php Tue Oct 17 01:01:05 2006 @@ -51,6 +51,16 @@ function &createModule($module) { $instance = null; + + // + // TODO need cache here? + // + XCube_DelegateUtils::call('Legacy_Utils.CreateModule', new XCube_Ref($instance), $module); + + if (is_object($instance) && is_a($instance, 'Legacy_AbstractModule')) { + return $instance; + } + $dirname = $module->get('dirname'); // @@ -80,12 +90,22 @@ * @static * @return Legacy_BlockProcedure */ - function createBlockProcedure(&$block) + function &createBlockProcedure(&$block) { // // IMPORTANT CONVENTION // $retBlock = null; + + // + // TODO need cache here? + // + XCube_DelegateUtils::call('Legacy_Utils.CreateBlockProcedure', new XCube_Ref($retBlock), $block); + + if (is_object($retBlock) && is_a($retBlock, 'Legacy_AbstractBlockProcedure')) { + return $retBlock; + } + $func = $block->get('show_func'); if (substr($func, 0, 4) == 'cl::') { $className = ucfirst($block->get('dirname')) . '_' . substr($func, 4);