aboutsummaryrefslogtreecommitdiff
path: root/templates/timeline.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/timeline.inc.php')
-rw-r--r--templates/timeline.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/timeline.inc.php b/templates/timeline.inc.php
index 6dd37c1..d07776d 100644
--- a/templates/timeline.inc.php
+++ b/templates/timeline.inc.php
@@ -52,14 +52,14 @@
</ul><?php endif; ?>
</nav>
<div class="post-content"><?= nl2br(autolink($post['post_content'])) ?></div>
- <?php if(!empty($attachments)): ?>
+ <?php if(!empty($attachments) && !empty($attachments[$post['id']])): ?>
<?php
- $attachments_total = count($attachments);
+ $attachments_total = count($attachments[$post['id']]);
// only display the first attachment on the timeline
- array_splice($attachments, 1);
+ array_splice($attachments[$post['id']], 1);
?>
<ul class="post-attachments">
- <?php foreach($attachments as $a): ?>
+ <?php foreach($attachments[$post['id']] as $a): ?>
<li title="<?= ($attachments_total > 1) ? 'and '.($attachments_total-1).' more' : '' ?>">
<?php if(strpos($a['file_mime_type'], 'image') === 0): ?>
<?php