Never delete an asset property key.
This commit is contained in:
parent
49c2cfd5fa
commit
61b4e1e826
2 changed files with 11 additions and 10 deletions
|
|
@ -431,11 +431,11 @@ Sets the versioning lock to "on" so that this piece of content may not be edited
|
|||
=cut
|
||||
|
||||
sub setVersionLock {
|
||||
my $self = shift;
|
||||
$self->session->db->write("update asset set isLockedBy=? where assetId=?", [$self->session->user->userId, $self->getId]);
|
||||
$self->{_properties}{isLockedBy} = $self->session->user->userId;
|
||||
$self->updateHistory("locked");
|
||||
$self->purgeCache;
|
||||
my $self = shift;
|
||||
$self->session->db->write("update asset set isLockedBy=? where assetId=?", [$self->session->user->userId, $self->getId]);
|
||||
$self->{_properties}{isLockedBy} = $self->session->user->userId;
|
||||
$self->updateHistory("locked");
|
||||
$self->purgeCache;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -484,11 +484,11 @@ Sets the versioning lock to "off" so that this piece of content may be edited on
|
|||
=cut
|
||||
|
||||
sub unsetVersionLock {
|
||||
my $self = shift;
|
||||
$self->session->db->write("update asset set isLockedBy=NULL where assetId=".$self->session->db->quote($self->getId));
|
||||
delete $self->{_properties}{isLockedBy};
|
||||
$self->updateHistory("unlocked");
|
||||
$self->purgeCache;
|
||||
my $self = shift;
|
||||
$self->session->db->write("update asset set isLockedBy=NULL where assetId=".$self->session->db->quote($self->getId));
|
||||
$self->{_properties}{isLockedBy} = undef;
|
||||
$self->updateHistory("unlocked");
|
||||
$self->purgeCache;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ use Test::More;
|
|||
use Test::Deep;
|
||||
use Test::MockObject;
|
||||
use HTML::TokeParser;
|
||||
use Data::Dumper;
|
||||
use Storable qw/dclone/;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue