mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
게시판별 첨부파일 제한이 없을경우(공백) 파일첨부모듈의 제한을 따르도록함
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5115 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a1b2660aa8
commit
471aba08e2
3 changed files with 19 additions and 2 deletions
|
|
@ -149,6 +149,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 게시판만 뽑자
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -83,14 +83,25 @@
|
|||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$file_module_config = $oModuleModel->getModuleConfig('file');
|
||||
|
||||
if($module_srl) $file_config = $oModuleModel->getModulePartConfig('file',$module_srl);
|
||||
if(!$file_config) $file_config = $oModuleModel->getModuleConfig('file');
|
||||
if(!$file_config) $file_config = $file_module_config;
|
||||
|
||||
if($file_config) {
|
||||
$config->allowed_filesize = $file_config->allowed_filesize;
|
||||
$config->allowed_attach_size = $file_config->allowed_attach_size;
|
||||
$config->allowed_filetypes = $file_config->allowed_filetypes;
|
||||
$config->download_grant = $file_config->download_grant;
|
||||
}
|
||||
|
||||
// 전체 파일첨부 속성을 먼저 따른다
|
||||
if(!$config->allowed_filesize) $config->allowed_filesize = $file_module_config->allowed_filesize;
|
||||
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->download_grant) $config->download_grant = $file_module_config->download_grant;
|
||||
|
||||
// 그래도 없으면 default로
|
||||
if(!$config->allowed_filesize) $config->allowed_filesize = '2';
|
||||
if(!$config->allowed_attach_size) $config->allowed_attach_size = '3';
|
||||
if(!$config->allowed_filetypes) $config->allowed_filetypes = '*.*';
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
// cache 파일을 비교하여 문제 없으면 include하고 $widget_info 변수를 return
|
||||
$cache_file = sprintf('./files/cache/widget/%s.%s.cache.php', $widget, Context::getLangType());
|
||||
|
||||
|
||||
if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file)) {
|
||||
@include($cache_file);
|
||||
return $widget_info;
|
||||
|
|
@ -76,7 +77,7 @@
|
|||
if(!$xml_obj) return;
|
||||
|
||||
$buff = '';
|
||||
|
||||
debugPrint($xml_obj);
|
||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2') {
|
||||
// 위젯의 제목, 버전
|
||||
$buff .= sprintf('$widget_info->widget = "%s";', $widget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue