Fixed bug 10812 -- LXR paths were not getting generated correctly.

git-svn-id: svn://10.0.0.236/trunk@41571 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
terry%mozilla.org
1999-07-30 01:28:32 +00:00
parent cf752b583b
commit 9ae2e7cdec
2 changed files with 10 additions and 11 deletions

View File

@@ -212,6 +212,11 @@ DefParam("lxr_base",
"http://lxr.mozilla.org/",
\&check_urlbase);
DefParam("lxr_mungeregexp",
'A regexp to use to munge a pathname from the $CVSROOT into a valid LXR pathname. So, for example, if we tend to have a lot of pathnames that start with "mozilla/", and the LXR URLs should not contain that leading mozilla/, then you would use something like: s@^mozilla/@@',
"t",
"");
DefParam("bugs_base",
"The URL that is the common initial leading part of all Bugzilla URLs.",
"t",

View File

@@ -1208,17 +1208,11 @@ sub GenerateUserLookUp {
sub Fix_LxrLink {
my ($lxr_path) = @_;
my $lxr_base = Param('lxr_base');
# # total kludge!! lxr omits the top-level "mozilla" directory...
# if (mozilla_lxr_kludge) {
# $lxr_path =~ s@^ns/@@;
# $lxr_path =~ s@^mozilla/@@;
# }
$lxr_path =~ s!.*/(r+src/)!$1!;
$lxr_path =~ s!(r+src)/!device/$1/!;
return "$lxr_base/$lxr_path";
my $munge = Param('lxr_mungeregexp');
if ($munge ne "") {
eval("\$lxr_path =~ $munge");
}
return "$lxr_base$lxr_path";
}
#