From 6e749800d8a9f6b77bf50be92a70b7916c2804f3 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Thu, 27 Apr 2023 01:55:12 +0300 Subject: hotfixes and optimizations --- public/app/controllers/cms/Course.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'public/app/controllers/cms/Course.php') diff --git a/public/app/controllers/cms/Course.php b/public/app/controllers/cms/Course.php index c795ab9..47eac5f 100644 --- a/public/app/controllers/cms/Course.php +++ b/public/app/controllers/cms/Course.php @@ -68,6 +68,12 @@ class Course { Render::file($real_path, $media_type); } + } else { + Render::view('error/404', [ + 'error_code' => 403, + 'moto' => 'Forbidden', + 'message' => '' + ]); } } @@ -85,7 +91,9 @@ class Course { $medias = Cache_service::files_attributes(); foreach($medias as $key => $medi) { + if ($medi['path'] == $path) { + return $medi; } } -- cgit v1.2.3