]> git.decadent.org.uk Git - maypole.git/commitdiff
fix to bug raised by mst with FromCGI
authorAaron Trevena <aaron.trevena@gmail.com>
Thu, 19 Apr 2007 19:38:34 +0000 (19:38 +0000)
committerAaron Trevena <aaron.trevena@gmail.com>
Thu, 19 Apr 2007 19:38:34 +0000 (19:38 +0000)
git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@562 48953598-375a-da11-a14b-00016c27c3ee

lib/Maypole/Model/CDBI/Base.pm

index 2434284a032b3f62b11a793018073e09a30aacc2..6ecc213ac15419d09ba16f028b2a12c69812561d 100644 (file)
@@ -125,7 +125,7 @@ sub _do_update_or_create {
   # update or create
   if ($obj) {
     # We have something to edit
-    eval { $obj->update_from_cgi( $r => {
+    eval { $obj->update_from_cgi( $h => {
                                         required => $required_cols,
                                         ignore => $ignored_cols,
                                        }); 
@@ -134,7 +134,7 @@ sub _do_update_or_create {
     $fatal = $@;
   } else {
        eval {
-       $obj = $self->create_from_cgi( $r => {
+       $obj = $self->create_from_cgi( $h => {
                                            required => $required_cols,
                                            ignore => $ignored_cols,
                                           } );
@@ -231,6 +231,9 @@ sub do_search : Exported {
     if ( !%values ) { return $self->list($r) }
     my $order = $self->order($r);
     $self = $self->do_pager($r);
+
+    # FIXME: use pager info to get slice of iterator instead of all the objects as array
+
     $r->objects(
         [
             $self->search_where(
@@ -756,7 +759,7 @@ sub get_classmetadata {
 
 =head1 SEE ALSO
 
-L<Maypole>, L<Maypole::Model::CDBI::Base>.
+L<Maypole>, L<Maypole::Model::Base>.
 
 =head1 AUTHOR