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

Evergreen Git git at git.evergreen-ils.org
Mon Oct 31 10:02:47 EDT 2011


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  84d3f4d0724183b3b8c506f90a30993d596df9a7 (commit)
      from  6f75dd2839cc76e01141ef547e8b0e80cdbd4c87 (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 84d3f4d0724183b3b8c506f90a30993d596df9a7
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Fri Oct 28 13:49:42 2011 -0400

    Tpac: Rename orig_loc to physical_loc, for clarity's sake.
    
    This is an OPAC parameter not so much meant for use by patrons at home,
    but for users at machines physically located in libraries.  In
    conjunction with OpenILS::WWW::Redirector, it helps those machines
    "remember" what branch they're in.
    
    Anyway, the name orig_loc doesn't make the parameter's meaning quite as
    clear as it could whne you encounter it in code.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Bill Erickson <berick 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 122f08c..4a50820 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -25,7 +25,7 @@ use OpenILS::WWW::EGCatLoader::Container;
 my $U = 'OpenILS::Application::AppUtils';
 
 use constant COOKIE_SES => 'ses';
-use constant COOKIE_ORIG_LOC => 'eg_orig_loc';
+use constant COOKIE_PHYSICAL_LOC => 'eg_physical_loc';
 
 use constant COOKIE_ANON_CACHE => 'anoncache';
 use constant ANON_CACHE_MYLIST => 'mylist';
@@ -220,7 +220,7 @@ sub load_common {
     $ctx->{unparsed_uri} = $self->apache->unparsed_uri;
     $ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
     $ctx->{is_staff} = 0; # Assume false, check for workstation id later.  Was: ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
-    $ctx->{orig_loc} = $self->get_orig_loc;
+    $ctx->{physical_loc} = $self->get_physical_loc;
 
     # capture some commonly accessed pages
     $ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
@@ -252,24 +252,24 @@ sub load_common {
     return Apache2::Const::OK;
 }
 
-# orig_loc (i.e. "original location") passed in as a URL 
-# param will replace any existing orig_loc stored as a cookie.
-sub get_orig_loc {
+# physical_loc (i.e. "original location") passed in as a URL 
+# param will replace any existing physical_loc stored as a cookie.
+sub get_physical_loc {
     my $self = shift;
 
-    if(my $orig_loc = $self->cgi->param('orig_loc')) {
+    if(my $physical_loc = $self->cgi->param('physical_loc')) {
         $self->apache->headers_out->add(
             "Set-Cookie" => $self->cgi->cookie(
-                -name => COOKIE_ORIG_LOC,
+                -name => COOKIE_PHYSICAL_LOC,
                 -path => $self->ctx->{base_path},
-                -value => $orig_loc,
+                -value => $physical_loc,
                 -expires => undef
             )
         );
-        return $orig_loc;
+        return $physical_loc;
     }
 
-    return $self->cgi->cookie(COOKIE_ORIG_LOC);
+    return $self->cgi->cookie(COOKIE_PHYSICAL_LOC);
 }
 
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
index 9b21d56..0f714c9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
@@ -182,9 +182,9 @@ sub mk_copy_query {
     };
 
     # XXX In the future, $sort_org should be understood to be an abstration
-    # that refers to something configurable, not necessariyl orig_loc.
+    # that refers to something configurable, not necessariyl physical_loc.
 
-    if (my $sort_org = $self->ctx->{orig_loc}) {
+    if (my $sort_org = $self->ctx->{physical_loc}) {
         unshift @{$query->{order_by}}, {
             class => 'acp', field => 'circ_lib', transform => 'numeric_eq',
             params => [$sort_org], direction => 'desc'
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
index eb5d7ea..93f90b6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
@@ -300,7 +300,7 @@ sub check_1hit_redirect {
         $sname = 'opac.patron.jump_to_details_on_single_hit';
         $org = ($ctx->{user}) ? 
             $ctx->{user}->home_ou : 
-            $ctx->{orig_loc} || 
+            $ctx->{physical_loc} || 
             $self->ctx->{aou_tree}->()->id;
     }
 
@@ -491,7 +491,7 @@ sub get_staff_search_settings {
     }
 
     my $sss_size = $self->ctx->{get_org_setting}->(
-        $self->ctx->{orig_loc} || $self->ctx->{aou_tree}->()->id,
+        $self->ctx->{physical_loc} || $self->ctx->{aou_tree}->()->id,
         "opac.staff_saved_search.size",
     );
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
index 560ccc6..01d57f4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm
@@ -66,7 +66,7 @@ sub handler {
 	my $depth = $apache->dir_config('OILSRedirectDepth');
 	my $locale = $apache->dir_config('OILSRedirectLocale') || 'en-US';
     my $use_tt = ($apache->dir_config('OILSRedirectTpac') || '') =~ /true/i;
-    my $orig_loc;
+    my $physical_loc;
 
     $apache->log->debug("Redirector sees client frim $user_ip");
 
@@ -80,7 +80,7 @@ sub handler {
 		if ($nhostname =~ m/[^\s]/) { $hostname = $nhostname; }
 
         if($org_cache{$shortname}) {
-            $orig_loc = $org_cache{$shortname};
+            $physical_loc = $org_cache{$shortname};
 
         } else {
 
@@ -89,7 +89,7 @@ sub handler {
                 'open-ils.actor.org_unit.retrieve_by_shortname',
 			    $shortname)->gather(1);
 
-            $org_cache{$shortname} = $orig_loc = $org->id if $org;
+            $org_cache{$shortname} = $physical_loc = $org->id if $org;
         }
 	}
 
@@ -98,7 +98,7 @@ sub handler {
     if($use_tt) {
 
         $url .= "/eg/opac/home";
-        $url .= "?orig_loc=$orig_loc" if $orig_loc;
+        $url .= "?physical_loc=$physical_loc" if $physical_loc;
 
 =head1 potential locale/skin implementation
 
@@ -127,8 +127,8 @@ sub handler {
 
     } else {
         $url .= "/opac/$locale/skin/$skin/xml/index.xml";
-        if($orig_loc) {
-            $url .= "?ol=" . $orig_loc;
+        if($physical_loc) {
+            $url .= "?ol=" . $physical_loc;
             $url .= "&d=$depth" if defined $depth;
         }
     }

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

Summary of changes:
 .../src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm    |   20 ++++++++++----------
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm |    4 ++--
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm |    4 ++--
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Redirect.pm  |   12 ++++++------
 4 files changed, 20 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list