--- loncom/lontrans.pm 2016/08/16 20:17:54 1.16 +++ loncom/lontrans.pm 2019/01/20 02:42:35 1.25 @@ -1,7 +1,7 @@ # The LearningOnline Network # URL translation for User Files # -# $Id: lontrans.pm,v 1.16 2016/08/16 20:17:54 raeburn Exp $ +# $Id: lontrans.pm,v 1.25 2019/01/20 02:42:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -30,13 +30,13 @@ package Apache::lontrans; use strict; use Apache::Constants qw(:common :remotehost REDIRECT); -use Apache::lonnet(); +use Apache::lonnet; use Apache::File(); use LONCAPA qw(:DEFAULT :match); sub handler { my $r = shift; - # FIXME line remove when mod_perl fixes BUG#4948 + # FIXME line remove when mod_perl fixes BUG#4948 $r->notes->set('error-notes' => ''); if ($r->uri=~m{^/raw/}) { my $host = $r->headers_in->get('Host'); @@ -66,7 +66,7 @@ sub handler { '/userfiles/'.(join('/',@ufile))); } return OK; - } else { + } else { return DECLINED; } } @@ -98,16 +98,16 @@ sub redirect_raw { my $remintdom = &Apache::lonnet::internet_dom($remprimary); if (ref($replication->{'certreq'}) eq 'ARRAY') { if (grep(/^\Q$remintdom\E$/,@{$replication->{'certreq'}})) { - $redirect = 1; - } else { $redirect = 0; + } else { + $redirect = 1; } } if (ref($replication->{'nocertreq'}) eq 'ARRAY') { if (grep(/^\Q$remintdom\E$/,@{$replication->{'nocertreq'}})) { - $redirect = 0; - } else { $redirect = 1; + } else { + $redirect = 0; } } } @@ -117,15 +117,9 @@ sub redirect_raw { last; } } - return $redirect; + return $redirect; } 1; __END__ - - - - - -