Normalized signature of Asset::duplicate. This involved going through

existing overrides and callers for that method and making sure they followed
the correct signature.  Various related cleanups.

This should fix those bugs with collaboration systems refusing to be copied
or deployed as packages.
This commit is contained in:
Drake 2006-09-23 01:33:46 +00:00
parent 3f45819b49
commit c438d55310
20 changed files with 123 additions and 153 deletions

View file

@ -168,8 +168,8 @@ sub definition {
#-------------------------------------------------------------------
sub duplicate {
my $self = shift;
my $newAsset = $self->SUPER::duplicate(shift);
my $sth = $self->session->db->read("select * from Poll_answer where assetId=".$self->session->db->quote($self->getId));
my $newAsset = $self->SUPER::duplicate(@_);
my $sth = $self->session->db->read("select * from Poll_answer where assetId=?", [$self->getId]);
while (my $data = $sth->hashRef) {
$newAsset->setVote($data->{answer}, $data->{userId}, $data->{ipAddress});
}