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)
+ fix to correct problem with LocationMatch and regex based Location directives in apache config.
2.11 Mon 31 July 2006
my $classmeta = $r->template_args->{classmetadata} ||= {};
$classmeta->{name} ||= $class;
$classmeta->{table} ||= $class->table;
- $classmeta->{columns} ||= [ $class->display_columns ];
- $classmeta->{list_columns} ||= [ $class->list_columns ];
- $classmeta->{colnames} ||= { $class->column_names };
+ $classmeta->{columns} ||= [ $class->display_columns ] if ($class->can('display_columns'));
+ $classmeta->{list_columns} ||= [ $class->list_columns ] if ($class->can('list_columns'));
+ $classmeta->{colnames} ||= { $class->column_names } if ($class->can('column_names'));
$classmeta->{related_accessors} ||= [ $class->related($r) ];
$classmeta->{moniker} ||= $class->moniker;
$classmeta->{plural} ||= $class->plural_moniker;
- $classmeta->{cgi} ||= { $class->to_cgi } if ($r->build_form_elements);
- $classmeta->{stringify_column} ||= $class->stringify_column;
+ $classmeta->{cgi} ||= { $class->to_cgi } if ($r->build_form_elements && $class->can('to_cgi'));
+ $classmeta->{stringify_column} ||= $class->stringify_column if ($class->can('stringify_column'));
# User-friendliness facility for custom template writers.
if ( @{ $r->objects || [] } > 1 ) {