Diff for /loncom/interface/londocs.pm between versions 1.667 and 1.671

version 1.667, 2020/03/01 15:39:17 version 1.671, 2020/07/01 20:08:53
Line 1227  sub update_paste_buffer { Line 1227  sub update_paste_buffer {
                 } elsif ($url =~ m{^/res/$match_domain/$match_username/}) {                  } elsif ($url =~ m{^/res/$match_domain/$match_username/}) {
                     $pasteurls{$url} = 1;                      $pasteurls{$url} = 1;
                 } else {                  } else {
                      $pasteurls{$cid.'_'.$url} = 1;                      $pasteurls{$cid.'_'.$url} = 1;
                 }                  }
             }              }
         }          }
Line 4157  END Line 4157  END
     my ($editlink,$extresform,$anchor,$hiddenres,$nomodal);      my ($editlink,$extresform,$anchor,$hiddenres,$nomodal);
     my $orig_url = $url;      my $orig_url = $url;
     $orig_url=~s{http(:|:)//https(:|:)//}{https$2//};      $orig_url=~s{http(:|:)//https(:|:)//}{https$2//};
     $url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/};      if ($container eq 'page') {
           $url=~s{^http(|s)(:|:)//}{/ext/};
       } else {
           $url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/};
       }
     if (!$supplementalflag && $residx && $symb) {      if (!$supplementalflag && $residx && $symb) {
         if ((!$isfolder) && (!$ispage)) {          if ((!$isfolder) && (!$ispage)) {
     (undef,undef,$url)=&Apache::lonnet::decode_symb($symb);      (undef,undef,$url)=&Apache::lonnet::decode_symb($symb);
     $url=&Apache::lonnet::clutter($url);              if (($url =~ m{^ext/}) && ($container eq 'page')) {
                   $url=&Apache::lonnet::clutter_with_no_wrapper($url);
               } else {
                   $url=&Apache::lonnet::clutter($url);
               } 
     if ($url=~/^\/*uploaded\//) {      if ($url=~/^\/*uploaded\//) {
         $url=~/\.(\w+)$/;          $url=~/\.(\w+)$/;
         my $embstyle=&Apache::loncommon::fileembstyle($1);          my $embstyle=&Apache::loncommon::fileembstyle($1);
Line 4175  END Line 4183  END
     } elsif ($url=~m{^(|/adm/wrapper)/ext/([^#]+)}) {      } elsif ($url=~m{^(|/adm/wrapper)/ext/([^#]+)}) {
                 my $wrapped = $1;                  my $wrapped = $1;
                 my $exturl = $2;                  my $exturl = $2;
                 if ($wrapped eq '') {                  if (($wrapped eq '') && ($container ne 'page')) { 
                     $url='/adm/wrapper'.$url;                      $url='/adm/wrapper'.$url;
                 }                  }
                 if (($ENV{'SERVER_PORT'} == 443) && ($exturl !~ /^https:/)) {                  if (($ENV{'SERVER_PORT'} == 443) && ($exturl !~ /^https:/)) {
Line 4195  END Line 4203  END
             if (&Apache::lonnet::symbverify($symb,$url)) {              if (&Apache::lonnet::symbverify($symb,$url)) {
                 my $shownsymb = $symb;                  my $shownsymb = $symb;
                 if ($isexternal) {                  if ($isexternal) {
                     if ($url =~ /^([^#]+)#([^#]+)$/) {                      $url =~ s/\#[^#]+$//;
                         $url = $1;                      if ($container eq 'page') {
                         $anchor = $2;                          $url = &Apache::lonnet::clutter($url);
                         my $escan = &escape('#');  
                         $shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/;  
                     }                      }
                 }                  }
                 unless ($env{'request.role.adv'}) {                  unless ($env{'request.role.adv'}) {
Line 4854  sub short_urls { Line 4860  sub short_urls {
         $r->rflush();          $r->rflush();
         my $readonly;          my $readonly;
         if ($canedit) {          if ($canedit) {
             my ($numnew,$errors) = &Apache::loncommon::make_short_symbs($cdom,$cnum,$navmap);              my ($numnew,$errors) = &Apache::loncommon::get_requested_shorturls($cdom,$cnum,$navmap);
             if ($numnew) {              if ($numnew) {
                 $r->print('<p class="LC_info">'.&mt('Created [quant,_1,URL]',$numnew).'</p>');                  $r->print('<p class="LC_info">'.&mt('Created [quant,_1,URL]',$numnew).'</p>');
             }              }

Removed from v.1.667  
changed lines
  Added in v.1.671


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