Bug Fixing Suggestions.pm : using ordernumber
authorPaul Poulain <paul.poulain@biblibre.com>
Sun, 13 Sep 2009 21:46:51 +0000 (23:46 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 30 Sep 2009 09:30:30 +0000 (11:30 +0200)
C4/Suggestions.pm

index df1bec3..d67f09a 100644 (file)
@@ -406,7 +406,7 @@ connect a suggestion to an existing biblio
 =cut
 
 sub ConnectSuggestionAndBiblio {
-    my ($ordernumber,$biblionumber) = @_;
+    my ($suggestionid,$biblionumber) = @_;
     my $dbh=C4::Context->dbh;
     my $query = "
         UPDATE suggestions
@@ -426,7 +426,7 @@ Delete a suggestion. A borrower can delete a suggestion only if he is its owner.
 =cut
 
 sub DelSuggestion {
-    my ($borrowernumber,$ordernumber,$type) = @_;
+    my ($borrowernumber,$suggestionid,$type) = @_;
     my $dbh = C4::Context->dbh;
     # check that the suggestion comes from the suggestor
     my $query = "
@@ -435,7 +435,7 @@ sub DelSuggestion {
         WHERE  suggestionid=?
     ";
     my $sth = $dbh->prepare($query);
-    $sth->execute($ordernumber);
+    $sth->execute($suggestionid);
     my ($suggestedby) = $sth->fetchrow;
     if ($type eq "intranet" || $suggestedby eq $borrowernumber ) {
         my $queryDelete = "