* [misc] refactor doc-ajaxGetDoc with getDraft.
This commit is contained in:
@@ -1869,6 +1869,7 @@ class doc extends control
|
||||
$doc->module = (int)$doc->module;
|
||||
$doc->privs = array('edit' => common::hasPriv('doc', 'edit', $doc));
|
||||
$doc->editors = $this->doc->getEditors($docID);
|
||||
$doc->draft = $this->doc->getDraft($docID);
|
||||
|
||||
if($details == 'yes')
|
||||
{
|
||||
@@ -1889,12 +1890,11 @@ class doc extends control
|
||||
$doc->object = $object;
|
||||
}
|
||||
|
||||
if(!empty($doc->rawContent)) $doc->content = $doc->rawContent;
|
||||
if($doc->contentType === 'doc' && is_string($doc->content)) $doc->content = htmlspecialchars_decode($doc->content);
|
||||
if(is_string($doc->title)) $doc->title = htmlspecialchars_decode($doc->title);
|
||||
if(!empty($doc->keywords) && is_string($doc->keywords)) $doc->keywords = htmlspecialchars_decode($doc->keywords);
|
||||
|
||||
unset($doc->rawContent);
|
||||
if(!empty($doc->rawContent))
|
||||
{
|
||||
$doc->content = $doc->rawContent;
|
||||
unset($doc->rawContent);
|
||||
}
|
||||
if($docID) $this->doc->createAction($docID, 'view');
|
||||
|
||||
$this->send($doc);
|
||||
|
||||
Reference in New Issue
Block a user