From 76680bebd5e09478498309d701ab0b9006504b8f Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Mon, 28 Feb 2005 16:34:19 +0000 Subject: [PATCH] Don't create an incomplete HTML table if the root directory is empty or none of the files in the root directory matches against the current wildcard --- modules/Command.pm | 3 ++- templates/dirlist.htm | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/Command.pm b/modules/Command.pm index e6491e7..2e8f935 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2005-02-14 +# Last modified: 2005-02-28 # use strict; @@ -207,6 +207,7 @@ sub exec_show($$) $tpl->fillin('FILTER',encode_entities($filter2)); $tpl->fillin('FILTER_URL',escape($filter2)); + $tpl->parse_if_block('empty',$dirlist eq ''); $tpl->parse_if_block('dir_writeable',$dir_writeable); $tpl->parse_if_block('filter',$filter2); $tpl->parse_if_block('gmt',$config->{'use_gmt'}); diff --git a/templates/dirlist.htm b/templates/dirlist.htm index 8a8c9ee..c87faac 100644 --- a/templates/dirlist.htm +++ b/templates/dirlist.htm @@ -14,8 +14,8 @@
- -{DIRLIST}
+{IF empty}

This directory is empty or nothing is matching against your wildcard

{ELSE} +{DIRLIST}
{ENDIF}
-- 2.34.1