mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Improve documentation and error messages
This commit is contained in:
parent
d69007e200
commit
7bf5d78206
6 changed files with 23 additions and 8 deletions
|
|
@ -305,6 +305,10 @@ class editorModel extends editor
|
||||||
$file_config = $oFileModel->getUploadConfig();
|
$file_config = $oFileModel->getUploadConfig();
|
||||||
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
|
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
|
||||||
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
|
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
|
||||||
|
if (PHP_INT_SIZE < 8)
|
||||||
|
{
|
||||||
|
$file_config->allowed_filesize = min($file_config->allowed_filesize, 2147483647);
|
||||||
|
}
|
||||||
$file_config->allowed_chunk_size = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')) * 0.95, 64 * 1024 * 1024);
|
$file_config->allowed_chunk_size = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')) * 0.95, 64 * 1024 * 1024);
|
||||||
if ($file_config->allowed_chunk_size > 4 * 1048576)
|
if ($file_config->allowed_chunk_size > 4 * 1048576)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
// uploader
|
// uploader
|
||||||
var setting = {
|
var setting = {
|
||||||
maxFileSize: {$file_config->allowed_filesize},
|
maxFileSize: {$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize},
|
||||||
maxChunkSize: {$file_config->allowed_chunk_size},
|
maxChunkSize: {$file_config->allowed_chunk_size},
|
||||||
singleFileUploads: true
|
singleFileUploads: true
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,13 @@ class fileAdminController extends file
|
||||||
if($userFileAllowSize > $iniMinSzie || $userAttachAllowSize > $iniMinSzie)
|
if($userFileAllowSize > $iniMinSzie || $userAttachAllowSize > $iniMinSzie)
|
||||||
return new Object(-1, 'input size over than config in php.ini');
|
return new Object(-1, 'input size over than config in php.ini');
|
||||||
*/
|
*/
|
||||||
|
if (PHP_INT_SIZE < 8)
|
||||||
|
{
|
||||||
|
if ($file_config->allowed_filesize > 2047 || $file_config->allowed_attach_size > 2047)
|
||||||
|
{
|
||||||
|
return new Object(-1, 'msg_32bit_max_2047mb');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$oModuleController = getController('module');
|
$oModuleController = getController('module');
|
||||||
for($i=0;$i<count($module_srl);$i++)
|
for($i=0;$i<count($module_srl);$i++)
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,9 @@ $lang->enable_download_group = 'Downloadable Groups';
|
||||||
$lang->about_allow_outlink = 'You can block external links according to referers(except media files like *.wmv and *.mp3).';
|
$lang->about_allow_outlink = 'You can block external links according to referers(except media files like *.wmv and *.mp3).';
|
||||||
$lang->about_allow_outlink_format = 'These formats will always be allowed. Please use comma(,) for multiple input. eg)hwp,doc,zip,pdf';
|
$lang->about_allow_outlink_format = 'These formats will always be allowed. Please use comma(,) for multiple input. eg)hwp,doc,zip,pdf';
|
||||||
$lang->about_allow_outlink_site = 'These websites will alyways be allowed. Please use new line for multiple input. ex)https://www.rhymix.org/';
|
$lang->about_allow_outlink_site = 'These websites will alyways be allowed. Please use new line for multiple input. ex)https://www.rhymix.org/';
|
||||||
$lang->about_allowed_filesize = 'You can assign file size limit for each file.(Exclude administrators)';
|
$lang->about_allowed_filesize = 'You can limit the size of each attached file. Administrators are exempt.';
|
||||||
$lang->about_allowed_attach_size = 'You can assign file size limit for each document.(Exclude administrators)';
|
$lang->about_allowed_attach_size = 'You can limit the total size of all attached files in one document. Administrators are exempt.';
|
||||||
|
$lang->about_allowed_size_limits = 'The file size will be limited to the value set in php.ini (%sB) in IE9 and below and older Android browsers.';
|
||||||
$lang->about_allowed_filetypes = 'To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension. ex) *.* or *.jpg;*.gif; ';
|
$lang->about_allowed_filetypes = 'To allow an extension, use "*.[extention]". To allow multiple extensions, use ";" between each extension. ex) *.* or *.jpg;*.gif; ';
|
||||||
$lang->cmd_delete_checked_file = 'Delete Selected Item(s)';
|
$lang->cmd_delete_checked_file = 'Delete Selected Item(s)';
|
||||||
$lang->cmd_move_to_document = 'Move to Document';
|
$lang->cmd_move_to_document = 'Move to Document';
|
||||||
|
|
@ -45,6 +46,7 @@ $lang->msg_not_allowed_outlink = 'It is not allowed to download files from sites
|
||||||
$lang->msg_not_permitted_create = 'Failed to create a file or directory.';
|
$lang->msg_not_permitted_create = 'Failed to create a file or directory.';
|
||||||
$lang->msg_file_upload_error = 'An error has occurred during uploading.';
|
$lang->msg_file_upload_error = 'An error has occurred during uploading.';
|
||||||
$lang->msg_upload_invalid_chunk = 'An error has occurred during chunked uploading.';
|
$lang->msg_upload_invalid_chunk = 'An error has occurred during chunked uploading.';
|
||||||
|
$lang->msg_32bit_max_2047mb = 'On 32-bit servers, the file size limit cannot exceed 2047MB.';
|
||||||
$lang->no_files = 'No Files';
|
$lang->no_files = 'No Files';
|
||||||
$lang->file_manager = 'Manage selected files';
|
$lang->file_manager = 'Manage selected files';
|
||||||
$lang->selected_file = 'Selected files';
|
$lang->selected_file = 'Selected files';
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,9 @@ $lang->enable_download_group = '다운로드 가능 그룹';
|
||||||
$lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)';
|
$lang->about_allow_outlink = '리퍼러에 따라 파일 외부 링크를 차단할 수 있습니다.(*.wmv, *.mp3등 미디어 파일 제외)';
|
||||||
$lang->about_allow_outlink_format = '파일 외부 링크 설정에 상관없이 허용하는 파일 확장자입니다. 여러 개 입력 시에 쉼표(,)을 이용해서 구분해주세요. 예)hwp,doc,zip,pdf';
|
$lang->about_allow_outlink_format = '파일 외부 링크 설정에 상관없이 허용하는 파일 확장자입니다. 여러 개 입력 시에 쉼표(,)을 이용해서 구분해주세요. 예)hwp,doc,zip,pdf';
|
||||||
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 상관없이 허용하는 사이트 주소입니다. 여러 개 입력 시에 줄을 바꿔서 구분해주세요. 예)https://www.rhymix.org/';
|
$lang->about_allow_outlink_site = '파일 외부 링크 설정에 상관없이 허용하는 사이트 주소입니다. 여러 개 입력 시에 줄을 바꿔서 구분해주세요. 예)https://www.rhymix.org/';
|
||||||
$lang->about_allowed_filesize = '하나의 파일에 대해 최고 용량을 지정할 수 있습니다.(관리자는 제외)';
|
$lang->about_allowed_filesize = '각 파일의 용량을 제한할 수 있습니다. 관리자에게는 적용되지 않습니다.';
|
||||||
$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최고 용량을 지정할 수 있습니다.(관리자는 제외)';
|
$lang->about_allowed_attach_size = '하나의 문서에 첨부할 수 있는 최대 용량을 제한할 수 있습니다. 관리자에게는 적용되지 않습니다.';
|
||||||
|
$lang->about_allowed_size_limits = 'IE9 이하, 구버전 안드로이드 등에서는 php.ini에서 지정한 %sB로 제한됩니다.';
|
||||||
$lang->about_allowed_filetypes = '"*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다. 예) *.* or *.jpg;*.gif;';
|
$lang->about_allowed_filetypes = '"*.확장자"로 지정할 수 있고 ";" 으로 여러 개 지정이 가능합니다. 예) *.* or *.jpg;*.gif;';
|
||||||
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
$lang->cmd_delete_checked_file = '선택항목 삭제';
|
||||||
$lang->cmd_move_to_document = '문서로 이동';
|
$lang->cmd_move_to_document = '문서로 이동';
|
||||||
|
|
@ -46,6 +47,7 @@ $lang->msg_not_allowed_outlink = '외부링크에서 다운로드할 수 없습
|
||||||
$lang->msg_not_permitted_create = '파일 또는 디렉터리를 생성할 수 없습니다.';
|
$lang->msg_not_permitted_create = '파일 또는 디렉터리를 생성할 수 없습니다.';
|
||||||
$lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.';
|
$lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.';
|
||||||
$lang->msg_upload_invalid_chunk = '분할 업로드 처리 중 오류가 발생하였습니다.';
|
$lang->msg_upload_invalid_chunk = '분할 업로드 처리 중 오류가 발생하였습니다.';
|
||||||
|
$lang->msg_32bit_max_2047mb = '32비트 서버에서는 파일 크기 제한이 2047MB를 초과할 수 없습니다.';
|
||||||
$lang->no_files = '파일이 없습니다.';
|
$lang->no_files = '파일이 없습니다.';
|
||||||
$lang->file_manager = '선택한 파일 관리';
|
$lang->file_manager = '선택한 파일 관리';
|
||||||
$lang->selected_file = '선택한 파일';
|
$lang->selected_file = '선택한 파일';
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,21 @@
|
||||||
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
|
<label for="allowed_filesize" class="x_control-label">{$lang->allowed_filesize}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" min="0" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="7" style="min-width:80px" /> MB
|
<input type="number" min="0" name="allowed_filesize" id="allowed_filesize" value="{$file_config->allowed_filesize}" size="7" style="min-width:80px" /> MB
|
||||||
<p class="x_help-inline">{$lang->about_allowed_filesize}</p>
|
<p class="x_help-block">{$lang->about_allowed_filesize}<br />{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label for="allowed_attach_size" class="x_control-label">{$lang->allowed_attach_size}</label>
|
<label for="allowed_attach_size" class="x_control-label">{$lang->allowed_attach_size}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="number" min="0" name="allowed_attach_size" id="allowed_attach_size" value="{$file_config->allowed_attach_size}" size="7" style="min-width:80px" /> MB
|
<input type="number" min="0" name="allowed_attach_size" id="allowed_attach_size" value="{$file_config->allowed_attach_size}" size="7" style="min-width:80px" /> MB
|
||||||
<p class="x_help-inline">{$lang->about_allowed_attach_size}</p>
|
<p class="x_help-block">{$lang->about_allowed_attach_size}<br />{sprintf($lang->about_allowed_size_limits, ini_get('upload_max_filesize'))}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<label for="allowed_filetypes" class="x_control-label">{$lang->allowed_filetypes}</label>
|
<label for="allowed_filetypes" class="x_control-label">{$lang->allowed_filetypes}</label>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
<input type="text" name="allowed_filetypes" id="allowed_filetypes" value="{$file_config->allowed_filetypes}" />
|
<input type="text" name="allowed_filetypes" id="allowed_filetypes" value="{$file_config->allowed_filetypes}" />
|
||||||
<p class="x_help-inline">{$lang->about_allowed_filetypes}</p>
|
<p class="x_help-block">{$lang->about_allowed_filetypes}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue