diff options
author | kim <kim> | 2004-04-01 19:21:50 +0000 |
---|---|---|
committer | kim <kim> | 2004-04-01 19:21:50 +0000 |
commit | 4d97c6461e0d7daf62a05f2dd895d96f7023975c (patch) | |
tree | b78d833dccfc62df1b79ac136b5bb276556f0144 /www/p5-Apache-Gallery | |
parent | a1e6381cc4fdf8c3beb48855169c971205f38b48 (diff) | |
download | pkgsrc-4d97c6461e0d7daf62a05f2dd895d96f7023975c.tar.gz |
Add patch-aa, missed from previous commit.
Diffstat (limited to 'www/p5-Apache-Gallery')
-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); + } + } + |