Minahito
minah****@users*****
2007年 4月 18日 (水) 15:11:26 JST
Index: xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php diff -u xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php:1.1.2.3 xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php:1.1.2.3.2.1 --- xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php:1.1.2.3 Thu Dec 28 22:24:50 2006 +++ xoops2jp/html/modules/legacy/admin/actions/ModuleListAction.class.php Wed Apr 18 15:11:26 2007 @@ -1,7 +1,7 @@ <?php /** * @package Legacy - * @version $Id: ModuleListAction.class.php,v 1.1.2.3 2006/12/28 13:24:50 nobunobu Exp $ + * @version $Id: ModuleListAction.class.php,v 1.1.2.3.2.1 2007/04/18 06:11:26 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -70,6 +70,7 @@ function _processSave(&$controller, &$xoopsUser) { $moduleHandler =& xoops_gethandler('module'); + $blockHandler =& xoops_gethandler('block'); $t_objectArr =& $moduleHandler->getObjects(); $successFlag = true; @@ -81,15 +82,21 @@ $newdata['name'] = $this->mActionForm->get('name', $mid); $newdata['weight'] = $this->mActionForm->get('weight', $mid); $newdata['isactive'] = $this->mActionForm->get('isactive', $mid); - if ( count(array_diff_assoc($olddata, $newdata)) > 0 ) { + if (count(array_diff_assoc($olddata, $newdata)) > 0 ) { $module->set('name', $this->mActionForm->get('name', $mid)); $module->set('weight', $this->mActionForm->get('weight', $mid)); $module->set('isactive', $this->mActionForm->get('isactive', $mid)); // - // Store. + // Store & Sync isactive of blocks with isactive of the module. // - $successFlag &= $moduleHandler->insert($module); + if ($moduleHandler->insert($module)) { + $successFlag &= true; + $blockHandler->syncIsActive($module->get('mid'), $module->get('isactive')); + } + else { + $successFlag = false; + } } }