]> git.decadent.org.uk Git - maypole.git/commitdiff
fixes to fixes to changes to fixes
authorAaron Trevena <aaron.trevena@gmail.com>
Sat, 9 Dec 2006 10:36:38 +0000 (10:36 +0000)
committerAaron Trevena <aaron.trevena@gmail.com>
Sat, 9 Dec 2006 10:36:38 +0000 (10:36 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@554 48953598-375a-da11-a14b-00016c27c3ee

Changes
lib/Maypole.pm
lib/Maypole/Model/CDBI/Base.pm
lib/Maypole/Model/CDBI/DFV.pm

diff --git a/Changes b/Changes
index dee2dbc4c6f423762e906ff39be91a9fcd06e42a..372769a604b6280ae5e0a137426e443f6ec309a4 100644 (file)
--- a/Changes
+++ b/Changes
@@ -22,6 +22,7 @@ For information about current developments and future releases, see:
    fixed template path ordering so i.e. /tablename/list is used before /list when provided with a tablename
    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
 
 2.11 Mon 31 July 2006
 
index 6b40b7052b5ee5e039a61c90c283b3a86340ec21..fdb1b8659a493d76daad16232a65cf882ae36065 100644 (file)
@@ -582,7 +582,11 @@ sub handler_guts {
   }
 
   # less frequent path - perhaps output has been set to an error message
-  return OK if $self->output;
+  if ($self->output) {
+    $self->{content_type}      ||= $self->__get_mime_type();
+    $self->{document_encoding} ||= "utf-8";
+    return OK;
+  }
 
   # normal path - no output has been generated yet
   my $processed_view_ok = $self->__call_process_view;
@@ -636,6 +640,7 @@ sub __setup_plain_template
     my ($self) = @_;
 
     # It's just a plain template
+    $self->build_form_elements(0);
     $self->model_class(undef);
 
     unless ($self->template) {
index 118062f3df2539a9adc04552f34147014bbc0f49..2434284a032b3f62b11a793018073e09a30aacc2 100644 (file)
@@ -321,6 +321,21 @@ sub related_class {
      }
  }
 
+=head2 search_columns
+
+  $class->search_columns;
+
+Returns a list of columns suitable for searching - used in factory templates, over-ridden in
+classes. Provides same list as display_columns unless over-ridden.
+
+=cut
+
+sub search_columns {
+  my $class = shift;
+  return $class->display_columns;
+}
+
+
 =head2 related_meta
 
   $class->related_meta($col);
index ded183fde396e24a5c74bc98b75b9cd37ef82743..7848759d610a72bc97711b175af01bd196d41704 100644 (file)
@@ -152,10 +152,6 @@ sub do_edit : Exported {
   if (ref $errors) {
     # pass errors to template
     $r->template_args->{errors} = $errors;
-    foreach my $error (keys %$errors) {
-      $r->template_args->{errors}{ucfirst($error)} = $errors->{$error}
-    }
-
     # Set it up as it was:
     $r->template_args->{cgi_params} = $r->params;
     $r->template("edit");