Diff for /loncom/interface/lonhelp.pm between versions 1.27 and 1.29

version 1.27, 2006/05/30 12:46:09 version 1.29, 2006/06/30 03:50:02
Line 164  sub listmatches { Line 164  sub listmatches {
     $line=~s/\{//gs;      $line=~s/\{//gs;
     $line=~s/\}//gs;      $line=~s/\}//gs;
     $line=~s/\\/ /gs;      $line=~s/\\/ /gs;
     $line=~s/(\Q$term\E)/\<b\>$1\<\/b\>/gsi;  
                     $line=~s/\</\&lt\;/gs;                      $line=~s/\</\&lt\;/gs;
                     $line=~s/\>/\&gt\;/gs;                      $line=~s/\>/\&gt\;/gs;
       $line=~s/(\Q$term\E)/\<b\>$1\<\/b\>/gsi;
     $quote.='<br />...'.$line.'...';      $quote.='<br />...'.$line.'...';
  }   }
     }      }
Line 191  sub handler { Line 191  sub handler {
      my $serverroot = $ENV{'HTTP_HOST'};       my $serverroot = $ENV{'HTTP_HOST'};
   
      &Apache::lonlocal::get_language_handle($r);       &Apache::lonlocal::get_language_handle($r);
        &Apache::loncommon::content_type($r,"text/html");
      my $text='';       my $text='';
      if ($env{'form.searchterm'}=~/\w/) {       if ($env{'form.searchterm'}=~/\w/) {
  &Apache::loncommon::content_type($r,"text/html");  
  ($text,my $matches)=&listmatches($docroot,$env{'form.searchterm'},&Apache::lonlocal::current_language().'/');   ($text,my $matches)=&listmatches($docroot,$env{'form.searchterm'},&Apache::lonlocal::current_language().'/');
          if ($matches) {           if ($matches) {
              my ($englishresult,$englishmatches)=&listmatches($docroot,$env{'form.searchterm'});               my ($englishresult,$englishmatches)=&listmatches($docroot,$env{'form.searchterm'});
Line 233  sub handler { Line 233  sub handler {
          or return HTTP_NOT_FOUND;           or return HTTP_NOT_FOUND;
      $tex .= join('', <$file>);       $tex .= join('', <$file>);
  }   }
     
  if ($env{'browser.mathml'}) {  
      &Apache::loncommon::content_type($r,'text/xml');  
      &tth::ttminit();  
      if ($env{'browser.unicode'}) {  
  &tth::ttmoptions('-L -u1');  
      } else {  
  &tth::ttmoptions('-L -u0');  
      }  
  } else {  
      &Apache::loncommon::content_type($r,"text/html");  
      &tth::tthinit();  
      if ($env{'browser.unicode'}) {  
  &tth::tthoptions('-L -u1');  
      } else {  
  &tth::tthoptions('-L -u0');  
      }  
  }  
  $text = &render($tex, $docroot, $serverroot);   $text = &render($tex, $docroot, $serverroot);
      }       }
   

Removed from v.1.27  
changed lines
  Added in v.1.29


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