Skip to content

Commit 23d2100

Browse files
committed
Admin: Fix download of existing CSS by platform admin - refs BT#22159
1 parent 00cdb85 commit 23d2100

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

main/course_info/download.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@
3131
(api_is_platform_admin(true) || api_is_drh() || CourseManager::is_course_teacher(api_get_user_id(), api_get_course_id()))
3232
) {
3333
$content_type = 'application/force-download';
34-
} elseif ('zip' === $extension && $_cid && (api_is_platform_admin(true) || api_is_course_admin())) {
35-
$content_type = 'application/force-download';
34+
} elseif ('zip' === $extension) {
35+
if ($_cid && (api_is_platform_admin(true) || api_is_course_admin())) {
36+
$content_type = 'application/force-download';
37+
} elseif (empty($_cid) && api_is_platform_admin()) {
38+
$content_type = 'application/force-download';
39+
}
3640
}
3741

3842
if (empty($content_type)) {

0 commit comments

Comments
 (0)