mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
파일첨부가 허용된 에디터 출력시 이미 등록된 첨부파일의 수를 count하여 첨부된 파일이 없으면 파일 목록을 구해오지 않도록 하여 쓸데없는 페이지 호출 및 서버 작업/ 클라이언트 부하를 없앰
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3749 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
27d176f9ec
commit
1dbe0daede
5 changed files with 18 additions and 9 deletions
|
|
@ -98,6 +98,7 @@
|
|||
if($enable_autosave) {
|
||||
// 자동 저장된 데이터를 추출
|
||||
$saved_doc = $this->getSavedDoc();
|
||||
if($saved_doc->document_srl && !$upload_target_srl) $upload_target_srl = $saved_doc->document_srl;
|
||||
|
||||
// 자동 저장 데이터를 context setting
|
||||
Context::set('saved_doc', $saved_doc);
|
||||
|
|
@ -116,6 +117,7 @@
|
|||
/**
|
||||
* 업로드 활성화시 내부적으로 file 모듈의 환경설정을 이용하여 설정
|
||||
**/
|
||||
$files_count = 0;
|
||||
if($allow_fileupload) {
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
|
|
@ -133,7 +135,12 @@
|
|||
// upload가능하다고 설정 (내부적으로 캐싱하여 처리)
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->setUploadInfo($editor_sequence, $upload_target_srl);
|
||||
|
||||
// 이미 등록된 파일이 있는지 검사
|
||||
if($upload_target_srl) $files_count = $oFileModel->getFilesCount($upload_target_srl);
|
||||
}
|
||||
Context::set('files_count', (int)$files_count);
|
||||
|
||||
Context::set('allow_fileupload', $allow_fileupload);
|
||||
|
||||
// 에디터 동작을 위한 editor_sequence값 설정
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue