error segment

This commit is contained in:
CHIEFSOFT\ameye
2023-11-05 07:43:06 -05:00
parent 60f6f2133f
commit 0b9b9a3b13
2 changed files with 10 additions and 6 deletions
+10 -6
View File
@@ -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