Fix file existence logic for get_avatar MACRO

Test for existence on filesystem
This commit is contained in:
2022-08-01 20:19:44 -04:00
parent d4e8422677
commit 83d9156f17
4 changed files with 8 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
<!--% MACRO get_avatar(has_avatar, host_id) BLOCK %-->
<!--% IF has_avatar == 0 %-->hpr_logo.png<!--% ELSE %-->hosts/<!--% host_id %-->.png<!--% END %-->
<!--% MACRO get_avatar(host_id) BLOCK %-->
<!--% TRY %-->
<!--% USE File ("./public_html/images/hosts/${host_id}.png") %-->hosts/<!--% File.name %-->
<!--% CATCH File %-->hpr_logo.png<!--% END %-->
<!--% END %-->