diff options
author | kim <kim@pkgsrc.org> | 2004-04-01 19:21:50 +0000 |
---|---|---|
committer | kim <kim@pkgsrc.org> | 2004-04-01 19:21:50 +0000 |
commit | da5e393dc59dc92669c30941731fe8c6c8ae7f84 (patch) | |
tree | b78d833dccfc62df1b79ac136b5bb276556f0144 /www | |
parent | d155339fac21f0f300bc9880cb40240f95e09975 (diff) | |
download | pkgsrc-da5e393dc59dc92669c30941731fe8c6c8ae7f84.tar.gz |
Add patch-aa, missed from previous commit.
Diffstat (limited to 'www')
-rw-r--r-- | www/p5-Apache-Gallery/patches/patch-aa | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/www/p5-Apache-Gallery/patches/patch-aa b/www/p5-Apache-Gallery/patches/patch-aa new file mode 100644 index 00000000000..81590a562aa --- /dev/null +++ b/www/p5-Apache-Gallery/patches/patch-aa @@ -0,0 +1,41 @@ +$NetBSD: patch-aa,v 1.4 2004/04/01 19:21:50 kim Exp $ + +Convert newlines to <BR> tags in visible folder names on the directory +page, but not in the menu bar. + +--- lib/Apache/Gallery.pm.orig 2004-03-13 13:02:03.000000000 -0500 ++++ lib/Apache/Gallery.pm 2004-03-13 13:02:49.000000000 -0500 +@@ -272,7 +272,7 @@ + if (-d $thumbfilename) { + my $dirtitle = ''; + if (-e $thumbfilename . ".folder") { +- $dirtitle = get_filecontent($thumbfilename . ".folder"); ++ $dirtitle = get_filecontent($thumbfilename . ".folder", 1); + } + + $tpl->assign(FILEURL => uri_escape($fileurl, $escape_rule), FILE => ($dirtitle ? $dirtitle : $file)); +@@ -1041,6 +1041,7 @@ + + sub get_filecontent { + my $file = shift; ++ my $fold = shift; + open(FH, $file) or return undef; + my $content = ''; + { +@@ -1048,6 +1049,7 @@ + $content = <FH>; + } + close(FH); ++ $content =~ s/\n/<BR>\n/g if $fold; + return $content; + } + +@@ -1145,7 +1147,7 @@ + $dirname = File::Spec->catdir($dirname, $link); + + if (-e $dirname . ".folder") { +- $linktext = get_filecontent($dirname . ".folder"); ++ $linktext = get_filecontent($dirname . ".folder", 0); + } + } + |