summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2018-03-18 09:14:19 +0000
committerwiz <wiz@pkgsrc.org>2018-03-18 09:14:19 +0000
commit864a1d32df0fcf764db149a731579e972c03d2d4 (patch)
tree6135673938dfd477f1a1883994f1169a180e11f3
parent8d1df1ff5d9b94b3858f5981cd2c8ab0962772af (diff)
downloadpkgsrc-864a1d32df0fcf764db149a731579e972c03d2d4.tar.gz
Apache-Gallery: update to 1.0.2.
Based on wip/p5-Apache-Gallery by mef@ Many dependencies re-added. 1.0.2 Wed Jun 8 20:47:16 CEST 2011 - Extended GalleryUnderscoresToSpaces to filenames as well. (Debian bug #348724, Francesco Potortì) - Added txt to GalleryDocFile, the code in Gallery.pm already allowed it. (Luca Capello) - Added text-html.png and text-txt.png icons. (Debian bug #423004, Luca Capello) - Fixed counter typo for <directory>.folder in next directory menu item. (Luca Capello) - Added support to ignore items through <directory|file>.ignore. (Debian bug #619625, Luca Capello) - Fixed spelling typos in Gallery.pm and README. (Luca Capello) - GalleryCacheDir defaults to /var/cache/www/ per the FHS-2.3. (Debian bug #337197, Luca Capello) - Fixed two minor POD errors (Michael Legart) 1.0.1 Wed Feb 23 20:45:38 CET 2011 - Added missing template files to MANIFEST 1.0 Tue Feb 22 21:54:31 CET 2011 - Handle files that match both GalleryDocFile and GalleryImgFile correctly. (Claus Faerber) - Only respond to HEAD and GET requests, enabling users to use WebDAV for upload (Andreas Plesner) - Added new option GalleryCommentExifKey to get comments from EXIF data (Michael Legart) - Added new option GalleryEnableMediaRss to enable generation of a media RSS feed for each directory listing. This works with e.g. the plugin from http://piclens.com to enable 3D viewing of your gallery. (Michael Legart) - Make browser-caching work with mod_perl 2. Supports If-None-Match and If-Modified-Since headers. Sets Last-Modified-Date and ETag headers. (Michael Legart) 1.0RC3 Fri Sep 16 10:27:48 CEST 2005 - Add watermark even when picture doesn't need to be rescaled (Andreas Plesner) - Fix logging to work in Apache 1.3 (Andreas Plesner) - Bugfix: If only one GallerySize was specified, the image's max width was autmatically added to GallerySizes (Andreas Plesner) - Bugfix: Locate thm files if they are called .thm or .THM (Michael Legart) 1.0RC2 Wed Jun 1 09:11:50 CEST 2005 - Added access keys for navigation (Michael Knudsen) 1.0RC1 Tue May 24 13:31:50 CEST 2005 - Added submit button to form in selection mode (Vlad Marchenko) - Added new option GalleryRootPath for use when the gallery is not running from the root of the virtual host (Lubomir Host) - Report proper errors when there are problems with templates (Don Armstrong) - Support newest mod_perl2 version (Philip Paeps)
-rw-r--r--www/p5-Apache-Gallery/MESSAGE24
-rw-r--r--www/p5-Apache-Gallery/Makefile102
-rw-r--r--www/p5-Apache-Gallery/PLIST65
-rw-r--r--www/p5-Apache-Gallery/distinfo10
-rw-r--r--www/p5-Apache-Gallery/files/ag.conf25
-rw-r--r--www/p5-Apache-Gallery/patches/patch-aa362
6 files changed, 25 insertions, 563 deletions
diff --git a/www/p5-Apache-Gallery/MESSAGE b/www/p5-Apache-Gallery/MESSAGE
deleted file mode 100644
index 17cbc36a0cd..00000000000
--- a/www/p5-Apache-Gallery/MESSAGE
+++ /dev/null
@@ -1,24 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.3 2005/09/28 14:15:50 rillig Exp $
-
-The default Apache::Gallery templates have been installed in
-
- ${AG_SHAREDIR}/templates
-
-The templates refer to icons and stylesheets, that need to be accessible
-through your HTTP server. If you are running Apache, then you may either
-symlink
-
- ln -s ${AG_SHAREDIR}/htdocs ${AG}
-
-in DocumentRoot, or add the following line to httpd.conf:
-
- Include ${PKG_SYSCONFDIR}/${AG}.conf
-
-For more configuration information, see the following files:
-
- ${AG_DOCDIR}/INSTALL
- ${AG_DOCDIR}/README
- ${AG_DOCDIR}/UPGRADE
-
-===========================================================================
diff --git a/www/p5-Apache-Gallery/Makefile b/www/p5-Apache-Gallery/Makefile
index bc15a40855c..7cb420fcf57 100644
--- a/www/p5-Apache-Gallery/Makefile
+++ b/www/p5-Apache-Gallery/Makefile
@@ -1,99 +1,39 @@
-# $NetBSD: Makefile,v 1.69 2017/06/05 14:25:08 ryoon Exp $
+# $NetBSD: Makefile,v 1.70 2018/03/18 09:14:19 wiz Exp $
-DISTNAME= Apache-Gallery-0.9.1
-PKGNAME= p5-${DISTNAME}
-PKGREVISION= 30
-CATEGORIES= www graphics perl5
-MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Apache/}
+DISTNAME= Apache-Gallery-1.0.2-withoutworldwriteables
+PKGNAME= ${DISTNAME:C/-without.*//}
+CATEGORIES= graphics www
+MASTER_SITES= https://cpan.metacpan.org/authors/id/L/LE/LEGART/
MAINTAINER= kim@tac.nyc.ny.us
HOMEPAGE= http://apachegallery.dk/
COMMENT= Perl5/Apache module for handling image directories
LICENSE= artistic
-DEPENDS+= p5-CGI>=2.93:../../www/p5-CGI
-DEPENDS+= p5-URI>=1.23:../../www/p5-URI
DEPENDS+= p5-Image-Imlib2-[0-9]*:../../graphics/p5-Image-Imlib2
-DEPENDS+= p5-Image-Info>=1.15:../../graphics/p5-Image-Info
+DEPENDS+= p5-Image-Info-[0-9]*:../../graphics/p5-Image-Info
DEPENDS+= p5-Image-Size-[0-9]*:../../graphics/p5-Image-Size
DEPENDS+= p5-Text-Template-[0-9]*:../../textproc/p5-Text-Template
-DEPENDS+= p5-${APACHE_PKG_PREFIX}-libapreq{,2}-[0-9]*:../../www/${LIBAPREQ}
+DEPENDS+= p5-HTTP-Date-[0-9]*:../../www/p5-HTTP-Date
+DEPENDS+= p5-URI-[0-9]*:../../www/p5-URI
+DEPENDS+= p5-CGI-[0-9]*:../../www/p5-CGI
-PERL5_PACKLIST= auto/Apache/Gallery/.packlist
+WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
-.include "../../mk/bsd.prefs.mk"
+USE_LANGUAGES= # none
-PKG_SYSCONFSUBDIR?= httpd
-MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+TEST_ENV+= MOD_PERL_API_VERSION=2
+BUILD_DEFS+= VARBASE
-LIBAPREQ= p5-libapreq2
+PERL5_PACKLIST= auto/Apache/Gallery/.packlist
-AG= ag
-AG_DOCDIR= ${PREFIX}/share/doc/${AG}
-AG_EGDIR= ${PREFIX}/share/examples/${AG}
-AG_SHAREDIR= ${PREFIX}/share/${AG}
+SUBST_CLASSES+= var
+SUBST_FILES.var+= t/004_cache_dir.t
+SUBST_SED.var+= -e 's,/var/tmp/Apache-Gallery,${VARBASE}/cache/www,'
+SUBST_STAGE.var= pre-configure
-FILES_SUBST+= LDFLAGS=${LDFLAGS:M*:Q}
-
-MESSAGE_SUBST+= AG=${AG}
-MESSAGE_SUBST+= AG_DOCDIR=${AG_DOCDIR}
-MESSAGE_SUBST+= AG_SHAREDIR=${AG_SHAREDIR}
-
-PLIST_SUBST+= AG=${AG:Q}
-PLIST_SUBST+= AG_DOCDIR=${AG_DOCDIR:S,${PREFIX}/,,}
-PLIST_SUBST+= AG_EGDIR=${AG_EGDIR:S,${PREFIX}/,,}
-PLIST_SUBST+= AG_SHAREDIR=${AG_SHAREDIR:S,${PREFIX}/,,}
-
-CONF_FILES= ${AG_EGDIR}/${AG}.conf ${PKG_SYSCONFDIR}/${AG}.conf
-
-SUBST_CLASSES+= paths
-SUBST_FILES.paths= ag.conf
-SUBST_SED.paths+= -e 's,@AG@,${AG},g'
-SUBST_SED.paths+= -e 's,@AG_SHAREDIR@,${AG_SHAREDIR},g'
-SUBST_STAGE.paths= post-patch
-
-USE_TOOLS+= pax
-
-post-extract:
- ${CP} ${FILESDIR}/ag.conf ${WRKSRC}
-
-post-patch:
- @${MV} -f ${WRKSRC}/templates/default/gallery.css \
- ${WRKSRC}/htdocs/gallery-default.css
- @${MV} -f ${WRKSRC}/templates/new/gallery.css \
- ${WRKSRC}/htdocs/gallery-new.css
-
-pre-configure:
- ${FIND} ${WRKSRC} -name "*.orig" -type f | ${XARGS} ${RM} -f
-
-post-build:
- @for j in default new; \
- do \
- cd ${WRKSRC}/templates/$$j && \
- for i in *.tpl; \
- do \
- ${CP} -p $$i $$i.orig && \
- ${SED} -e "s,/icons/,/${AG}/," \
- -e "s,/gallery.css,/${AG}/gallery-$$j.css," \
- $$i.orig > $$i; \
- ${RM} -f $$i.orig; \
- done; \
- done
-
-INSTALLATION_DIRS= ${AG_SHAREDIR}/htdocs ${AG_SHAREDIR}/templates \
- ${AG_DOCDIR} ${AG_EGDIR}
-
-post-install:
- cd ${WRKSRC}/htdocs && pax -rw . ${DESTDIR}${AG_SHAREDIR}/htdocs
- cd ${WRKSRC}/templates && pax -rw . ${DESTDIR}${AG_SHAREDIR}/templates
- ${INSTALL_DATA} ${WRKSRC}/Changes ${DESTDIR}${AG_DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/INSTALL ${DESTDIR}${AG_DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/LICENSE ${DESTDIR}${AG_DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${AG_DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/UPGRADE ${DESTDIR}${AG_DOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/${AG}.conf ${DESTDIR}${AG_EGDIR}
-
-.include "../../graphics/imlib2/buildlink3.mk"
.include "../../lang/perl5/module.mk"
-.include "../../mk/apache.mk"
+# for make test
+# (still asking for Apache::FakeRequest)
+.include "../../www/ap2-perl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/p5-Apache-Gallery/PLIST b/www/p5-Apache-Gallery/PLIST
deleted file mode 100644
index 41d95e2b007..00000000000
--- a/www/p5-Apache-Gallery/PLIST
+++ /dev/null
@@ -1,65 +0,0 @@
-@comment $NetBSD: PLIST,v 1.5 2009/06/14 22:00:30 joerg Exp $
-${AG_SHAREDIR}/htdocs/agfolder.png
-${AG_SHAREDIR}/htdocs/application-doc.png
-${AG_SHAREDIR}/htdocs/application-pdf.png
-${AG_SHAREDIR}/htdocs/application-rtf.png
-${AG_SHAREDIR}/htdocs/c.png
-${AG_SHAREDIR}/htdocs/gallery-default.css
-${AG_SHAREDIR}/htdocs/gallery-new.css
-${AG_SHAREDIR}/htdocs/sound-mp3.png
-${AG_SHAREDIR}/htdocs/sound-ogg.png
-${AG_SHAREDIR}/htdocs/sound-wav.png
-${AG_SHAREDIR}/htdocs/video-asf.png
-${AG_SHAREDIR}/htdocs/video-avi.png
-${AG_SHAREDIR}/htdocs/video-mov.png
-${AG_SHAREDIR}/htdocs/video-mpeg.png
-${AG_SHAREDIR}/htdocs/video-mpg.png
-${AG_SHAREDIR}/htdocs/video-wmv.png
-${AG_SHAREDIR}/templates/default/dircomment.tpl
-${AG_SHAREDIR}/templates/default/directory.tpl
-${AG_SHAREDIR}/templates/default/error.tpl
-${AG_SHAREDIR}/templates/default/file.tpl
-${AG_SHAREDIR}/templates/default/index.tpl
-${AG_SHAREDIR}/templates/default/info.tpl
-${AG_SHAREDIR}/templates/default/interval.tpl
-${AG_SHAREDIR}/templates/default/intervalactive.tpl
-${AG_SHAREDIR}/templates/default/layout.tpl
-${AG_SHAREDIR}/templates/default/navpicture.tpl
-${AG_SHAREDIR}/templates/default/nodircomment.tpl
-${AG_SHAREDIR}/templates/default/nopictureinfo.tpl
-${AG_SHAREDIR}/templates/default/orig.tpl
-${AG_SHAREDIR}/templates/default/picture.tpl
-${AG_SHAREDIR}/templates/default/pictureinfo.tpl
-${AG_SHAREDIR}/templates/default/refresh.tpl
-${AG_SHAREDIR}/templates/default/scale.tpl
-${AG_SHAREDIR}/templates/default/scaleactive.tpl
-${AG_SHAREDIR}/templates/default/showpicture.tpl
-${AG_SHAREDIR}/templates/default/slideshowisoff.tpl
-${AG_SHAREDIR}/templates/default/slideshowoff.tpl
-${AG_SHAREDIR}/templates/new/dircomment.tpl
-${AG_SHAREDIR}/templates/new/directory.tpl
-${AG_SHAREDIR}/templates/new/error.tpl
-${AG_SHAREDIR}/templates/new/file.tpl
-${AG_SHAREDIR}/templates/new/index.tpl
-${AG_SHAREDIR}/templates/new/info.tpl
-${AG_SHAREDIR}/templates/new/interval.tpl
-${AG_SHAREDIR}/templates/new/intervalactive.tpl
-${AG_SHAREDIR}/templates/new/layout.tpl
-${AG_SHAREDIR}/templates/new/navpicture.tpl
-${AG_SHAREDIR}/templates/new/nodircomment.tpl
-${AG_SHAREDIR}/templates/new/nopictureinfo.tpl
-${AG_SHAREDIR}/templates/new/orig.tpl
-${AG_SHAREDIR}/templates/new/picture.tpl
-${AG_SHAREDIR}/templates/new/pictureinfo.tpl
-${AG_SHAREDIR}/templates/new/refresh.tpl
-${AG_SHAREDIR}/templates/new/scale.tpl
-${AG_SHAREDIR}/templates/new/scaleactive.tpl
-${AG_SHAREDIR}/templates/new/showpicture.tpl
-${AG_SHAREDIR}/templates/new/slideshowisoff.tpl
-${AG_SHAREDIR}/templates/new/slideshowoff.tpl
-${AG_DOCDIR}/Changes
-${AG_DOCDIR}/INSTALL
-${AG_DOCDIR}/LICENSE
-${AG_DOCDIR}/README
-${AG_DOCDIR}/UPGRADE
-${AG_EGDIR}/${AG}.conf
diff --git a/www/p5-Apache-Gallery/distinfo b/www/p5-Apache-Gallery/distinfo
index 06c5d5abbc8..377a45e14a1 100644
--- a/www/p5-Apache-Gallery/distinfo
+++ b/www/p5-Apache-Gallery/distinfo
@@ -1,7 +1,5 @@
-$NetBSD: distinfo,v 1.9 2015/11/04 02:47:00 agc Exp $
+$NetBSD: distinfo,v 1.10 2018/03/18 09:14:19 wiz Exp $
-SHA1 (Apache-Gallery-0.9.1.tar.gz) = e818c89d2b9a6d1aa63bacf149c4a259e6323284
-RMD160 (Apache-Gallery-0.9.1.tar.gz) = 015f9921520c5c3fe382b5e3b7d358b96ddd4be7
-SHA512 (Apache-Gallery-0.9.1.tar.gz) = 32d64f99d98cb970919422b4521d885c5e46ded6531acf4b45fae9979731dfa2d4b9352bddf3297edc4aacbbd8b06db5cb9229bdcf5616b955a55353e2f45f89
-Size (Apache-Gallery-0.9.1.tar.gz) = 82230 bytes
-SHA1 (patch-aa) = ba3246c428255c752fe2a3877072cf4de0f6c86d
+SHA1 (Apache-Gallery-1.0.2-withoutworldwriteables.tar.gz) = b68df2ac7bb784d1627e0b7e71460f8e4ae1a4e9
+RMD160 (Apache-Gallery-1.0.2-withoutworldwriteables.tar.gz) = 59e5c07ff536255e3defe0785908bb8621c2de09
+Size (Apache-Gallery-1.0.2-withoutworldwriteables.tar.gz) = 89317 bytes
diff --git a/www/p5-Apache-Gallery/files/ag.conf b/www/p5-Apache-Gallery/files/ag.conf
deleted file mode 100644
index 01d9a78f3e5..00000000000
--- a/www/p5-Apache-Gallery/files/ag.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-# $NetBSD: ag.conf,v 1.3 2003/09/21 16:21:16 kim Exp $
-#
-# Configuration fragment for Apache::Gallery
-#
-
-#
-# Default settings
-#
-
-PerlSetVar GalleryTemplateDir @AG_SHAREDIR@/templates/default
-
-#
-# Files referred by default templates
-#
-
-<IfModule mod_alias.c>
- Alias /@AG@/ "@AG_SHAREDIR@/htdocs/"
-</IfModule>
-
-<Directory "@AG_SHAREDIR@/htdocs">
- Options None
- AllowOverride None
- Order allow,deny
- Allow from all
-</Directory>
diff --git a/www/p5-Apache-Gallery/patches/patch-aa b/www/p5-Apache-Gallery/patches/patch-aa
deleted file mode 100644
index 54027f9f5ea..00000000000
--- a/www/p5-Apache-Gallery/patches/patch-aa
+++ /dev/null
@@ -1,362 +0,0 @@
-$NetBSD: patch-aa,v 1.7 2006/04/16 14:19:25 kim Exp $
-
---- lib/Apache/Gallery.pm.orig 2004-09-12 00:53:05.000000000 +0300
-+++ lib/Apache/Gallery.pm 2006-04-16 16:43:43.000000000 +0300
-@@ -13,22 +13,22 @@
-
- eval('require mod_perl;');
- if ( $@ ) {
-- require Apache2::mod_perl;
-+ require mod_perl2;
- }
-
- $::MP2 = ($mod_perl::VERSION >= 1.99);
-
- if ($::MP2) {
-- require Apache2;
-- require Apache::Server;
-- require Apache::RequestRec;
-- require Apache::Log;
-+ #require Apache2;
-+ #require Apache2::Server;
-+ require Apache2::RequestRec;
-+ require Apache2::Log;
- require APR::Table;
-- require Apache::RequestIO;
-- require Apache::SubRequest;
-- require Apache::Const;
-+ require Apache2::RequestIO;
-+ require Apache2::SubRequest;
-+ require Apache2::Const;
-
-- Apache::Const->import(-compile => 'OK','DECLINED','FORBIDDEN','NOT_FOUND');
-+ Apache2::Const->import(-compile => 'OK','DECLINED','FORBIDDEN','NOT_FOUND');
-
- }
- else {
-@@ -84,10 +84,10 @@
- }
-
- if (-f $filename or -d $filename) {
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
- else {
-- return $::MP2 ? Apache::NOT_FOUND() : Apache::Constants::NOT_FOUND();
-+ return $::MP2 ? Apache2::Const::NOT_FOUND() : Apache::Constants::NOT_FOUND();
- }
- }
-
-@@ -105,7 +105,7 @@
- }
-
- $r->print($content);
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
-
- # Selectmode providing checkboxes beside all thumbnails
-@@ -113,7 +113,7 @@
-
- # Let Apache serve icons without us modifying the request
- if ($r->uri =~ m/^\/icons/i) {
-- return $::MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED();
-+ return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED();
- }
- # Lookup the file in the cache and scale the image if the cached
- # image does not exist
-@@ -142,7 +142,7 @@
-
- if ($::MP2) {
- $r->sendfile($file);
-- return Apache::OK();
-+ return Apache2::Const::OK();
- }
- else {
- $r->path_info('');
-@@ -157,7 +157,7 @@
-
- unless (-f $filename or -d $filename) {
- show_error($r, 404, "404!", "No such file or directory: ".uri_escape($r->uri, $escape_rule));
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
-
- my $doc_pattern = $r->dir_config('GalleryDocFile');
-@@ -171,14 +171,14 @@
-
- # Let Apache serve files we don't know how to handle anyway
- if (-f $filename && $filename !~ m/$img_pattern/i) {
-- return $::MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED();
-+ return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED();
- }
-
- if (-d $filename) {
-
- unless (-d cache_dir($r, 0)) {
- unless (create_cache($r, cache_dir($r, 0))) {
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
- }
-
-@@ -198,7 +198,7 @@
-
- unless (opendir (DIR, $filename)) {
- show_error ($r, 500, $!, "Unable to access directory $filename: $!");
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
-
- $tpl_vars{MENU} = generate_menu($r);
-@@ -253,9 +253,28 @@
-
- # Combine directories and files to one listing
- my @listing;
-- push (@listing, @directories);
-- push (@listing, @files);
-- push (@listing, @downloadable_files);
-+ if (!defined($r->dir_config('GallerySortReverse'))
-+ || $r->dir_config('GallerySortReverse') eq '0') {
-+ push (@listing, @directories);
-+ push (@listing, @files);
-+ push (@listing, @downloadable_files);
-+ } else {
-+ if ($r->dir_config('GallerySortReverse') & 1) {
-+ push (@listing, reverse @directories);
-+ } else {
-+ push (@listing, @directories);
-+ }
-+ if ($r->dir_config('GallerySortReverse') & 2) {
-+ push (@listing, reverse @files);
-+ } else {
-+ push (@listing, @files);
-+ }
-+ if ($r->dir_config('GallerySortReverse') & 4) {
-+ push (@listing, reverse @downloadable_files);
-+ } else {
-+ push (@listing, @downloadable_files);
-+ }
-+ }
-
- if (@listing) {
-
-@@ -319,7 +338,7 @@
- if (-d $thumbfilename) {
- my $dirtitle = '';
- if (-e $thumbfilename . ".folder") {
-- $dirtitle = get_filecontent($thumbfilename . ".folder");
-+ $dirtitle = get_filecontent($thumbfilename . ".folder", 1);
- }
-
- $dirtitle = $dirtitle ? $dirtitle : $file;
-@@ -393,7 +412,7 @@
- if (-f $topdir . '.comment') {
- my $comment_ref = get_comment($topdir . '.comment');
- my %comment_vars;
-- $comment_vars{COMMENT} = $comment_ref->{COMMENT} . '<br>' if $comment_ref->{COMMENT};
-+ $comment_vars{COMMENT} = $comment_ref->{COMMENT} if $comment_ref->{COMMENT};
- $comment_vars{TITLE} = $comment_ref->{TITLE} if $comment_ref->{TITLE};
- $tpl_vars{DIRCOMMENT} = fill_in_file($tpl_vars{comment},
- HASH => \%comment_vars,
-@@ -420,7 +439,7 @@
- }
-
- $r->print($tpl_vars{MAIN});
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
-
- }
- else {
-@@ -429,9 +448,9 @@
- if (defined($ENV{QUERY_STRING}) && $ENV{QUERY_STRING} eq 'orig') {
- if ($r->dir_config('GalleryAllowOriginal') ? 1 : 0) {
- $r->filename($filename);
-- return $::MP2 ? Apache::DECLINED() : Apache::Constants::DECLINED();
-+ return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED();
- } else {
-- return $::MP2 ? Apache::FORBIDDEN() : Apache::Constants::FORBIDDEN();
-+ return $::MP2 ? Apache2::Const::FORBIDDEN() : Apache::Constants::FORBIDDEN();
- }
- }
-
-@@ -443,7 +462,7 @@
-
- unless (-d $cache_path) {
- unless (create_cache($r, $cache_path)) {
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
- }
-
-@@ -465,7 +484,7 @@
- if ($cgi->param('width')) {
- unless ((grep $cgi->param('width') == $_, @sizes) or ($cgi->param('width') == $original_size)) {
- show_error($r, 200, "Invalid width", "The specified width is invalid");
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
-
- $width = $cgi->param('width');
-@@ -534,7 +553,7 @@
-
- unless (opendir(DATADIR, $path)) {
- show_error($r, 500, "Unable to access directory", "Unable to access directory $path");
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
- my @pictures = grep { /$img_pattern/i } readdir (DATADIR);
- closedir(DATADIR);
-@@ -542,6 +561,9 @@
-
- $tpl_vars{TOTAL} = scalar @pictures;
-
-+ my $prevtext = (defined($r->dir_config('GalleryPreviousText')) ? $r->dir_config('GalleryPreviousText') : '&laquo; prev' );
-+ my $nexttext = (defined($r->dir_config('GalleryNextText')) ? $r->dir_config('GalleryNextText') : 'next &raquo;' );
-+
- my $prevpicture;
- my $nextpicture;
-
-@@ -567,13 +589,13 @@
- $nav_vars{FILENAME} = $prevpicture;
- $nav_vars{WIDTH} = $width;
- $nav_vars{PICTURE} = uri_escape(".cache/$cached", $escape_rule);
-- $nav_vars{DIRECTION} = "&laquo; prev";
-+ $nav_vars{DIRECTION} = $prevtext;
- $tpl_vars{BACK} = fill_in_file($tpl_vars{navpicture},
- HASH => \%nav_vars,
- );
- }
- else {
-- $tpl_vars{BACK} = "&nbsp";
-+ $tpl_vars{BACK} = '';
- }
-
- $nextpicture = $pictures[$i+1];
-@@ -591,14 +613,14 @@
- $nav_vars{FILENAME} = $nextpicture;
- $nav_vars{WIDTH} = $width;
- $nav_vars{PICTURE} = uri_escape(".cache/$cached", $escape_rule);
-- $nav_vars{DIRECTION} = "next &raquo;";
-+ $nav_vars{DIRECTION} = $nexttext;
-
- $tpl_vars{NEXT} = fill_in_file($tpl_vars{navpicture},
- HASH => \%nav_vars
- );
- }
- else {
-- $tpl_vars{NEXT} = "&nbsp;";
-+ $tpl_vars{NEXT} = '';
- }
- }
- }
-@@ -607,7 +629,7 @@
- if (-f $path . '/' . $picfilename . '.comment') {
- my $comment_ref = get_comment($path . '/' . $picfilename . '.comment');
- $foundcomment = 1;
-- $tpl_vars{COMMENT} = $comment_ref->{COMMENT} . '<br>' if $comment_ref->{COMMENT};
-+ $tpl_vars{COMMENT} = $comment_ref->{COMMENT} if $comment_ref->{COMMENT};
- $tpl_vars{TITLE} = $comment_ref->{TITLE} if $comment_ref->{TITLE};
- } else {
- $tpl_vars{COMMENT} = '';
-@@ -749,7 +771,7 @@
-
- unless ((grep $cgi->param('slideshow') == $_, @slideshow_intervals)) {
- show_error($r, 200, "Invalid interval", "Invalid slideshow interval choosen");
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
- }
-
- $tpl_vars{URL} = uri_escape($nextpicture, $escape_rule);
-@@ -781,7 +803,7 @@
- }
-
- $r->print($tpl_vars{MAIN});
-- return $::MP2 ? Apache::OK() : Apache::Constants::OK();
-+ return $::MP2 ? Apache2::Const::OK() : Apache::Constants::OK();
-
- }
-
-@@ -1040,7 +1062,7 @@
- }
- }
- elsif (ref($element) eq 'HASH') {
-- $value .= "<br>{ ";
-+ $value .= " { ";
- foreach (sort keys %{$element}) {
- $value .= "$_ = " . $element->{$_} . ' ';
- }
-@@ -1226,6 +1248,7 @@
-
- sub get_filecontent {
- my $file = shift;
-+ my $fold = shift;
- open(FH, $file) or return undef;
- my $content = '';
- {
-@@ -1233,6 +1256,8 @@
- $content = <FH>;
- }
- close(FH);
-+ chomp($content);
-+ $content =~ s/\n/<br \/>\n/g if $fold;
- return $content;
- }
-
-@@ -1252,7 +1277,6 @@
- }
-
- while (<FH>) {
-- chomp;
- $comment_ref->{COMMENT} .= $_;
- }
- close(FH);
-@@ -1319,6 +1343,8 @@
- return qq{ <a href="/">$root_text</a> };
- }
-
-+ my $delim = (defined($r->dir_config('GalleryMenuSeparator')) ? $r->dir_config('GalleryMenuSeparator') : ' / ' );
-+
- my $menu;
- my $menuurl;
- foreach my $link (@links) {
-@@ -1326,23 +1352,26 @@
- $menuurl .= $link."/";
- my $linktext = $link;
- unless (length($link)) {
-- $linktext = "$root_text ";
-+ $linktext = $root_text;
- }
- else {
-
- $dirname = File::Spec->catdir($dirname, $link);
-
- if (-e $dirname . ".folder") {
-- $linktext = get_filecontent($dirname . ".folder");
-+ $linktext = get_filecontent($dirname . ".folder", 0);
- }
- }
-
-- $menu .= "<a href=\"".uri_escape($menuurl, $escape_rule)."\">$linktext</a> / ";
-+ if (length($menu)) {
-+ $menu .= $delim;
-+ }
-+ $menu .= '<a href="' . uri_escape($menuurl, $escape_rule) . '">' . $linktext . '</a>';
-
- }
-
- if (-f $filename) {
-- $menu .= $picturename;
-+ $menu .= $delim . $picturename;
- }
- else {
-
-@@ -1752,7 +1781,7 @@
- Example:
-
- TITLE: This is the new title of the page
-- And this is the comment.<br>
-+ And this is the comment.<br />
- And this is line two of the comment.
-
- The visible name of the folder is by default identical to the name of