summaryrefslogtreecommitdiff
path: root/public/app/controllers/cms/Course.php
diff options
context:
space:
mode:
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;
}
}