| version 1.19, 2003/02/01 00:23:10 |
version 1.20, 2003/02/01 01:01:51 |
|
|
| # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| # SUCH DAMAGE. |
# SUCH DAMAGE. |
| # |
# |
| # $FreeBSD: /home/ncvs/projects/cvsweb/cvsweb.cgi,v 1.139 2002/12/21 20:39:36 scop Exp $ |
# $FreeBSD: /home/ncvs/projects/cvsweb/cvsweb.cgi,v 1.140 2002/12/21 23:27:09 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 $ |
| # |
# |
| # DONT'T delete lines between '$''Idaemons' and '$''Platon' -- patches from FreeBSD failed then |
# DONT'T delete lines between '$''Idaemons' and '$''Platon' -- patches from FreeBSD failed then |
| # $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.18 2003/01/11 13:50:06 nepto Exp $ |
# $Platon: scripts/cgi/cvsweb/cvsweb.cgi,v 1.19 2003/02/01 00:23:10 rajo Exp $ |
| # |
# |
| ### |
### |
| |
|
| Line 181 sub fileSortCmp(); |
|
| Line 181 sub fileSortCmp(); |
|
| sub download_url($$;$); |
sub download_url($$;$); |
| sub download_link($$$;$); |
sub download_link($$$;$); |
| sub graph_link($$;$); |
sub graph_link($$;$); |
| sub toggleQuery($$); |
sub toggleQuery($;$); |
| sub urlencode($); |
sub urlencode($); |
| sub htmlquote($); |
sub htmlquote($); |
| sub htmlunquote($); |
sub htmlunquote($); |
| Line 328 $maycompress = ( |
|
| Line 328 $maycompress = ( |
|
| # to hold our state - they will be added (with |
# to hold our state - they will be added (with |
| # their current value) to any link/query string |
# their current value) to any link/query string |
| # you construct |
# you construct |
| @stickyvars = qw(cvsroot hideattic sortby logsort f only_with_tag); |
@stickyvars = qw(cvsroot hideattic ignorecase sortby logsort f only_with_tag); |
| @unsafevars = qw(logsort only_with_tag r1 r2 rev sortby tr1 tr2); |
@unsafevars = qw(logsort only_with_tag r1 r2 rev sortby tr1 tr2); |
| |
|
| if (-f $config) { |
if (-f $config) { |
| Line 1002 if (-d $fullname) { |
|
| Line 1002 if (-d $fullname) { |
|
| } |
} |
| print "<center>\n<table cellpadding=\"0\" cellspacing=\"0\">"; |
print "<center>\n<table cellpadding=\"0\" cellspacing=\"0\">"; |
| print "\n<tr class=\"dir-header\">\n"; |
print "\n<tr class=\"dir-header\">\n"; |
| print "<th style=\"text-align: center\" colspan=\"2\">", _("Preferences"), "</th>\n</tr>\n"; |
print "<th style=\"text-align: center\">", _("Preferences"), "</th>\n</tr>\n"; |
| print "<tr>\n<td>"; |
print "<tr>\n<td>"; |
| print "<label for=\"sortby\" accesskey=\"F\">", _("Sort files by"); |
print "<label for=\"sortby\" accesskey=\"F\">", _("Sort files by"), ": "; |
| print " </label><select id=\"sortby\" name=\"sortby\">\n"; |
print "<select id=\"sortby\" name=\"sortby\">\n"; |
| print "<option value=\"\">", _("File"), "</option>\n"; |
print "<option value=\"\">", _("File"), "</option>\n"; |
| print "<option", $bydate ? " selected" : "", |
print "<option", $bydate ? " selected" : "", |
| " value=\"date\">", _("Age"), "</option>\n"; |
" value=\"date\">", _("Age"), "</option>\n"; |
| print "<option", $byauthor ? " selected" : "", |
print "<option", $byauthor ? " selected" : "", |
| " value=\"author\">", _("Author"), "</option>\n" |
" value=\"author\">", _("Author"), "</option>\n" |
| if ($show_author); |
if $show_author; |
| print "<option", $byrev ? " selected" : "", |
print "<option", $byrev ? " selected" : "", |
| " value=\"rev\">", _("Revision"), "</option>\n"; |
" value=\"rev\">", _("Revision"), "</option>\n"; |
| print "<option", $bylog ? " selected" : "", |
print "<option", $bylog ? " selected" : "", |
| " value=\"log\">", _("Log message"), "</option>\n"; |
" value=\"log\">", _("Log message"), "</option>\n"; |
| print "</select>\n</td>\n"; |
print "</select></label>,\n"; |
| print "<td><label for=\"logsort\" accesskey=\"L\">"; |
print '<label for="ignorecase" accesskey="I">', _("case-insensitive"), ': '; |
| print _("Sort log by"), ": </label>"; |
print "<input id=\"ignorecase\" name=\"ignorecase\" type=\"checkbox\"", |
| |
$input{'ignorecase'} ? " checked" : "", " value=\"1\"></label>\n"; |
| |
print "<label for=\"logsort\" accesskey=\"L\">", _("Sort log by"), ": "; |
| printLogSortSelect(0); |
printLogSortSelect(0); |
| print "</td>\n</tr>\n"; |
print "</label></td>\n</tr>\n"; |
| print "<tr>\n<td><label for=\"f\" accesskey=\"D\">"; |
print "<tr>\n<td><label for=\"f\" accesskey=\"D\">", _("Diff format"), ": "; |
| print _("Diff format"), ": </label>"; |
|
| printDiffSelect(0); |
printDiffSelect(0); |
| print "</td>\n"; |
print '</label> '; |
| print "<td><label for=\"hideattic\" accesskey=\"A\">"; |
print '<label for="hideattic" accesskey="A">', _("Hide files in Attic"); |
| print _("Show Attic files"), ": </label>"; |
|
| print "<input id=\"hideattic\" name=\"hideattic\" type=\"checkbox\"", |
print "<input id=\"hideattic\" name=\"hideattic\" type=\"checkbox\"", |
| $input{'hideattic'} ? " checked" : "", "></td>\n</tr>\n"; |
$input{'hideattic'} ? ' checked' : '', " value=\"1\"></label></td>\n"; |
| print "<tr>\n<td align=\"center\" colspan=\"2\">"; |
print "</tr>\n<tr>\n<td align=\"center\">"; |
| print "<input type=\"submit\" value=\"", _("Change Options"), "\" accesskey=\"C\">"; |
print "<input type=\"submit\" value=\"", _("Change Options"), "\" accesskey=\"C\">"; |
| print "</td>\n</tr>\n</table>\n</center>\n</form>\n"; |
print "</td>\n</tr>\n</table>\n</center>\n</form>\n"; |
| } |
} |
| Line 3339 sub fileSortCmp() |
|
| Line 3339 sub fileSortCmp() |
|
| my ($rev2, $date2, $log2, $author2, $filename2) = @{$fileinfo{$bf}} |
my ($rev2, $date2, $log2, $author2, $filename2) = @{$fileinfo{$bf}} |
| if (defined($fileinfo{$bf})); |
if (defined($fileinfo{$bf})); |
| |
|
| if ( defined($filename1) |
if (defined($filename1) && defined($filename2) && |
| && defined($filename2) |
$af eq $filename1 && $bf eq $filename2) |
| && $af eq $filename1 |
|
| && $bf eq $filename2) |
|
| { |
{ |
| |
|
| # Two files |
# Two files |
| $comp = -revcmp($rev1, $rev2) if ($byrev && $rev1 && $rev2); |
$comp = -revcmp($rev1, $rev2) if ($byrev && $rev1 && $rev2); |
| $comp = ($date2 <=> $date1) if ($bydate && $date1 && $date2); |
$comp = ($date2 <=> $date1) if ($bydate && $date1 && $date2); |
| $comp = ($log1 cmp $log2) if ($bylog && $log1 && $log2); |
if ($input{ignorecase}) { |
| $comp = ($author1 cmp $author2) if ($byauthor && $author1 && $author2); |
$comp = (uc($log1) cmp uc($log2)) if ($bylog && $log1 && $log2); |
| |
$comp = (uc($author1) cmp uc($author2)) if ($byauthor && |
| |
$author1 && $author2); |
| |
} else { |
| |
$comp = ($log1 cmp $log2) if ($bylog && $log1 && $log2); |
| |
$comp = ($author1 cmp $author2) if ($byauthor && |
| |
$author1 && $author2); |
| |
} |
| } |
} |
| |
|
| if ($comp == 0) { |
if ($comp == 0) { |
| Line 3370 sub fileSortCmp() |
|
| Line 3375 sub fileSortCmp() |
|
| ); |
); |
| ($c = $a) =~ s|.*/||; |
($c = $a) =~ s|.*/||; |
| ($d = $b) =~ s|.*/||; |
($d = $b) =~ s|.*/||; |
| $comp = ("$ad$c" cmp "$bd$d"); |
$comp = $input{ignorecase} ? |
| |
(uc("$ad$c") cmp uc("$bd$d")) : ("$ad$c" cmp "$bd$d"); |
| } |
} |
| return $comp; |
return $comp; |
| } |
} |
| Line 3462 sub graph_link($$;$) |
|
| Line 3468 sub graph_link($$;$) |
|
| |
|
| # Returns a Query string with the |
# Returns a Query string with the |
| # specified parameter toggled |
# specified parameter toggled |
| sub toggleQuery($$) |
sub toggleQuery($;$) |
| { |
{ |
| my ($toggle, $value) = @_; |
my ($toggle, $value) = @_; |
| |
|