1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Origin: f05446b0d898a278302a8f3058f56c9b30d8a592 Mon Sep 17 00:00:00 2001
From: Don Armstrong <don@donarmstrong.com>
Last-Update: 2011-11-29
Subject: Rewrite path to icons in request
git-svn-id: file:///srv/don_svn/deb_pkgs/libapache-gallery-perl/trunk@635 8f7917da-ec0b-0410-a553-b9b0e350d17e
---
debian/changelog | 6 ++++++
lib/Apache/Gallery.pm | 6 +++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/Apache/Gallery.pm b/lib/Apache/Gallery.pm
index ee9f63a..e02bee9 100644
--- a/lib/Apache/Gallery.pm
+++ b/lib/Apache/Gallery.pm
@@ -120,7 +120,11 @@ sub handler {
# 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/$filename";
+ $r->filename($filename);
+ }
+ 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
|