* [bug #62324] fix publish from draft not update doc version.

This commit is contained in:
sunhao
2025-05-16 16:44:58 +08:00
committed by 刘刚
parent 6572597ec6
commit 0787770cfd
+1 -1
View File
@@ -1676,9 +1676,9 @@ class docModel extends model
$oldRawContent = isset($oldDoc->rawContent) ? $oldDoc->rawContent : '';
$newRawContent = isset($doc->rawContent) ? $doc->rawContent : '';
$onlyRawChanged = $oldRawContent != $newRawContent;
$changed = $files || $onlyRawChanged ? true : false;
$isDraft = $doc->status == 'draft';
$version = $isDraft ? 0 : ($oldDoc->version + 1);
$changed = $files || $onlyRawChanged || (!$isDraft && $oldDoc->version == 0);
foreach($changes as $change)
{
if($change['field'] == 'content' || $change['field'] == 'title' || $change['field'] == 'rawContent') $changed = true;