aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Linkinfo.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-07-25 10:19:19 +0200
committerMario Vavti <mario@mariovavti.com>2018-07-25 10:19:19 +0200
commit1b1d11dcf1091158232e98abad966d4900e2ccc9 (patch)
tree380d5e04c73391089bf3d658ea4b27eecffa4916 /Zotlabs/Module/Linkinfo.php
parentb655d04b3474893ee3dea99b77f2e7dd764729a0 (diff)
parent35200e5f1b10cdd18af8f0ea646996e438b97011 (diff)
downloadvolse-hubzilla-1b1d11dcf1091158232e98abad966d4900e2ccc9.tar.gz
volse-hubzilla-1b1d11dcf1091158232e98abad966d4900e2ccc9.tar.bz2
volse-hubzilla-1b1d11dcf1091158232e98abad966d4900e2ccc9.zip
Merge branch '3.6RC'
Diffstat (limited to 'Zotlabs/Module/Linkinfo.php')
-rw-r--r--Zotlabs/Module/Linkinfo.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php
index 3392e4114..f0d62b5e0 100644
--- a/Zotlabs/Module/Linkinfo.php
+++ b/Zotlabs/Module/Linkinfo.php
@@ -55,10 +55,10 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$h = explode("\n",$result['header']);
foreach ($h as $l) {
list($k,$v) = array_map("trim", explode(":", trim($l), 2));
- $hdrs[$k] = $v;
+ $hdrs[strtolower($k)] = $v;
}
- if (array_key_exists('Content-Type', $hdrs))
- $type = $hdrs['Content-Type'];
+ if (array_key_exists('content-type', $hdrs))
+ $type = $hdrs['content-type'];
if($type) {
$zrl = is_matrix_url($url);
if(stripos($type,'image/') !== false) {
@@ -82,6 +82,10 @@ class Linkinfo extends \Zotlabs\Web\Controller {
echo $br . '[audio]' . $url . '[/audio]' . $br;
killme();
}
+ if(strtolower($type) === 'application/pdf' || strtolower($type) === 'application/x-pdf') {
+ echo $br . '[embed]' . $url . '[/embed]' . $br;
+ killme();
+ }
}
}