prepare("DELETE FROM mods_pending WHERE slug = ?"); if (!$statement) { $errorMessage = "An unexpected error occurred while discarding the mod."; } else { $modSlug = $modDataToDiscard['slug']; $statement->bind_param('s', $modSlug); if (!$statement->execute()) { $errorMessage = "An unexpected error occurred while discarding the mod."; } else { $modDiscarded = true; } $statement->close(); } } } } if (!$modDiscarded) { $pageTitle = "Discard pending mod"; $pageDescription = "Discard a pending SVR.JS mod in SVR.JS Mods directory."; } else { $pageTitle = "Mod discarded"; $pageDescription = "The pending mod has been discarded."; } include 'header.php'; ?>

Mod discarded

The pending mod has been discarded.

View pending mods

Discard mod

This action will discard the pending mod.

' . htmlspecialchars($errorMessage) . '

'; ?>
query("SELECT email AS address, username AS name FROM users WHERE is_moderator = 1;"); if ($moderatorResult) { $moderators = []; while ($moderator = $moderatorResult->fetch_assoc()) { array_push($moderators, $moderator); } sendEmail($moderators, 'A pending mod has been discarded', "A pending mod has been discarded:\n\nMod name: " . str_replace(["\r\n", "\r", "\n"], '', $modDataToDiscard['name']) . "\nSlug: " . $modDataToDiscard['slug'] . "\n\nNo action is required."); } } ?>