This commit is contained in:
2021-03-16 12:46:44 +01:00
parent 8162c89051
commit 67ac104b4b
15 changed files with 56 additions and 61 deletions
@@ -15,13 +15,13 @@ function ZipFileHandler(string $gameFileName, string $gameFileTmp){
if(in_array($headerType,$headerTypeMatch)){
$gameFileNewName = uniqid("", true). "." . $fileActualExtGame;
if(empty($gameFileName)){
header("location: ../../../Frontend/index.php?error=emptyFile");
header("location: ../../../Frontend/index.html?error=emptyFile");
exit();
}
rename($gameFileTmp,"../../Games/".$gameFileNewName);
return $gameFileNewName;
}else{
header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type");
header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type");
}
return NULL;
}
@@ -41,13 +41,13 @@ function imagesFileHandler(string $thumbnailFileName, string $thumbnailFileTmp){
if(in_array($headerType,$headerTypeMatch)){
$thumbnailFileNewName = uniqid("", true). "." . $fileActualExtThumb;
if(empty($thumbnailFileName)){
header("location: ../../../Frontend/index.php?error=emptyFile");
header("location: ../../../Frontend/index.html?error=emptyFile");
exit();
}
rename($thumbnailFileTmp,"../../../Frontend/images/".$thumbnailFileNewName);
return $thumbnailFileNewName;
}else{
header("location: location: ../../../Frontend/index.php?error=Wrong%20File%20Type");
header("location: location: ../../../Frontend/index.html?error=Wrong%20File%20Type");
}
return NULL;
}