mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 20:48:42 +01:00
fix #1162
This commit is contained in:
parent
ed30a99655
commit
a1bf3d037b
@ -3,9 +3,9 @@
|
||||
<?php
|
||||
if (isset($post) || isset($page)) {
|
||||
$cid = isset($post) ? $post->cid : $page->cid;
|
||||
|
||||
|
||||
if ($cid) {
|
||||
\Widget\Contents\Related::alloc(['parentId' => $cid])->to($attachment);
|
||||
\Widget\Contents\Attachment\Related::alloc(['parentId' => $cid])->to($attachment);
|
||||
} else {
|
||||
\Widget\Contents\Attachment\Unattached::alloc()->to($attachment);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user