From c0b0d438b8b66e1eb9a49a823c419d34697b3425 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Wed, 24 Jul 2013 14:56:34 +0200 Subject: [PATCH] Catch errors on missing templates Pages that are missing a template will cause a error 500. We now catch this and display a default string. Fixes #513 --- public/templates/mmcFE/master.tpl | 2 +- public/templates/mobile/master.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/templates/mmcFE/master.tpl b/public/templates/mmcFE/master.tpl index 68777d1a..c300eee4 100644 --- a/public/templates/mmcFE/master.tpl +++ b/public/templates/mmcFE/master.tpl @@ -59,7 +59,7 @@

{$smarty.session.POPUP[popup].CONTENT}

{/section} {/if} - {include file="$PAGE/$ACTION/$CONTENT"} + {if file_exists($smarty.current_dir|cat:"/$PAGE/$ACTION/$CONTENT")}{include file="$PAGE/$ACTION/$CONTENT"}{else}Missing template for this page{/if}
{/if}
-{include file="$PAGE/$ACTION/$CONTENT"} +{if file_exists($smarty.current_dir|cat:"/$PAGE/$ACTION/$CONTENT")}{include file="$PAGE/$ACTION/$CONTENT"}{else}Missing template for this page{/if}
{include file="global/footer.tpl"}