[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 97d89ddf5022b415d91a2fe2e1e6c54f3a2f4d79

Evergreen Git git at git.evergreen-ils.org
Wed Aug 15 13:54:59 EDT 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, rel_2_2 has been updated
       via  97d89ddf5022b415d91a2fe2e1e6c54f3a2f4d79 (commit)
      from  13869d72c78dae42b9a43beeed40a557f0513e13 (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 97d89ddf5022b415d91a2fe2e1e6c54f3a2f4d79
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Tue Apr 10 09:10:46 2012 -0400

    SuperCat fixes - Child Init
    
    Sometimes it seems that child_init has not run properly for supercat.
    
    This attempts to fix that by checking for the global appsession objects. If
    they are not there we run child_init. The function that does this is being
    called from all handler entry functions.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index f47ad27..bc33b81 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -273,6 +273,14 @@ sub child_init {
     }
 }
 
+sub check_child_init() {
+    if (!defined $supercat || !defined $actor || !defined $search) {
+        # For some reason one (or more) of our appsessions is missing....
+        # So init!
+        child_init();
+    }
+}
+
 =head2 parse_feed_type($type)
 
 Determines whether and how a given feed type needs to be "fleshed out"
@@ -367,6 +375,8 @@ sub oisbn {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     (my $isbn = $apache->path_info) =~ s{^.*?([^/]+)$}{$1}o;
 
     my $list = $supercat
@@ -398,6 +408,8 @@ sub unapi {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
 
     my $add_path = 0;
@@ -727,6 +739,8 @@ sub supercat {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
 
     my $add_path = 0;
@@ -966,6 +980,8 @@ sub bookbag_feed {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
 
     my $year = (gmtime())[5] + 1900;
@@ -1056,6 +1072,8 @@ sub changes_feed {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
 
     my $year = (gmtime())[5] + 1900;
@@ -1203,6 +1221,8 @@ sub opensearch_feed {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
     my $year = (gmtime())[5] + 1900;
 
@@ -1518,6 +1538,8 @@ sub string_browse {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
     my $year = (gmtime())[5] + 1900;
 
@@ -1601,6 +1623,8 @@ sub string_startwith {
     my $apache = shift;
     return Apache2::Const::DECLINED if (-e $apache->filename);
 
+    check_child_init();
+
     my $cgi = new CGI;
     my $year = (gmtime())[5] + 1900;
 
@@ -1812,6 +1836,8 @@ my $ex_doc;
 sub sru_search {
     my $cgi = new CGI;
 
+    check_child_init();
+
     my $req = SRU::Request->newFromCGI( $cgi );
     my $resp = SRU::Response->newFromRequest( $req );
 
@@ -2022,6 +2048,8 @@ my $auth_ex_doc;
 sub sru_auth_search {
     my $cgi = new CGI;
 
+    check_child_init();
+
     my $req = SRU::Request->newFromCGI( $cgi );
     my $resp = SRU::Response->newFromRequest( $req );
 

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

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm |   28 +++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list