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>
remotes/origin/stable
Florian Pritz 2011-09-22 19:47:25 +07:00
parent 2ff5df192b
commit 652b744201
1 changed files with 5 additions and 1 deletions

@ -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>