Skip to content

Commit 5b3755b

Browse files
committed
Document: # fix folder size calculation to avoid DELETED documents that have many registries in c_item_property - refs BT#22562
1 parent 39e0fa8 commit 5b3755b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main/inc/lib/document.lib.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6635,7 +6635,15 @@ public static function getTotalFolderSize($value, $canSeeInvisible = false, $byI
66356635
docs.path LIKE '$path/%' AND
66366636
props.c_id = $course_id AND
66376637
props.tool = '$tool_document' AND
6638-
$visibility_rule
6638+
$visibility_rule AND
6639+
props.ref not in (
6640+
SELECT ref
6641+
FROM $table_itemproperty as cip
6642+
WHERE
6643+
cip.c_id = $course_id AND
6644+
cip.tool = '$tool_document' AND
6645+
cip.visibility = 2
6646+
)
66396647
$session_condition
66406648
GROUP BY ref
66416649
) as table1";

0 commit comments

Comments
 (0)