--- rat/lonpageflip.pm 2004/11/11 19:43:22 1.50 +++ rat/lonpageflip.pm 2005/02/17 09:09:57 1.51 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.50 2004/11/11 19:43:22 albertel Exp $ +# $Id: lonpageflip.pm,v 1.51 2005/02/17 09:09:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -26,17 +26,6 @@ # # http://www.lon-capa.org/ # -# (Page Handler -# -# (TeX Content Handler -# -# 05/29/00,05/30 Gerd Kortemeyer) -# 08/30,08/31,09/06,09/14,09/15,09/16,09/19,09/20,09/21,09/23, -# 10/02 Gerd Kortemeyer) -# -# 10/03,10/05,10/06,10/07,10/09,10/10,10/11,10/16,10/17, -# 11/14,11/16, -# 10/01/01,05/01,05/28,07/05 Gerd Kortemeyer package Apache::lonpageflip; @@ -190,9 +179,9 @@ sub handler { # ------------------------------------------- Set document type for header only if ($r->header_only) { - $r->content_type('text/html'); - $r->send_http_header; - return OK; + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + return OK; } my %cachehash=(); @@ -226,7 +215,6 @@ sub handler { ($murl,$id,$fn)=&Apache::lonnet::decode_symb(&Apache::lonnet::symbread($fn)); $id=$hash{'map_pc_'.&Apache::lonnet::clutter($murl)}.'.'.$id; $newloc=$hash{'src_'.$id}; - &Apache::lonnet::logthis(" hrrm 1 "); if ($newloc) { if ($hash{'encrypted_'.$id}) { $newloc=&Apache::lonenc::encrypted($newloc); } @@ -237,7 +225,7 @@ sub handler { } else { $newloc='/adm/noidea.html'; } - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$newloc); @@ -258,7 +246,7 @@ sub handler { if ($last) { $currenturl=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($last))[1]); } else { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.'/adm/noidea.html'); return REDIRECT; @@ -358,13 +346,13 @@ sub handler { &Apache::lonnet::appenv('user.criticalcheck.time'=>time); } - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$redirecturl); return REDIRECT; } else { # --------------------------------------------------------- There was a problem - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; if ($#possibilities>0) { my $bodytag=