mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
자동 저장 문서 삭제 부분 - mid별로 삭제 되게 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6582 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
607ba936bb
commit
c2bc3067a2
4 changed files with 19 additions and 6 deletions
|
|
@ -294,15 +294,24 @@
|
||||||
} else {
|
} else {
|
||||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||||
}
|
}
|
||||||
|
$args->module_srl = Context::get('module_srl');
|
||||||
|
// module_srl이 없으면 현재 모듈
|
||||||
|
if(!$args->module_srl) {
|
||||||
|
$current_module_info = Context::get('current_module_info');
|
||||||
|
$args->module_srl = $current_module_info->module_srl;
|
||||||
|
}
|
||||||
|
|
||||||
// 자동저장된 값이 혹시 이미 등록된 글인지 확인
|
// 자동저장된 값이 혹시 이미 등록된 글인지 확인
|
||||||
|
$output = executeQuery('editor.getSavedDocument', $args);
|
||||||
|
$saved_doc = $output->data;
|
||||||
|
if(!$saved_doc) return;
|
||||||
|
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
$oSaved = $oDocumentModel->getDocument($saved_doc->document_srl);
|
$oSaved = $oDocumentModel->getDocument($saved_doc->document_srl);
|
||||||
if(!$oSaved->isExists()) {
|
if(!$oSaved->isExists()) {
|
||||||
if($mode) {
|
if($mode) {
|
||||||
$output = executeQuery('editor.getSavedDocument', $args);
|
$output = executeQuery('editor.getSavedDocument', $args);
|
||||||
$trigger_obj = $output->data;
|
$output = ModuleHandler::triggerCall('editor.deleteSavedDoc', 'after', $saved_doc);
|
||||||
$output = ModuleHandler::triggerCall('editor.deleteSavedDoc', 'after', $trigger_obj);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
<tables>
|
<tables>
|
||||||
<table name="editor_autosave" />
|
<table name="editor_autosave" />
|
||||||
</tables>
|
</tables>
|
||||||
|
<columns />
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="equal" column="member_srl" var="member_srl" />
|
<condition operation="equal" column="module_srl" var="module_srl" />
|
||||||
<condition operation="equal" column="ipaddress" var="ipaddress" />
|
<condition operation="equal" column="member_srl" var="member_srl" pipe="and" />
|
||||||
<condition operation="equal" column="module_srl" var="module_srl" pipe="and" />
|
<condition operation="equal" column="ipaddress" var="ipaddress" pipe="and" />
|
||||||
</conditions>
|
</conditions>
|
||||||
</query>
|
</query>
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height, f
|
||||||
var param = new Array();
|
var param = new Array();
|
||||||
param['editor_sequence'] = editor_sequence;
|
param['editor_sequence'] = editor_sequence;
|
||||||
param['primary_key'] = primary_key;
|
param['primary_key'] = primary_key;
|
||||||
|
paran['mid'] = current_mid;
|
||||||
var response_tags = new Array("error","message","editor_sequence","key","title","content","document_srl");
|
var response_tags = new Array("error","message","editor_sequence","key","title","content","document_srl");
|
||||||
exec_xml('editor',"procEditorLoadSavedDocument", param, getAutoSavedSrl, response_tags);
|
exec_xml('editor',"procEditorLoadSavedDocument", param, getAutoSavedSrl, response_tags);
|
||||||
if(typeof(editorUploadInit) == 'function') editorUploadInit(uploadSettingObj, true);
|
if(typeof(editorUploadInit) == 'function') editorUploadInit(uploadSettingObj, true);
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,9 @@ function _editorAutoSave(exe) {
|
||||||
|
|
||||||
// 자동저장된 모든 메세지를 삭제하는 루틴
|
// 자동저장된 모든 메세지를 삭제하는 루틴
|
||||||
function editorRemoveSavedDoc() {
|
function editorRemoveSavedDoc() {
|
||||||
exec_xml("editor","procEditorRemoveSavedDoc");
|
var param = new Array();
|
||||||
|
param['mid'] = current_mid;
|
||||||
|
exec_xml("editor","procEditorRemoveSavedDoc", param);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue