[open-ils-commits] [GIT] Evergreen ILS branch master updated. efb83e6c54b0cbd00415b23eab0376c130953247

Evergreen Git git at git.evergreen-ils.org
Thu Feb 2 09:09:48 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  efb83e6c54b0cbd00415b23eab0376c130953247 (commit)
      from  3f7a75e6d0f5507db0b34bec09db9c00cd94d6aa (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit efb83e6c54b0cbd00415b23eab0376c130953247
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Feb 1 16:58:45 2012 -0500

    TPAC: Avoid hold placement problems à la 80d5c4a4
    
    A commit written in October and merged quickly (80d5c4a4) was designed
    to avoid problems with a middle layer method that sometimes returns hash
    refs and sometimes returns array refs.
    
    A commit written in September but not merged until January (a663dfed)
    affected neighboring code, but was not aware of the other code to dance
    around hash refs and array refs (just read the commit messages of each
    to see what I mean, with attention to the changes in
    WWW/EGCatLoader/Account.pm).
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

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 7b0c1a1..489594c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -893,15 +893,22 @@ sub attempt_hold_placement {
 
                     if (ref $result eq 'HASH') {
                         $hdata->{hold_failed_event} = $result->{last_event};
+
+                        if ($result->{age_protected_copy}) {
+                            $hdata->{could_override} = 1;
+                            $hdata->{age_protect} = 1;
+                        } else {
+                            $hdata->{could_override} = $self->test_could_override($hdata->{hold_failed_event});
+                        }
                     } elsif (ref $result eq 'ARRAY') {
-                        $hdata->{hold_failed_event} = pop @$result;
-                    }
+                        $hdata->{hold_failed_event} = $result->[0];
 
-                    if($result->{age_protected_copy}) {
-                        $hdata->{could_override} = 1;
-                        $hdata->{age_protect} = 1;
-                    } else {
-                        $hdata->{could_override} = $self->test_could_override($hdata->{hold_failed_event});
+                        if ($result->[3]) { # age_protect_only
+                            $hdata->{could_override} = 1;
+                            $hdata->{age_protect} = 1;
+                        } else {
+                            $hdata->{could_override} = $self->test_could_override($hdata->{hold_failed_event});
+                        }
                     }
                 }
             }

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/WWW/EGCatLoader/Account.pm         |   21 +++++++++++++------
 1 files changed, 14 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list