]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole.pm
Updated patches for 2.13.
[maypole.git] / lib / Maypole.pm
index 249a3e9a604c874846bf9ad56030c2fc1888efce..1a86f53ad515c57afb82fa1d1b381f0abcb10b54 100644 (file)
@@ -12,7 +12,7 @@ use URI::QueryParam;
 use NEXT;
 use File::MMagic::XS qw(:compat);
 
-our $VERSION = '2.121';
+our $VERSION = '2.13';
 our $mmagic = File::MMagic::XS->new();
 
 # proposed privacy conventions:
@@ -575,7 +575,7 @@ sub handler_guts {
 
   # process request with model if applicable and template not set.
   if ($applicable) {
-    unless ($r->{template}) {
+    unless ($self->{template}) {
       eval { $self->model_class->process($self) };
       if ( my $error = $@ ) {
        $status = $self->call_exception($error, "model");
@@ -616,7 +616,7 @@ my %filetypes = (
 sub __get_mime_type {
   my $self = shift;
   my $type = 'text/html';
-  if ($self->path =~ m/.*\.(\w{3,4})$/) {
+  if ($self->path =~ m/.*\.(\w{2,4})$/) {
     $type = $filetypes{$1};
   } else {
     my $output = $self->output;