Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 15, 2026

Diff for scripts/cgi/cvsweb/cvsweb.cgi between version 1.3 and 1.4

version 1.3, 2002/08/14 16:52:23 version 1.4, 2002/08/14 17:22:18
Line 467  if ($input{'cvsroot'} && $CVSROOT{$input
Line 467  if ($input{'cvsroot'} && $CVSROOT{$input
 $cvsroot = $CVSROOT{$cvstree};  $cvsroot = $CVSROOT{$cvstree};
   
 # create icons out of description  # create icons out of description
 my $k;  foreach my $k (keys %ICONS) {
 foreach $k (keys %ICONS) {  
         no strict 'refs';          no strict 'refs';
         my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}};          my ($itxt, $ipath, $iwidth, $iheight) = @{$ICONS{$k}};
         if ($ipath) {          if ($ipath) {
Line 480  foreach $k (keys %ICONS) {
Line 479  foreach $k (keys %ICONS) {
                 ${"${k}icon"} = $itxt;                  ${"${k}icon"} = $itxt;
         }          }
 }  }
 undef $k;  
   
 my $config_cvstree = "$config-$cvstree";  my $config_cvstree = "$config-$cvstree";
   
Line 799  if (-d $fullname) {
Line 797  if (-d $fullname) {
         my $filesexists;          my $filesexists;
         my $filesfound;          my $filesfound;
   
         foreach (sort { &fileSortCmp } @dir) {          foreach my $file (sort { &fileSortCmp } @dir) {
                 if ($_ eq '.') {  
                         next;                  next if ($file eq '.');
                 }  
   
                 # ignore CVS lock and stale NFS files                  # ignore CVS lock and stale NFS files
                 next if (/^#cvs\.|^,|^\.nfs/);                  next if ($file =~ /^#cvs\.|^,|^\.nfs/);
   
                 # Check whether to show the CVSROOT path                  # Check whether to show the CVSROOT path
                 next if ($input{'hidecvsroot'} && ($_ eq 'CVSROOT'));                  next if ($input{'hidecvsroot'} && $file eq 'CVSROOT');
   
                 # Check whether the module is in the restricted list                  # Check whether the module is in the restricted list
                 next if ($_ && &forbidden_module($_));                  next if ($file && &forbidden_module($file));
   
                 # Ignore non-readable files                  # Ignore non-readable files
                 next if ($input{'hidenonreadable'} && !(-r "$fullname/$_"));                  next if ($input{'hidenonreadable'} && !(-r "$fullname/$file"));
   
                 if (s|^Attic/||) {                  if ($file =~ s|^Attic/||) {
                         $attic = " (in the Attic) " . $hideAtticToggleLink;                          $attic = " (in the Attic) " . $hideAtticToggleLink;
                 } else {                  } else {
                         $attic = "";                          $attic = "";
                 }                  }
   
                 if ($_ eq '..' || -d "$fullname/$_") {                  if ($file eq '..' || -d "$fullname/$file") {
                         next if ($_ eq '..' && $where eq '/');                          next if ($file eq '..' && $where eq '/');
                         my ($rev, $date, $log, $author, $filename);                          my ($rev, $date, $log, $author, $filename) =
                         ($rev, $date, $log, $author, $filename) =                              @{$fileinfo{$file}}
                             @{$fileinfo{$_}}                              if (defined($fileinfo{$file}));
                             if (defined($fileinfo{$_}));  
                         printf "<tr style=\"background-color: %s\">\n<td>",                          printf "<tr style=\"background-color: %s\">\n<td>",
                              $tabcolors[$dirrow % 2] if $dirtable;                               $tabcolors[$dirrow % 2] if $dirtable;
   
                         if ($_ eq '..') {                          if ($file eq '..') {
                                 $url = "../$query";                                  $url = "../$query";
                                 if ($nofilelinks) {                                  if ($nofilelinks) {
                                         print $backicon;                                          print $backicon;
Line 840  if (-d $fullname) {
Line 836  if (-d $fullname) {
                                 }                                  }
                                 print '&nbsp;', &link("Parent Directory", $url);                                  print '&nbsp;', &link("Parent Directory", $url);
                         } else {                          } else {
                                 $url = './' . urlencode($_) . "/$query";                                  $url = './' . urlencode($file) . "/$query";
                                 print "<a name=\"$_\"></a>";                                  print "<a name=\"$file\"></a>";
   
                                 if ($nofilelinks) {                                  if ($nofilelinks) {
                                         print $diricon;                                          print $diricon;
                                 } else {                                  } else {
                                         print &link($diricon, $url);                                          print &link($diricon, $url);
                                 }                                  }
                                 print '&nbsp;', &link("$_/", $url), $attic;                                  print '&nbsp;', &link("$file/", $url), $attic;
   
                                 if ($_ eq "Attic") {                                  if ($file eq "Attic") {
                                         print "&nbsp; ";                                          print "&nbsp; ";
                                         print &link(                                          print &link(
                                                 "[Don't hide]",                                                  "[Don't hide]",
Line 893  if (-d $fullname) {
Line 889  if (-d $fullname) {
                                 }                                  }
                         } else {                          } else {
                                 my ($dwhere) =                                  my ($dwhere) =
                                     ($where ne "/" ? $where : "") . $_;                                      ($where ne "/" ? $where : "") . $file;
   
                                 if ($use_descriptions                                  if ($use_descriptions
                                     && defined $descriptions{$dwhere})                                      && defined $descriptions{$dwhere})
Line 920  if (-d $fullname) {
Line 916  if (-d $fullname) {
                                 print "<br>\n";                                  print "<br>\n";
                         }                          }
                         $dirrow++;                          $dirrow++;
                 } elsif (s/,v$//) {                  } elsif ($file =~ s/,v$//) {
   
                         # Skip forbidden files now so we'll give no hint                          # Skip forbidden files now so we'll give no hint
                         # about their existence.  This should probably have                          # about their existence.  This should probably have
                         # been done earlier, but it's straightforward here.                          # been done earlier, but it's straightforward here.
                         next if forbidden_file("$fullname/$_");                          next if forbidden_file("$fullname/$file");
   
                         $fileurl = ($attic ? "Attic/" : "") . urlencode($_);                          $fileurl = ($attic ? "Attic/" : "") . urlencode($file);
                         $url = './' . $fileurl . $query;                          $url = './' . $fileurl . $query;
                         my $rev    = '';  
                         my $date   = '';  
                         my $log    = '';  
                         my $author = '';  
                         $filesexists++;                          $filesexists++;
                         next if (!defined($fileinfo{$_}));                          next if (!defined($fileinfo{$file}));
                         ($rev, $date, $log, $author) = @{$fileinfo{$_}};                          my ($rev, $date, $log, $author) = @{$fileinfo{$file}};
                         $filesfound++;                          $filesfound++;
                         printf "<tr style=\"background-color: %s\">\n<td>",                          printf "<tr style=\"background-color: %s\">\n<td>",
                             $tabcolors[$dirrow % 2] if $dirtable;                              $tabcolors[$dirrow % 2] if $dirtable;
                         print "<a name=\"$_\"></a>";                          print "<a name=\"$file\"></a>";
   
                         if ($nofilelinks) {                          if ($nofilelinks) {
                                 print $fileicon;                                  print $fileicon;
                         } else {                          } else {
                                 print &link($fileicon, $url);                                  print &link($fileicon, $url);
                         }                          }
                         print '&nbsp;', &link($_, $url), $attic;                          print '&nbsp;', &link(htmlquote($file), $url), $attic;
                         print "</td>\n<td>&nbsp;" if ($dirtable);                          print "</td>\n<td>&nbsp;" if ($dirtable);
                         download_link($fileurl, $rev, $rev,                          download_link($fileurl, $rev, $rev,
                                 $defaultViewable ? "text/x-cvsweb-markup" :                                  $defaultViewable ? "text/x-cvsweb-markup" :
Line 1405  sub spacedHtmlText($;$) {
Line 1397  sub spacedHtmlText($;$) {
 } # }}}  } # }}}
   
 # sub link($$) {{{  # sub link($$) {{{
   # Note that this doesn't htmlquote the first argument...
 sub link($$) {  sub link($$) {
         my ($name, $url) = @_;          my ($name, $url) = @_;
   
Line 1766  sub doAnnotate($$) {
Line 1759  sub doAnnotate($$) {
         } else {          } else {
                 print "</pre>";                  print "</pre>";
         }          }
           html_footer();
   
         close($reader) or warn "cannot close: $!";          close($reader) or warn "cannot close: $!";
         wait;          wait;
 } # }}}  } # }}}
Line 2104  sub getDirLogs($$@) {
Line 2099  sub getDirLogs($$@) {
         push (@files, &safeglob("$DirName/*,v"));          push (@files, &safeglob("$DirName/*,v"));
         push (@files, &safeglob("$DirName/Attic/*,v"))          push (@files, &safeglob("$DirName/Attic/*,v"))
             if (!$input{'hideattic'});              if (!$input{'hideattic'});
         foreach $file (@otherFiles) {          foreach my $file (@otherFiles) {
                 push (@files, "$DirName/$file");                  push (@files, "$DirName/$file");
         }          }
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top