Revert "fix names??"

This reverts commit 3f1633733b0091356916aac3c176c2f4537aac01.
This commit is contained in:
Lain Iwakura 2025-07-24 07:12:56 +03:00
parent 944f240e89
commit 89a5905982
No known key found for this signature in database
GPG Key ID: C7C18257F2ADC6F8
2 changed files with 9 additions and 9 deletions

View File

@ -14,8 +14,6 @@ $config = require 'config.php';
$boardId = $_GET['board'] ?? 'b';
$threadId = isset($_GET['thread']) ? urldecode($_GET['thread']) : null;
try {
$db = new PDO(
"mysql:host={$config['db']['host']};dbname={$config['db']['name']}",
@ -130,7 +128,7 @@ if ($threadId) {
$posts = $stmt->fetchAll(PDO::FETCH_ASSOC);
if (empty($posts)) {
header('Location: board.php?board=' . urlencode($boardId));
header('Location: board.php?board=' . $boardId);
exit;
}
} catch (PDOException $e) {

View File

@ -96,13 +96,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
');
$stmt->execute([$threadId, $boardId, $title, $description, $fileName, $fileSize, $fileType, $ip, $anonymousId]);
if ($message) {
$stmt = $db->prepare('
INSERT INTO posts (post_id, thread_id, board_id, message, file_name, file_size, file_type, ip_address, anonymous_id)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
INSERT INTO posts (post_id, thread_id, board_id, message, ip_address, anonymous_id)
VALUES (?, ?, ?, ?, ?, ?)
');
$stmt->execute([$postId, $threadId, $boardId, $message, $fileName, $fileSize, $fileType, $ip, $anonymousId]);
$stmt->execute([$postId, $threadId, $boardId, $message, $ip, $anonymousId]);
}
header('Location: board.php?board=' . urlencode($boardId) . '&thread=' . urlencode($threadId));
header('Location: board.php?board=' . $boardId . '&thread=' . $threadId);
exit;
}
} else {