]> git.donarmstrong.com Git - deb_pkgs/libapache-gallery-perl.git/commitdiff
Rewrite path to icons in request
authorDon Armstrong <don@donarmstrong.com>
Tue, 29 Nov 2011 19:39:26 +0000 (19:39 +0000)
committerDon Armstrong <don@donarmstrong.com>
Tue, 29 Nov 2011 19:39:26 +0000 (19:39 +0000)
git-svn-id: file:///srv/don_svn/deb_pkgs/libapache-gallery-perl/trunk@635 8f7917da-ec0b-0410-a553-b9b0e350d17e

debian/changelog
lib/Apache/Gallery.pm

index 4133a8b147bd3b16d02d232cb4e417f149d01202..47d67d3302f569699751c479424ddf3ff0e9353a 100644 (file)
@@ -1,3 +1,9 @@
+libapache-gallery-perl (1.0.2-2) unstable; urgency=low
+
+  * Rewrite path to icons in request
+
+ -- Don Armstrong <don@debian.org>  Sat, 26 Nov 2011 16:29:55 -0800
+
 libapache-gallery-perl (1.0.2-1) unstable; urgency=low
 
   * New upstream release
index ee9f63af81e4c0ea3eaa09c7e11abdc556b9e366..e02bee91b384403cd8e4bc10334d4df3a7ed2c6e 100644 (file)
@@ -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