|
Lines 47-56
my $need_confirm = 0;
Link Here
|
| 47 |
if ($negcaptcha ) { |
47 |
if ($negcaptcha ) { |
| 48 |
print $input->redirect("/cgi-bin/koha/opac-suggestions.pl"); |
48 |
print $input->redirect("/cgi-bin/koha/opac-suggestions.pl"); |
| 49 |
exit; |
49 |
exit; |
| 50 |
} else { |
|
|
| 51 |
# don't pass 'negcap' column to DB, else DBI::Class will error |
| 52 |
# DBIx::Class::Row::store_column(): No such column 'negcap' on Koha::Schema::Result::Suggestion at Koha/C4/Suggestions.pm |
| 53 |
delete $suggestion->{negcap}; |
| 54 |
} |
50 |
} |
| 55 |
|
51 |
|
| 56 |
#If suggestions are turned off we redirect to 404 error. This will also redirect guest suggestions |
52 |
#If suggestions are turned off we redirect to 404 error. This will also redirect guest suggestions |
|
Lines 59-67
if ( ! C4::Context->preference('suggestion') ) {
Link Here
|
| 59 |
exit; |
55 |
exit; |
| 60 |
} |
56 |
} |
| 61 |
|
57 |
|
| 62 |
delete $suggestion->{$_} foreach qw<op suggested_by_anyone confirm>; |
|
|
| 63 |
$op = 'else' unless $op; |
| 64 |
|
| 65 |
my ( $template, $borrowernumber, $cookie, @messages ); |
58 |
my ( $template, $borrowernumber, $cookie, @messages ); |
| 66 |
my $deleted = $input->param('deleted'); |
59 |
my $deleted = $input->param('deleted'); |
| 67 |
my $submitted = $input->param('submitted'); |
60 |
my $submitted = $input->param('submitted'); |
|
Lines 87-92
else {
Link Here
|
| 87 |
); |
80 |
); |
| 88 |
} |
81 |
} |
| 89 |
|
82 |
|
|
|
83 |
# don't pass 'negcap' column to DB, else DBI::Class will error |
| 84 |
# DBIx::Class::Row::store_column(): No such column 'negcap' on Koha::Schema::Result::Suggestion at Koha/C4/Suggestions.pm |
| 85 |
delete $suggestion->{negcap}; |
| 86 |
delete $suggestion->{$_} foreach qw<op suggested_by_anyone confirm>; |
| 87 |
$op = 'else' unless $op; |
| 88 |
|
| 90 |
if ( $op eq 'else' ) { |
89 |
if ( $op eq 'else' ) { |
| 91 |
if ( C4::Context->preference("OPACViewOthersSuggestions") ) { |
90 |
if ( C4::Context->preference("OPACViewOthersSuggestions") ) { |
| 92 |
if ( $borrowernumber ) { |
91 |
if ( $borrowernumber ) { |
| 93 |
- |
|
|