]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Apache/MVC/Model/CDBI.pm
Make untainting, editing, and other things work.
[maypole.git] / lib / Apache / MVC / Model / CDBI.pm
index f9b2087b9cd16abf7407dc612db7c999e8425ca4..695e1cbd7dec1fe0e6e6f9ed33863113df0b2c90 100644 (file)
@@ -20,13 +20,13 @@ sub related {
     map {to_PL($_)} 
     grep { exists $r->{config}{ok_tables}{$_} }
     map {$_->table}
-    keys %{shift->__hasa_list}
+    keys %{shift->__hasa_list || {}}
 }
 
 sub do_edit :Exported {
     my ($self, $r) = @_;
     my $h = CGI::Untaint->new(%{$r->{params}});
-    my ($obj) = @{$self->objects};
+    my ($obj) = @{$r->objects};
     if ($obj) {
         # We have something to edit
         $obj->update_from_cgi($h);