Asset->get should return a copy of the properties hashref
This commit is contained in:
parent
7a14ebd639
commit
b92da4afab
3 changed files with 5 additions and 3 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
7.3.9
|
7.3.9
|
||||||
- fix: Can't add task to project management (perlDreamer Consulting, LLC)
|
- fix: Can't add task to project management (perlDreamer Consulting, LLC)
|
||||||
- fix: Error in RSS Feed (perlDreamer Consulting, LLC)
|
- fix: Error in RSS Feed (perlDreamer Consulting, LLC)
|
||||||
|
- rfe: Asset->get should return a copy of the properties hashref
|
||||||
|
|
||||||
|
|
||||||
7.3.8
|
7.3.8
|
||||||
- Fixed a template variable rewriting problem with HTML::Template::Expr
|
- Fixed a template variable rewriting problem with HTML::Template::Expr
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,8 @@ sub get {
|
||||||
if (defined $propertyName) {
|
if (defined $propertyName) {
|
||||||
return $self->{_properties}{$propertyName};
|
return $self->{_properties}{$propertyName};
|
||||||
}
|
}
|
||||||
return $self->{_properties};
|
my %copyOfHashRef = %{$self->{_properties}};
|
||||||
|
return \%copyOfHashRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,7 @@ Assets that normally autocommit their workflows (like CS Posts, and Wiki Pages)
|
||||||
sub duplicate {
|
sub duplicate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $options = shift;
|
my $options = shift;
|
||||||
my %assetProperties = %{$self->get()};
|
my $newAsset = $self->getParent->addChild($self->get, undef, undef, {skipAutoCommitWorkflows=>$options->{skipAutoCommitWorkflows}});
|
||||||
my $newAsset = $self->getParent->addChild(\%assetProperties, undef, undef, {skipAutoCommitWorkflows=>$options->{skipAutoCommitWorkflows}});
|
|
||||||
my $sth = $self->session->db->read("select * from metaData_values where assetId = ?", [$self->getId]);
|
my $sth = $self->session->db->read("select * from metaData_values where assetId = ?", [$self->getId]);
|
||||||
while (my $h = $sth->hashRef) {
|
while (my $h = $sth->hashRef) {
|
||||||
$self->session->db->write("insert into metaData_values (fieldId, assetId, value) values (?, ?, ?)", [$h->{fieldId}, $newAsset->getId, $h->{value}]);
|
$self->session->db->write("insert into metaData_values (fieldId, assetId, value) values (?, ?, ?)", [$h->{fieldId}, $newAsset->getId, $h->{value}]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue