Diff for /loncom/interface/lonindexer.pm between versions 1.153 and 1.154

version 1.153, 2006/09/29 18:21:43 version 1.154, 2006/12/05 02:55:53
Line 54  use Apache::File; Line 54  use Apache::File;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonsource();  use Apache::lonsource();
 use GDBM_File;  use GDBM_File;
   use LONCAPA qw(:match);
   
 # ---------------------------------------- variables used throughout the module  # ---------------------------------------- variables used throughout the module
 my %hash; # global user-specific gdbm file  my %hash; # global user-specific gdbm file
Line 366  function gothere(val) { Line 367  function gothere(val) {
 </script>  </script>
 ENDHEADER  ENDHEADER
   
         my ($headerdom)=($uri=~/^\/res\/(\w+)\//);          my ($headerdom)=($uri=~m{^/res/($match_domain)/});
  $r->print(&Apache::loncommon::start_page('Browse Resources',$js,   $r->print(&Apache::loncommon::start_page('Browse Resources',$js,
  {'domain' => $headerdom,}));   {'domain' => $headerdom,}));
 # - Evaluate actions from previous page (both cumulatively and chronologically)  # - Evaluate actions from previous page (both cumulatively and chronologically)
Line 1199  sub showpreview { Line 1200  sub showpreview {
        $output='<font size="-2">'.$output.'</font>';         $output='<font size="-2">'.$output.'</font>';
     } elsif ($embstyle eq 'img') {      } elsif ($embstyle eq 'img') {
        $output='<img alt="'.&mt('Preview').'" src="'.$filelink.'" />';         $output='<img alt="'.&mt('Preview').'" src="'.$filelink.'" />';
     } elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) {      } elsif ($filelink=~m{^/res/($match_domain)/($match_username)/}) {
        $output='<img  alt="'.&mt('Preview').'" src="http://'.         $output='<img  alt="'.&mt('Preview').'" src="http://'.
                  $Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}.                   $Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}.
                  '/cgi-bin/thumbnail.gif?url='.$filelink.'" />';                   '/cgi-bin/thumbnail.gif?url='.$filelink.'" />';

Removed from v.1.153  
changed lines
  Added in v.1.154


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