--- libapache-gallery-perl-1.0.2.orig/README +++ libapache-gallery-perl-1.0.2/README @@ -292,6 +292,10 @@ of the folder, but can be changed by creating a file .folder with the visible name of the folder. + Similarly, the visible name of any file is by default identical to the + name of the file, but can be changed by creating a file .file + with the visible name of the file. + It is also possible to set GalleryCommentExifKey to the name of an EXIF field containing the comment, e.g. ImageDescription. The EXIF comment is overridden by the .comment file if it exists. --- libapache-gallery-perl-1.0.2.orig/debian/README.Debian +++ libapache-gallery-perl-1.0.2/debian/README.Debian @@ -0,0 +1,125 @@ +libapache-gallery-perl for Debian +--------------------------------- + +Read more to learn how to integrate Apache::Gallery in the Apache Web Server. +You have to complete all the steps described in this README file. + +1. Configure your Apache server + +1.1 Apache 1.3 + +You need to configure your virtualhost block to look like: + + + ServerName gallery.yourdomain.org + DocumentRoot /data/pictures/ + ErrorLog logs/gallery-error_log + TransferLog logs/gallery-access_log + PerlSetVar GalleryTemplateDir '/usr/share/libapache-gallery-perl/templates/default' + PerlSetVar GalleryInfo 'Picture Taken => DateTimeOriginal, Flash => Flash' + PerlSetVar GallerySizes '640 1024 1600 2272' + PerlSetVar GalleryThumbnailSize '100x75' + PerlSetVar GalleryCopyrightImage 'htdocs/c.png' + + SetHandler perl-script + PerlHandler Apache::Gallery + + + +NOTICE: Although stated by the original author of Apache::Gallery, some users +have reported it is not longer true that Apache::Gallery does not work with +mod_autoindex. If you experience problems, with your gallery, please, follow +this instructions: + +WARNING: Apache::Gallery might not work properly if mod_autoindex is loaded by +Apache. Indeed, mod_autoindex might override Apache::Gallery and might not let +it display directory content. + +To check if your apache loads mod_autoindex, just look for this line in +httpd.conf: + +LoadModule autoindex_module /usr/lib/apache/1.3/mod_autoindex.so + +If this line is not commented, Apache::Gallery might only work when an image is +loaded directly. Whenever a directory listing is requested, Apache might +respond with the classic (and ugly) directory listing performed by +mod_autoindex. + +1.2 Apache 2 + +In case you run apache 2 and modperl 2 (or 1.99), it needs to look like: + + + ServerName gallery.yourdomain.org + DocumentRoot /data/pictures/ + ErrorLog logs/gallery-error_log + TransferLog logs/gallery-access_log + PerlSetVar GalleryTemplateDir '/usr/share/libapache-gallery-perl/templates/default' + PerlSetVar GalleryInfo 'Picture Taken => DateTimeOriginal, Flash => Flash' + PerlSetVar GallerySizes '640 1024 1600 2272' + PerlSetVar GalleryThumbnailSize '100x75' + PerlSetVar GalleryCopyrightImage 'htdocs/c.png' + PerlOptions +GlobalRequest + + SetHandler modperl + PerlResponseHandler Apache::Gallery + + + +NOTICE: Although stated by the original author of Apache::Gallery, some users +have reported it is not longer true that Apache::Gallery does not work with +mod_autoindex. If you experience problems, with your gallery, please, follow +this instructions: + +WARNING: Apache::Gallery might not work properly if mod_autoindex is loaded by +Apache. Indeed, mod_autoindex might override Apache::Gallery and might not let +it display directory content. + +To check if your installation loads the autoindex module, you need to check +under /etc/apache2/mods-enabled for a link to the module (actually placed under +/etc/apache2/mods-available) + +If this module is activated, Apache::Gallery might only work when an image is +loaded directly. Whenever a directory listing is requested, Apache might +respond with the classic (and ugly) directory listing performed by +mod_autoindex. + +2. Place the icons + +For accessing the icons, you can create an alias to the directory where they +reside. Icons for libapache-gallery-perl *must* appear under /icons/gallery +on your topmost apache tree: + + Alias /icons/gallery/ "/usr/share/libapache-gallery-perl/icons/" + +This Alias defined above should appear _before_ the "Alias /icons ..." in your +config files. + +Another choice is to symlink: + + /usr/share/apache2/icons/gallery -> /usr/share/libapache-gallery-perl/icons + +From your Apache icons directory. The example above is for Apache2. + +As a less recommended alternative, you can create a directory called gallery in +your Apache icons directory and copy the png files in htdocs to this directory. + +3. Edit the template directory + +Edit the GalleryTemplateDir variable to point to the templates you want +Apache::Gallery to use. This Debian package distributes 2 templates, called +"default" and "new". + +4. Place the CSS file + +The gallery.css file from the template directory you choose must be +copied to the DocumentRoot of your gallery. + +That's IT! + + +It is possible to include a graphical copyright notice on each picture now. +By setting the GalleryCopyrightImage PerlSetVar you can define the path +to a picture that you want include in the bottom right of each picture. + + -- Jesus Climent Mon, 09 Apr 2004 22:31:39 +0000 --- libapache-gallery-perl-1.0.2.orig/debian/changelog +++ libapache-gallery-perl-1.0.2/debian/changelog @@ -0,0 +1,195 @@ +libapache-gallery-perl (1.0.2-5) unstable; urgency=medium + + * Acknowledge NMU changes + * Update standards version, no changes + * Fix VCS urls + * Add support for ?thumbonly to the debian package + * Add support for .file renaming of images. Thanks to Luca + Capello for the patch (Closes: #337012). + + -- Don Armstrong Thu, 02 Nov 2017 11:17:27 -0700 + +libapache-gallery-perl (1.0.2-4.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add missing (build-)dependency on libcgi-pm-perl (Closes: #806899) + + -- Dominic Hargreaves Sun, 06 Dec 2015 22:10:31 +0000 + +libapache-gallery-perl (1.0.2-4) unstable; urgency=medium + + * Remove regex and filename setting for icons/gallery which caused the + wrong file to be used. Thanks to Andreas Pakulat for identifying the + issue. (Closes: #770687) + + -- Don Armstrong Tue, 02 Dec 2014 11:33:24 -0800 + +libapache-gallery-perl (1.0.2-3) unstable; urgency=medium + + * Create var/cache/www and make it writable by www-data (Closes: #710281) + Thanks to Bdale for noticing this. + * Do not attempt to delete /var/cache/www (Closes: #747260) + Thanks to Andy Spiers for the patch. + * Update standards version to 3.9.5 (no changes). + * Add rudimentary support for mp4 files (Closes: #704000). + Thanks to Andres Salomon for the patch. + + -- Don Armstrong Fri, 30 May 2014 18:53:18 -0700 + +libapache-gallery-perl (1.0.2-2) unstable; urgency=low + + * Rewrite path to icons in request + + -- Don Armstrong Sat, 26 Nov 2011 16:29:55 -0800 + +libapache-gallery-perl (1.0.2-1) unstable; urgency=low + + * New upstream release + + Added ignore file support (Closes: #619625) + + Cache dir default (Closes: #337197) + + -- Don Armstrong Sat, 26 Nov 2011 14:42:09 -0800 + +libapache-gallery-perl (1.0.1-3) unstable; urgency=low + + * Include default/navdirectory.tpl and new/navdirectory.tpl by copying + from the bright template (Closes: #645356). + + -- Don Armstrong Fri, 14 Oct 2011 14:04:25 -0700 + +libapache-gallery-perl (1.0.1-2) unstable; urgency=low + + * Fix maintainer address + + -- Don Armstrong Wed, 28 Sep 2011 14:57:52 -0700 + +libapache-gallery-perl (1.0.1-1) unstable; urgency=low + + * New upstream release + * Change underscores to spaces for images too (Closes: #348724). Thanks + to Francesco Potorti and Luca Capello. + * Allow txt files to be used as plain files (Closes: #423004); include + icons which are now upstream. Thanks to Luca Capello. + + -- Don Armstrong Wed, 28 Sep 2011 12:34:55 -0700 + +libapache-gallery-perl (0.99-svn060811-1) unstable; urgency=low + + * New svn pull release, pre 1.0. + * Upstream changes: + - Added the right gallery.css + - Fix xhtml validation errors. + - Cleaned colorcodes up at bit + - Initial import of new template; bright. + - Added missing semicolon for html validation. + - Cache bugfix. + * Added a cronjob to clean the cache (Closes: #337200) + + -- Jesus Climent Fri, 11 Aug 2006 00:09:30 +0300 + +libapache-gallery-perl (0.99-svn050921-1) unstable; urgency=low + + * New svn pull release, pre 1.0. + * Show only sizes specified in the config file (Closes: #290900). + * Add copyright image also in the case the picture does not need to scaled + (Closes: #324524). + * libapache-gallery-perl should work with libapache2-mod-perl2 even if + libapache-mod-perl is installed (Closes: #316172). + + -- Jesus Climent Tue, 20 Sep 2005 20:51:11 +0000 + +libapache-gallery-perl (0.99-svn050708-1) unstable; urgency=low + + * New svn pull release: "Debconf5 is over, so now i can work in my packages" + and "QA Meeting in FRA". + * Updated documentation. + * Update dependency on the new libapache2-mod-perl2. + * Bumped Standards, no changes needed. + + -- Jesus Climent Fri, 9 Sep 2005 15:44:10 +0000 + +libapache-gallery-perl (0.99-svn050524-1) unstable; urgency=low + + * The "Pissing Manoj has its consecuences" release. + * Updated subversion checkout due to new API version uploaded to sid + (Closes: #310486). + This version is in fact 1.0rc1, but it requires a new version of + perl-modules containing a new CGI.pm release (we need 3.08 and 3.04 is the + one we distribute right now). + * Remove spurious dependency on the (otherwise outdated) libcgi-perl + (Closes: #310632). Kudos to Manoj for noticing. + + -- Jesus Climent Tue, 24 May 2005 11:44:30 +0000 + +libapache-gallery-perl (0.9.1-3) unstable; urgency=low + + * Brown Paper Bag release. + * Changed back the /gallery-icons/ to /icons/gallery/ (Closes: #292604) + This was one of the old changes that I wanted not to introduce, but I + forgot I made when my hard disk drive crashed. The only working copy had + that change... + + -- Jesus Climent Fri, 28 Jan 2005 09:11:46 +0000 + +libapache-gallery-perl (0.9.1-2) unstable; urgency=low + + * New README.Debian file with reorganized intructions. Hopefully they will + make it easier for the end user to get it working (Closes: #254396). + Also, modified the requirement for removing autoindex_module, and state + that might not be true (Closes: #290159) + * Modified Gallery.pm to include the new libapache2-mod-perl2 + (Closes: #290678) + * Applied patch from Don Armstrong to get ppm, gif and tiff files displayed + from the cache proper (Closes: #287833) + + -- Jesus Climent Sun, 16 Jan 2005 14:33:10 +0000 + +libapache-gallery-perl (0.9.1-1) unstable; urgency=low + + * New upstream release (Closes: #271223) + * Erased some dependencies for the build process, since we can provide the + dependencies during installation time. I have built it, tested it, and it + Works For Me (TM) (Closes: #271222). + * A rework for #254396 was ready when my hdd crashed. Next release, maybe... + + -- Jesus Climent Sun, 12 Sep 2004 08:14:57 +0000 + +libapache-gallery-perl (0.8-3) unstable; urgency=low + + * The "Do not press gqgg while editing under vi unless you really know what + you are doing" release. + * Formated README.Debian for readability (Closes: #246465). Kudos to + Adeodato Simó. + + -- Jesus Climent Thu, 29 Apr 2004 08:54:55 +0000 + +libapache-gallery-perl (0.8-2) unstable; urgency=low + + * debian/README: some more bits of information about the procedure to set a + gallery (Closes: #240635, #245725, #245728). + + -- Jesus Climent Sun, 25 Apr 2004 07:30:35 +0000 + +libapache-gallery-perl (0.8-1) unstable; urgency=low + + * New upstream release + * Changed the dependency from libapache-mod-perl and apache-perl to + libapache-request-perl, which hopefully will pull the needed dependencies. + If only dpkg and apt-get would support conditional dependencies... + (Closes: #235055) + + -- Jesus Climent Wed, 10 Mar 2004 19:44:10 +0000 + +libapache-gallery-perl (0.7r237-2) unstable; urgency=low + + * debian/control + - Ups! I missed apache-mod-perl is not a package (Closes: #234456) + - Standards: bumped to 3.6.1.0 + + -- Jesus Climent Tue, 24 Feb 2004 06:51:06 +0000 + +libapache-gallery-perl (0.7r237-1) unstable; urgency=low + + * First uploaded release (Closes: #230614) + + -- Jesus Climent Mon, 22 Dec 2003 22:31:39 +0000 --- libapache-gallery-perl-1.0.2.orig/debian/compat +++ libapache-gallery-perl-1.0.2/debian/compat @@ -0,0 +1 @@ +10 --- libapache-gallery-perl-1.0.2.orig/debian/control +++ libapache-gallery-perl-1.0.2/debian/control @@ -0,0 +1,29 @@ +Source: libapache-gallery-perl +Maintainer: Don Armstrong +Priority: optional +Section: perl +Build-Depends-Indep: perl, libmodule-build-perl, sharutils, + libapache2-mod-perl2 (>=2.0) | libapache-request-perl, + libimage-size-perl, libimage-info-perl, libtemplate-perl, + libimage-imlib2-perl, libtext-template-perl, + libcgi-pm-perl | perl (<< 5.19) +Build-Depends: debhelper (>= 10) +Standards-Version: 4.1.1 +Vcs-Git: https://git.donarmstrong.com/deb_pkgs/libapache-gallery-perl.git +Vcs-Browser: https://git.donarmstrong.com/deb_pkgs/libapache-gallery-perl.git + +Package: libapache-gallery-perl +Architecture: all +Depends: ${perl:Depends}, ${misc:Depends}, libapache2-mod-perl2 (>= + 2.0) | libapache-request-perl, libimage-size-perl, + libimage-info-perl, libtemplate-perl, libimage-imlib2-perl, + libtext-template-perl, + libcgi-pm-perl | perl (<< 5.19) +Description: Apache module to create image galleries on-the-fly + This package contains a Perl module for Apache to create galleries. + . + The images just need to be copied into a directory where Apache will pick + them up and create a gallery page for you, with thumbnails and links to the + full size images. + . + Thumbnail size and maximum image size can be defined, among others. --- libapache-gallery-perl-1.0.2.orig/debian/copyright +++ libapache-gallery-perl-1.0.2/debian/copyright @@ -0,0 +1,19 @@ +This is Debian GNU/Linux's prepackaged version of Apache::Gallery, a Perl +module for Apache that allows you to have galleries created on-the-fly. + +Jesus Climent built this package. The original +sources were downloaded from . + +Snapshots are available from . + +The only change for the Debian package was the addition of the debian/ +files. + +The Apache::Gallery copyright is as follows: + +Copyright (C) 2001-2003 Michael Legart + +Apache::Gallery is free software and is released under the Artistic License. + +In a Debian system, you can find the Perl License at: +/usr/share/common-licenses/Artistic --- libapache-gallery-perl-1.0.2.orig/debian/cron.daily +++ libapache-gallery-perl-1.0.2/debian/cron.daily @@ -0,0 +1,24 @@ +#!/bin/sh +# +# libapache-gallery-perl cleanup +# Remove all files in $cachedir that have not been accessed in a week, +# then remove empty directories. Run as user $user. + +set -e + +cachedir="/var/cache/www" +user="www-data" + +if [ -d "$cachedir" ]; then + # remove old files + start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \ + --oknodo --chuid "$user" -- -c \ + "find '$cachedir' -type f -atime +6 -delete" + # remove empty directories + start-stop-daemon --start --pidfile /dev/null --startas /bin/sh \ + --oknodo --chuid "$user" -- -c \ + "find '$cachedir' -depth -mindepth 1 -type d -print0 | \ + xargs -r0 rmdir --ignore-fail-on-non-empty" +fi + +exit 0 --- libapache-gallery-perl-1.0.2.orig/debian/dirs +++ libapache-gallery-perl-1.0.2/debian/dirs @@ -0,0 +1,2 @@ +usr/share/libapache-gallery-perl/templates +usr/share/libapache-gallery-perl/icons --- libapache-gallery-perl-1.0.2.orig/debian/libapache-gallery-perl.postinst +++ libapache-gallery-perl-1.0.2/debian/libapache-gallery-perl.postinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +cachedir="/var/cache/www" +user="www-data" + +if [ "x$1" = "xconfigure" ]; then + if ! [ -d "$cachedir" ]; then + (mkdir "$cachedir" && chown "$user" "$cachedir") || exit 0; + fi; +fi; + + +#DEBHELPER# --- libapache-gallery-perl-1.0.2.orig/debian/rules +++ libapache-gallery-perl-1.0.2/debian/rules @@ -0,0 +1,26 @@ +#!/usr/bin/make -f + +%: + dh $@ + +# it is necessary to set MOD_PERL_API_VERSION to 2 to avoid trying to +# use modperl 1 +override_dh_auto_test: + MOD_PERL_API_VERSION=2 dh_auto_test; + +# install templates and icons +override_dh_auto_install: + dh_auto_install; + cp -r templates/* debian/libapache-gallery-perl/usr/share/libapache-gallery-perl/templates/.; + cp -r htdocs/* debian/libapache-gallery-perl/usr/share/libapache-gallery-perl/icons/.; + +# put the missing icons in place +override_dh_auto_configure: + dh_auto_configure; + uudecode -o htdocs/text-txt.png debian/text-text.png.uuencode + uudecode -o htdocs/text-html.png debian/text-html.png.uuencode + +# remove the missing icons on clean +override_dh_auto_clean: + dh_auto_clean; + rm -f htdocs/text-text.png htdocs/text-html.png --- libapache-gallery-perl-1.0.2.orig/debian/source/format +++ libapache-gallery-perl-1.0.2/debian/source/format @@ -0,0 +1 @@ +1.0 --- libapache-gallery-perl-1.0.2.orig/debian/text-html.png.uuencode +++ libapache-gallery-perl-1.0.2/debian/text-html.png.uuencode @@ -0,0 +1,72 @@ +begin 644 htdocs/text-html.png +MB5!.1PT*&@H````-24A$4@```#`````T"`8```#,D[N1````!&=!34$``+&/ +M"_QA!0````EP2%ES```+$0``"Q$!?V1?D0````=T24U%!]$$&`LU'U;WG#@` +M``NO241!5'C:U9I]=)35G<<_DYF\%&B`28FGVI;U!*2N!?)">#FU%3EKRR[@ +MMNL*`8&P]@Q-,GD9$@5E0K&\V%5([>(NGCU"DB$1V;-[V&ZM!['J<2LDT9W) +M`&K59$5%(!!V0(S))#/SW%__F)DG\\Q+(-8M>,]YSCQS[_/<^;U\?]_?_=T[ +M`#6`7`]77E[>^#SZO!4`I +MA=5J9<:,&>S=NX?L[.RD2J2$4'M[.P`[=^[$Y7+A7E,F_9M +MGGKJJ7@XF4:$T+OOODM961DY.3ET=7516EH*@*9IB`AKUJQA<'`0@-+24MK; +MV[GEEELH+2WE]MMOU^>9-V\>+I>+IJ8F7?AA[TF<,N#W^_'Y?+SQQAMXO5X. +M'SZ,W^]GRI0\#APX`+`>F!BE6%.$A70(C10'H\%WZF?#@B;K'QP&&7!8O7L*R9X/3ITRBEV+-G3_3%"1$8?6;(`[&MLK)2'G[X85%*25-3 +MD]CM=E%*Z7UVNUWL=KMHFF;X7+MVK30V-DHH%)*''GI(;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KE%"'WVXOYI%'?H/)E$UM;1U#0T,\_/##G#QYDM345$RF;!P. +M)W/FS*&XV([#X42OUV.WVZBO?XV4E!2RLC(G8;1:?HCMK(S`]>O7F#?O+GI[ +MKT5)0-HOFGBM3W#JGAX&!P?IZ/@'=^(X=^Y+NKN[&1@84%UX=\S_%YKDL0-8,?'%/B'PM2\5 +M^#DP+?0+X!TX!/`]<`VX`@P%C-5/&)_P?^"`'Q@!AH&QN)#%?"<;KN:(!/`? +4O^%/?II<;B$`````245.1*Y"8((` +` +end --- libapache-gallery-perl-1.0.2.orig/debian/watch +++ libapache-gallery-perl-1.0.2/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://search.cpan.org/CPAN/authors/id/L/LE/LEGART/ Apache-Gallery-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ --- libapache-gallery-perl-1.0.2.orig/lib/Apache/Gallery.pm +++ libapache-gallery-perl-1.0.2/lib/Apache/Gallery.pm @@ -25,7 +25,8 @@ require Apache2::SubRequest; require Apache2::Const; - Apache2::Const->import(-compile => 'OK','DECLINED','FORBIDDEN','NOT_FOUND','HTTP_NOT_MODIFIED'); + Apache2::Const->import(-compile => 'OK','DECLINED','FORBIDDEN', + 'NOT_FOUND','HTTP_NOT_MODIFIED', 'REDIRECT'); $::MP2 = 1; } else { @@ -120,7 +121,12 @@ # Let Apache serve icons without us modifying the request if ($r->uri =~ m/^\/icons/i) { - return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED(); + if ($r->uri =~ m/^\/icons\/gallery\/([^\/]+$)/i) { + $filename = "/usr/share/libapache-gallery-perl/icons/$1"; + return send_file($r,$filename); + } else { + 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 @@ -144,32 +150,8 @@ my $file = cache_dir($r, 0); $file =~ s/\.cache//; - my $subr = $r->lookup_file($file); - $r->content_type($subr->content_type()); - - if ($::MP2) { - my $fileinfo = stat($file); - - my $nonce = md5_base64($fileinfo->ino.$fileinfo->mtime); - if ($r->headers_in->{"If-None-Match"} eq $nonce) { - return Apache2::Const::HTTP_NOT_MODIFIED(); - } + return send_file($r,$file); - if ($r->headers_in->{"If-Modified-Since"} && str2time($r->headers_in->{"If-Modified-Since"}) < $fileinfo->mtime) { - return Apache2::Const::HTTP_NOT_MODIFIED(); - } - - $r->headers_out->{"Content-Length"} = $fileinfo->size; - $r->headers_out->{"Last-Modified-Date"} = time2str($fileinfo->mtime); - $r->headers_out->{"ETag"} = $nonce; - $r->sendfile($file); - return Apache2::Const::OK(); - } - else { - $r->path_info(''); - $r->filename($file); - return Apache::Constants::DECLINED(); - } } @@ -183,7 +165,7 @@ my $doc_pattern = $r->dir_config('GalleryDocFile'); unless ($doc_pattern) { - $doc_pattern = '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$' + $doc_pattern = '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|mp4|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$' } my $img_pattern = $r->dir_config('GalleryImgFile'); unless ($img_pattern) { @@ -387,9 +369,14 @@ $filetype = "unknown"; } - # Debian bug #348724 + # Debian bug #337012 # not images my $filetitle = $file; + if (-e $thumbfilename . ".file") { + $filetitle = get_filecontent($thumbfilename . ".file"); + } + + # Debian bug #348724 $filetitle =~ s/_/ /g if $r->dir_config('GalleryUnderscoresToSpaces'); $tpl_vars{FILES} .= @@ -417,9 +404,14 @@ my $rotate = readfile_getnum($r, $imageinfo, $thumbfilename.".rotate"); - # Debian bug #348724 + # Debian bug #337012 # HTML tag, alt attribute my $filetitle = $file; + if (-e $thumbfilename . ".file") { + $filetitle = get_filecontent($thumbfilename . ".file"); + } + + # Debian bug #348724 $filetitle =~ s/_/ /g if $r->dir_config('GalleryUnderscoresToSpaces'); my %file_vars = (FILEURL => uri_escape($fileurl, $escape_rule), @@ -560,6 +552,20 @@ return $::MP2 ? Apache2::Const::FORBIDDEN() : Apache::Constants::FORBIDDEN(); } } + if (defined $ENV{QUERY_STRING} && $ENV{QUERY_STRING} eq 'thumbonly' && + $r->dir_config('GalleryAllowThumbonly') && + -f $filename) { + + my ($width, $height, $type) = imgsize($filename); + my @filetypes = qw(JPG TIF PNG PPM GIF); + if (grep $type eq $_, @filetypes) { + my ($thumbnailwidth, $thumbnailheight) = get_thumbnailsize($r, $width, $height); + my $imageinfo = get_imageinfo($r, $filename, $type, $width, $height); + my $cached = get_scaled_picture_name($filename, $thumbnailwidth, $thumbnailheight); + $r->headers_out->set(Location => uri_escape(".cache/$cached", $escape_rule)); + return $::MP2 ? Apache2::Const::REDIRECT() : Apache::Constants::REDIRECT(); + } + } # Create cache dir if not existing my @tmp = split (/\//, $filename); @@ -646,9 +652,14 @@ my ($thumbnailwidth, $thumbnailheight) = get_thumbnailsize($r, $orig_width, $orig_height); my $imageinfo = get_imageinfo($r, $path.$prevpicture, $type, $orig_width, $orig_height); my $cached = get_scaled_picture_name($path.$prevpicture, $thumbnailwidth, $thumbnailheight); + # Debian bug #337012 + my $prevpicture_title = $prevpicture; + if (-e $path."/".$prevpicture . ".file") { + $prevpicture_title = get_filecontent($path."/".$prevpicture . ".file"); + } my %nav_vars; $nav_vars{URL} = uri_escape($prevpicture, $escape_rule); - $nav_vars{FILENAME} = $prevpicture; + $nav_vars{FILENAME} = $prevpicture_title; $nav_vars{WIDTH} = $width; $nav_vars{PICTURE} = uri_escape(".cache/$cached", $escape_rule); $nav_vars{DIRECTION} = "« prev"; @@ -669,9 +680,14 @@ my ($thumbnailwidth, $thumbnailheight) = get_thumbnailsize($r, $orig_width, $orig_height); my $imageinfo = get_imageinfo($r, $path.$nextpicture, $type, $thumbnailwidth, $thumbnailheight); my $cached = get_scaled_picture_name($path.$nextpicture, $thumbnailwidth, $thumbnailheight); + # Debian bug #337012 + my $nextpicture_title = $nextpicture; + if (-e $path."/".$nextpicture . ".file") { + $nextpicture_title = get_filecontent($path."/".$nextpicture . ".file"); + } my %nav_vars; $nav_vars{URL} = uri_escape($nextpicture, $escape_rule); - $nav_vars{FILENAME} = $nextpicture; + $nav_vars{FILENAME} = $nextpicture_title; $nav_vars{WIDTH} = $width; $nav_vars{PICTURE} = uri_escape(".cache/$cached", $escape_rule); $nav_vars{DIRECTION} = "next »"; @@ -848,6 +864,35 @@ } +sub send_file { + my ($r,$file) = @_; + my $subr = $r->lookup_file($file); + $r->content_type($subr->content_type()); + if ($::MP2) { + my $fileinfo = stat($file); + + my $nonce = md5_base64($fileinfo->ino.$fileinfo->mtime); + if ($r->headers_in->{"If-None-Match"} eq $nonce) { + return Apache2::Const::HTTP_NOT_MODIFIED(); + } + + if ($r->headers_in->{"If-Modified-Since"} && str2time($r->headers_in->{"If-Modified-Since"}) < $fileinfo->mtime) { + return Apache2::Const::HTTP_NOT_MODIFIED(); + } + + $r->headers_out->{"Content-Length"} = $fileinfo->size; + $r->headers_out->{"Last-Modified-Date"} = time2str($fileinfo->mtime); + $r->headers_out->{"ETag"} = $nonce; + $r->sendfile($file); + return Apache2::Const::OK(); + } + else { + $r->path_info(''); + $r->filename($file); + return Apache::Constants::DECLINED(); + } +} + sub cache_dir { my ($r, $strip_filename) = @_; @@ -1457,6 +1502,10 @@ my $picturename; if (-f $filename) { $picturename = pop(@links); + # Debian bug #337012 + if (-e $filename . ".file") { + $picturename = get_filecontent($filename . ".file"); + } } if ($r->uri eq $root_path) { @@ -1750,6 +1799,14 @@ Set to 1 or 0, default is 0 +=item B + +If true, B allows fooimg.jpg?thumbonly urls +to output the thumbnail of the image. This is useful when including +images in a blog (or similar). + +Defaults to '0' (false). + =item B With this option you can configure which intervals can be selected for @@ -1829,7 +1886,7 @@ as normal files. All other filetypes will still be served by Apache::Gallery but are not visible in the index. -The default is '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$' +The default is '\.(mpe?g|avi|mov|asf|wmv|doc|mp3|mp4|ogg|pdf|rtf|wav|dlt|txt|html?|csv|eps)$' =item B @@ -1984,6 +2041,10 @@ the folder, but can be changed by creating a file .folder with the visible name of the folder. +Similarly, the visible name of any file is by default identical to the +name of the file, but can be changed by creating a file .file +with the visible name of the file. + It is also possible to set GalleryCommentExifKey to the name of an EXIF field containing the comment, e.g. ImageDescription. The EXIF comment is overridden by the .comment file if it exists. --- libapache-gallery-perl-1.0.2.orig/t/004_cache_dir.t +++ libapache-gallery-perl-1.0.2/t/004_cache_dir.t @@ -42,12 +42,12 @@ } my $r=request(undef, 1); -is(Apache::Gallery::cache_dir($r, 1), '/var/tmp/Apache-Gallery/hostname/uripath1/uripath2'); -is(Apache::Gallery::cache_dir($r, 0), '/var/tmp/Apache-Gallery/hostname/uripath1/uripath2/urifile'); +is(Apache::Gallery::cache_dir($r, 1), '/var/cache/www/hostname/uripath1/uripath2'); +is(Apache::Gallery::cache_dir($r, 0), '/var/cache/www/hostname/uripath1/uripath2/urifile'); $r=request(undef, 0); -is(Apache::Gallery::cache_dir($r, 1), '/var/tmp/Apache-Gallery/location/uripath1/uripath2'); -is(Apache::Gallery::cache_dir($r, 0), '/var/tmp/Apache-Gallery/location/uripath1/uripath2/urifile'); +is(Apache::Gallery::cache_dir($r, 1), '/var/cache/www/location/uripath1/uripath2'); +is(Apache::Gallery::cache_dir($r, 0), '/var/cache/www/location/uripath1/uripath2/urifile'); $r=request('t/cachetest', 1); is(Apache::Gallery::cache_dir($r, 1), 't/cachetest/uripath1/uripath2'); --- libapache-gallery-perl-1.0.2.orig/templates/default/navdirectory.tpl +++ libapache-gallery-perl-1.0.2/templates/default/navdirectory.tpl @@ -0,0 +1,6 @@ + +
+ { $LINK_NAME } + { $DIR_FILES } +
+ --- libapache-gallery-perl-1.0.2.orig/templates/new/navdirectory.tpl +++ libapache-gallery-perl-1.0.2/templates/new/navdirectory.tpl @@ -0,0 +1,6 @@ + +
+ { $LINK_NAME } + { $DIR_FILES } +
+