get access mode of folder only once in folderListRow()

This commit is contained in:
Uwe Steinmann 2019-12-13 10:27:02 +01:00
parent 98da641061
commit c2e48e9ab4

View File

@ -2505,12 +2505,13 @@ $('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(e
// $content .= "<td></td>";
$content .= "<td>";
$content .= "<div class=\"list-action\">";
if($subFolder->getAccessMode($user) >= M_ALL) {
$subFolderAccessMode = $subFolder->getAccessMode($user);
if($subFolderAccessMode >= M_ALL) {
$content .= $this->printDeleteFolderButton($subFolder, 'splash_rm_folder', true);
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="icon-remove"></i></span>';
}
if($subFolder->getAccessMode($user) >= M_READWRITE) {
if($subFolderAccessMode >= M_READWRITE) {
$content .= '<a class_="btn btn-mini" href="../out/out.EditFolder.php?folderid='.$subFolder->getID().'" title="'.getMLText("edit_folder_props").'"><i class="icon-edit"></i></a>';
} else {
$content .= '<span style="padding: 2px; color: #CCC;"><i class="icon-edit"></i></span>';