@@ -152,11 +152,17 @@ class AttachmentService {
|
|||||||
$count = $this->cache->get('card-' . $cardId);
|
$count = $this->cache->get('card-' . $cardId);
|
||||||
if (!$count) {
|
if (!$count) {
|
||||||
$count = count($this->attachmentMapper->findAll($cardId));
|
$count = count($this->attachmentMapper->findAll($cardId));
|
||||||
|
|
||||||
|
foreach (array_keys($this->services) as $attachmentType) {
|
||||||
|
$service = $this->getService($attachmentType);
|
||||||
|
if ($service instanceof ICustomAttachmentService) {
|
||||||
|
$count += $service->getAttachmentCount($cardId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->cache->set('card-' . $cardId, $count);
|
$this->cache->set('card-' . $cardId, $count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user