more reasonable check for docs and folders

This commit is contained in:
Uwe Steinmann 2017-03-02 20:00:14 +01:00
parent 1c359cb701
commit 83e888b9c9

View File

@ -300,12 +300,9 @@ function folderSelected(id, name) {
print "<th>".getMLText("action")."</th>\n"; print "<th>".getMLText("action")."</th>\n";
print "</tr>\n</thead>\n<tbody>\n"; print "</tr>\n</thead>\n<tbody>\n";
} }
}
else printMLText("empty_folder_list");
foreach($subFolders as $subFolder) { foreach($subFolders as $subFolder) {
$txt = $this->callHook('folderListItem', $subFolder); $txt = $this->callHook('folderListItem', $subFolder, 'viewfolder');
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
else { else {
@ -323,13 +320,14 @@ function folderSelected(id, name) {
} }
} }
if ((count($subFolders) > 0)||(count($documents) > 0)) {
$txt = $this->callHook('folderListFooter', $folder); $txt = $this->callHook('folderListFooter', $folder);
if(is_string($txt)) if(is_string($txt))
echo $txt; echo $txt;
else else
echo "</tbody>\n</table>\n"; echo "</tbody>\n</table>\n";
} }
else printMLText("empty_folder_list");
echo "</div>\n"; // End of right column div echo "</div>\n"; // End of right column div
echo "</div>\n"; // End of div around left and right column echo "</div>\n"; // End of div around left and right column