mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
1. 에디터 모듈의 추가 설정 부분을 확장하여 업로드 권한/컴포넌트/기본컴포넌트/html사용등의 권한과 에디터 높이/스킨등을 상세히 설정할 수 있도록 기능 추가.
2. 게시판 모듈(board)의 경우 기본 설정 - 추가 설정 - 권한 설정을 여러개의 게시판에 대해서 일괄 적용할 수 있도록 기능 추가 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3519 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
77195b282a
commit
62ff4b1fae
54 changed files with 710 additions and 230 deletions
|
|
@ -102,20 +102,80 @@
|
|||
* @brief 에디터의 모듈별 추가 확장 폼을 저장
|
||||
**/
|
||||
function procEditorAdminInsertModuleConfig() {
|
||||
// 필요한 변수를 받아옴
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
$editor_skin = Context::get('editor_skin');
|
||||
|
||||
// 기존 설정을 가져옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('editor');
|
||||
|
||||
$config->module_config[$module_srl] = $editor_skin;
|
||||
// 대상을 구함
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
|
||||
// 여러개의 모듈 일괄 설정일 경우
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$editor_config = null;
|
||||
|
||||
$editor_config->editor_skin = Context::get('editor_skin');
|
||||
$editor_config->comment_editor_skin = Context::get('comment_editor_skin');
|
||||
|
||||
$enable_html_grant = trim(Context::get('enable_html_grant'));
|
||||
if($enable_html_grant) $editor_config->enable_html_grant = explode('|@|', $enable_html_grant);
|
||||
else $editor_config->enable_html_grant = array();
|
||||
|
||||
$enable_comment_html_grant = trim(Context::get('enable_comment_html_grant'));
|
||||
if($enable_comment_html_grant) $editor_config->enable_comment_html_grant = explode('|@|', $enable_comment_html_grant);
|
||||
else $editor_config->enable_comment_html_grant = array();
|
||||
|
||||
$upload_file_grant = trim(Context::get('upload_file_grant'));
|
||||
if($upload_file_grant) $editor_config->upload_file_grant = explode('|@|', $upload_file_grant);
|
||||
else $editor_config->upload_file_grant = array();
|
||||
|
||||
$comment_upload_file_grant = trim(Context::get('comment_upload_file_grant'));
|
||||
if($comment_upload_file_grant) $editor_config->comment_upload_file_grant = explode('|@|', $comment_upload_file_grant);
|
||||
else $editor_config->comment_upload_file_grant = array();
|
||||
|
||||
$enable_default_component_grant = trim(Context::get('enable_default_component_grant'));
|
||||
if($enable_default_component_grant) $editor_config->enable_default_component_grant = explode('|@|', $enable_default_component_grant);
|
||||
else $editor_config->enable_default_component_grant = array();
|
||||
|
||||
$enable_comment_default_component_grant = trim(Context::get('enable_comment_default_component_grant'));
|
||||
if($enable_comment_default_component_grant) $editor_config->enable_comment_default_component_grant = explode('|@|', $enable_comment_default_component_grant);
|
||||
else $editor_config->enable_comment_default_component_grant = array();
|
||||
|
||||
$enable_component_grant = trim(Context::get('enable_component_grant'));
|
||||
if($enable_component_grant) $editor_config->enable_component_grant = explode('|@|', $enable_component_grant);
|
||||
else $editor_config->enable_component_grant = array();
|
||||
|
||||
$enable_comment_component_grant = trim(Context::get('enable_comment_component_grant'));
|
||||
if($enable_comment_component_grant) $editor_config->enable_comment_component_grant = explode('|@|', $enable_comment_component_grant);
|
||||
else $editor_config->enable_comment_component_grant = array();
|
||||
|
||||
$editor_config->editor_height = (int)Context::get('editor_height');
|
||||
|
||||
$editor_config->comment_editor_height = (int)Context::get('comment_editor_height');
|
||||
|
||||
$editor_config->enable_height_resizable = Context::get('enable_height_resizable');
|
||||
|
||||
$editor_config->enable_comment_height_resizable = Context::get('enable_comment_height_resizable');
|
||||
|
||||
$editor_config->enable_autosave = Context::get('enable_autosave');
|
||||
|
||||
if($editor_config->enable_height_resizable != 'Y') $editor_config->enable_height_resizable = 'N';
|
||||
if($editor_config->enable_comment_height_resizable != 'Y') $editor_config->enable_comment_height_resizable = 'N';
|
||||
if($editor_config->enable_autosave != 'Y') $editor_config->enable_autosave = 'N';
|
||||
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$config->module_config[$srl] = $editor_config;
|
||||
}
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('editor',$config);
|
||||
return $output;
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue