[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /auth lonacc.pm /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 07 Apr 2006 22:42:38 -0000


albertel		Fri Apr  7 18:42:38 2006 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
    /loncom/lonnet/perl	lonnet.pm 
    /loncom	loncapa_apache.conf 
  Log:
  - moving hadnler routines out of lonnet into lonacc
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.74 loncom/auth/lonacc.pm:1.75
--- loncom/auth/lonacc.pm:1.74	Wed Apr  5 18:39:55 2006
+++ loncom/auth/lonacc.pm	Fri Apr  7 18:42:00 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.74 2006/04/05 22:39:55 albertel Exp $
+# $Id: lonacc.pm,v 1.75 2006/04/07 22:42:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -38,6 +38,19 @@
 use CGI::Cookie();
 use Fcntl qw(:flock);
 
+sub cleanup {
+    my ($r)=@_;
+    if (! $r->is_initial_req()) { return DECLINED; }
+    &Apache::lonnet::save_cache();
+    return OK;
+}
+
+sub goodbye {
+    my ($r)=@_;
+    &Apache::lonnet::goodbye();
+    return DONE;
+}
+
 sub handler {
     my $r = shift;
     my $requrl=$r->uri;
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.727 loncom/lonnet/perl/lonnet.pm:1.728
--- loncom/lonnet/perl/lonnet.pm:1.727	Thu Apr  6 16:27:35 2006
+++ loncom/lonnet/perl/lonnet.pm	Fri Apr  7 18:42:32 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.727 2006/04/06 20:27:35 raeburn Exp $
+# $Id: lonnet.pm,v 1.728 2006/04/07 22:42:32 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -45,7 +45,6 @@
 
 use IO::Socket;
 use GDBM_File;
-use Apache::Constants qw(:common :http);
 use HTML::LCParser;
 use HTML::Parser;
 use Fcntl qw(:flock);
@@ -852,12 +851,9 @@
 }
 
 sub save_cache {
-    my ($r)=@_;
-    if (! $r->is_initial_req()) { return DECLINED; }
     &purge_remembered();
     #&Apache::loncommon::validate_page();
     undef(%env);
-    return OK;
 }
 
 my $to_remember=-1;
@@ -6525,7 +6521,6 @@
    &logthis(sprintf("%-20s is %s",'hits',$hits));
    &flushcourselogs();
    &logthis("Shutting down");
-   return DONE;
 }
 
 BEGIN {
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.128 loncom/loncapa_apache.conf:1.129
--- loncom/loncapa_apache.conf:1.128	Fri Apr  7 18:28:57 2006
+++ loncom/loncapa_apache.conf	Fri Apr  7 18:42:38 2006
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.128 2006/04/07 22:28:57 albertel Exp $
+## $Id: loncapa_apache.conf,v 1.129 2006/04/07 22:42:38 albertel Exp $
 ##
 
 #
@@ -43,7 +43,7 @@
 # ------------------------------------------------------------- Access Handlers
 
 PerlTransHandler	Apache::lontrans
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 
 PerlAuthenHandler Apache::checkauthen
 PerlSetVar lonOtherAuthen no
@@ -89,7 +89,7 @@
 <LocationMatch "^/+userfiles.*">
 PerlAccessHandler       Apache::lontokacc
 PerlCleanupHandler	Apache::lontokacc::removefile
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 </LocationMatch>
 
 <LocationMatch "^/+uploaded.*">
@@ -286,7 +286,7 @@
 SetHandler perl-script
 PerlHandler Apache::lonindexer
 PerlCleanupHandler Apache::lonindexer::cleanup
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 </LocationMatch>
 
 <LocationMatch "^/+(res|\~).*\.tex$">
@@ -542,7 +542,7 @@
 SetHandler perl-script
 PerlHandler Apache::lonpageflip
 PerlCleanupHandler Apache::lonpageflip::cleanup
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 ErrorDocument     406 /adm/roles
 ErrorDocument     403 /adm/login
 ErrorDocument	  500 /adm/errorhandler
@@ -555,7 +555,7 @@
 SetHandler perl-script
 PerlHandler Apache::lonambiguous
 PerlCleanupHandler Apache::lonambiguous::cleanup
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 ErrorDocument     403 /adm/login
 ErrorDocument	  500 /adm/errorhandler
 </Location>
@@ -916,7 +916,7 @@
 SetHandler perl-script
 PerlHandler Apache::londocs
 PerlCleanupHandler Apache::londocs::untiehash
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 ErrorDocument     403 /adm/login
 ErrorDocument	  500 /adm/errorhandler
 </Location>
@@ -997,7 +997,7 @@
 SetHandler perl-script
 PerlHandler Apache::lonsearchcat
 PerlCleanupHandler Apache::lonsearchcat::cleanup
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 ErrorDocument     403 /adm/login
 ErrorDocument     413 /adm/overloaded.txt
 ErrorDocument	  500 /adm/errorhandler
@@ -1032,7 +1032,7 @@
 SetHandler perl-script
 PerlHandler Apache::groupsort
 PerlCleanupHandler Apache::groupsort::cleanup
-PerlCleanupHandler	Apache::lonnet::save_cache
+PerlCleanupHandler	Apache::lonacc::cleanup
 ErrorDocument     403 /adm/login
 ErrorDocument	  500 /adm/errorhandler
 </Location>
@@ -1141,7 +1141,7 @@
 
 # ------------------------------------------------------- Shutting down a child
 
-PerlChildExitHandler Apache::lonnet::goodbye
+PerlChildExitHandler Apache::lonacc::goodbye
 
 #
 # LON-CAPA Section (extensions to access.conf permission configuration)