NobuNobu
nobun****@users*****
2006年 3月 29日 (水) 22:49:23 JST
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.26 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.27 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.26 Tue Mar 28 22:30:15 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Wed Mar 29 22:49:23 2006 @@ -349,6 +349,33 @@ $GLOBALS['xoopsDebugger']=&$this->mDebugger; } + function _processPreBlockFilter() + { + // + // Auto pre-loading for Module. + // + if($this->mRoot->getSiteConfig('Legacy','AutoPreload')==1) { + $moduleHandler =& xoops_gethandler('module'); + $moduleObjects =& $moduleHandler->getObjects(); + foreach($moduleObjects as $moduleObject) { + $mod_dir = $moduleObject->getVar('dirname'); + $dir = XOOPS_ROOT_PATH.'/modules/'.$mod_dir.'/class/'; + if(is_dir($dir)) { + $files = glob($dir.'modulePreload*.class.php'); + foreach($files as $file) { + require_once $file; + $className=preg_replace('/^modulePreload(\w*)\.class\.php/', $mod_dir.'ModulePreload\1', basename($file)); + if(class_exists($className)) { + $instance =& new $className($this); + $this->addActionFilter($instance); + } + } + } + } + } + parent::_processPreBlockFilter(); + } + function _setupSession() { global $xoopsDB;