Support legacy urls for webmentions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Yarmo Mackenbach 2020-06-25 09:40:41 +02:00
parent c3e9ddae40
commit ee77a866a6

View File

@ -223,7 +223,11 @@ function scandirRec($path, $category, $params) {
return;
}
if (isset($params['slug'])) {
$item["webmentions"] = getWebmentions($item["url"]);
$item["webmentions"] = array_merge(
getWebmentions($item["url"]),
getWebmentions("https://yarmo.eu/blog/".$meta["slug"]),
getWebmentions("https://yarmo.eu/notes/".$meta["slug"])
);
$item["hasWebmentions"] = count($item["webmentions"]) > 0;
}