Diff for /loncom/interface/lonhelp.pm between versions 1.30 and 1.35

version 1.30, 2006/07/14 16:46:36 version 1.35, 2007/04/17 15:45:03
Line 59  sub processLabelName { Line 59  sub processLabelName {
 sub servetext {  sub servetext {
     my ($r,$text) = @_;      my ($r,$text) = @_;
     my $bugs=&Apache::loncommon::help_open_bug('Documentation','Report a documentation bug');      my $bugs=&Apache::loncommon::help_open_bug('Documentation','Report a documentation bug');
       my $morehelp;#=&Apache::loncommon::help_open_menu(undef,undef,1,undef,undef,undef,undef,'Help and Assistance Menu');
     my $start_page=      my $start_page=
  &Apache::loncommon::start_page('LON-CAPA Help',undef,   &Apache::loncommon::start_page('LON-CAPA Help',undef,
        {'only_body' => 1,});         {'only_body' => 1,});
Line 76  HEADER Line 77  HEADER
   
     if (&Apache::lonnavmaps::advancedUser()) {      if (&Apache::lonnavmaps::advancedUser()) {
  my $search=&mt('Search LON-CAPA help');   my $search=&mt('Search LON-CAPA help');
  my $about=&mt('About LON-CAPA help and More Help');  
         my $query=&mt('Search');          my $query=&mt('Search');
  my $uri = $r->uri;   my $uri = $r->uri;
  $r->print(<<FOOTER);   $r->print(<<FOOTER);
     <hr /><form action="$uri" method="post">      <hr /><form action="$uri" method="post">
 $search: <input type="text" name="searchterm" size="40" /><input type="submit" value="$query" />  <label>$search: <input type="text" name="searchterm" size="40" /></label><input type="submit" value="$query" />
 </form>  </form>
 <br />  <br />
 <a href="/adm/help/abouthelp.html">$about</a>  
 $bugs  $bugs
   $morehelp
 FOOTER  FOOTER
     
     }      }
Line 123  sub render { Line 123  sub render {
       } else {        } else {
   $label=~s/\.hlp$//;    $label=~s/\.hlp$//;
       }        }
              '\\begin{html}<a href="http://' . $serverroot ."/adm/help/".               '\\begin{html}<a href="/adm/help/'.
               $label .                $label .
               '.hlp#' . &processLabelName($1) .                 '.hlp#' . &processLabelName($1) . 
              '"><img src="http://' . $serverroot . '/adm/help/gif/smallHelp.gif" border="0" /></a>' .               '"><img src="/adm/help/gif/smallHelp.gif" border="0" /></a>' .
              '\\end{html}'               '\\end{html}'
              |gxe;               |gxe;
   
Line 135  sub render { Line 135  sub render {
   
     # Figures leftover without captions      # Figures leftover without captions
     $tex =~ s|  \\includegraphics(\[[^]]*\])*\{([^}]*)\}      $tex =~ s|  \\includegraphics(\[[^]]*\])*\{([^}]*)\}
              |  '\\begin{html}<img src="http://' . $serverroot . '/adm/help/gif/' . $2 . '.gif" border="2"'.               |  '\\begin{html}<img src="/adm/help/gif/' . $2 . '.gif" border="2"'.
                 ' bordercolor="#000000"/>\\end{html}'                  ' bordercolor="#000000"/>\\end{html}'
              |gxe;               |gxe;
   
Line 152  sub render { Line 152  sub render {
     # just duck the issue...      # just duck the issue...
   
     $tex =~ s/Figure 0://g;      $tex =~ s/Figure 0://g;
      $tex.=$Apache::lontexconvert::errorstring;      $tex.=$Apache::lontexconvert::errorstring;
     untie %fragmentLabels;      untie %fragmentLabels;
   
     return $tex;      return $tex;
Line 213  sub handler { Line 213  sub handler {
              $text=&listmatches($docroot,$env{'form.searchterm'});                $text=&listmatches($docroot,$env{'form.searchterm'}); 
          }           }
      } else {       } else {
  my $filenames = &unescape(substr ($ENV{'REQUEST_URI'} ,    my $filenames = &unescape(substr($ENV{'REQUEST_URI'} , 
    rindex($ENV{'REQUEST_URI'}, '/') + 1, -4));    rindex($ENV{'REQUEST_URI'}, '/') + 1, -4));
       
  # Security check on the file; the whole filename must consist   # Security check on the file; the whole filename must consist
  # of nothing but alphanums, ' ,, or ., or the file   # of nothing but alphanums, ' ,, or ., or the file

Removed from v.1.30  
changed lines
  Added in v.1.35


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