From: Jean-André Santoni Date: Tue, 7 Jul 2009 09:57:27 +0000 (+0200) Subject: Revert "(bug #2040) This prevent users to post empty suggestions, and post the same... X-Git-Tag: n_acq_a_porter~9 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=175e4edff026414927ef2037cf103cf8e7991c5b Revert "(bug #2040) This prevent users to post empty suggestions, and post the same suggestion twice." This reverts commit 1669201a7a02af4ce3bd7d36b59aa44e3a3bcd73. --- diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 1f9daef177..17325401ea 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -331,17 +331,15 @@ Insert a new suggestion on database with value given on input arg. sub NewSuggestion { my ($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,$biblionumber,$reason) = @_; - if ($title) { - my $dbh = C4::Context->dbh; - my $query = qq | - INSERT INTO suggestions - (status,suggestedby,title,author,publishercode,note,copyrightdate, - volumedesc,publicationyear,place,isbn,biblionumber,reason) - VALUES ('ASKED',?,?,?,?,?,?,?,?,?,?,?,?) - |; - my $sth = $dbh->prepare($query); - $sth->execute($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,$biblionumber,$reason); - } + my $dbh = C4::Context->dbh; + my $query = qq | + INSERT INTO suggestions + (status,suggestedby,title,author,publishercode,note,copyrightdate, + volumedesc,publicationyear,place,isbn,biblionumber,reason) + VALUES ('ASKED',?,?,?,?,?,?,?,?,?,?,?,?) + |; + my $sth = $dbh->prepare($query); + $sth->execute($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,$biblionumber,$reason); } =head2 ModStatus diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index bef3e9f0a9..b739817c95 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -84,8 +84,6 @@ if ( $op eq "add_confirm" ) { $place = ''; $isbn = ''; $op = 'else'; - - print $input->redirect('/cgi-bin/koha/opac-suggestions.pl'); } if ( $op eq "delete_confirm" ) {