]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fixed empty content logic
authorVincent Petry <pvince81@owncloud.com>
Mon, 21 Oct 2013 20:18:10 +0000 (22:18 +0200)
committerVincent Petry <pvince81@owncloud.com>
Mon, 21 Oct 2013 20:18:10 +0000 (22:18 +0200)
- Remove obsolete code that used another approach for hiding emptycontent
- Fixed logic for the showing of the empty content message

apps/files/index.php
apps/files/templates/index.php

index c2c0ba02a9904456dde19ae03564f8ad5ba3c623..0b56d9c19a8aa35450d801b94681ad6d33754dc1 100644 (file)
@@ -120,7 +120,7 @@ if ($needUpgrade) {
 
        $isCreatable = \OC\Files\Filesystem::isCreatable($dir . '/');
        $fileHeader = (!isset($files) or count($files) > 0);
-       $emptyContent = $isCreatable or $fileHeader or $ajaxLoad;
+       $emptyContent = ($isCreatable and !$fileHeader) or $ajaxLoad;
 
        OCP\Util::addscript('files', 'fileactions');
        OCP\Util::addscript('files', 'files');
index c1373c3e9d57588f065d1d68ab8d0aaf056757a8..5a686da43f807fd66c3972be93168c9391265df0 100644 (file)
@@ -1,6 +1,6 @@
 <div id="controls">
        <?php print_unescaped($_['breadcrumb']); ?>
-               <div class="actions creatable <?php if (!$_['isCreatable']):?>hidden<?php endif; ?> <?php if (isset($_['files']) and count($_['files'])==0):?>emptycontent<?php endif; ?>">
+               <div class="actions creatable <?php if (!$_['isCreatable']):?>hidden<?php endif; ?>">
                        <div id="new" class="button">
                                <a><?php p($l->t('New'));?></a>
                                <ul>