aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorZot <mike@macgirvin.com>2019-11-08 10:47:00 +0100
committerMario <mario@mariovavti.com>2019-11-08 10:47:00 +0100
commita6165c00ce286a9b9ee84bb104c1b5d9d944823a (patch)
treeeeecb56411b5a2deadea59aa907a10e4e76a3daa /Zotlabs/Module
parente9a9fc50501d63998203c51e8e0d5ce4a3fcf598 (diff)
downloadvolse-hubzilla-a6165c00ce286a9b9ee84bb104c1b5d9d944823a.tar.gz
volse-hubzilla-a6165c00ce286a9b9ee84bb104c1b5d9d944823a.tar.bz2
volse-hubzilla-a6165c00ce286a9b9ee84bb104c1b5d9d944823a.zip
svg stuff
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Wall_attach.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index 780e82950..e1088d18f 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -113,7 +113,22 @@ class Wall_attach extends \Zotlabs\Web\Controller {
$url = z_root() . '/cloud/' . $channel['channel_address'] . '/' . $r['data']['display_path'];
$s = "\n\n" . '[zaudio]' . $url . '[/zaudio]' . "\n\n";
}
-
+ if ($r['data']['filetype'] === 'image/svg+xml') {
+ $x = @file_get_contents('store/' . $channel['channel_address'] . '/' . $r['data']['os_path']);
+ if ($x) {
+ $bb = svg2bb($x);
+ if ($bb) {
+ $s .= "\n\n" . $bb;
+ }
+ else {
+ logger('empty return from svgbb');
+ }
+ }
+ else {
+ logger('unable to read svg data file: ' . 'store/' . $channel['channel_address'] . '/' . $r['data']['os_path']);
+ }
+ }
+
$s .= "\n\n" . '[attachment]' . $r['data']['hash'] . ',' . $r['data']['revision'] . '[/attachment]' . "\n";
}