From 185a7bd9eae82e94695c0492ca1b2d8f07b56b66 Mon Sep 17 00:00:00 2001 From: joyqi Date: Wed, 23 Oct 2024 23:56:29 +0800 Subject: [PATCH] fix draft version --- var/Widget/Base/Contents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/Widget/Base/Contents.php b/var/Widget/Base/Contents.php index 91238962..f5421258 100644 --- a/var/Widget/Base/Contents.php +++ b/var/Widget/Base/Contents.php @@ -193,7 +193,7 @@ class Contents extends Base implements QueryInterface, RowFilterInterface, Prima $draft = $this->db->fetchObject($this->db->select('type', 'parent') ->from('table.contents')->where('cid = ?', $cid)); - if (preg_match("/_draft$/", $draft->type) && $draft->parent) { + if ('revision' === $draft->type && $draft->parent) { $result = '@' . $result; }