@@ -195,3 +195,7 @@ label.confirmation,
.comments .more {
font-weight: normal;
}
+
+#id_website {
+ display: none;
+}
@@ -117,7 +117,8 @@ if (check_token()) {
list($ret, $output) = pkgreq_close($_POST['reqid'], $_POST['reason'], $_POST['comments']);
} elseif (current_action("do_EditComaintainers")) {
list($ret, $output) = pkgbase_set_comaintainers($base_id, explode("\n", $_POST['users']));
- } elseif (current_action("do_AddComment")) {
+ } elseif (current_action("do_AddComment") && $_REQUEST['website'] === "") {
+ // website is a hidden field used to detect if a bot filled in all form elements
$uid = uid_from_sid($_COOKIE["AURSID"]);
list($ret, $output) = pkgbase_add_comment($base_id, $uid, $_REQUEST['comment']);
if ($ret && isset($_REQUEST['enable_notifications'])) {
@@ -11,6 +11,7 @@
<p>
<textarea id="id_comment" name="comment" cols="80" rows="10"><?= (isset($comment_id)) ? htmlspecialchars($comment) : "" ?></textarea>
</p>
+ <input id="id_website" type="text" name="website"/>
<p>
<input type="submit" value="<?= (isset($comment_id)) ? __("Save") : __("Add Comment") ?>" />
<?php if (!isset($comment_id) && !pkgbase_user_notify($uid, $base_id)): ?>