Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 16. október 2026

Rozdiely pre scripts/cgi/cvsweb/cvsweb.cgi medzi verziami 1.12 a 1.13

verzia 1.12, 2002/11/22 18:34:48 verzia 1.13, 2002/11/22 20:04:15
Riadok 48 
Riadok 48 
 # $FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.136 2002/11/16 13:26:40 scop Exp $  # $FreeBSD: projects/cvsweb/cvsweb.cgi,v 1.136 2002/11/16 13:26:40 scop Exp $
 # $Id$  # $Id$
 # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $  # $Idaemons: /home/cvs/cvsweb/cvsweb.cgi,v 1.84 2001/10/07 20:50:10 knu Exp $
 # $Platon$  # $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.12 2002/11/22 18:34:48 rajo Exp $
 #  #
 ###  ###
   
Riadok 909  if (-d $fullname) {
Riadok 909  if (-d $fullname) {
   if ($filesexists && !$filesfound) {    if ($filesexists && !$filesfound) {
     print      print
       "<p><b>", _("NOTE"), ":</b> ",        "<p><b>", _("NOTE"), ":</b> ",
           sprintf( _("There are %s files, but none matches the current tag (%s)."),        sprintf( _("There are %s files, but none matches the current tag (%s)."),
           $filesexists,        $filesexists,
           $input{only_with_tag}),        $input{only_with_tag}),
           "</p>\n";        "</p>\n";
   }    }
   
   if ($input{only_with_tag} && (!%tags || !$tags{$input{only_with_tag}})) {    if ($input{only_with_tag} && (!%tags || !$tags{$input{only_with_tag}})) {
Riadok 1830  sub cvswebMarkup($$$)
Riadok 1830  sub cvswebMarkup($$$)
   
   print "<hr noshade>";    print "<hr noshade>";
   print "<table width=\"100%\">\n<tr>\n<td class=\"log-markup\">";    print "<table width=\"100%\">\n<tr>\n<td class=\"log-markup\">";
   print "File: ", &clickablePath($where, 1);    print _("File"), ": ", &clickablePath($where, 1);
   print "&nbsp;(";    print "&nbsp;(";
   &download_link($fileurl, $revision, "download");    &download_link($fileurl, $revision, _("download"));
   print ")";    print ")";
   if ($allow_cvsgraph) {    if ($allow_cvsgraph) {
     print ' - ', &graph_link('', $revision, 'graph');      print ' - ', &graph_link('', $revision, 'graph');
Riadok 1840  sub cvswebMarkup($$$)
Riadok 1840  sub cvswebMarkup($$$)
   
   if (!$defaultTextPlain) {    if (!$defaultTextPlain) {
     print "&nbsp;(";      print "&nbsp;(";
     &download_link($fileurl, $revision, "as text", "text/plain");      &download_link($fileurl, $revision, _("as text"), "text/plain");
     print ")";      print ")";
   }    }
   print "<br>\n";    print "<br>\n";
Riadok 1849  sub cvswebMarkup($$$)
Riadok 1849  sub cvswebMarkup($$$)
     readLog($fullname);    #,$revision);      readLog($fullname);    #,$revision);
     printLog($revision, 0);      printLog($revision, 0);
   } else {    } else {
     print "Version: <b>$revision</b><br>\n";      print _("Version"), ": <b>$revision</b><br>\n";
     print "Tag: <b>", $input{only_with_tag}, "</b><br>\n"      print _("Tag"), ": <b>", $input{only_with_tag}, "</b><br>\n"
       if $input{only_with_tag};        if $input{only_with_tag};
   }    }
   print "</td>\n</tr>\n</table>";    print "</td>\n</tr>\n</table>";
Riadok 1904  sub doDiff($$$$$$)
Riadok 1904  sub doDiff($$$$$$)
   
   if (&forbidden_file($fullname)) {    if (&forbidden_file($fullname)) {
     fatal("403 Forbidden",      fatal("403 Forbidden",
           'Access forbidden.  This file is mentioned in @ForbiddenFiles');            _('Access forbidden.  This file is mentioned in @ForbiddenFiles'));
   }    }
   
   if ($r1 =~ /([^:]+)(:(.+))?/) {    if ($r1 =~ /([^:]+)(:(.+))?/) {
Riadok 1928  sub doDiff($$$$$$)
Riadok 1928  sub doDiff($$$$$$)
   # make sure the revisions a wellformed, for security    # make sure the revisions a wellformed, for security
   # reasons ..    # reasons ..
   if ($rev1 =~ /[^\w.]/ || $rev2 =~ /[^\w.]/) {    if ($rev1 =~ /[^\w.]/ || $rev2 =~ /[^\w.]/) {
     fatal("404 Not Found", 'Malformed query "%s"', $ENV{QUERY_STRING});      fatal("404 Not Found", _('Malformed query "%s"'), $ENV{QUERY_STRING});
   }    }
   
   #    #
Riadok 1943  sub doDiff($$$$$$)
Riadok 1943  sub doDiff($$$$$$)
   my $difftype = $DIFFTYPES{$f};    my $difftype = $DIFFTYPES{$f};
   
   if (!$difftype) {    if (!$difftype) {
     fatal("400 Bad arguments", 'Diff format %s not understood', $f);      fatal("400 Bad arguments", _('Diff format %s not understood'), $f);
   }    }
   
   my @difftype       = @{$difftype->{'opts'}};    my @difftype       = @{$difftype->{'opts'}};
Riadok 2222  sub getDirLogs($$@)
Riadok 2222  sub getDirLogs($$@)
   
   if ($. == 0) {    if ($. == 0) {
     fatal("500 Internal Error",      fatal("500 Internal Error",
           'Failed to spawn GNU rlog on <em>"%s"</em>.  <p>Did you set the <b>$command_path</b> in your configuration file correctly ? (Currently "%s"',        _('Failed to spawn GNU rlog on <em>"%s"</em>.  <p>Did you set the <b>$command_path</b> in your configuration file correctly ? (Currently "%s"'),
           join (", ", @files),        join (", ", @files), $command_path);
           $command_path);  
   }    }
   close($fh);    close($fh);
 }  }
Riadok 2331  sub readLog($;$)
Riadok 2330  sub readLog($;$)
       $state{$rev}     = $8;        $state{$rev}     = $8;
       $difflines{$rev} = $10;        $difflines{$rev} = $10;
     } else {      } else {
       fatal("500 Internal Error", 'Error parsing RCS output: %s', $_);        fatal("500 Internal Error", _('Error parsing RCS output: %s'), $_);
     }      }
   
   line:    line:
Riadok 2436  sub readLog($;$)
Riadok 2435  sub readLog($;$)
     }      }
   
     if (!defined($onlyonbranch) || $onlybranchpoint eq "") {      if (!defined($onlyonbranch) || $onlybranchpoint eq "") {
       fatal("404 Tag not found", 'Tag %s not defined',        fatal("404 Tag not found", _('Tag %s not defined'),
             $input{'only_with_tag'});              $input{'only_with_tag'});
     }      }
   }    }
Riadok 2528  sub printLog($;$)
Riadok 2527  sub printLog($;$)
   
     if ($defaultViewable) {      if ($defaultViewable) {
       print " / (";        print " / (";
       &download_link($fileurl, $_, "download", $mimetype);        &download_link($fileurl, $_, _("download"), $mimetype);
       print ")";        print ")";
     }      }
   
     if (not $defaultTextPlain) {      if (not $defaultTextPlain) {
       print " / (";        print " / (";
       &download_link($fileurl, $_, "as text", "text/plain");        &download_link($fileurl, $_, _("as text"), "text/plain");
       print ")";        print ")";
     }      }
   
     if (!$defaultViewable) {      if (!$defaultViewable) {
       print " / (";        print " / (";
       &download_link($fileurl, $_, "view", "text/x-cvsweb-markup");        &download_link($fileurl, $_, _("view"), "text/x-cvsweb-markup");
       print ")";        print ")";
     }      }
   
     if ($allow_annotate) {      if ($allow_annotate) {
       print " - ";        print " - ";
       print &link('annotate',        print &link(_('annotate'),
                   sprintf('%s/%s?annotate=%s%s',                    sprintf('%s/%s?annotate=%s%s',
                           $scriptname, urlencode($where), $_, $barequery));                            $scriptname, urlencode($where), $_, $barequery));
     }      }
Riadok 2555  sub printLog($;$)
Riadok 2554  sub printLog($;$)
     if ($allow_version_select) {      if ($allow_version_select) {
       print ' - ';        print ' - ';
       if ($isSelected) {        if ($isSelected) {
         print '<b>[selected]</b>';          print '<b>[', _('selected'), ']</b>';
       } else {        } else {
         print &link('[select&nbsp;for&nbsp;diffs]',          print &link('[', _('select&nbsp;for&nbsp;diffs'), ']',
                     sprintf('%s?r1=%s%s#rev%s',                      sprintf('%s?r1=%s%s#rev%s',
                             $scriptwhere, $_, $barequery, $_));                              $scriptwhere, $_, $barequery, $_));
       }        }
     }      }
   } else {    } else {
     print "Revision <b>$_</b>";      print _("Revision"), " <b>$_</b>";
   }    }
   
   if (/^1\.1\.1\.\d+$/) {    if (/^1\.1\.1\.\d+$/) {
     print " <i>(vendor branch)</i>";      print " <i>(", _("vendor branch"), ")</i>";
   }    }
   if (defined @mytz) {    if (defined @mytz) {
     my ($est) = $mytz[(localtime($date{$_}))[8]];      my ($est) = $mytz[(localtime($date{$_}))[8]];
Riadok 2575  sub printLog($;$)
Riadok 2574  sub printLog($;$)
   } else {    } else {
     print ", <i>", scalar gmtime($date{$_}), " UTC</i> (";      print ", <i>", scalar gmtime($date{$_}), " UTC</i> (";
   }    }
   print readableTime(time() - $date{$_}, 1), ' ago)';    print readableTime(time() - $date{$_}, 1), ' ', _('ago'), ')';
   print ' by <i>', htmlquote($author{$_}), "</i>\n";    print ' by <i>', htmlquote($author{$_}), "</i>\n";
   
   if ($revsym{$br}) {    if ($revsym{$br}) {
     printf "<br>Branch: <b>%s</b>\n",      printf "<br>", _("Branch"), ": <b>%s</b>\n",
       $link ? link_tags($revsym{$br}) : htmlquote($revsym{$br});        $link ? link_tags($revsym{$br}) : htmlquote($revsym{$br});
   }    }
   if ($revsym{$_}) {    if ($revsym{$_}) {
     printf "<br>CVS Tags: <b>%s</b>\n",      printf "<br>", _("CVS Tags"), ": <b>%s</b>\n",
       $link ? link_tags($revsym{$_}) : htmlquote($revsym{$_});        $link ? link_tags($revsym{$_}) : htmlquote($revsym{$_});
   }    }
   if ($branchpoint{$_}) {    if ($branchpoint{$_}) {
     printf "<br>Branch point for: <b>%s</b>\n",      printf "<br>", _("Branch point for"), ": <b>%s</b>\n",
       $link ? link_tags($branchpoint{$_}) : htmlquote($branchpoint{$_});        $link ? link_tags($branchpoint{$_}) : htmlquote($branchpoint{$_});
   }    }
   
Riadok 2605  sub printLog($;$)
Riadok 2604  sub printLog($;$)
   
   if ($prev ne "") {    if ($prev ne "") {
     if ($difflines{$_}) {      if ($difflines{$_}) {
       print "<br>Changes since <b>$prev: $difflines{$_} lines</b>";        print "<br>", _("Changes since"), " <b>$prev: $difflines{$_} ", _("lines"), "</b>";
     }      }
   }    }
   
   if ($isDead) {    if ($isDead) {
     print "<br><b><i>FILE REMOVED</i></b>\n";      print "<br><b><i>", _("FILE REMOVED"), "</i></b>\n";
   } elsif ($link) {    } elsif ($link) {
     my %diffrev = ();      my %diffrev = ();
     $diffrev{$_} = 1;      $diffrev{$_} = 1;
Riadok 2718  sub doGraphView($)
Riadok 2717  sub doGraphView($)
   
   navigateHeader($scriptwhere, $pathname, $filename, $rev, 'graph');    navigateHeader($scriptwhere, $pathname, $filename, $rev, 'graph');
   
   my $title = sprintf 'Revision graph of %s', htmlquote($pathname . $filename);    my $title = sprintf _('Revision graph of %s'), htmlquote($pathname . $filename);
   my $mapname = 'CvsGraphMap';    my $mapname = 'CvsGraphMap';
   my $ctype = $defaultViewable ? '&amp;content-type=text/x-cvsweb-markup' : '';    my $ctype = $defaultViewable ? '&amp;content-type=text/x-cvsweb-markup' : '';
   
Riadok 2782  sub doLog($)
Riadok 2781  sub doLog($)
   
   readLog($fullname);    readLog($fullname);
   
   html_header("CVS log for $where");    html_header(_("CVS log for") . " $where");
   ($upwhere  = $where) =~ s|(Attic/)?[^/]+$||;    ($upwhere  = $where) =~ s|(Attic/)?[^/]+$||;
   ($filename = $where) =~ s|^.*/||;    ($filename = $where) =~ s|^.*/||;
   $backurl = $scriptname . "/" . urlencode($upwhere) . $query;    $backurl = $scriptname . "/" . urlencode($upwhere) . $query;
Riadok 2790  sub doLog($)
Riadok 2789  sub doLog($)
   print &link($backicon, "$backurl#$filename"), " <b>Up to ",    print &link($backicon, "$backurl#$filename"), " <b>Up to ",
     &clickablePath($upwhere, 1), "</b>\n</p>\n";      &clickablePath($upwhere, 1), "</b>\n</p>\n";
   print "<p>\n ";    print "<p>\n ";
   print &link('Request diff between arbitrary revisions', '#diff');    print &link(_('Request diff between arbitrary revisions'), '#diff');
   if ($allow_cvsgraph) {    if ($allow_cvsgraph) {
     print ' / ', &graph_link('', 1, 'Display revisions graphically');      print ' / ', &graph_link('', 1, _('Display revisions graphically'));
   }    }
   print "\n</p>\n<hr noshade>\n";    print "\n</p>\n<hr noshade>\n";
   
   print "<p>\n";    print "<p>\n";
   if ($curbranch) {    if ($curbranch) {
     print "Default branch: ", ($revsym{$curbranch} || $curbranch);      print _("Default branch"), ": ", ($revsym{$curbranch} || $curbranch);
   } else {    } else {
     print "No default branch";      print _("No default branch");
   }    }
   print "<br>\n";    print "<br>\n";
   
   if ($input{only_with_tag}) {    if ($input{only_with_tag}) {
     print "Current tag: $input{only_with_tag}<br>\n";      print _("Current tag"), ": $input{only_with_tag}<br>\n";
   }    }
   print "</p>\n";    print "</p>\n";
   
Riadok 2818  sub doLog($)
Riadok 2817  sub doLog($)
   
   print "<hr noshade>\n<p>\n";    print "<hr noshade>\n<p>\n";
   print "<a name=\"diff\">\n";    print "<a name=\"diff\">\n";
   print "This form allows you to request diff's between any two\n";    print _("This form allows you to request diff's between any two\n" .
   print "revisions of a file.  You may select a symbolic revision\n";            "revisions of a file.  You may select a symbolic revision\n" .
   print "name using the selection box or you may type in a numeric\n";            "name using the selection box or you may type in a numeric\n" .
   print "name using the type-in text box.\n";            "name using the type-in text box.\n");
   print "</a>\n</p>\n";    print "</a>\n</p>\n";
   print    print
     "<form method=\"get\" action=\"${scriptwhere}.diff\" name=\"diff_select\">\n";      "<form method=\"get\" action=\"${scriptwhere}.diff\" name=\"diff_select\">\n";
Riadok 2834  sub doLog($)
Riadok 2833  sub doLog($)
   }    }
   print "<table style=\"border: none\">\n<tr>\n";    print "<table style=\"border: none\">\n<tr>\n";
   print "<td align=\"right\">";    print "<td align=\"right\">";
   print "<label for=\"r1\" accesskey=\"1\">Diffs between </label>\n";    print "<label for=\"r1\" accesskey=\"1\">", _("Diffs between"), " </label>\n";
   print "<select id=\"r1\" name=\"r1\">\n";    print "<select id=\"r1\" name=\"r1\">\n";
   print "<option value=\"text\" selected>Use Text Field</option>\n";    print "<option value=\"text\" selected>", _("Use Text Field"), "</option>\n";
   print $sel;    print $sel;
   print "</select>\n";    print "</select>\n";
   $diffrev = $revdisplayorder[$#revdisplayorder];    $diffrev = $revdisplayorder[$#revdisplayorder];
Riadok 2847  sub doLog($)
Riadok 2846  sub doLog($)
   print "<tr>\n<td align=\"right\">";    print "<tr>\n<td align=\"right\">";
   print "<label for=\"r2\" accesskey=\"2\">and </label>\n";    print "<label for=\"r2\" accesskey=\"2\">and </label>\n";
   print "<select id=\"r2\" name=\"r2\">\n";    print "<select id=\"r2\" name=\"r2\">\n";
   print "<option value=\"text\" selected>Use Text Field</option>\n";    print "<option value=\"text\" selected>", _("Use Text Field"), "</option>\n";
   print $sel;    print $sel;
   print "</select>\n";    print "</select>\n";
   $diffrev = $revdisplayorder[0];    $diffrev = $revdisplayorder[0];
Riadok 2855  sub doLog($)
Riadok 2854  sub doLog($)
   print    print
     "<input type=\"text\" size=\"$inputTextSize\" name=\"tr2\" value=\"$diffrev\" onchange=\"this.form.r2.selectedIndex=0\"></td>\n";      "<input type=\"text\" size=\"$inputTextSize\" name=\"tr2\" value=\"$diffrev\" onchange=\"this.form.r2.selectedIndex=0\"></td>\n";
   print    print
     "<td><input type=\"submit\" value=\"  Get Diffs  \" accesskey=\"G\"></td>\n";      "<td><input type=\"submit\" value=\"", _("  Get Diffs  "), "\" accesskey=\"G\"></td>\n";
   print "</tr>\n</table>\n";    print "</tr>\n</table>\n";
   print "</form>\n";    print "</form>\n";
   print "<hr noshade>\n";    print "<hr noshade>\n";
   print "<form method=\"get\" action=\"$scriptwhere\">\n";    print "<form method=\"get\" action=\"$scriptwhere\">\n";
   print "<table style=\"border: none\">\n";    print "<table style=\"border: none\">\n";
   print "<tr>\n<td align=\"right\">";    print "<tr>\n<td align=\"right\">";
   print "<label for=\"f\" accesskey=\"D\">Preferred Diff type:";    print "<label for=\"f\" accesskey=\"D\">", _("Preferred Diff type"), ":";
   print "</label></td>\n";    print "</label></td>\n";
   print "<td>";    print "<td>";
   printDiffSelect($use_java_script);    printDiffSelect($use_java_script);
Riadok 2871  sub doLog($)
Riadok 2870  sub doLog($)
   if (@branchnames) {    if (@branchnames) {
     print "<tr>\n<td align=\"right\">";      print "<tr>\n<td align=\"right\">";
     print "<label for=\"only_with_tag\" accesskey=\"B\">";      print "<label for=\"only_with_tag\" accesskey=\"B\">";
     print "View only Branch:</label></td>\n";      print _("View only Branch"), ":</label></td>\n";
     print "<td>";      print "<td>";
     print "<a name=\"branch\"></a>\n";      print "<a name=\"branch\"></a>\n";
     print "<select id=\"only_with_tag\" name=\"only_with_tag\"";      print "<select id=\"only_with_tag\" name=\"only_with_tag\"";
Riadok 2881  sub doLog($)
Riadok 2880  sub doLog($)
     print " selected"      print " selected"
       if (defined($input{"only_with_tag"})        if (defined($input{"only_with_tag"})
       && $input{"only_with_tag"} eq "");        && $input{"only_with_tag"} eq "");
     print ">Show all branches</option>\n";      print ">", _("Show all branches"), "</option>\n";
   
     foreach (reverse sort @branchnames) {      foreach (reverse sort @branchnames) {
       my $selected =        my $selected =
Riadok 2905  sub doLog($)
Riadok 2904  sub doLog($)
   }    }
   print "<tr>\n<td align=\"right\">";    print "<tr>\n<td align=\"right\">";
   print "<a name=\"logsort\"></a>\n";    print "<a name=\"logsort\"></a>\n";
   print "<label for=\"logsort\" accesskey=\"L\">Sort log by:";    print "<label for=\"logsort\" accesskey=\"L\">", _("Sort log by"), ":";
   print "</label></td>\n<td>";    print "</label></td>\n<td>";
   printLogSortSelect($use_java_script);    printLogSortSelect($use_java_script);
   print "</td>\n";    print "</td>\n";
Riadok 2984  sub human_readable_diff($)
Riadok 2983  sub human_readable_diff($)
     $date2 = $r2d;      $date2 = $r2d;
   }    }
   
   print    print "<h3 style=\"text-align: center\">",
     "<h3 style=\"text-align: center\">Diff for /$where_nd between version $rev1 and $rev2</h3>\n",      _("Diff for %s between version %s and %s"), $where_nd, $rev1, $rev2, "</h3>\n",
   
     # Using style=\"border: none\" here breaks NS 4.x badly...      # Using style=\"border: none\" here breaks NS 4.x badly...
     "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n",      "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n",
     "<tr style=\"background-color: #ffffff\">\n",      "<tr style=\"background-color: #ffffff\">\n",
     "<th style=\"text-align: center; vertical-align: top\" width=\"50%\">",      "<th style=\"text-align: center; vertical-align: top\" width=\"50%\">",
     "version $rev1";      _("version"), " $rev1";
   print ", $date1"         if (defined($date1));    print ", $date1"         if (defined($date1));
   print "<br>Tag: $sym1\n" if ($sym1);    print "<br>", _("Tag"), ": $sym1\n" if ($sym1);
   print "</th>\n<th style=\"text-align: center; vertical-align: top\" width=\"50%\">version $rev2";    print "</th>\n<th style=\"text-align: center; vertical-align: top\" width=\"50%\">",
       _("version"), " $rev2";
   print ", $date2"         if (defined($date2));    print ", $date2"         if (defined($date2));
   print "<br>Tag: $sym2\n" if ($sym1);    print "<br>", _("Tag"), ": $sym2\n" if ($sym1);
   print "</th>\n";    print "</th>\n";
   
   my $leftRow  = 0;    my $leftRow  = 0;
Riadok 3019  sub human_readable_diff($)
Riadok 3019  sub human_readable_diff($)
       $funname = htmlquote($funname);        $funname = htmlquote($funname);
       $funname =~ s/\s/&nbsp;/go;        $funname =~ s/\s/&nbsp;/go;
       print "<tr class=\"diff-heading\">\n<td width=\"50%\">";        print "<tr class=\"diff-heading\">\n<td width=\"50%\">";
       print        print "<table width=\"100%\" border=\"1\" cellpadding=\"5\">\n<tr>\n<td><b>",
         "<table width=\"100%\" border=\"1\" cellpadding=\"5\">\n<tr>\n<td><b>Line&nbsp;$oldline</b>";            _("Line"), "&nbsp;$oldline</b>";
       print        print "&nbsp;<span style=\"font-size: smaller\">$funname</span></td>\n</tr>\n</table>";
         "&nbsp;<span style=\"font-size: smaller\">$funname</span></td>\n</tr>\n</table>";  
       print "</td>\n<td width=\"50%\">";        print "</td>\n<td width=\"50%\">";
       print        print "<table width=\"100%\" border=\"1\" cellpadding=\"5\">\n<tr>\n<td><b>",
         "<table width=\"100%\" border=\"1\" cellpadding=\"5\">\n<tr>\n<td><b>Line&nbsp;$newline</b>";            _("Line"), "&nbsp;$newline</b>";
       print        print "&nbsp;<span style=\"font-size: smaller\">$funname</span></td>\n</tr>\n</table>\n";
         "&nbsp;<span style=\"font-size: smaller\">$funname</span></td>\n</tr>\n</table>\n";  
       print "</td>\n";        print "</td>\n";
       $state    = "dump";        $state    = "dump";
       $leftRow  = 0;        $leftRow  = 0;
Riadok 3075  sub human_readable_diff($)
Riadok 3073  sub human_readable_diff($)
   if (!$state) {    if (!$state) {
     print "<tr>\n<td colspan=\"2\">&nbsp;</td>\n</tr>\n";      print "<tr>\n<td colspan=\"2\">&nbsp;</td>\n</tr>\n";
     print "<tr class=\"diff-empty\">\n";      print "<tr class=\"diff-empty\">\n";
     print      print "<td colspan=\"2\" align=\"center\"><b>- ",
       "<td colspan=\"2\" align=\"center\"><b>- No viewable change -</b></td>\n</tr>\n";          _("No viewable change"), " -</b></td>\n</tr>\n";
   }    }
   print "</table>\n";    print "</table>\n";
   
Riadok 3086  sub human_readable_diff($)
Riadok 3084  sub human_readable_diff($)
   
   # print legend    # print legend
   print "<table border=\"1\">\n<tr>\n<td>";    print "<table border=\"1\">\n<tr>\n<td>";
   print    print "Legend:<br><table style=\"border: none\" cellspacing=\"0\" cellpadding=\"1\">\n";
     "Legend:<br><table style=\"border: none\" cellspacing=\"0\" cellpadding=\"1\">\n";    print "<tr>\n<td align=\"center\" class=\"diff-removed\">",
   print        _("Removed from v."), "$rev1</td>\n<td class=\"diff-empty\">&nbsp;</td>\n</tr>\n";
     "<tr>\n<td align=\"center\" class=\"diff-removed\">Removed from v.$rev1</td>\n<td class=\"diff-empty\">&nbsp;</td>\n</tr>\n";    print "<tr class=\"diff-changed\">\n<td align=\"center\" colspan=\"2\">",
   print        _("changed lines"), "</td>\n</tr>\n";
     "<tr class=\"diff-changed\">\n<td align=\"center\" colspan=\"2\">changed lines</td>\n</tr>\n";    print "<tr>\n<td class=\"diff-empty\">&nbsp;</td>\n<td align=\"center\" class=\"diff-added\">",
   print        _("Added in v."), "$rev2</td>\n</tr>\n";
     "<tr>\n<td class=\"diff-empty\">&nbsp;</td>\n<td align=\"center\" class=\"diff-added\">Added in v.$rev2</td>\n</tr>\n";  
   print "</table>\n</td>\n</tr>\n</table>\n</td>\n<td>";    print "</table>\n</td>\n</tr>\n</table>\n</td>\n<td>";
   
   # Print format selector    # Print format selector
Riadok 3105  sub human_readable_diff($)
Riadok 3102  sub human_readable_diff($)
       urlencode($input{$var}), "\">\n";        urlencode($input{$var}), "\">\n";
   }    }
   printDiffSelect($use_java_script);    printDiffSelect($use_java_script);
   print "<input type=\"submit\" value=\"Show\">\n";    print "<input type=\"submit\" value=\"", _("Show"), "\">\n";
   print "</td>\n";    print "</td>\n";
   
   print "</tr>\n</table>\n";    print "</tr>\n</table>\n";
Riadok 3138  $HTML_META$css</head>
Riadok 3135  $HTML_META$css</head>
 EOF  EOF
   
   print &link($backicon, "$swhere$query#rev$rev");    print &link($backicon, "$swhere$query#rev$rev");
   printf '<b>Return to %s CVS log',    printf '<b>', _('Return to %s CVS log'),
     &link(htmlquote($filename), "$swhere$query#rev$rev");      &link(htmlquote($filename), "$swhere$query#rev$rev");
   print "</b> $fileicon</td>";    print "</b> $fileicon</td>";
   
   print "<td align=\"right\">$diricon <b>Up to ", &clickablePath($path, 1),    print "<td align=\"right\">$diricon <b>", _("Up to "), &clickablePath($path, 1),
     "</b></td>";      "</b></td>";
   print "</tr></table>";    print "</tr></table>";
 }  }
Riadok 3172  sub readableTime($$)
Riadok 3169  sub readableTime($$)
   
   # this function works correct for time >= 2 seconds    # this function works correct for time >= 2 seconds
   if ($secs < 2) {    if ($secs < 2) {
     return "very little time";      return _("very little time");
   }    }
   
   my %desc = (    my %desc = (
               1        => 'second',                1        => _('second'),
               60       => 'minute',                60       => _('minute'),
               3600     => 'hour',                3600     => _('hour'),
               86400    => 'day',                86400    => _('day'),
               604800   => 'week',                604800   => _('week'),
               2628000  => 'month',                2628000  => _('month'),
               31536000 => 'year'                31536000 => _('year')
              );               );
   
   my @breaks = sort { $a <=> $b } keys %desc;    my @breaks = sort { $a <=> $b } keys %desc;
Riadok 3266  sub chooseCVSRoot()
Riadok 3263  sub chooseCVSRoot()
     # within a table ...      # within a table ...
     print "<table style=\"border: none\">\n<tr>\n";      print "<table style=\"border: none\">\n<tr>\n";
     print      print
       "<td><label for=\"cvsroot\" accesskey=\"C\">CVS Root:</label></td>\n";        "<td><label for=\"cvsroot\" accesskey=\"C\">", _("CVS Root"), ":</label></td>\n";
     print "<td>\n<select id=\"cvsroot\" name=\"cvsroot\"";      print "<td>\n<select id=\"cvsroot\" name=\"cvsroot\"";
     print " onchange=\"this.form.submit()\"" if $use_java_script;      print " onchange=\"this.form.submit()\"" if $use_java_script;
     print ">\n";      print ">\n";
Riadok 3283  sub chooseCVSRoot()
Riadok 3280  sub chooseCVSRoot()
     # no choice -- but we need the form to select module/path,      # no choice -- but we need the form to select module/path,
     # at least for Netscape      # at least for Netscape
     print "<p>\n";      print "<p>\n";
     print "CVS Root: <b>[$cvstree]</b>";      print _("CVS Root"), ": <b>[$cvstree]</b>";
   }    }
   
   print " <label for=\"mpath\" accesskey=\"M\">Module path or alias:";    print "<label for=\"mpath\" accesskey=\"M\">", _("Module path or alias"), ":</label>\n";
   print "</label>\n";  
   print    print
     "<input type=\"text\" id=\"mpath\" name=\"path\" value=\"\" size=\"15\">\n";      "<input type=\"text\" id=\"mpath\" name=\"path\" value=\"\" size=\"15\">\n";
   print "<input type=\"submit\" value=\"Go\" accesskey=\"O\">";    print "<input type=\"submit\" value=\"", _("Go"), "\" accesskey=\"O\">";
   
   if (2 <= @CVSROOT) {    if (2 <= @CVSROOT) {
     print "</td>\n</tr>\n</table>";      print "</td>\n</tr>\n</table>";
Riadok 3309  sub chooseMirror()
Riadok 3305  sub chooseMirror()
   scalar(%MIRRORS) or return;    scalar(%MIRRORS) or return;
   
   # Should perhaps exclude the current site somehow...    # Should perhaps exclude the current site somehow...
   print "\n<p>\nThis CVSweb is mirrored in\n";    print "\n<p>\n", _("This CVSweb is mirrored in"), "\n";
   
   my @tmp = map(&link(htmlquote($_), $MIRRORS{$_}), sort keys %MIRRORS);    my @tmp = map(&link(htmlquote($_), $MIRRORS{$_}), sort keys %MIRRORS);
   my $tmp = pop (@tmp);    my $tmp = pop (@tmp);
   
   if (scalar(@tmp)) {    if (scalar(@tmp)) {
     print join (', ', @tmp), ' and ';      print join (', ', @tmp), _(' and ');
   }    }
   
   print "$tmp.\n</p>\n";    print "$tmp.\n</p>\n";
Riadok 3582  sub http_header(;$)
Riadok 3578  sub http_header(;$)
       } else {        } else {
         print "\r\n";    # Close headers          print "\r\n";    # Close headers
       }        }
       print        print "<span style=\"font-size: smaller\">",
         "<span style=\"font-size: smaller\">Unable to find gzip binary in the <b>\$command_path</b> ($command_path) to compress output</span><br>";          _("Unable to find gzip binary in the <b>\$command_path</b> (%s) to compress output"),
           $command_path, "</span><br>";
     }      }
   } else {    } else {
   

Legend:
Odstranené z verzie1.12  
zmenené riadky
  Pridané vo verzii1.13

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok