From 9ff33081268b65dcae7173d498c4b8f322ebf62f Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 15 Mar 2006 06:54:17 +0000 Subject: [PATCH] merging forward 6.8.8 bugfix of [ 1423434 ] 6.8.5 - Versioning - users can see uncommitted data --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Asset.pm | 2 +- lib/WebGUI/AssetVersioning.pm | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index e0a50aeba..41bca42f3 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -65,6 +65,7 @@ - fix [ 1429389 ] 6.9: "1" appended to HTML 6.8.8 + - fix [ 1423434 ] 6.8.5 - Versioning - users can see uncommitted data - fix [ 1437186 ] 6.8.7 deploy DataForm package does not copy fields - fix [ 1437563 ] Data picker intermittent for Admin - fix broken link to top of CS Assets configured as FAQs diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 1e056b3e2..eceff7618 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -196,7 +196,7 @@ sub definition { status=>{ noFormPost=>1, fieldType=>'hidden', - defaultValue=>'approved' + defaultValue=>'pending' }, assetSize=>{ noFormPost=>1, diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index 470196546..cab4893a1 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -69,8 +69,9 @@ sub addRevision { my $newVersion = WebGUI::Asset->new($self->session,$self->getId, $self->get("className"), $now); $newVersion->updateHistory("created revision"); $newVersion->update($self->get); - $newVersion->setVersionLock; - $newVersion->update($properties) if (defined $properties); + $newVersion->{isLockedBy} = $self->session->user->userId; + $properties->{status} = 'pending'; + $newVersion->update($properties); return $newVersion; }