aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-04 09:31:07 +0000
committerMario <mario@mariovavti.com>2019-11-04 10:34:24 +0100
commit873b20677ed35df291004152fd4e3a0494c478bf (patch)
tree606859f75df34d88f280f27552533776ef280fa9 /Zotlabs/Module/Item.php
parent64c6e25896bc5b8f899abdad4e52a9fe6c88a66c (diff)
downloadvolse-hubzilla-873b20677ed35df291004152fd4e3a0494c478bf.tar.gz
volse-hubzilla-873b20677ed35df291004152fd4e3a0494c478bf.tar.bz2
volse-hubzilla-873b20677ed35df291004152fd4e3a0494c478bf.zip
fix duplicate attachment and regression with audio file upload
(cherry picked from commit 4cfb965881df2be181aab6020c9df78c0a86fd9f)
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php5
1 files changed, 0 insertions, 5 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index cda8eabec..14881844d 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -817,11 +817,6 @@ class Item extends Controller {
'revision' => $r['data']['revision']
);
}
- $ext = substr($r['data']['filename'],strrpos($r['data']['filename'],'.'));
- if(strpos($r['data']['filetype'],'audio/') !== false)
- $attach_link = '[audio]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/audio]';
- elseif(strpos($r['data']['filetype'],'video/') !== false)
- $attach_link = '[video]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/video]';
$body = str_replace($match[1][$i],$attach_link,$body);
$i++;
}