[Bps-public-commit] rt-extension-customizecontenttype branch, master, updated. 43f442d74976bde40d4839b1494d01982e37c9b3

Thomas Sibley trs at bestpractical.com
Wed Jul 25 12:41:54 EDT 2012


The branch, master has been updated
       via  43f442d74976bde40d4839b1494d01982e37c9b3 (commit)
      from  f38a06af71613879ca2066a731f5ceae90435126 (commit)

Summary of changes:
 lib/RT/Extension/CustomizeContentType.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 43f442d74976bde40d4839b1494d01982e37c9b3
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Jul 25 09:41:14 2012 -0700

    Normalize extensions to lowercase
    
    Otherwise you'd have to handle case variants like .PDF vs .pdf vs .PDf
    separately.

diff --git a/lib/RT/Extension/CustomizeContentType.pm b/lib/RT/Extension/CustomizeContentType.pm
index 2f503f4..e856429 100644
--- a/lib/RT/Extension/CustomizeContentType.pm
+++ b/lib/RT/Extension/CustomizeContentType.pm
@@ -14,7 +14,7 @@ my $new = sub {
 
     return $content_type
       unless $self->Filename && $self->Filename =~ /\.(\w+)$/;
-    my $ext = $1;
+    my $ext = lc $1;
 
     my $config = RT->Config->Get('ContentTypes') or return $content_type;
     return $config->{$ext} || $content_type;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list