Diff for /loncom/interface/loncss.pm between versions 1.3 and 1.9

version 1.3, 2006/06/28 16:04:34 version 1.9, 2011/05/27 21:53:41
Line 32  use Apache::lonnet; Line 32  use Apache::lonnet;
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::Constants qw(:common);  use Apache::Constants qw(:common);
 use POSIX qw(strftime);  use POSIX qw(strftime);
 use CGI::Cookie();  use LONCAPA;
   
 sub handler {  sub handler {
     my ($r) = @_;      my ($r) = @_;
Line 41  sub handler { Line 41  sub handler {
     $url =~ s{^/adm/css/}{};      $url =~ s{^/adm/css/}{};
     $url =~ s{ \.css $ }{}xms;       $url =~ s{ \.css $ }{}xms; 
               
     my ($uname,$udom,$timestamp,$function,$domain,$bgcolor) =       my ($uname,$udom,$version,$timestamp,$function,$domain,$bgcolor) = 
  split(':',$url);   split(':',$url);
   
     $r->content_type('text/css');      $r->content_type('text/css');
     my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime(time+600));      my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime(time+86400));
     $r->header_out("Expires" => $date);      $r->header_out("Expires" => $date);
       $r->header_out("Cache-Control" =>  "public, no-transform");
     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));      $r->send_http_header;
     my $lonidsdir=$r->dir_config('lonIDsDir');      
       my $handle = &Apache::lonnet::check_for_valid_session($r);
     my $handle;      if ($handle ne '' ) {
     if ($cookies{'lonID'}) {  
  $handle=$cookies{'lonID'}->value;  
         $handle=~s/\W//g;  
     }  
   
     if ($handle ne ''   
  && -e $r->dir_config('lonIDsDir')."/$handle.id") {  
  &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'),   &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'),
  $handle);   $handle);
     }      }

Removed from v.1.3  
changed lines
  Added in v.1.9


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>