From 885a369c6786b97c6d2f351affc2267ef10ba4d7 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 26 Apr 2007 23:11:15 +0000 Subject: [PATCH] fix bad override of isLocked inside WebGUI::Asset::Post::Thread --- docs/changelog/7.x.x.txt | 1 + docs/gotcha.txt | 13 +++++++++++++ lib/WebGUI/Asset/Post/Thread.pm | 8 ++++---- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 08a2cf72a..50cc64b13 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,5 +1,6 @@ 7.3.16 - fix: The POD of Form::Image is faulty (perlDreamer Consulting, LLC) + - fix: Method name clash between WebGUI::Asset::Post::Thread and WebGUI::AssetVersioning (perlDreamer Consulting, LLC) - fix: Images in Collaboration Systems were broken in 7.3.15 diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 2190926d1..04f37393b 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,19 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +7.3.16 +-------------------------------------------------------------------- + + * There was an inadvertent override of the Asset method isLocked inside + of WebGUI::Asset::Post::Thread.pm. Normally, isLocked will return true + if the Asset is being edited by another user. However, the isLocked inside + of Thread.pm returned true if the Thread was locked to prevent more + replies from being added to the it. + + In 7.3.16, the thread lock method inside Thread.pm was renamed + isThreadLocked. No template variables, field names or database + columsn were changed. + 7.3.15 -------------------------------------------------------------------- diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index fa6386f7f..e52e9a02f 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -41,7 +41,7 @@ sub archive { #------------------------------------------------------------------- sub canReply { my $self = shift; - return !$self->isLocked && $self->getParent->get("allowReplies") && $self->getParent->canPost; + return !$self->isThreadLocked && $self->getParent->get("allowReplies") && $self->getParent->canPost; } #------------------------------------------------------------------- @@ -401,13 +401,13 @@ sub getUnsubscribeUrl { #------------------------------------------------------------------- -=head2 isLocked ( ) +=head2 isThreadLocked ( ) Returns a boolean indicating whether this thread is locked from new posts and other edits. =cut -sub isLocked { +sub isThreadLocked { my ($self) = @_; return $self->get("isLocked"); } @@ -844,7 +844,7 @@ sub view { $var->{'stick.url'} = $self->getStickUrl; $var->{'unstick.url'} = $self->getUnstickUrl; - $var->{'isLocked'} = $self->isLocked; + $var->{'isLocked'} = $self->isThreadLocked; $var->{'lock.url'} = $self->getLockUrl; $var->{'unlock.url'} = $self->getUnlockUrl;