mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 22:33:10 +09:00
css 및 js 호출순서 조정기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f380d9c48
commit
61851f1dfe
2149 changed files with 109090 additions and 18689 deletions
|
|
@ -18,11 +18,6 @@
|
|||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminList');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentPrint');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminDeclared');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->addIndex("documents","idx_module_list_order", array("module_srl","list_order"));
|
||||
|
|
@ -32,10 +27,14 @@
|
|||
$oDB->addIndex("documents","idx_module_notice", array("module_srl","is_notice"));
|
||||
$oDB->addIndex("documents","idx_module_document_srl", array("module_srl","document_srl"));
|
||||
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
|
||||
$oDB->addIndex("document_aliases", "idx_module_title", array("module_srl","alias_title"), true);
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
|
||||
|
||||
// 2009. 01. 29 Added a trigger for additional setup
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -46,11 +45,6 @@
|
|||
$oDB = &DB::getInstance();
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
/**
|
||||
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
|
||||
**/
|
||||
if(!$oDB->isColumnExists("documents","extra_vars20")) return true;
|
||||
|
||||
/**
|
||||
* 2007. 7. 25 : 알림 필드(notify_message) 추가
|
||||
**/
|
||||
|
|
@ -64,20 +58,9 @@
|
|||
if(!$oDB->isIndexExists("documents","idx_module_readed_count")) return true;
|
||||
if(!$oDB->isIndexExists("documents","idx_module_voted_count")) return true;
|
||||
|
||||
/**
|
||||
* 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig')) return true;
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument')) return true;
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after')) return true;
|
||||
|
||||
/**
|
||||
* 2007. 10. 18 : 관리자 페이지의 신고된 목록 보기 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared')) return true;
|
||||
|
||||
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
|
||||
if(!$oDB->isColumnExists("document_categories","parent_srl")) return true;
|
||||
if(!$oDB->isColumnExists("document_categories","expand")) return true;
|
||||
|
|
@ -99,10 +82,16 @@
|
|||
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
|
||||
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
|
||||
|
||||
|
||||
// 2008-12-15 문서 분류에 color를 추가
|
||||
if(!$oDB->isColumnExists("document_categories", "color")) return true;
|
||||
|
||||
/**
|
||||
* 2009. 01. 29 : 확장변수 값 테이블에 lang_code가 없을 경우 추가
|
||||
**/
|
||||
if(!$oDB->isColumnExists("document_extra_vars","lang_code")) return true;
|
||||
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -114,16 +103,6 @@
|
|||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
/**
|
||||
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
|
||||
**/
|
||||
if(!$oDB->isColumnExists("documents","extra_vars20")) {
|
||||
for($i=1;$i<=20;$i++) {
|
||||
$column_name = "extra_vars".$i;
|
||||
$oDB->addColumn('documents',$column_name,'text');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 2007. 7. 25 : 알림 필드(notify_message) 추가
|
||||
**/
|
||||
|
|
@ -150,24 +129,10 @@
|
|||
$oDB->addIndex("documents","idx_module_voted_count", array("module_srl","voted_count"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig'))
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig');
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument'))
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument');
|
||||
|
||||
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
|
||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
|
||||
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
|
||||
|
||||
/**
|
||||
* 2007. 10. 18 : 관리자 페이지의 신고된 목록 보기 action 추가
|
||||
**/
|
||||
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared'))
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminDeclared');
|
||||
|
||||
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
|
||||
if(!$oDB->isColumnExists("document_categories","parent_srl")) $oDB->addColumn('document_categories',"parent_srl","number",12,0);
|
||||
if(!$oDB->isColumnExists("document_categories","expand")) $oDB->addColumn('document_categories',"expand","char",1,"N");
|
||||
|
|
@ -202,6 +167,16 @@
|
|||
|
||||
if(!$oDB->isColumnExists("document_categories","color")) $oDB->addColumn('document_categories',"color","char",7);
|
||||
|
||||
/**
|
||||
* 2009. 01. 29 : 확장변수 값 테이블에 lang_code가 없을 경우 추가
|
||||
**/
|
||||
if(!$oDB->isColumnExists("document_extra_vars","lang_code")) $oDB->addColumn('document_extra_vars',"lang_code","varchar",10);
|
||||
|
||||
// 2009. 01. 29 Added a trigger for additional setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
|
||||
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
|
||||
}
|
||||
|
|
@ -214,92 +189,5 @@
|
|||
FileHandler::removeFilesInDir(_XE_PATH_."files/cache/document_category");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Action중 Admin이 들어갔을 경우 권한 체크
|
||||
**/
|
||||
function checkAdminActionGrant() {
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin=='Y') return true;
|
||||
|
||||
$actions = array('procDocumentAdminAddCart','dispDocumentAdminManageDocument','procDocumentAdminManageCheckedDocument');
|
||||
if(in_array($this->act, $actions)) return true;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
if($oModuleModel->isSiteAdmin()) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 권한 체크를 실행하는 method
|
||||
* 모듈 객체가 생성된 경우는 직접 권한을 체크하지만 기능성 모듈등 스스로 객체를 생성하지 않는 모듈들의 경우에는
|
||||
* ModuleObject에서 직접 method를 호출하여 권한을 확인함
|
||||
*
|
||||
* isAdminGrant는 관리권한 이양시에만 사용되도록 하고 기본은 false로 return 되도록 하여 잘못된 권한 취약점이 생기지 않도록 주의하여야 함
|
||||
**/
|
||||
function isAdmin() {
|
||||
// 로그인이 되어 있지 않으면 무조건 return false
|
||||
$is_logged = Context::get('is_logged');
|
||||
if(!$is_logged) return false;
|
||||
|
||||
// 사용자 아이디를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 모듈 요청에 사용된 변수들을 가져옴
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
// act의 값에 따라서 관리 권한 체크
|
||||
switch($args->act) {
|
||||
// 게시글 목록에서 글을 체크하는 경우 해당 글의 모듈 정보를 구해서 관리자 여부를 체크
|
||||
case 'procDocumentAdminAddCart' :
|
||||
if(!$args->srls) return false;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
list($srl) = explode(',',$args->srls);
|
||||
if(!$srl) return false;
|
||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($srl);
|
||||
if(!$module_info) return false;
|
||||
|
||||
if($oModuleModel->isModuleAdmin($module_info, $logged_info)) return true;
|
||||
break;
|
||||
|
||||
// 체크된 게시글을 관리하는 action
|
||||
case 'dispDocumentAdminManageDocument' :
|
||||
// 세션 정보에 게시글이 담겨 있으면 return true 해줌
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) return true;
|
||||
break;
|
||||
|
||||
// 체크된 게시글을 다른 모듈로 이동 또는 복사, 삭제 할때
|
||||
case 'procDocumentAdminManageCheckedDocument' :
|
||||
switch($args->type) {
|
||||
// 이동과 복사의 경우에는 대상 모듈의 정보를 체크
|
||||
case 'move' :
|
||||
case 'copy' :
|
||||
if($args->target_module) {
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->target_module);
|
||||
if(!$module_info) return false;
|
||||
|
||||
if($oModuleModel->isModuleAdmin($module_info, $logged_info)) return true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
// 삭제일 경우는 세션에 저장된 글이 있으면 return true
|
||||
case 'delete' :
|
||||
$flag_list = $_SESSION['document_management'];
|
||||
if(count($flag_list)) return true;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue