mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@918 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f724024ace
commit
2cf7d0223f
4 changed files with 33 additions and 0 deletions
|
|
@ -106,6 +106,12 @@
|
|||
$oEditorController = &getController('editor');
|
||||
$oEditorController->deleteSavedDoc();
|
||||
|
||||
// 첨부 파일이 있었을 경우 해당 첨부파일들의 valid값을 Y로 변경
|
||||
if($obj->uploaded_count) {
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->setFilesValid($obj->document_srl);
|
||||
}
|
||||
|
||||
// return
|
||||
$this->addGrant($obj->document_srl);
|
||||
$output->add('document_srl',$obj->document_srl);
|
||||
|
|
@ -188,6 +194,12 @@
|
|||
if($obj->category_srl) $this->updateCategoryCount($obj->category_srl);
|
||||
}
|
||||
|
||||
// 첨부 파일이 있었을 경우 해당 첨부파일들의 valid값을 Y로 변경
|
||||
if($obj->uploaded_count) {
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->setFilesValid($obj->document_srl);
|
||||
}
|
||||
|
||||
// 자동 저장 문서 삭제
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->deleteSavedDoc();
|
||||
|
|
|
|||
|
|
@ -106,6 +106,15 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 upload_target_srl의 첨부파일들의 상태를 유효로 변경
|
||||
* 글이 등록될때 글에 첨부된 파일들의 상태를 유효상태로 변경함으로서 관리시 불필요 파일로 인식되지 않도록 함
|
||||
**/
|
||||
function setFilesValid($upload_target_srl) {
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
return executeQuery('file.updateFileValid', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 첨부파일 삭제
|
||||
**/
|
||||
|
|
|
|||
11
modules/file/queries/updateFileValid.xml
Normal file
11
modules/file/queries/updateFileValid.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="updateFileValid" action="update">
|
||||
<tables>
|
||||
<table name="files" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="isvalid" var="isvalid" default="Y" notnull="notnull" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="upload_target_srl" var="upload_target_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
<column name="file_size" type="number" size="11" default="0" notnull="notnull" index="idx_file_size" />
|
||||
<column name="comment" type="varchar" size="250" />
|
||||
<column name="downloaded_count" type="number" size="11" default="0" notnull="notnull" index="idx_downloaded_count" />
|
||||
<column name="isvalid" type="char" size="1" default="N" index="idx_upload_target_srl" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress"/>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue