From eba97cbde67c0aa8a9bdd94cf904995b11cf5908 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 14 Dec 2006 17:50:21 +0000 Subject: [PATCH] kludgy fix: Cannot manageAssets for a Collaboration System with locked Threads --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Asset.pm | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 9568909b0..d750239bd 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,6 +1,8 @@ 7.3.2 - fix: Calendar and Event now have printable templates and URL parameters. - fix: Miscellaneous Calendar template fixes + - fix: Cannot manageAssets with a locked Thread -- NOTE: Kludgy, but any other + way would probably have to break API. 7.3.1 - Fixed a problem with IE and resizable text areas that caused IE to crash diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 992f0d95c..582d18790 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1173,7 +1173,8 @@ sub manageAssets { $title =~ s/\'/\\\'/g; my $locked; my $edit; - if ($child->isLocked) { + #if ($child->isLocked) { + if ($child->lockedBy) { # This is a stopgap to fix a bug when isLocked is overridden but does not function as in the API my $username_html = WebGUI::HTML::format($child->lockedBy->username, "text"); $locked = 'locked by '.$username_html.''; $edit = "'getUrl("func=edit;proceed=manageAssets")."\">Edit | '+" if ($child->canEditIfLocked);