From 5934de7a4e3bd3fb8889e2d27df1963d00160078 Mon Sep 17 00:00:00 2001 From: onli Date: Sat, 2 Nov 2019 21:32:24 +0100 Subject: [PATCH] Fix links in ML not going to item when no image. Cherry-picked from master branch. --- docs/NEWS | 3 +++ templates/2k11/admin/media_items.tpl | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index 196d149f..58e492d3 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -10,6 +10,9 @@ Version 2.3.3-beta1 () published blog entries and ability to prepend a mail body. Also fixes missing "keep strip tags" configuration option + * Fix: Items in Medialibrary that are not images now get + the correct link + * #651: When using checkboxes to insert multiple media files, if only one asset has been selected, do not use the gallery mode, but instead single-asset view. Also improves to click the title diff --git a/templates/2k11/admin/media_items.tpl b/templates/2k11/admin/media_items.tpl index a951927e..dab34649 100644 --- a/templates/2k11/admin/media_items.tpl +++ b/templates/2k11/admin/media_items.tpl @@ -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} +