Fix: error when using bulk shaare with a single URL

Make sure that header metadata associated with permalink is only used in linklist template.

Fixes #1686
This commit is contained in:
ArthurHoaro 2021-01-19 11:18:56 +01:00
parent ccd1862d5f
commit 9e55beebfd
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@
{/if} {/if}
<link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#" <link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#"
title="Shaarli search - {$shaarlititle}" /> title="Shaarli search - {$shaarlititle}" />
{if="! empty($links) && count($links) === 1"} {if="$template === 'linklist' && ! empty($links) && count($links) === 1"}
{$link=reset($links)} {$link=reset($links)}
<meta property="og:title" content="{$link.title}" /> <meta property="og:title" content="{$link.title}" />
<meta property="og:type" content="article" /> <meta property="og:type" content="article" />

View file

@ -16,7 +16,7 @@
{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="{$base_path}/data/user.css#" />{/if} {if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="{$base_path}/data/user.css#" />{/if}
<link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#" <link rel="search" type="application/opensearchdescription+xml" href="{$base_path}/open-search#"
title="Shaarli search - {$shaarlititle|htmlspecialchars}" /> title="Shaarli search - {$shaarlititle|htmlspecialchars}" />
{if="! empty($links) && count($links) === 1"} {if="$template === 'linklist' && ! empty($links) && count($links) === 1"}
{$link=reset($links)} {$link=reset($links)}
<meta property="og:title" content="{$link.title}" /> <meta property="og:title" content="{$link.title}" />
<meta property="og:type" content="article" /> <meta property="og:type" content="article" />