indenting.
This commit is contained in:
parent
5c47bdf205
commit
e2dda3f6a3
1 changed files with 19 additions and 19 deletions
|
|
@ -1327,25 +1327,25 @@ Hash reference of properties and values to set.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub update {
|
sub update {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $properties = shift;
|
my $properties = shift;
|
||||||
foreach my $definition (@{$self->definition}) {
|
foreach my $definition (@{$self->definition}) {
|
||||||
my @setPairs;
|
my @setPairs;
|
||||||
foreach my $property (keys %{$definition->{properties}}) {
|
foreach my $property (keys %{$definition->{properties}}) {
|
||||||
next unless (exists $properties->{$property});
|
next unless (exists $properties->{$property});
|
||||||
my $value = $properties->{$property};
|
my $value = $properties->{$property};
|
||||||
if (exists $definition->{properties}{$property}{filter}) {
|
if (exists $definition->{properties}{$property}{filter}) {
|
||||||
my $filter = $definition->{properties}{$property}{filter};
|
my $filter = $definition->{properties}{$property}{filter};
|
||||||
$value = $self->$filter($value);
|
$value = $self->$filter($value);
|
||||||
}
|
}
|
||||||
$self->{_properties}{$property} = $value;
|
$self->{_properties}{$property} = $value;
|
||||||
push(@setPairs, $property."=".quote($value));
|
push(@setPairs, $property."=".quote($value));
|
||||||
}
|
}
|
||||||
if (scalar(@setPairs) > 0) {
|
if (scalar(@setPairs) > 0) {
|
||||||
WebGUI::SQL->write("update ".$definition->{tableName}." set ".join(",",@setPairs)." where assetId=".quote($self->getId)." and revisionDate=".$self->get("revisionDate"));
|
WebGUI::SQL->write("update ".$definition->{tableName}." set ".join(",",@setPairs)." where assetId=".quote($self->getId)." and revisionDate=".$self->get("revisionDate"));
|
||||||
$self->setSize;
|
$self->setSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$self->purgeCache;
|
$self->purgeCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue