mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 03:39:56 +09:00
#17727625 : features to view old revision and to apply old revision
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6011 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a50139a884
commit
9c88f8a395
12 changed files with 72 additions and 11 deletions
|
|
@ -44,14 +44,17 @@
|
|||
function dispWikiHistory() {
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_srl = Context::get('document_srl');
|
||||
$page = Context::get('page');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists()) return $this->stop('msg_invalid_request');
|
||||
$entry = $oDocument->getTitleText();
|
||||
Context::set('entry',$entry);
|
||||
$histories = $oDocumentModel->getHistories($document_srl);
|
||||
$histories = $oDocumentModel->getHistories($document_srl, 10, $page);
|
||||
if(!$histories) $histories = array();
|
||||
Context::set('histories',$histories);
|
||||
Context::set('histories',$histories->data);
|
||||
Context::set('oDocument', $oDocument);
|
||||
Context::set('page_navigation', $histories->page_navigation);
|
||||
Context::set('page', $histories->page);
|
||||
$this->setTemplateFile('histories');
|
||||
}
|
||||
|
||||
|
|
@ -65,6 +68,15 @@
|
|||
$oDocument->add('module_srl', $this->module_srl);
|
||||
Context::set('document_srl',$document_srl);
|
||||
Context::set('oDocument', $oDocument);
|
||||
$history_srl = Context::get('history_srl');
|
||||
if($history_srl)
|
||||
{
|
||||
$output = $oDocumentModel->getHistory($history_srl);
|
||||
if($output && $output->content != null)
|
||||
{
|
||||
Context::set('history', $output);
|
||||
}
|
||||
}
|
||||
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml');
|
||||
|
||||
|
|
@ -109,9 +121,6 @@
|
|||
$document_srl = $oDocumentModel->getDocumentSrlByAlias($this->module_info->mid, $entry);
|
||||
}
|
||||
|
||||
|
||||
// document model 객체 생성
|
||||
|
||||
/**
|
||||
* 요청된 문서 번호가 있다면 문서를 구함
|
||||
**/
|
||||
|
|
@ -131,6 +140,16 @@
|
|||
|
||||
// 상담기능이 사용되고 공지사항이 아니고 사용자의 글도 아니면 무시
|
||||
|
||||
$history_srl = Context::get('history_srl');
|
||||
if($history_srl)
|
||||
{
|
||||
$output = $oDocumentModel->getHistory($history_srl);
|
||||
if($output && $output->content != null)
|
||||
{
|
||||
Context::set('history', $output);
|
||||
}
|
||||
}
|
||||
|
||||
// 요청된 문서번호의 문서가 없으면 document_srl null 처리 및 경고 메세지 출력
|
||||
} else {
|
||||
Context::set('document_srl','',true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue