diff --git a/modules/communication/communication.admin.controller.php b/modules/communication/communication.admin.controller.php index 84236b125..8c66e34ba 100644 --- a/modules/communication/communication.admin.controller.php +++ b/modules/communication/communication.admin.controller.php @@ -15,7 +15,7 @@ class CommunicationAdminController extends communication function procCommunicationAdminInsertConfig() { // get the default information - $args = Context::gets('enable_message', 'enable_friend', 'enable_attachment', 'skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_send_default','grant_send_group'); + $args = Context::gets('enable_message', 'enable_friend', 'enable_attachment', 'attachment_size_limit', 'skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_send_default','grant_send_group'); $args->editor_colorset = $args->sel_editor_colorset; unset($args->sel_editor_colorset); @@ -23,6 +23,7 @@ class CommunicationAdminController extends communication $args->grant_send = $oCommunicationModel->getGrantArray($args->grant_send_default, $args->grant_send_group); unset($args->grant_send_default); unset($args->grant_send_group); + $args->attachment_size_limit = intval($args->attachment_size_limit) ?? 0; // create the module module Controller object $oModuleController = getController('module'); diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php index c4e324377..057b9bb87 100644 --- a/modules/communication/communication.view.php +++ b/modules/communication/communication.view.php @@ -280,6 +280,7 @@ class CommunicationView extends communication $option->primary_key_name = 'temp_srl'; $option->content_key_name = 'content'; $option->allow_fileupload = $this->config->enable_attachment === 'Y'; + $option->allowed_filesize = $this->config->attachment_size_limit ?? 0; $option->enable_autosave = FALSE; $option->enable_default_component = TRUE; // FALSE; $option->enable_component = FALSE; diff --git a/modules/communication/lang/en.php b/modules/communication/lang/en.php index cdd540813..813709e88 100644 --- a/modules/communication/lang/en.php +++ b/modules/communication/lang/en.php @@ -48,3 +48,4 @@ $lang->alert_new_message_arrived = 'You have %d new message(s). Do you want to c $lang->enable_communication_friend = 'Friend Enable'; $lang->enable_communication_message = 'Message Enable'; $lang->enable_attachment = 'Allow Attachment'; +$lang->attachment_size_limit = 'Attachment Size Limit'; diff --git a/modules/communication/lang/ko.php b/modules/communication/lang/ko.php index 6da434b26..8d1e8700c 100644 --- a/modules/communication/lang/ko.php +++ b/modules/communication/lang/ko.php @@ -48,6 +48,7 @@ $lang->alert_new_message_arrived = '%d개의 새로운 메시지가 도착하였 $lang->enable_communication_friend = '친구기능 사용'; $lang->enable_communication_message = '쪽지기능 사용'; $lang->enable_attachment = '파일첨부 허용'; +$lang->attachment_size_limit = '첨부 용량 제한'; $lang->warning = '알려드립니다!'; $lang->msg_allow_message_friend = '현재 회원님은 친구에게만 수신 가능한 상태입니다.'; $lang->msg_allow_meesage_Block = '현재 회원님은 수신거부 상태입니다.'; diff --git a/modules/communication/tpl/index.html b/modules/communication/tpl/index.html index dd4e74abd..7b0c3b0c7 100644 --- a/modules/communication/tpl/index.html +++ b/modules/communication/tpl/index.html @@ -53,6 +53,12 @@ +