z6 updates to owa, linkinfo improved image detection
This commit is contained in:
parent
3dab0d365d
commit
51b4b6216f
@ -265,20 +265,43 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
$attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
|
$attr["content"] = html_entity_decode($attr["content"], ENT_QUOTES, "UTF-8");
|
||||||
|
|
||||||
switch (strtolower($attr["name"])) {
|
switch (strtolower($attr["name"])) {
|
||||||
case 'generator':
|
|
||||||
$siteinfo['generator'] = $attr['content'];
|
|
||||||
break;
|
|
||||||
case "fulltitle":
|
case "fulltitle":
|
||||||
$siteinfo["title"] = $attr["content"];
|
$siteinfo["title"] = trim($attr["content"]);
|
||||||
break;
|
break;
|
||||||
case "description":
|
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;
|
break;
|
||||||
case "dc.title":
|
case "dc.title":
|
||||||
$siteinfo["title"] = $attr["content"];
|
$siteinfo["title"] = trim($attr["content"]);
|
||||||
break;
|
break;
|
||||||
case "dc.description":
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,15 +31,17 @@ class Owa extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
if($keyId) {
|
if($keyId) {
|
||||||
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
|
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
|
||||||
where hubloc_addr = '%s' ",
|
where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) ",
|
||||||
dbesc(str_replace('acct:','',$keyId))
|
dbesc(str_replace('acct:','',$keyId)),
|
||||||
|
dbesc($keyId)
|
||||||
);
|
);
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
$found = discover_by_webbie(str_replace('acct:','',$keyId));
|
$found = discover_by_webbie(str_replace('acct:','',$keyId));
|
||||||
if($found) {
|
if($found) {
|
||||||
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
|
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
|
||||||
where hubloc_addr = '%s' ",
|
where ( hubloc_addr = '%s' or hubloc_id_url = '%s' ) ",
|
||||||
dbesc(str_replace('acct:','',$keyId))
|
dbesc(str_replace('acct:','',$keyId)),
|
||||||
|
dbesc($keyId)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user