From 2af3091e4954c080708cb08eb3c72d52416f9ca1 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Fri, 23 Mar 2007 17:55:43 +0000 Subject: [PATCH] applied patch from nicg : Modified MVC.pm to correct problem with LocationMatch and regex based git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@555 48953598-375a-da11-a14b-00016c27c3ee --- Changes | 1 + lib/Apache/MVC.pm | 3 ++- lib/Maypole/View/TT.pm | 5 ++++- lib/Maypole/templates/factory/list | 2 +- lib/Maypole/templates/factory/macros | 3 +-- lib/Maypole/templates/factory/search_form | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 372769a..977dd0a 100644 --- a/Changes +++ b/Changes @@ -23,6 +23,7 @@ For information about current developments and future releases, see: fixed template path with array refs fix to template being reset from path in plain templates (i.e. where no model), may affect those relying on the bug ( bug 23722 ) added search_columns method to base cdbi model class, provides display_columns unless over-ridden + fix to display_line macro in factory templates (bug 22920) 2.11 Mon 31 July 2006 diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 8315276..384b497 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -134,7 +134,8 @@ sub parse_location { } my $path = $self->ar->uri; - my $loc = $self->ar->location; + my $base = URI->new($self->config->uri_base); + my $loc = $base->path; { no warnings 'uninitialized'; diff --git a/lib/Maypole/View/TT.pm b/lib/Maypole/View/TT.pm index 936fcc5..d2da45a 100644 --- a/lib/Maypole/View/TT.pm +++ b/lib/Maypole/View/TT.pm @@ -8,7 +8,7 @@ use File::Spec::Functions qw(catdir tmpdir); our $error_template; { local $/; $error_template = ; } -our $VERSION = '2.11'; +our $VERSION = '2.12'; use strict; @@ -16,6 +16,9 @@ sub template { my ( $self, $r ) = @_; unless ($self->{tt}) { my $view_options = $r->config->view_options || {}; + if ($r->debug) { + $view_options->{DEBUG} = 'undef'; + } $self->{provider} = Template::Provider->new($view_options); $self->{tt} = Template->new({ %$view_options, diff --git a/lib/Maypole/templates/factory/list b/lib/Maypole/templates/factory/list index 9abbc01..8b9052e 100644 --- a/lib/Maypole/templates/factory/list +++ b/lib/Maypole/templates/factory/list @@ -24,7 +24,7 @@ SET additional = additional _ "&" _ name _ "=" _ request.params.$name; - SET action = "search"; + SET action = "do_search"; END; END; USE model_obj = Class request.model_class; diff --git a/lib/Maypole/templates/factory/macros b/lib/Maypole/templates/factory/macros index c96cb17..ce9d0e1 100644 --- a/lib/Maypole/templates/factory/macros +++ b/lib/Maypole/templates/factory/macros @@ -63,8 +63,7 @@ for some. ELSIF col == classmetadata.stringify_column; maybe_link_view(item); ELSIF col_obj; # its a real column - accessor = item.accessor_name_for(col_obj) || - item.accessor_name(col_obj); # deprecated in cdbi + accessor = item.accessor_name_for(col_obj) || item.accessor_name(col_obj); # deprecated in cdbi maybe_link_view(item.$accessor); ELSE; item.$col; diff --git a/lib/Maypole/templates/factory/search_form b/lib/Maypole/templates/factory/search_form index 5d0fd90..5694f7d 100644 --- a/lib/Maypole/templates/factory/search_form +++ b/lib/Maypole/templates/factory/search_form @@ -2,7 +2,7 @@