Update local property cache when performing version tag operations an $self.

This commit is contained in:
Colin Kuskie 2009-06-19 18:20:14 +00:00
parent d9afb768f5
commit b9b7066a1d
2 changed files with 4 additions and 0 deletions

View file

@ -21,6 +21,7 @@
- fixed: Add progress bars for set rank in the Asset Manager.
- fixed: SurveyJSON database bloating
- fixed #10548: Macro RandomAssetProxy failure to be random
- fixed #10542: AssetVersioning: versionTag/isLockedBy updating
7.7.10
- Made a change to LDAP auth that adds an OR to that query so that it also searches for a row with fieldData REGEXP '^uid=(value-from-ldap-directory-server),'. (Wes Morgan)

View file

@ -433,6 +433,7 @@ Sets the versioning lock to "on" so that this piece of content may not be edited
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;
}
@ -453,6 +454,7 @@ sub setVersionTag {
my $self = shift;
my $tagId = shift;
$self->session->db->write("update assetData set tagId=? where assetId=? and tagId = ?", [$tagId, $self->getId,$self->get('tagId')]);
$self->{_properties}{tagId} = $tagId;
$self->updateHistory("changed version tag to $tagId");
$self->purgeCache;
}
@ -484,6 +486,7 @@ Sets the versioning lock to "off" so that this piece of content may be edited on
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;
}