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:
parent
3f45819b49
commit
c438d55310
20 changed files with 123 additions and 153 deletions
|
|
@ -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});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue