From 652b74420130e94739ea860f77182f72800c8e55 Mon Sep 17 00:00:00 2001 From: Florian Pritz <bluewind@xinu.at> Date: Thu, 22 Sep 2011 19:47:25 +0200 Subject: [PATCH] don't print empty folder warning if it will be hidden No point in wasting resources if you don't show it. This also fixes an undefined variable notice. Signed-off-by: Florian Pritz <bluewind@xinu.at> --- files/templates/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/templates/index.php b/files/templates/index.php index fc01c751a6..76531b22ed 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -21,7 +21,11 @@ </div> <div id='notification'></div> -<div id="emptyfolder" <?php if(count($_['files'])) echo 'style="display:none;"';?>><?php echo $l->t('Nothing in here. Upload something!')?></div> +<?php +if (isset($_['files'])) { + if (!count($_['files'])) { ?> +<div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div> +<?php }}?> <table> <thead> -- GitLab