Diff for /loncom/interface/lonmsgdisplay.pm between versions 1.181.2.9 and 1.181.2.9.2.3

version 1.181.2.9, 2022/01/19 15:06:22 version 1.181.2.9.2.3, 2023/10/07 01:47:21
Line 111  use Apache::loncommunicate; Line 111  use Apache::loncommunicate;
 use Apache::lonfeedback;  use Apache::lonfeedback;
 use Apache::lonrss();  use Apache::lonrss();
 use Apache::lonselstudent();  use Apache::lonselstudent();
   use Apache::lonenc();
 use lib '/home/httpd/lib/perl/';  use lib '/home/httpd/lib/perl/';
 use LONCAPA qw(:DEFAULT :match);  use LONCAPA qw(:DEFAULT :match);
   
Line 2503  sub displaymessage { Line 2504  sub displaymessage {
                               $showsymb,$env{'user.domain'},$env{'user.name'});                                $showsymb,$env{'user.domain'},$env{'user.name'});
                 if ($symb) {                  if ($symb) {
                     if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) {                      if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) {
                         $showsymb = &Apache::lonenc::check_encrypt($symb);                          unless ($showsymb =~ m{^/enc/}) {
                               $showsymb = &Apache::lonenc::encrypted($showsymb);
                           }
                     }                      }
                     $symblink = '?symb='.$showsymb;                      $symblink = '?symb='.$showsymb;
                 }                  }
                 if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) {                  if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) {
                     $showurl = $baseurl;                      unless ($showurl =~ m{^/enc/}) {
                           $showurl = &Apache::lonenc::encrypted($showurl);
                       }
                 }                  }
                 $r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to'))                  $r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to'))
                          .'<a href="'.$showurl.$symblink.'">'.$restitle.'</a>'                           .'<a href="'.$showurl.$symblink.'">'.$restitle.'</a>'
Line 2702  sub displayresource { Line 2707  sub displayresource {
      && (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) {       && (&Apache::lonnet::allowed('vgr',$content{'courseid'}))) {
         my $symb;          my $symb;
         if (defined($content{'symb'})) {          if (defined($content{'symb'})) {
             $symb = $content{'symb'};              $symb = &Apache::lonenc::check_decrypt($content{'symb'});
         } else {           } elsif (defined($content{'baseurl'})) {
     $symb=&Apache::lonnet::symbread($content{'baseurl'});              $symb =
                   &Apache::lonnet::symbread(&Apache::lonenc::check_decrypt($content{'baseurl'}));
         }          }
 # Could not get a symb, give up  # Could not get a symb, give up
  unless ($symb) { return $content{'citation'}; }   unless ($symb) { return $content{'citation'}; }
Line 3165  sub handler { Line 3171  sub handler {
          'sendreply','compose','sendmail','critical','recname','recdom',           'sendreply','compose','sendmail','critical','recname','recdom',
          'recordftf','sortedby','folder','startdis','interdis',           'recordftf','sortedby','folder','startdis','interdis',
  'showcommentbaseurl','dismode','group','subject','text','ref',   'showcommentbaseurl','dismode','group','subject','text','ref',
          'msgstatus']);           'msgstatus','btoken']);
     $sqs='&amp;sortedby='.$env{'form.sortedby'};      $sqs='&amp;sortedby='.$env{'form.sortedby'};
   
   # ----------- Check if access was from balancer to server with existing session
   
       if ($env{'form.btoken'}) {
           my %info = &Apache::lonnet::tmpget($env{'form.btoken'});
           &Apache::lonnet::tmpdel($env{'form.btoken'});
           delete($env{'form.btoken'});
           unless ($env{'form.display'}) {
               if (($info{'display'}) && ($info{'mailrecip'})) {
                   if (&unescape($info{'mailrecip'}) eq $env{'user.name'}.':'.$env{'user.domain'}) {
                       $env{'form.display'} = &unescape($info{'display'});
                   }
               }
           }
       }
   
 # ------------------------------------------------------ They checked for email  # ------------------------------------------------------ They checked for email
     &Apache::lonnet::put('email_status',{'recnewemail'=>0});      &Apache::lonnet::put('email_status',{'recnewemail'=>0});
   

Removed from v.1.181.2.9  
changed lines
  Added in v.1.181.2.9.2.3


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