Minahito
minah****@users*****
2007年 4月 17日 (火) 18:35:31 JST
Index: xoops2jp/extras/XUpgrade/admin/class/UpgradeProcessor.class.php diff -u xoops2jp/extras/XUpgrade/admin/class/UpgradeProcessor.class.php:1.1.2.1 xoops2jp/extras/XUpgrade/admin/class/UpgradeProcessor.class.php:1.1.2.1.2.1 --- xoops2jp/extras/XUpgrade/admin/class/UpgradeProcessor.class.php:1.1.2.1 Mon Nov 20 20:19:48 2006 +++ xoops2jp/extras/XUpgrade/admin/class/UpgradeProcessor.class.php Tue Apr 17 18:35:31 2007 @@ -1,7 +1,7 @@ <?php /** * @package XUpgrade - * @version $Id: UpgradeProcessor.class.php,v 1.1.2.1 2006/11/20 11:19:48 minahito Exp $ + * @version $Id: UpgradeProcessor.class.php,v 1.1.2.1.2.1 2007/04/17 09:35:31 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -48,6 +48,8 @@ if (XUPGRADE_ENABLE_TEMPLATEPORTING == true) { $this->_portTemplates(); } + + $this->_adjustModules(); } /** @@ -281,6 +283,21 @@ } } } + + function _adjustModules() + { + $handler =& xoops_gethandler('modules'); + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('isactive', 0)); + $criteria->add(new Criteria('hasmain', 0)); + + $modules =& $handler->getObjects($criteria); + foreach ($modules as $module) { + $module->set('isactive', 1); + $handler->insert($module); + $log->add(XCube_Utils::formatMessage(_MI_XUPGRADE_MESSAGE_ADJUST_MODULE_ISACTIVE, $module->get('dirname'))); + } + } } ?> \ No newline at end of file