aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-07 10:38:08 +0000
committerMario <mario@mariovavti.com>2024-03-07 10:38:08 +0000
commitfe9ca30c5e3061e1f8a7def634392d9fc267790e (patch)
treead2fef28c802141ff3e50dcd2eb79f7853fc146f /include/text.php
parent9e8ba5f6e24d4fdd1e06350f69731aaac9425948 (diff)
downloadvolse-hubzilla-fe9ca30c5e3061e1f8a7def634392d9fc267790e.tar.gz
volse-hubzilla-fe9ca30c5e3061e1f8a7def634392d9fc267790e.tar.bz2
volse-hubzilla-fe9ca30c5e3061e1f8a7def634392d9fc267790e.zip
list attachments in the original order
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php
index aa9650a25..3582b430c 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1541,15 +1541,16 @@ function theme_attachments(&$item) {
$url = z_root() . '/magic?f=&owa=1&hash=' . $item['author_xchan'] . '&bdest=' . bin2hex($r['href'] . '/' . $revision);
}
- //$s .= '<a href="' . $url . '" title="' . $title . '" class="attachlink" >' . $icon . '</a>';
- if (isset($label) && isset($url) && isset($icon) && isset($title))
- $attaches[] = array('label' => $label, 'url' => $url, 'icon' => $icon, 'title' => $title);
+ if (isset($label) && isset($url) && isset($icon) && isset($title)) {
+ array_unshift($attaches, ['label' => $label, 'url' => $url, 'icon' => $icon, 'title' => $title]);
+ }
}
- if (count($attaches) > 0)
+ if ($attaches) {
$s = replace_macros(get_markup_template('item_attach.tpl'), [
'$attaches' => $attaches
]);
+ }
}
return $s;