* [bug #57839] fix cannot save attachment when doc content not changed.

This commit is contained in:
sunhao
2024-12-09 09:21:27 +08:00
committed by 刘刚
parent 57aba89aad
commit 1ca3ac024b
+12 -1
View File
@@ -1572,7 +1572,18 @@ class docModel extends model
$files = $this->loadModel('file')->saveUpload('doc', $docID);
$changes = common::createChanges($oldDoc, $doc);
$changed = $files ? true : false;
foreach($changes as $change) if($change['field'] == 'content' || $change['field'] == 'title') $changed = true;
if(!$changed && isset($doc->rawContent)) $changed = (isset($oldDoc->rawContent) ? $oldDoc->rawContent : null) != $doc->rawContent;
if(!$changed)
{
foreach($changes as $change)
{
if($change['field'] == 'content' || $change['field'] == 'title' || $change['field'] == 'rawContent')
{
$changed = true;
break;
}
}
}
if($changed)
{