зеркало из https://github.com/mozilla/gecko-dev.git
More patches from Matthew Wilson <msw@gimp.org> -- keep popup layer location; quote some URLs better.
This commit is contained in:
Родитель
09eaa8f230
Коммит
e283f6603c
|
@ -187,7 +187,7 @@ if ($ENV{'HTTP_USER_AGENT'} =~ /Win/) {
|
||||||
#
|
#
|
||||||
$output = "<DIV ALIGN=LEFT>";
|
$output = "<DIV ALIGN=LEFT>";
|
||||||
foreach $path (split('/',$rcs_path)) {
|
foreach $path (split('/',$rcs_path)) {
|
||||||
$link_path .= $path;
|
$link_path .= url_encode2($path);
|
||||||
$output .= "<A HREF='rview.cgi?dir=$link_path";
|
$output .= "<A HREF='rview.cgi?dir=$link_path";
|
||||||
$output .= "&cvsroot=$form{'root'}" if defined $form{'root'};
|
$output .= "&cvsroot=$form{'root'}" if defined $form{'root'};
|
||||||
$output .= "&rev=$browse_revtag" unless $browse_revtag eq 'HEAD';
|
$output .= "&rev=$browse_revtag" unless $browse_revtag eq 'HEAD';
|
||||||
|
@ -346,6 +346,8 @@ sub print_top {
|
||||||
local ($diff_link) = "cvsview2.cgi?diff_mode=context&whitespace_mode=show";
|
local ($diff_link) = "cvsview2.cgi?diff_mode=context&whitespace_mode=show";
|
||||||
$diff_link .= "&root=$form{'root'}" if defined $form{'root'};
|
$diff_link .= "&root=$form{'root'}" if defined $form{'root'};
|
||||||
$diff_link .= "&subdir=$rcs_path&command=DIFF_FRAMESET&file=$file_tail";
|
$diff_link .= "&subdir=$rcs_path&command=DIFF_FRAMESET&file=$file_tail";
|
||||||
|
|
||||||
|
$diff_link = &url_encode3($diff_link);
|
||||||
|
|
||||||
print <<__TOP__;
|
print <<__TOP__;
|
||||||
<HTML>
|
<HTML>
|
||||||
|
@ -391,7 +393,12 @@ function log(event, line, prev_rev, rev) {
|
||||||
l.document.write(eval("log" + revToName(rev)) + "</TD></TR></TABLE>");
|
l.document.write(eval("log" + revToName(rev)) + "</TD></TR></TABLE>");
|
||||||
l.document.close();
|
l.document.close();
|
||||||
}
|
}
|
||||||
l.top = event.target.y - 3;
|
|
||||||
|
if(event.target.y > window.innerHeight + window.pageYOffset - l.clip.height) {
|
||||||
|
l.top = (window.innerHeight + window.pageYOffset - (l.clip.height + 15));
|
||||||
|
} else {
|
||||||
|
l.top = event.target.y - 3;
|
||||||
|
}
|
||||||
l.left = event.target.x + 40;
|
l.left = event.target.x + 40;
|
||||||
l.visibility="show";
|
l.visibility="show";
|
||||||
|
|
||||||
|
|
|
@ -173,6 +173,7 @@ if ($opt_sort eq 'author') {
|
||||||
$table_header_tag .= "<TH ALIGN=LEFT>Rev<TH ALIGN=LEFT><A HREF='cvslog.cgi?file=$filename&root=$root&rev=$browse_revtag&sort=author&author=$author_arg'>Author</A><TH ALIGN=LEFT>Date<TH><TH ALIGN=LEFT>Log";
|
$table_header_tag .= "<TH ALIGN=LEFT>Rev<TH ALIGN=LEFT><A HREF='cvslog.cgi?file=$filename&root=$root&rev=$browse_revtag&sort=author&author=$author_arg'>Author</A><TH ALIGN=LEFT>Date<TH><TH ALIGN=LEFT>Log";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table_header_tag = &url_encode3($table_header_tag);
|
||||||
print "$font_tag$table_tag$table_header_tag";
|
print "$font_tag$table_tag$table_header_tag";
|
||||||
|
|
||||||
# Print each line of the revision, preceded by its annotation.
|
# Print each line of the revision, preceded by its annotation.
|
||||||
|
@ -215,16 +216,24 @@ foreach $revision (@revisions)
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= "<TR$bgcolor VALIGN=TOP><TD>"
|
$output .= "<TR$bgcolor VALIGN=TOP><TD>"
|
||||||
."<A NAME=$revision><A HREF='cvsview2.cgi";
|
."<A NAME=$revision>";
|
||||||
|
|
||||||
|
$anchor = "<A HREF=cvsview2.cgi";
|
||||||
|
|
||||||
if (defined($prev_revision{$revision})) {
|
if (defined($prev_revision{$revision})) {
|
||||||
$output .= "?diff_mode=context&whitespace_mode=show&file=$file_tail"
|
$anchor .= "?diff_mode=context&whitespace_mode=show&file=$file_tail"
|
||||||
."&root=$root&subdir=$rcs_path&command=DIFF_FRAMESET"
|
."&root=$root&subdir=$rcs_path&command=DIFF_FRAMESET"
|
||||||
."&rev1=$prev_revision{$revision}&rev2=$revision";
|
."&rev1=$prev_revision{$revision}&rev2=$revision";
|
||||||
} else {
|
} else {
|
||||||
$output .= "?files=$file_tail"
|
$anchor .= "?files=$file_tail"
|
||||||
."&root=$root&subdir=$rcs_path\&command=DIRECTORY\&rev2=$revision";
|
."&root=$root&subdir=$rcs_path\&command=DIRECTORY\&rev2=$revision";
|
||||||
$output .= "&branch=$browse_revtag" unless $browse_revtag eq 'HEAD';
|
$anchor .= "&branch=$browse_revtag" unless $browse_revtag eq 'HEAD';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$anchor = &url_encode3($anchor);
|
||||||
|
|
||||||
|
$output .= $anchor;
|
||||||
|
|
||||||
$output .= "'>$revision</A>"
|
$output .= "'>$revision</A>"
|
||||||
.' ' x ($max_rev_length - length($revision)).'</TD>';
|
.' ' x ($max_rev_length - length($revision)).'</TD>';
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,17 @@ sub url_encode2 {
|
||||||
$s =~ s/\'/\%27/g;
|
$s =~ s/\'/\%27/g;
|
||||||
$s =~ s/\|/\%7c/g;
|
$s =~ s/\|/\%7c/g;
|
||||||
$s =~ s/\&/\%26/g;
|
$s =~ s/\&/\%26/g;
|
||||||
|
$s =~ s/\+/\%2b/g;
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub url_encode3 {
|
||||||
|
local( $s ) = @_;
|
||||||
|
|
||||||
|
$s =~ s/\n/\%0a/g;
|
||||||
|
$s =~ s/\r//g;
|
||||||
|
$s =~ s/\"/\%22/g;
|
||||||
|
$s =~ s/\+/\%2b/g;
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,4 +143,12 @@ create table tags (
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
create table checkinlocks (
|
||||||
|
repositoryid mediumint not null,
|
||||||
|
branchid mediumint not null,
|
||||||
|
dirid mediumint not null,
|
||||||
|
fileid mediumint not null,
|
||||||
|
revision
|
||||||
|
|
||||||
|
|
||||||
OK_ALL_DONE
|
OK_ALL_DONE
|
||||||
|
|
Загрузка…
Ссылка в новой задаче