From c72e2ad49fbf27621d9720c8fc18e52bed76c3b4 Mon Sep 17 00:00:00 2001 From: conory Date: Thu, 13 Jul 2017 15:59:00 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=90=EB=94=94=ED=84=B0=20=EB=AF=B8?= =?UTF-8?q?=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/editor/editor.model.php | 23 +++++++------ modules/editor/editor.view.php | 53 ++--------------------------- modules/editor/tpl/admin_index.html | 8 ++--- 3 files changed, 19 insertions(+), 65 deletions(-) diff --git a/modules/editor/editor.model.php b/modules/editor/editor.model.php index 34ebc95c5..ea9b265b2 100644 --- a/modules/editor/editor.model.php +++ b/modules/editor/editor.model.php @@ -408,19 +408,22 @@ class editorModel extends editor } // Permission check for file upload - if ($logged_info->is_admin === 'Y' || !count($option->upload_file_grant)) + if($module_srl) { - $option->allow_fileupload = true; - } - else - { - $option->allow_fileupload = false; - foreach($group_list as $group_srl => $group_info) + if ($logged_info->is_admin === 'Y' || !count($option->upload_file_grant)) { - if(in_array($group_srl, $option->upload_file_grant)) + $option->allow_fileupload = true; + } + else + { + $option->allow_fileupload = false; + foreach($group_list as $group_srl => $group_info) { - $option->allow_fileupload = true; - break; + if(in_array($group_srl, $option->upload_file_grant)) + { + $option->allow_fileupload = true; + break; + } } } } diff --git a/modules/editor/editor.view.php b/modules/editor/editor.view.php index 01f8b5da9..678551962 100644 --- a/modules/editor/editor.view.php +++ b/modules/editor/editor.view.php @@ -149,57 +149,8 @@ class editorView extends editor function dispEditorConfigPreview() { - $oEditorModel = getModel('editor'); - $config = $oEditorModel->getEditorConfig(); - - $mode = Context::get('mode'); - - if($mode != 'main') - { - $option_com = new stdClass(); - $option_com->allow_fileupload = false; - $option_com->content_style = $config->content_style; - $option_com->content_font = $config->content_font; - $option_com->content_font_size = $config->content_font_size; - $option_com->content_line_height = $config->content_line_height; - $option_com->content_paragraph_spacing = $config->content_paragraph_spacing; - $option_com->content_word_break = $config->content_word_break; - $option_com->enable_autosave = false; - $option_com->enable_default_component = true; - $option_com->enable_component = true; - $option_com->disable_html = false; - $option_com->height = $config->comment_editor_height; - $option_com->skin = $config->comment_editor_skin; - $option_com->content_key_name = 'dummy_content'; - $option_com->primary_key_name = 'dummy_key'; - $option_com->content_style = $config->comment_content_style; - $option_com->colorset = $config->sel_comment_editor_colorset; - $editor = $oEditorModel->getEditor(0, $option_com); - } - else - { - $option = new stdClass(); - $option->allow_fileupload = false; - $option->content_style = $config->content_style; - $option->content_font = $config->content_font; - $option->content_font_size = $config->content_font_size; - $option->content_line_height = $config->content_line_height; - $option->content_paragraph_spacing = $config->content_paragraph_spacing; - $option->content_word_break = $config->content_word_break; - $option->enable_autosave = false; - $option->enable_default_component = true; - $option->enable_component = true; - $option->disable_html = false; - $option->height = $config->editor_height; - $option->skin = $config->editor_skin; - $option->content_key_name = 'dummy_content'; - $option->primary_key_name = 'dummy_key'; - $option->colorset = $config->sel_editor_colorset; - $editor = $oEditorModel->getEditor(0, $option); - } - - Context::set('editor', $editor); - + Context::set('editor', getModel('editor')->getModuleEditor(Context::get('type'), 0, 0, 'dummy_key', 'dummy_content')); + $this->setLayoutFile('popup_layout'); $this->setTemplatePath($this->module_path.'tpl'); $this->setTemplateFile('config_preview'); diff --git a/modules/editor/tpl/admin_index.html b/modules/editor/tpl/admin_index.html index 97f59c7a8..776762c8a 100644 --- a/modules/editor/tpl/admin_index.html +++ b/modules/editor/tpl/admin_index.html @@ -7,7 +7,7 @@

{$XE_VALIDATOR_MESSAGE}

-
+