render_editlink: don't overwrite title if already set (second take)

This commit is contained in:
n 2021-03-06 18:14:58 +01:00
parent 4a71818880
commit 9c9372c7d0
Signed by: n
GPG key ID: E96086FC951DAE30

View file

@ -63,7 +63,7 @@ function hook_shaargem_render_editlink($data)
// fetch title only for gemini:// iris // fetch title only for gemini:// iris
if(isset($data['link']['url'])) { if(isset($data['link']['url'])) {
if(strstr($data['link']['url'],"gemini://")) { if(strstr($data['link']['url'],"gemini://")) {
if (!isset($data['link']['title'])) { if ($data['link']['title'] == '') {
$data['link']['title'] = fetch_iri_title($data['link']['url']); $data['link']['title'] = fetch_iri_title($data['link']['url']);
} }
} }