diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 01:55:12 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-04-27 01:55:12 +0300 |
| commit | 6e749800d8a9f6b77bf50be92a70b7916c2804f3 (patch) | |
| tree | 3d6ba2eb67fa11f228b756e0f84ef8ecb3f6ff34 /public/app/controllers/cms/Course.php | |
| parent | 546daa78721e6abdbc89afcecc158118c2239865 (diff) | |
| download | classroom-6e749800d8a9f6b77bf50be92a70b7916c2804f3.tar.gz classroom-6e749800d8a9f6b77bf50be92a70b7916c2804f3.tar.bz2 classroom-6e749800d8a9f6b77bf50be92a70b7916c2804f3.zip | |
hotfixes and optimizations
Diffstat (limited to 'public/app/controllers/cms/Course.php')
| -rw-r--r-- | public/app/controllers/cms/Course.php | 8 |
1 files changed, 8 insertions, 0 deletions
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; } } |
