diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 004ddb0fe..d9d04c975 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -93,14 +93,13 @@ $xml_info = $oModuleModel->getModuleXmlInfo($this->module); // 현재 요청된 act가 있으면 $xml_info에서 type을 찾음, 없다면 기본 action을 이용 - if(!$this->act || !$xml_info->action->{$this->act}) $this->act = $xml_info->default_action; + if(!$this->act || !$xml_info->action->{$this->act}) $this->act = $xml_info->default_index_act; // 설정된 mid가 없을 경우 요청된 act의 standalone 여부 체크 if(!$this->mid && !$xml_info->action->{$this->act}->standalone) { $this->error = 'msg_module_is_not_standalone'; return; } - // type, grant 값 구함 $type = $xml_info->action->{$this->act}->type; $grant = $xml_info->action->{$this->act}->grant; diff --git a/modules/admin/conf/module.xml b/modules/admin/conf/module.xml index ce0560961..542ad44a5 100644 --- a/modules/admin/conf/module.xml +++ b/modules/admin/conf/module.xml @@ -1,7 +1,7 @@ - + - + diff --git a/modules/install/conf/module.xml b/modules/install/conf/module.xml index 0daf357d5..3d0d0b0df 100644 --- a/modules/install/conf/module.xml +++ b/modules/install/conf/module.xml @@ -1,8 +1,8 @@ - + - + diff --git a/modules/member/conf/module.xml b/modules/member/conf/module.xml index c1a25188f..7363be2eb 100644 --- a/modules/member/conf/module.xml +++ b/modules/member/conf/module.xml @@ -1,8 +1,5 @@ - + - - - diff --git a/modules/message/conf/module.xml b/modules/message/conf/module.xml index 2d8198dd1..4d1579280 100644 --- a/modules/message/conf/module.xml +++ b/modules/message/conf/module.xml @@ -1,7 +1,7 @@ - + - + diff --git a/modules/module/conf/module.xml b/modules/module/conf/module.xml index 4a9de63e6..af5df34e0 100644 --- a/modules/module/conf/module.xml +++ b/modules/module/conf/module.xml @@ -1,6 +1,6 @@ - + - + diff --git a/modules/module/module.model.php b/modules/module/module.model.php index 7e16d5351..2e025348d 100644 --- a/modules/module/module.model.php +++ b/modules/module/module.model.php @@ -21,7 +21,6 @@ * 이게 퍼포먼스 상으로는 좋은데 어떤 부정적인 결과를 유도할지는 잘 모르겠... **/ function getModuleXmlInfo($module) { - $module = "board"; // 요청된 모듈의 경로를 구한다. 없으면 return $class_path = ModuleHandler::getModulePath($module); if(!$class_path) return; @@ -57,8 +56,11 @@ $default = $grant->attrs->default?$grant->attrs->default:'guest'; $title = $grant->title->body; - $buff .= sprintf('$info->grant->%s->title=\'%s\';%s', $name, $title, chr(13)); - $buff .= sprintf('$info->grant->%s->default=\'%s\';%s', $name, $default, chr(13)); + $info->grant->{$name}->title = $title; + $info->grant->{$name}->default = $default; + + $buff .= sprintf('$info->grant->%s->title=\'%s\';', $name, $title); + $buff .= sprintf('$info->grant->%s->default=\'%s\';', $name, $default); } } @@ -81,20 +83,32 @@ $output->action->{$name}->grant = $grant; $output->action->{$name}->standalone= $standalone; - $buff .= sprintf('$info->action->%s->type=\'%s\';%s', $name, $type, chr(13)); - $buff .= sprintf('$info->action->%s->grant=\'%s\';%s', $name, $grant, chr(13)); - $buff .= sprintf('$info->action->%s->standalone=%s;%s', $name, $standalone, chr(13)); + $info->action->{$name}->type = $type; + $info->action->{$name}->grant = $grant; + $info->action->{$name}->standalone = $standalone=='true'?true:false; - if($index=='true') $default_index_act = $name; - if($admin_index=='true') $admin_index_act = $name; + $buff .= sprintf('$info->action->%s->type=\'%s\';', $name, $type); + $buff .= sprintf('$info->action->%s->grant=\'%s\';', $name, $grant); + $buff .= sprintf('$info->action->%s->standalone=%s;', $name, $standalone); + + if($index=='true') { + $default_index_act = $name; + $info->default_index_act = $name; + } + if($admin_index=='true') { + $admin_index_act = $name; + $info->admin_index_act = $name; + } } } - $buff = sprintf('default_index = \'%s\';%s$info->admin_index = \'%s\';%s%s?>', chr(13), chr(13), $default_index_act, chr(13), $admin_index_act, chr(13), $buff); + $buff = sprintf('default_index_act = \'%s\';$info->admin_index_act = \'%s\';%s?>', $default_index_act, $admin_index_act, $buff); FileHandler::writeFile($cache_file, $buff); + + return $info; } - if(file_exists($cache_file)) include $cache_file; + include $cache_file; return $info; }