mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
첨부될 target_srl이 이전에 쓰인 target_srl인지 확인, 쓰였다면 이 모듈에서 쓰인게 맞는지 확인
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6585 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
43fb484aaf
commit
46900dae58
1 changed files with 18 additions and 4 deletions
|
|
@ -19,6 +19,7 @@
|
|||
**/
|
||||
function procFileUpload() {
|
||||
// 기본적으로 필요한 변수 설정
|
||||
$oFileModel = &getModel('file');
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$module_srl = $this->module_srl;
|
||||
|
||||
|
|
@ -26,13 +27,26 @@
|
|||
if(!$_SESSION['upload_info'][$editor_sequence]->enabled) exit();
|
||||
|
||||
// upload_target_srl 구함
|
||||
$upload_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
if(!$upload_target_srl) {
|
||||
$oFileModel = &getModel('file');
|
||||
$tmp_target_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
if(!$tmp_target_srl) {
|
||||
if($oFileModel->getIsPermitted(Context::get('uploadTargetSrl'))) {
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = Context::get('uploadTargetSrl');
|
||||
$tmp_target_srl = Context::get('uploadTargetSrl');
|
||||
}
|
||||
}
|
||||
|
||||
$tmp_files = $oFileModel->getFiles($tmp_target_srl);
|
||||
if(is_array($tmp_files)) $tmp_file = $tmp_files[0];
|
||||
|
||||
// 첨부될 target_srl이 이전에 쓰인 target_srl인지 확인, 쓰였다면 이 모듈에서 쓰인게 맞는지 확인
|
||||
if(!$tmp_file || !$tmp_file->file_srl || $tmp_file->module_srl == $module_srl) {
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = $tmp_target_srl;
|
||||
}
|
||||
else {
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = '';
|
||||
}
|
||||
unset($tmp_files);
|
||||
unset($tmp_file);
|
||||
|
||||
if(!$upload_target_srl) {
|
||||
$_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = getNextSequence();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue