[LON-CAPA-cvs] cvs: loncom /interface lonhtmlcommon.pm
www
lon-capa-cvs@mail.lon-capa.org
Thu, 29 Jan 2004 00:51:06 -0000
www Wed Jan 28 19:51:06 2004 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
Log:
Better setting of final "/" in crumbs.
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.42 loncom/interface/lonhtmlcommon.pm:1.43
--- loncom/interface/lonhtmlcommon.pm:1.42 Tue Jan 27 11:35:37 2004
+++ loncom/interface/lonhtmlcommon.pm Wed Jan 28 19:51:06 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.42 2004/01/27 16:35:37 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.43 2004/01/29 00:51:06 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -924,13 +924,14 @@
my ($uri,$target,$prefix,$form)=@_;
my $output='<br /><tt><b><font size="+2">'.$prefix.'/';
if ($ENV{'user.adv'}) {
- my $path=$prefix;
+ my $path=$prefix.'/';
foreach (split('/',$uri)) {
unless ($_) { next; }
- $path.='/'.$_;
+ $path.=$_;
+ unless ($path eq $uri) { $path.='/'; }
my $linkpath=$path;
if ($form) {
- $linkpath="javascript:$form.action='$path/';$form.submit();";
+ $linkpath="javascript:$form.action='$path';$form.submit();";
}
$output.='<a href="'.$linkpath.'"'.($target?' target="'.$target.'"':'').'>'.$_.'</a>/';
}