Public: fix comment form action path to avoid 404

This commit is contained in:
Alexander Andreev 2026-02-21 16:14:10 +03:00
parent ec64282d8a
commit 05c106226f

View File

@ -691,7 +691,7 @@ function outputWatermarked(string $path, string $mime): never
<h3 class="detail-comments-title">Комментарии</h3> <h3 class="detail-comments-title">Комментарии</h3>
<?php if ($viewer): ?> <?php if ($viewer): ?>
<form class="js-comment-form comment-form" method="post" action="?photo_id=<?= (int)$photo['id'] ?><?= $isTopicMode ? '&topic_id=' . $activeTopicId : '&section_id=' . (int)$detailSectionId ?><?= $viewerToken!=='' ? '&viewer=' . urlencode($viewerToken) : '' ?>"> <form class="js-comment-form comment-form" method="post" action="index.php?photo_id=<?= (int)$photo['id'] ?><?= $isTopicMode ? '&topic_id=' . $activeTopicId : '&section_id=' . (int)$detailSectionId ?><?= $viewerToken!=='' ? '&viewer=' . urlencode($viewerToken) : '' ?>">
<input type="hidden" name="action" value="add_comment"> <input type="hidden" name="action" value="add_comment">
<input type="hidden" name="photo_id" value="<?= (int)$photo['id'] ?>"> <input type="hidden" name="photo_id" value="<?= (int)$photo['id'] ?>">
<input type="hidden" name="section_id" value="<?= $isSectionMode ? (int)$detailSectionId : 0 ?>"> <input type="hidden" name="section_id" value="<?= $isSectionMode ? (int)$detailSectionId : 0 ?>">