[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Tue, 22 Nov 2005 22:33:02 -0000
foxr Tue Nov 22 17:33:02 2005 EDT
Modified files:
/loncom/interface loncommon.pm
Log:
Require that the request be defined in content_type before calling
no_cache as printout.pl (e.g.) invokes content_type with undef for the
request.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.298 loncom/interface/loncommon.pm:1.299
--- loncom/interface/loncommon.pm:1.298 Mon Nov 21 19:01:41 2005
+++ loncom/interface/loncommon.pm Tue Nov 22 17:33:01 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.298 2005/11/22 00:01:41 raeburn Exp $
+# $Id: loncommon.pm,v 1.299 2005/11/22 22:33:01 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3486,7 +3486,10 @@
sub content_type {
my ($r,$type,$charset) = @_;
- &no_cache($r);
+ if ($r) {
+ # Note that printout.pl calls this with undef for $r.
+ &no_cache($r);
+ }
if ($env{'browser.mathml'} && $type eq 'text/html') { $type='text/xml'; }
unless ($charset) {
$charset=&Apache::lonlocal::current_encoding;