[PLUGINS][AttachmentCollections] Fixed "Error: Expected Doctrine\ORM\Query\Lexer::T_IDENTIFIER, got 'Plugin\AttachmentCollections\Entity\AttachmentCollection'"

[TWIG] Cards are now divided into blocks and macros, additional macros done, attachments page no longer inside cards directory
[CARDS][Navigation] Now using macros to create section, details, and nav elements
This commit is contained in:
2022-02-06 21:37:04 +00:00
parent 2b9f70f89f
commit b3d582f665
43 changed files with 285 additions and 230 deletions

View File

@@ -108,17 +108,13 @@ class AttachmentCollections extends Plugin
$res = DB::findBy(AttachmentCollection::class, ['actor_id' => $owner->getId()]);
} else {
$res = DB::dql(
<<<'EOF'
SELECT entry.attachment_collection_id FROM \Plugin\AttachmentCollections\Entity\AttachmentCollectionEntry AS entry
INNER JOIN \Plugin\AttachmentCollections\Entity\AttachmentCollection AS attachment_collection
WITH attachment_collection.id = entry.attachment_collection_id
WHERE entry.attachment_id = :attach_id AND entry.note_id = :note_id AND attachment_collection.actor_id = :id
EOF,
[
'id' => $owner->getId(),
'note_id' => $vars['vars']['note_id'],
'attach_id' => $vars['vars']['attachment_id'],
],
'select e.attachment_collection_id from attachment_collection_entry e '
. 'inner join attachment_collection as a '
. 'with a.id = e.attachment_collection_id '
. 'where e.attachment_id = :attachment_id '
. 'and e.note_id = :note_id '
. 'and a.actor_id = :actor_id',
['actor_id' => $owner->getId(), 'note_id' => $vars['vars']['note_id'], 'attachment_id' => $vars['vars']['attachment_id']],
);
}
if (!$ids_only) {