From 9acc73b273bbe12b334703e3a0f4c1a6f16aef5b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 18 Nov 2024 23:15:29 +0100 Subject: some cleanup for mod magic --- include/text.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index 18a70c3a5..98093ca53 100644 --- a/include/text.php +++ b/include/text.php @@ -1145,7 +1145,7 @@ function chanlink_cid($d) { function magiclink_url($observer,$myaddr,$url) { return (($observer) - ? z_root() . '/magic?f=&owa=1&bdest=' . bin2hex($url) . '&addr=' . $myaddr + ? z_root() . '/magic?owa=1&bdest=' . bin2hex($url) . '&addr=' . $myaddr : $url ); } @@ -1579,15 +1579,13 @@ function theme_attachments(&$item) { $title = t('Size') . ' ' . (isset($r['length']) ? userReadableSize($r['length']) : t('unknown')); - $revision = $r['revision'] ?? ''; - require_once('include/channel.php'); if (isset($r['href'])) { if(is_foreigner($item['author_xchan'])) $url = $r['href']; else - $url = z_root() . '/magic?f=&owa=1&hash=' . $item['author_xchan'] . '&bdest=' . bin2hex($r['href'] . '/' . $revision); + $url = z_root() . '/magic?owa=1&bdest=' . bin2hex($r['href']); } if (isset($label) && isset($url) && isset($icon) && isset($title)) { -- cgit v1.2.3