fix: fix missing mod image after submitting the mod
This commit is contained in:
parent
85b235e047
commit
41f067f10a
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
$errorMessage = "An unexpected error occurred while uploading the cover image.";
|
$errorMessage = "An unexpected error occurred while uploading the cover image.";
|
||||||
}
|
}
|
||||||
if (!$fileError) {
|
if (!$fileError) {
|
||||||
$uploadedCoverImagePathname = $modPendingUploadDirectory . '/' . str_replace(['/', '\\'], '', $modDataToEdit['slug']) . '.' . $fileExtension;
|
$uploadedCoverImagePathname = $modPendingUploadDirectory . '/' . str_replace(['/', '\\'], '', $slug) . '.' . $fileExtension;
|
||||||
if (!move_uploaded_file($fileTmpPath, $uploadedCoverImagePathname)) {
|
if (!move_uploaded_file($fileTmpPath, $uploadedCoverImagePathname)) {
|
||||||
$fileError = true;
|
$fileError = true;
|
||||||
$errorMessage = "An unexpected error occurred while uploading the cover image.";
|
$errorMessage = "An unexpected error occurred while uploading the cover image.";
|
||||||
|
@ -255,4 +255,4 @@ if ($modSubmitted) {
|
||||||
sendEmail($moderators, 'A mod has been submitted that requires approval', "A mod has been submitted that requires approval:\n\nMod name: " . str_replace(["\r\n", "\r", "\n"], '', $_POST['name']) . "\nSlug: " . $slug . "\n\nPlease review the mod and approve or reject it.");
|
sendEmail($moderators, 'A mod has been submitted that requires approval', "A mod has been submitted that requires approval:\n\nMod name: " . str_replace(["\r\n", "\r", "\n"], '', $_POST['name']) . "\nSlug: " . $slug . "\n\nPlease review the mod and approve or reject it.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue