summaryrefslogtreecommitdiff
path: root/public/app/controllers/cms/Course.php
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 01:55:12 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-04-27 01:55:12 +0300
commit6e749800d8a9f6b77bf50be92a70b7916c2804f3 (patch)
tree3d6ba2eb67fa11f228b756e0f84ef8ecb3f6ff34 /public/app/controllers/cms/Course.php
parent546daa78721e6abdbc89afcecc158118c2239865 (diff)
downloadclassroom-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.php8
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;
}
}