diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-11-05 09:56:52 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-11-05 09:56:52 +0100 |
commit | b6938da552890f60409e17c32498a0760bb60f43 (patch) | |
tree | 13b62c1c69b2e28609041e052ae916b3983094fb /Zotlabs/Module | |
parent | 92ea3ef72036c39601b69565f3e03fa44ad9aef7 (diff) | |
parent | 73d2719330789c40d7b64fcc2e6ca2eec0d9deb6 (diff) | |
download | volse-hubzilla-b6938da552890f60409e17c32498a0760bb60f43.tar.gz volse-hubzilla-b6938da552890f60409e17c32498a0760bb60f43.tar.bz2 volse-hubzilla-b6938da552890f60409e17c32498a0760bb60f43.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Linkinfo.php | 37 | ||||
-rw-r--r-- | Zotlabs/Module/Owa.php | 10 |
2 files changed, 36 insertions, 11 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index 670967370..7c7dc0e88 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -270,20 +270,43 @@ class Linkinfo extends \Zotlabs\Web\Controller { $attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8"); switch (strtolower($attr["name"])) { - case 'generator': - $siteinfo['generator'] = $attr['content']; - break; case "fulltitle": - $siteinfo["title"] = $attr["content"]; + $siteinfo["title"] = trim($attr["content"]); break; case "description": - $siteinfo["text"] = $attr["content"]; + $siteinfo["text"] = trim($attr["content"]); + break; + case "thumbnail": + $siteinfo["image"] = $attr["content"]; + break; + case "twitter:image": + $siteinfo["image"] = $attr["content"]; + break; + case "twitter:image:src": + $siteinfo["image"] = $attr["content"]; + break; + case "twitter:card": + if (($siteinfo["type"] == "") || ($attr["content"] == "photo")) { + $siteinfo["type"] = $attr["content"]; + } + break; + case "twitter:description": + $siteinfo["text"] = trim($attr["content"]); + break; + case "twitter:title": + $siteinfo["title"] = trim($attr["content"]); break; case "dc.title": - $siteinfo["title"] = $attr["content"]; + $siteinfo["title"] = trim($attr["content"]); break; case "dc.description": - $siteinfo["text"] = $attr["content"]; + $siteinfo["text"] = trim($attr["content"]); + break; + case "keywords": + $keywords = explode(",", $attr["content"]); + break; + case "news_keywords": + $keywords = explode(",", $attr["content"]); break; } } diff --git a/Zotlabs/Module/Owa.php b/Zotlabs/Module/Owa.php index 4a488086f..ad57f883c 100644 --- a/Zotlabs/Module/Owa.php +++ b/Zotlabs/Module/Owa.php @@ -31,15 +31,17 @@ class Owa extends \Zotlabs\Web\Controller { if($keyId) { $r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash - where hubloc_addr = '%s' ", - dbesc(str_replace('acct:','',$keyId)) + where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) ", + dbesc(str_replace('acct:','',$keyId)), + dbesc($keyId) ); if(! $r) { $found = discover_by_webbie(str_replace('acct:','',$keyId)); if($found) { $r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash - where hubloc_addr = '%s' ", - dbesc(str_replace('acct:','',$keyId)) + where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) ", + dbesc(str_replace('acct:','',$keyId)), + dbesc($keyId) ); } } |