Fix links in ML not going to item when not an image

This commit is contained in:
onli 2019-11-02 21:32:24 +01:00
parent 7a59338971
commit 8d0cd12b39
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,9 @@
Version 2.4-alpha1 ()
------------------------------------------------------------------------
* Fix: Items in Medialibrary that are not images now get
the correct link
* Plugin nl2br: Include figure and figcaption tags (2.21.3)
Thanks to @stephanbrunker!

View File

@ -55,10 +55,7 @@
{$img_alt="{$file.mime}"}
{/if}
{/if}
{* builds a ML objects link for step 1, to pass to media_choose.tpl file section: passthrough media.filename_only scripts - do not use "empty($link) AND" here, since that would require a reset before! *}
{if (!$file.is_image OR $file.is_image == 0) AND $file.mediatype != 'image' AND $file.realfile}
{$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[fid]={$file.id}&serendipity[filename_only]={$media.filename_only}&serendipity[textarea]={$media.textarea}&serendipity[htmltarget]={$media.htmltarget}"}
{/if}
<article id="media_{$file.id}" class="media_file {if $media.manage AND $media.multiperm}manage {/if}{cycle values="odd,even"}">
<header class="clearfix">