View | Details | Raw Unified | Return to bug 3144
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (+6 lines)
Lines 82-87 Link Here
82
                                            <label for="note">Notes:</label>
82
                                            <label for="note">Notes:</label>
83
                                            <textarea name="note" id="note" rows="5" cols="40"></textarea>
83
                                            <textarea name="note" id="note" rows="5" cols="40"></textarea>
84
                                        </li>
84
                                        </li>
85
86
                                        <!--  BZ 3144, add a hidden 'negcap' field -->
87
                                        <li id="negcap" style="position: absolute; left: -2000px;">
88
                                            negcap <input type="text" name="negcap"/>
89
                                        </li>
90
85
                                    </ol>
91
                                    </ol>
86
                                </fieldset>
92
                                </fieldset>
87
                                <fieldset class="action">
93
                                <fieldset class="action">
(-)a/opac/opac-suggestions.pl (-1 / +8 lines)
Lines 33-38 my $input = new CGI; Link Here
33
my $allsuggestions  = $input->param('showall');
33
my $allsuggestions  = $input->param('showall');
34
my $op              = $input->param('op');
34
my $op              = $input->param('op');
35
my $suggestion      = $input->Vars;
35
my $suggestion      = $input->Vars;
36
my $negcaptcha       = $input->param('negcap');
37
38
# BZ 3144 - if a spambot accidentally populates the 'negcap' field in the sugesstions form, then silently skip and return.
39
if ($negcaptcha ) {
40
    print $input->redirect("/cgi-bin/koha/opac-suggestions.pl");
41
    exit;
42
}
43
36
delete $$suggestion{$_} foreach qw<op suggestedbyme>;
44
delete $$suggestion{$_} foreach qw<op suggestedbyme>;
37
$op = 'else' unless $op;
45
$op = 'else' unless $op;
38
46
39
- 

Return to bug 3144