Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.382 and 1.383

version 1.382, 2017/02/25 19:48:33 version 1.383, 2017/03/08 02:51:08
Line 3497  ENDUTILITY Line 3497  ENDUTILITY
 sub jump_to_editres {  sub jump_to_editres {
     my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,      my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,
         $title,$hostname,$idx,$suppurl,$todocs,$suppanchor) = @_;          $title,$hostname,$idx,$suppurl,$todocs,$suppanchor) = @_;
     my ($jscall,$anchor,$usehttp,$usehttps);      my ($jscall,$anchor,$usehttp,$usehttps,$is_ext);
     if ($switchserver) {      if ($switchserver) {
         if ($home) {          if ($home) {
             $cfile = '/adm/switchserver?otherserver='.$home.'&role='.              $cfile = '/adm/switchserver?otherserver='.$home.'&role='.
Line 3517  sub jump_to_editres { Line 3517  sub jump_to_editres {
         }          }
     } else {      } else {
         unless ($cfile =~ m{^/priv/}) {          unless ($cfile =~ m{^/priv/}) {
             if ($cfile =~ m{^(/adm/wrapper/ext/[^#]+)#([^#]+)$}) {              if ($cfile =~ m{^(/adm/wrapper/ext/([^#]+))#([^#]+)$}) {
                 $cfile = $1;                  $cfile = $1;
                 $anchor = $2;                  my $extlink = $2;
                   $anchor = $3;
                   $is_ext = 1;
                   if (($extlink !~ /^https:/) && ($ENV{'SERVER_PORT'} == 443)) {
                       $usehttp = 1;
                   } elsif ($env{'request.use_absolute'}) {
                       if ($env{'request.use_absolute'} =~ m{^https://}) {
                           $usehttps = 1;
                       }
                   } 
             } elsif ($cfile =~ m{^/?public/($match_domain)/($match_courseid)/syllabus}) {              } elsif ($cfile =~ m{^/?public/($match_domain)/($match_courseid)/syllabus}) {
                 if ($ENV{'SERVER_PORT'} == 443) {                  if ($ENV{'SERVER_PORT'} == 443) {
                     my ($cdom,$cnum) = ($1,$2);                      my ($cdom,$cnum) = ($1,$2);
Line 3567  sub jump_to_editres { Line 3576  sub jump_to_editres {
                 if ($hostname ne '') {                  if ($hostname ne '') {
                     $cfile = 'http://'.$hostname.(($cfile =~ /^\//)? '':'/').$cfile;                      $cfile = 'http://'.$hostname.(($cfile =~ /^\//)? '':'/').$cfile;
                 }                  }
                 $cfile .= (($cfile=~/\?/)?'&':'?').'usehttp=1';                  unless ($is_ext) {
                       $cfile .= (($cfile=~/\?/)?'&':'?').'usehttp=1';
                   }
             } elsif ($usehttps) {              } elsif ($usehttps) {
                 $cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;                  $cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;
             }              }

Removed from v.1.382  
changed lines
  Added in v.1.383


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