From a30b919cff8e114b54116dfd8b1732bb1bb3adaf Mon Sep 17 00:00:00 2001 From: Chris Nehren Date: Fri, 17 Oct 2008 20:36:35 +0000 Subject: [PATCH] remove the superfluous '.'s from the exportBinaryExtensions config field and update exportGetUrlAsPath's regex to match. --- etc/WebGUI.conf.original | 60 +++++++++++++++++------------------ lib/WebGUI/AssetExportHtml.pm | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index e8f17a8c4..26acdbeec 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -837,36 +837,36 @@ # extensions that the export system should pass through as-is instead of using # index.html "exportBinaryExtensions" : [ - ".html", - ".htm", - ".txt", - ".pdf", - ".jpg", - ".css", - ".gif", - ".png", - ".doc", - ".xls", - ".xml", - ".rss", - ".bmp", - ".mp3", - ".js", - ".fla", - ".flv", - ".swf", - ".pl", - ".php", - ".php3", - ".php4", - ".php5", - ".ppt", - ".docx", - ".zip", - ".tar", - ".rar", - ".gz", - ".bz2" + "html", + "htm", + "txt", + "pdf", + "jpg", + "css", + "gif", + "png", + "doc", + "xls", + "xml", + "rss", + "bmp", + "mp3", + "js", + "fla", + "flv", + "swf", + "pl", + "php", + "php3", + "php4", + "php5", + "ppt", + "docx", + "zip", + "tar", + "rar", + "gz", + "bz2" ] } diff --git a/lib/WebGUI/AssetExportHtml.pm b/lib/WebGUI/AssetExportHtml.pm index f7de3c32d..ad03b4538 100644 --- a/lib/WebGUI/AssetExportHtml.pm +++ b/lib/WebGUI/AssetExportHtml.pm @@ -543,7 +543,7 @@ sub exportGetUrlAsPath { return Path::Class::File->new($exportPath, @pathComponents, $filename, $index); } else { # got a dot - my $extension = (fileparse($filename, qr/\.[^.]*/))[2]; # get just the extension + my $extension = (fileparse($filename, qr/[^.]*$/))[2]; # get just the extension # check if the file type is recognised by apache. if it is, return it # as-is. if not, slap on the directory separator, $index, and return