From: Bill Erickson Date: Tue, 21 Feb 2012 16:47:34 +0000 (-0500) Subject: TPac: avoid showing replaced addresses X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dad78e0222d35454ae0b2e38e855b1ab49c1150b;p=evergreen%2Fjoelewis.git TPac: avoid showing replaced addresses Replaced (negative-id) addresses should never be visible to the patron. Remove them from the collected list of addrs. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 489594ce2f..fddb0edc0b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -34,6 +34,10 @@ sub prepare_extended_user_info { $e->rollback if $local_xact; + # discard replaced (negative-id) addresses. + $self->ctx->{user}->addresses([ + grep {$_->id > 0} @{$self->ctx->{user}->addresses} ]); + return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR unless $self->ctx->{user};