Diff for /loncom/interface/lonindexer.pm between versions 1.67 and 1.69

version 1.67, 2003/06/16 17:27:33 version 1.69, 2003/07/17 21:11:09
Line 126  sub handler { Line 126  sub handler {
     my $diropendb =       my $diropendb = 
  "/home/httpd/perl/tmp/$ENV{'user.domain'}_$ENV{'user.name'}_indexer.db";   "/home/httpd/perl/tmp/$ENV{'user.domain'}_$ENV{'user.name'}_indexer.db";
     %hash = ();      %hash = ();
     my %dbfile;      {
     if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) {   my %dbfile;
         while(my($key,$value)=each(%dbfile)) {   if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) {
             $hash{$key}=$value;      while(my($key,$value)=each(%dbfile)) {
         }   $hash{$key}=$value;
         untie(%dbfile);      }
       untie(%dbfile);
    }
       }
       {
  if ($ENV{'form.launch'} eq '1') {   if ($ENV{'form.launch'} eq '1') {
     &start_fresh_session();      &start_fresh_session();
         }          }
Line 315  END Line 318  END
   
 <script type="text/javascript">  <script type="text/javascript">
 $catalogmodefunctions  $catalogmodefunctions
 function openWindow(url, wdwName, w, h, toolbar,scrollbar) {  function openWindow(url, wdwName, w, h, toolbar,scrollbar,locationbar) {
     var options = "width=" + w + ",height=" + h + ",";      var options = "width=" + w + ",height=" + h + ",";
     options += "resizable=yes,scrollbars="+scrollbar+",status=no,";      options += "resizable=yes,scrollbars="+scrollbar+",status=no,";
     options += "menubar=no,toolbar="+toolbar+",location=no,directories=no";      options += "menubar=no,toolbar="+toolbar+",location="+locationbar+",directories=no";
     var newWin = window.open(url, wdwName, options);      var newWin = window.open(url, wdwName, options);
     newWin.focus();      newWin.focus();
 }  }
Line 499  END Line 502  END
   
 # --------------------------------------------------- end the output and return  # --------------------------------------------------- end the output and return
  $r->print('</body></html>'."\n");   $r->print('</body></html>'."\n");
     } else {  #    } else {
  $r->print('<html><head></head><body>Unable to tie hash to db '.  # $r->print('<html><head></head><body>Unable to tie hash to db '.
   'file</body></html>');  #  'file</body></html>');
  return OK;  # return OK;
     }      }
     if(! $c->aborted()) {      if(! $c->aborted()) {
    my %dbfile;
         if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_NEWDB(),0640)) {          if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_NEWDB(),0640)) {
             while (my($key,$value) = each(%hash)) {              while (my($key,$value) = each(%hash)) {
                 $dbfile{$key}=$value;                  $dbfile{$key}=$value;
Line 816  sub display_line { Line 820  sub display_line {
   
  $r->print("<img src=$iconpath$iconname border='0' />\n");   $r->print("<img src=$iconpath$iconname border='0' />\n");
  $r->print (" <a href=\"javascript:openWindow('".$filelink.   $r->print (" <a href=\"javascript:openWindow('".$filelink.
    "', 'metadatafile', '450', '500', 'no', 'yes')\";".     "', 'previewfile', '450', '500', 'no', 'yes','yes')\";".
    " TARGET=_self>$listname</a> ");     " TARGET=_self>$listname</a> ");
   
  $r->print (" (<a href=\"javascript:openWindow('".$filelink.   $r->print (" (<a href=\"javascript:openWindow('".$filelink.
    ".meta', 'metadatafile', '400', '450', 'no', 'yes')\"; ".     ".meta', 'metadatafile', '400', '450', 'no', 'yes','no')\"; ".
    "TARGET=_self>metadata</a>) ") if ($metafile == 1);     "TARGET=_self>metadata</a>) ") if ($metafile == 1);
   
  $r->print("</td>\n");   $r->print("</td>\n");

Removed from v.1.67  
changed lines
  Added in v.1.69


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