From a5321bee0139be5c35a1e1ceee47c57138f22f18 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Mon, 26 Mar 2007 15:55:35 +0000 Subject: [PATCH] change template path to only look for custom, factory, etc on first/only path provided git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@561 48953598-375a-da11-a14b-00016c27c3ee --- Changes | 1 + lib/Maypole/View/Base.pm | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 1433119..155c842 100644 --- a/Changes +++ b/Changes @@ -26,6 +26,7 @@ For information about current developments and future releases, see: fix to display_line macro in factory templates (bug 22920) fix to correct problem with LocationMatch and regex based Location directives in apache config. change to view::base to only call display_columns, stringify_columns, to_cgi if model class can + changed template path to only look for custom, factory, etc on first/only path provided 2.11 Mon 31 July 2006 diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index 07564c2..81e5044 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -15,6 +15,7 @@ sub paths { $root = [ $root ]; } my @output = (); + my $i = 0; foreach my $path (@$root) { push(@output, ( @@ -22,9 +23,10 @@ sub paths { && File::Spec->catdir( $path, $r->model_class->table ) ) ); - push(@output, File::Spec->catdir( $path, "custom" )); + push(@output, File::Spec->catdir( $path, "custom" )) unless ($i); push(@output, $path); - push(@output, File::Spec->catdir( $path, "factory" )); + push(@output, File::Spec->catdir( $path, "factory" )) unless ($i); + $i = 1; } return grep( $_, @output); -- 2.39.5