error segment
This commit is contained in:
@@ -51,12 +51,16 @@ class WrenchMedia extends BaseController
|
||||
$fileSection = $uriSegments[$segLen-2];
|
||||
$fileUID = $uriSegments[$segLen-1];
|
||||
|
||||
$supportedSections = ['profile'=>100,'myfile'=>200,'contracts'=>300,'family'=>400];
|
||||
if (!in_array($fileSection, $supportedSections)) {
|
||||
// section not supported
|
||||
// return;
|
||||
$supportedSections = ['profile'=>100,'myfile'=>200,'contracts'=>300,'family'=>400,'jobs'=>500];
|
||||
if (!array_key_exists($fileSection, $supportedSections)) {
|
||||
$file = 'error.png';
|
||||
header('Content-Type: image/png');
|
||||
readfile($file);
|
||||
exit();
|
||||
}
|
||||
else{
|
||||
// echo "all good";
|
||||
}
|
||||
|
||||
/*
|
||||
* VERIFY ALL PARAMETERS ARE GOOD
|
||||
#define WRENCH_FILE_PROFILE 100
|
||||
@@ -78,7 +82,7 @@ class WrenchMedia extends BaseController
|
||||
readfile($file);
|
||||
|
||||
exit();
|
||||
|
||||
|
||||
|
||||
//We can check cache for the file or
|
||||
// OR
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user