From 0fc95905c37422185b4adf49a19bef679ed5e875 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Wed, 8 Sep 2021 07:53:02 +0800 Subject: [PATCH] * Fix bug #14566. --- module/doc/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/doc/model.php b/module/doc/model.php index 599957a458..c25818e4f6 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -595,7 +595,6 @@ class docModel extends model ->remove('comment,files,labels,uid,contactListMenu') ->get(); - if($doc->contentType == 'markdown') $doc->content = $this->post->content; if(!empty($doc->acl) and $doc->acl == 'private') $doc->users = $oldDoc->addedBy; $oldDocContent = $this->dao->select('*')->from(TABLE_DOCCONTENT)->where('doc')->eq($docID)->andWhere('version')->eq($oldDoc->version)->fetch(); @@ -609,6 +608,8 @@ class docModel extends model $lib = !empty($doc->lib) ? $this->getLibByID($doc->lib) : ''; $doc = $this->loadModel('file')->processImgURL($doc, $this->config->doc->editor->edit['id'], $this->post->uid); + if($doc->contentType == 'markdown') $doc->content = $this->post->content; + if(!empty($lib)) { $doc->product = $lib->product;