Fix unable to preview revisions (#1687)
* Fix unable to preview revisions * Improve revision preview fix Co-authored-by: joyqi <joyqi@users.noreply.github.com> --------- Co-authored-by: joyqi <joyqi@users.noreply.github.com>
This commit is contained in:
@@ -1661,7 +1661,12 @@ EOF;
|
||||
}
|
||||
|
||||
/** 设置归档类型 */
|
||||
[$this->archiveType] = explode('_', $this->type);
|
||||
if ($this->parameter->preview && $this->type === 'revision') {
|
||||
$parent = ContentsFrom::allocWithAlias($this->parent, ['cid' => $this->parent]);
|
||||
$this->archiveType = $parent->type;
|
||||
} else {
|
||||
[$this->archiveType] = explode('_', $this->type);
|
||||
}
|
||||
|
||||
/** 设置归档缩略名 */
|
||||
$this->archiveSlug = ('post' == $this->archiveType || 'attachment' == $this->archiveType)
|
||||
|
||||
Reference in New Issue
Block a user