]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't print empty folder warning if it will be hidden
authorFlorian Pritz <bluewind@xinu.at>
Thu, 22 Sep 2011 17:47:25 +0000 (19:47 +0200)
committerFlorian Pritz <bluewind@xinu.at>
Sat, 24 Sep 2011 16:41:49 +0000 (18:41 +0200)
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

index fc01c751a6a1f0505c723e78d3a6362f17aa3f0b..76531b22ed5fce154d93b4702e19db0cfebdaf17 100644 (file)
 </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>