mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
#17633688 허용 사이트 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5351 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
55fc9374d5
commit
125ef5eaa1
5 changed files with 26 additions and 1 deletions
|
|
@ -82,6 +82,7 @@
|
|||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
$config->allow_outlink = Context::get('allow_outlink');
|
||||
$config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
|
|
@ -103,6 +104,7 @@
|
|||
$download_grant = trim(Context::get('download_grant'));
|
||||
|
||||
$file_config->allow_outlink = Context::get('allow_outlink');
|
||||
$file_config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
$file_config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$file_config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$file_config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
|
|
|
|||
|
|
@ -73,7 +73,19 @@
|
|||
}
|
||||
if($file_module_config->allow_outlink == 'N') {
|
||||
$referer = parse_url($_SERVER["HTTP_REFERER"]);
|
||||
if($referer['host'] != $_SERVER['HTTP_HOST']) return $this->stop('msg_not_permitted_download');
|
||||
if($referer['host'] != $_SERVER['HTTP_HOST']) {
|
||||
if($file_module_config->allow_outlink_site) {
|
||||
$allow_outlink_site_array = array();
|
||||
$allow_outlink_site_array = explode("\n", $file_module_config->allow_outlink_site);
|
||||
if(!is_array($allow_outlink_site_array)) $allow_outlink_site_array[0] = $file_module_config->allow_outlink_site;
|
||||
foreach($allow_outlink_site_array as $val) {
|
||||
$site = parse_url(trim($val));
|
||||
if($site['host'] == $referer['host']) $file_module_config->allow_outlink = 'Y';
|
||||
}
|
||||
if($file_module_config->allow_outlink != 'Y') return $this->stop('msg_not_permitted_download');
|
||||
}
|
||||
else return $this->stop('msg_not_permitted_download');
|
||||
}
|
||||
}
|
||||
|
||||
// trigger 호출 (before)
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@
|
|||
$config->allowed_filetypes = $file_config->allowed_filetypes;
|
||||
$config->download_grant = $file_config->download_grant;
|
||||
$config->allow_outlink = $file_config->allow_outlink;
|
||||
$config->allow_outlink_site = $file_config->allow_outlink_site;
|
||||
}
|
||||
|
||||
// 전체 파일첨부 속성을 먼저 따른다
|
||||
|
|
@ -101,6 +102,7 @@
|
|||
if(!$config->allowed_attach_size) $config->allowed_attach_size = $file_module_config->allowed_attach_size;
|
||||
if(!$config->allowed_filetypes) $config->allowed_filetypes = $file_module_config->allowed_filetypes;
|
||||
if(!$config->allow_outlink) $config->allow_outlink = $file_module_config->allow_outlink;
|
||||
if(!$config->allow_outlink_site) $config->allow_outlink_site = $file_module_config->allow_outlink_site;
|
||||
if(!$config->download_grant) $config->download_grant = $file_module_config->download_grant;
|
||||
|
||||
// 그래도 없으면 default로
|
||||
|
|
|
|||
|
|
@ -14,12 +14,14 @@
|
|||
$lang->is_stand_by = '대기';
|
||||
$lang->file_list = '첨부 파일 목록';
|
||||
$lang->allow_outlink = '파일 외부 링크';
|
||||
$lang->allow_outlink_site = '파일 외부 허용 사이트';
|
||||
$lang->allowed_filesize = '파일 제한 크기';
|
||||
$lang->allowed_attach_size = '문서 첨부 제한';
|
||||
$lang->allowed_filetypes = '허용 확장자';
|
||||
$lang->enable_download_group = '다운로드 가능 그룹';
|
||||
|
||||
$lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)';
|
||||
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 관계 없이 허용하는 사이트 주소입니다. 여러개 입력시에 줄을 바꿔서 구분해주세요.<br />ex)http://www.zeroboard.com';
|
||||
$lang->about_allowed_filesize = '하나의 파일에 대해 최고 용량을 지정할 수 있습니다. (관리자는 제외)';
|
||||
$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다. (관리자는 제외)';
|
||||
$lang->about_allowed_filetypes = '허용한 확장자만 첨부할 수 있습니다. "*.확장자"로 지정할 수 있고 ";" 으로 여러개 지정이 가능합니다.<br />ex) *.* or *.jpg;*.gif;<br />(관리자는 제외)';
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@
|
|||
<p>{$lang->about_allow_outlink}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th scope="col"><div>{$lang->allow_outlink_site}</div></th>
|
||||
<td>
|
||||
<textarea name="allow_outlink_site" cols="70">{$config->allow_outlink_site}</textarea>
|
||||
<p>{$lang->about_allow_outlink_site}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th scope="col"><div>{$lang->allowed_filesize}</div></th>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue