Revert "(bug #2040) This prevent users to post empty suggestions, and post the same...
authorJean-André Santoni <jeanandre.santoni@biblibre.com>
Tue, 7 Jul 2009 09:57:27 +0000 (11:57 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Mon, 13 Jul 2009 10:43:40 +0000 (12:43 +0200)
This reverts commit 1669201a7a02af4ce3bd7d36b59aa44e3a3bcd73.

C4/Suggestions.pm
opac/opac-suggestions.pl

index 1f9daef..1732540 100644 (file)
@@ -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
index bef3e9f..b739817 100755 (executable)
@@ -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" ) {