mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
r5347 처리 순서 바꾸기
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5352 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
125ef5eaa1
commit
10b11a0dd0
1 changed files with 17 additions and 16 deletions
|
|
@ -54,23 +54,8 @@
|
||||||
$file_obj = $oFileModel->getFile($file_srl);
|
$file_obj = $oFileModel->getFile($file_srl);
|
||||||
if($file_obj->file_srl!=$file_srl || $file_obj->sid!=$sid || $file_obj->isvalid!='Y') return $this->stop('msg_not_permitted_download');
|
if($file_obj->file_srl!=$file_srl || $file_obj->sid!=$sid || $file_obj->isvalid!='Y') return $this->stop('msg_not_permitted_download');
|
||||||
|
|
||||||
// 파일 다운로드 권한이 있는지 확인
|
|
||||||
$file_module_config = $oFileModel->getFileModuleConfig($file_obj->module_srl);
|
$file_module_config = $oFileModel->getFileModuleConfig($file_obj->module_srl);
|
||||||
if(is_array($file_module_config->download_grant) && count($file_module_config->download_grant)>0) {
|
// 파일 외부링크 차단
|
||||||
if(!Context::get('is_logged')) return $this->stop('msg_not_permitted_download');
|
|
||||||
$logged_info = Context::get('logged_info');
|
|
||||||
if($logged_info->is_admin != 'Y') {
|
|
||||||
$is_permitted = false;
|
|
||||||
for($i=0;$i<count($file_module_config->download_grant);$i++) {
|
|
||||||
$group_srl = $file_module_config->download_grant[$i];
|
|
||||||
if($logged_info->group_list[$group_srl]) {
|
|
||||||
$is_permitted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!$is_permitted) return $this->stop('msg_not_permitted_download');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if($file_module_config->allow_outlink == 'N') {
|
if($file_module_config->allow_outlink == 'N') {
|
||||||
$referer = parse_url($_SERVER["HTTP_REFERER"]);
|
$referer = parse_url($_SERVER["HTTP_REFERER"]);
|
||||||
if($referer['host'] != $_SERVER['HTTP_HOST']) {
|
if($referer['host'] != $_SERVER['HTTP_HOST']) {
|
||||||
|
|
@ -87,6 +72,22 @@
|
||||||
else return $this->stop('msg_not_permitted_download');
|
else return $this->stop('msg_not_permitted_download');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 파일 다운로드 권한이 있는지 확인
|
||||||
|
if(is_array($file_module_config->download_grant) && count($file_module_config->download_grant)>0) {
|
||||||
|
if(!Context::get('is_logged')) return $this->stop('msg_not_permitted_download');
|
||||||
|
$logged_info = Context::get('logged_info');
|
||||||
|
if($logged_info->is_admin != 'Y') {
|
||||||
|
$is_permitted = false;
|
||||||
|
for($i=0;$i<count($file_module_config->download_grant);$i++) {
|
||||||
|
$group_srl = $file_module_config->download_grant[$i];
|
||||||
|
if($logged_info->group_list[$group_srl]) {
|
||||||
|
$is_permitted = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!$is_permitted) return $this->stop('msg_not_permitted_download');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// trigger 호출 (before)
|
// trigger 호출 (before)
|
||||||
$output = ModuleHandler::triggerCall('file.downloadFile', 'before', $file_obj);
|
$output = ModuleHandler::triggerCall('file.downloadFile', 'before', $file_obj);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue