mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
모듈 선택기능 추가 (위젯의 단일/다수 위젯 선택, 첵크된 게시글 이동/복사시) 사용되며 virtualSite외의 사이트들도 검색후 선택이 가능하도록 개선
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5298 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3345d21c4e
commit
906bb46d19
83 changed files with 970 additions and 543 deletions
|
|
@ -112,58 +112,6 @@
|
|||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 모듈 카테고리 목록을 구함
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
|
||||
// 모듈의 목록을 가져옴
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args->site_srl = $site_module_info->site_srl;
|
||||
$module_list = $oModuleModel->getMidList($args);
|
||||
|
||||
// 사이트 운영자가 아닌 경우
|
||||
if(!$oModuleModel->isSiteAdmin()) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$user_id = $logged_info->user_id;
|
||||
$group_list = $logged_info->group_list;
|
||||
|
||||
if($logged_info->is_admin != 'Y') {
|
||||
foreach($module_list as $key => $val) {
|
||||
$info = $oModuleModel->arrangeModuleInfo($val);
|
||||
|
||||
// 직접 최고 관리자로 지정이 안되어 있으면 그룹을 체크
|
||||
if(!in_array($user_id, $info->admin_id)) {
|
||||
|
||||
$is_granted = false;
|
||||
$manager_group = $info->grants['manager'];
|
||||
if(count($group_list) && count($manager_group)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
if(in_array($group_srl, $manager_group)) {
|
||||
$is_granted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$is_granted) unset($module_list[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 게시판만 뽑자
|
||||
foreach($module_list as $module_srl => $module) {
|
||||
if($module->module != 'board') unset($module_list[$module_srl]);
|
||||
}
|
||||
|
||||
// module_category와 module의 조합
|
||||
if($module_categories) {
|
||||
foreach($module_list as $module_srl => $module) {
|
||||
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
|
||||
}
|
||||
} else {
|
||||
$module_categories[0]->list = $module_list;
|
||||
}
|
||||
|
||||
|
||||
// 모듈 카테고리 목록과 모듈 목록의 조합
|
||||
if(count($module_list)>1) Context::set('module_list', $module_categories);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue