From c7effbe20900edb883501db7be77698fe4b92945 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 8 Jun 2010 10:20:27 +0200 Subject: [PATCH] MT3667 followup MT3811 : unexpected issues not stored As a consequence of previous MT3667 patch, the subscriptionid list was processed. And unfortunately, since array order is the only relevant information from HTML processing, it caused subscriptionid to be null for a double edition. This patch only uses uniq for serials-collection and when passing information to serials-collection page. Signed-off-by: Colin Campbell --- serials/serials-collection.pl | 4 +++- serials/serials-edit.pl | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index 23e2abc831..5cf57ed6f3 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -28,6 +28,7 @@ use C4::Serials; use C4::Letters; use C4::Output; use C4::Context; +use List::MoreUtils qw/uniq/; my $query = new CGI; @@ -46,7 +47,8 @@ my ($template, $loggedinuser, $cookie); my $biblionumber = $query->param('biblionumber'); my @subscriptionid = $query->param('subscriptionid'); -my $subscriptiondescs ; +@subscriptionid= uniq @subscriptionid; +my $subscriptiondescs; my $subscriptions; if($op eq 'gennext' && @subscriptionid){ diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index a2e4713e9b..b79da4b3a7 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -86,7 +86,6 @@ my $op = $query->param('op'); if ( scalar(@subscriptionids) == 1 && index( $subscriptionids[0], q|,| ) > 0 ) { @subscriptionids = split( /,/, $subscriptionids[0] ); } -my @subscriptionids=uniq @subscriptionids; my @errors; my @errseq; @@ -104,8 +103,7 @@ unless (@serialids) { } unless ( scalar(@serialids) ) { - my $string = - "serials-collection.pl?subscriptionid=" . join( ",", @subscriptionids ); + my $string = "serials-collection.pl?subscriptionid=" . join( ",", uniq @subscriptionids ); $string =~ s/,$//; print $query->redirect($string); -- 2.39.5