Skip to content

Commit

Permalink
fix #1162
Browse files Browse the repository at this point in the history
  • Loading branch information
joyqi committed Sep 9, 2021
1 parent ed30a99 commit a1bf3d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/file-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a1bf3d0

Please sign in to comment.