git-svn-id: http://xe-core.googlecode.com/svn/trunk@836 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-30 10:32:58 +00:00
parent 078ea34bc4
commit d94dc0d9a8
12 changed files with 116 additions and 106 deletions

View file

@ -221,61 +221,6 @@
}
}
/**
* @brief 첨부파일 삭제
* 에디터에서 개별 파일 삭제시 사용
**/
function procBoardDeleteFile() {
// 기본적으로 필요한 변수인 upload_target_srl, module_srl을 설정
$upload_target_srl = Context::get('upload_target_srl');
$module_srl = $this->module_srl;
$file_srl = Context::get('file_srl');
// file class의 controller 객체 생성
$oFileController = &getController('file');
if($file_srl) $output = $oFileController->deleteFile($file_srl, $this->grant->manager);
// 첨부파일의 목록을 java script로 출력
$oFileController->printUploadedFileList($upload_target_srl);
}
/**
* @brief 첨부파일 업로드
*
* editor에서는 upload_target_srl을 넘겨주고 게시판에서는 document_srl을 upload_target_srl로 설정해 놓은 상태이다.
**/
function procBoardUploadFile() {
// 업로드 권한이 없거나 정보가 없을시 종료
if(!Context::isUploaded() || !$this->grant->fileupload) exit();
// 기본적으로 필요한 변수 설정
$upload_target_srl = Context::get('upload_target_srl');
$module_srl = $this->module_srl;
// file class의 controller 객체 생성
$oFileController = &getController('file');
$output = $oFileController->insertFile($module_srl, $upload_target_srl);
// 첨부파일의 목록을 java script로 출력
$oFileController->printUploadedFileList($upload_target_srl);
}
/**
* @brief 첨부파일 다운로드
* 직접 요청을 받음\n
* file_srl : 파일의 sequence\n
* sid : db에 저장된 비교 , 틀리면 다운로드 하지 낳음\n
**/
function procBoardDownloadFile() {
// 다운로드에 필요한 변수 체크
$file_srl = Context::get('file_srl');
$sid = Context::get('sid');
// document module 객체 생성후 해당 파일의 정보를 체크
$oFileModel = &getModel('file');
$oFileModel->procDownload($file_srl, $sid);
}
/**
* @brief 권한 추가
**/

View file

@ -192,8 +192,8 @@
Context::set('document', $document);
// 에디터 모듈의 getEditor를 호출하여 세팅
$oEditorView = &getView('editor');
$editor = $oEditorView->getEditor($document_srl, $this->grant->fileupload, true);
$oEditorModel = &getModel('editor');
$editor = $oEditorModel->getEditor($document_srl, $this->grant->fileupload, true);
Context::set('editor', $editor);
$this->setTemplateFile('write_form');
@ -425,8 +425,8 @@
}
// 에디터 모듈의 getEditor를 호출하여 세팅
$oEditorView = &getView('editor');
$comment_editor = $oEditorView->getEditor($comment_srl, $this->grant->fileupload);
$oEditorModel = &getModel('editor');
$comment_editor = $oEditorModel->getEditor($comment_srl, $this->grant->fileupload);
Context::set('comment_editor', $comment_editor);
}