related to #1657 remove is_svg from code in gallery

This commit is contained in:
Matthieu Leproux
2022-08-29 14:09:44 +02:00
parent fba93e05b9
commit 7946a33780
3 changed files with 3 additions and 8 deletions

View File

@@ -163,7 +163,6 @@ function get_sync_metadata($infos)
$infos['filesize'] = floor($fs/1024);
$is_tiff = false;
$is_svg = false;
if (isset($infos['representative_ext']))
{
@@ -185,8 +184,6 @@ function get_sync_metadata($infos)
if (in_array(mime_content_type($file), array('image/svg+xml', 'image/svg')))
{
$is_svg = true;
$xml = file_get_contents($file);
$xmlget = simplexml_load_string($xml);
@@ -195,8 +192,6 @@ function get_sync_metadata($infos)
$height = (int) $xmlattributes->height;
$vb = (string) $xmlattributes->viewBox;
$infos['is_svg'] = $is_svg;
if (isset($width) and $width != "")
{
$infos['width'] = $width;

View File

@@ -149,7 +149,7 @@ y.callService(
{if isset($previous)}
<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE_ESC}" rel="prev">
<span class="thumbHover prevThumbHover"></span>
<img class="{if isset($previous.is_svg) and $previous.is_svg}svgImg{/if}" src="{if isset($previous.is_svg) and $previous.is_svg}{$previous.path}{else}{$previous.derivatives.square->get_url()}{/if}" alt="{$previous.TITLE_ESC}">
<img class="{if {$previous.path_ext} == 'svg'}svgImg{/if}" src="{if {$previous.path_ext} == 'svg'}{$previous.path}{else}{$previous.derivatives.square->get_url()}{/if}" alt="{$previous.TITLE_ESC}">
</a>
{elseif isset($U_UP)}
<a class="navThumb" id="linkPrev" href="{$U_UP}" title="{'Thumbnails'|@translate}">
@@ -159,7 +159,7 @@ y.callService(
{if isset($next)}
<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE_ESC}" rel="next">
<span class="thumbHover nextThumbHover"></span>
<img class="{if isset($next.is_svg) and $next.is_svg}svgImg{/if}" src="{if isset($next.is_svg) and $next.is_svg}{$next.path}{else}{$next.derivatives.square->get_url()}{/if}" alt="{$next.TITLE_ESC}">
<img class="{if {$next.path_ext} == 'svg'}svgImg{/if}" src="{if $next.path_ext}{$next.path}{else}{$next.derivatives.square->get_url()}{/if}" alt="{$next.TITLE_ESC}">
</a>
{elseif isset($U_UP)}
<a class="navThumb" id="linkNext" href="{$U_UP}" title="{'Thumbnails'|@translate}">

View File

@@ -4,7 +4,7 @@
{footer_script}var error_icon = "{$ROOT_URL}{$themeconf.icon_dir}/errors_small.png"{/footer_script}
{/if}
<img {if $current.is_svg}src="{$current.path}" style="{if $current.width < 200}min-width: 200px; {else} max-width:{$current.width}px; {/if} {if $current.height < 200} min-height: 200px;{else} max-height: {$current.height}px {/if}" {elseif $current.selected_derivative->is_cached()}src="{$current.selected_derivative->get_url()}"{$current.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE_ESC} - {$ALT_IMG}{/if}">
<img class="file-ext-{$current.file_ext} path-ext-{$current.path_ext}" {if {$current.path_ext} == 'svg'} src="{$current.path}" {elseif $current.selected_derivative->is_cached()}src="{$current.selected_derivative->get_url()}"{$current.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE_ESC} - {$ALT_IMG}{/if}">
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}
<map name="map{$derivative->get_type()}">