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

Evergreen Git git at git.evergreen-ils.org
Tue Jan 31 14:27:55 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  d165b4ed70d06b4170f4e24cd75a2b31c6fdcc05 (commit)
      from  575ce3ca19612007003c1c31c4be3c30077b2d12 (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 d165b4ed70d06b4170f4e24cd75a2b31c6fdcc05
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Jan 23 17:04:01 2012 -0500

    TPac: avoid SMS org setting check for non-SMS pages
    
    Avoid an unnecessary org unit setting lookup on a large swath of
    (mostly myopac) pages.  Instead, check to see if the current page is the
    SMS page in question and the lookup is necessary before making the
    lookup.
    
    This change also inserts the physical location as the first org unit to
    use in the org setting test.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index b19b8bc..0a1fd65 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -128,10 +128,10 @@ sub load {
         );
     }
 
-    my $org_unit = $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
-    my $skip_sms_auth = $self->ctx->{get_org_setting}->($org_unit, 'sms.disable_authentication_requirement.callnumbers');
-    if ($skip_sms_auth) {
-        return $self->load_sms_cn if $path =~ m|opac/sms_cn|;
+    if ($path =~ m|opac/sms_cn| and !$self->editor->requestor) {
+        my $org_unit = $self->ctx->{physical_loc} || $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
+        my $skip_sms_auth = $self->ctx->{get_org_setting}->($org_unit, 'sms.disable_authentication_requirement.callnumbers');
+        return $self->load_sms_cn if $skip_sms_auth;
     }
 
     # ----------------------------------------------------------------

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list