X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FCDBI.pm;h=c80a2902e0ad69cd74bb507a4abd56d43dfbb25a;hb=3323461600041b1b4f420cb8487637067bc2a5fc;hp=d99eb500d35eafb5beaefe281fc546ad468e4932;hpb=7c1eccbb6e4b547e61e82ece501c824785c25480;p=maypole.git diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index d99eb50..c80a290 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -1,6 +1,10 @@ package Maypole::Model::CDBI; use base qw(Maypole::Model::Base Class::DBI); use Class::DBI::AsForm; +# use Maypole::Form::CDBI; +use CGI::Untaint; +# use Maypole::Form; + use Class::DBI::FromCGI; use Class::DBI::Loader; use Class::DBI::AbstractSearch; @@ -8,7 +12,7 @@ use Class::DBI::Plugin::RetrieveAll; use Class::DBI::Pager; use Lingua::EN::Inflect::Number qw(to_PL); -use CGI::Untaint; + use strict; =head1 NAME @@ -87,7 +91,7 @@ sub related_class { $self->meta_info( has_a => $accessor ) || return; - my $mapping = $related->{args}->{mapping}; + my $mapping = $related->{args}->{mapping} || []; if ( @$mapping ) { return $related->{foreign_class}->meta_info('has_a')->{ $$mapping[0] } ->{foreign_class};