From 709de5de5da8b60f43f41e58d8d1bc90e768d871 Mon Sep 17 00:00:00 2001 From: jwz Date: Tue, 16 Jun 1998 01:18:34 +0000 Subject: [PATCH] yuck. you can't use ".." in otherwise-fully-qualified URLs, so I had to add another template variable, $dotdoturl, that is just like $baseurl but points to one directory higher. Sucks! git-svn-id: svn://10.0.0.236/trunk@3852 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/lxr/lib/LXR/Common.pm | 10 +++++++++- mozilla/webtools/lxr/template-source-head | 6 +++--- mozilla/webtools/lxr/template-sourcedir-head | 6 +++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/mozilla/webtools/lxr/lib/LXR/Common.pm b/mozilla/webtools/lxr/lib/LXR/Common.pm index ad658a4db5a..ad5216e81e5 100755 --- a/mozilla/webtools/lxr/lib/LXR/Common.pm +++ b/mozilla/webtools/lxr/lib/LXR/Common.pm @@ -1,4 +1,4 @@ -# $Id: Common.pm,v 1.5 1998-06-16 00:57:48 jwz Exp $ +# $Id: Common.pm,v 1.6 1998-06-16 01:18:34 jwz Exp $ package LXR::Common; @@ -412,6 +412,13 @@ sub baseurl { return($Conf->baseurl); } +sub dotdoturl { + my $url = $Conf->baseurl; + $url =~ s@/$@@; + $url =~ s@/[^/]*$@@; + return($url); +} + # This one isn't too bad either. We just expand the "modes" template # by filling in all the relevant values in the nested "modelink" # template. @@ -581,6 +588,7 @@ sub makeheader { ('title', \&titleexpand), ('banner', \&bannerexpand), ('baseurl', \&baseurl), + ('dotdoturl', \&dotdoturl), ('thisurl', \&thisurl), ('pathname', \&pathname), ('modes', \&modeexpand), diff --git a/mozilla/webtools/lxr/template-source-head b/mozilla/webtools/lxr/template-source-head index ab58caed10e..8839f4955d9 100644 --- a/mozilla/webtools/lxr/template-source-head +++ b/mozilla/webtools/lxr/template-source-head @@ -86,9 +86,9 @@ function js_file_menu(file,d) { changes to
this file in
the last: - day
- week
- month
+ day
+ week
+ month
diff --git a/mozilla/webtools/lxr/template-sourcedir-head b/mozilla/webtools/lxr/template-sourcedir-head index 7c65586492d..9941b08fab8 100644 --- a/mozilla/webtools/lxr/template-sourcedir-head +++ b/mozilla/webtools/lxr/template-sourcedir-head @@ -86,9 +86,9 @@ function js_file_menu(file,d) { changes to
this directory
in the last: - day
- week
- month
+ day
+ week
+ month