fix: Collaboration System can now be subclassed and still work with existing Thread and Post assets
This commit is contained in:
parent
8a88823682
commit
65235990a3
3 changed files with 5 additions and 3 deletions
|
|
@ -48,6 +48,8 @@
|
|||
http://www.webgui.org/bugs/tracker/user-profile-images-disappear-after-updat
|
||||
- RFE: HttpProxy - regexp for URLs that will not be proxied. Url pattern
|
||||
filters can now be created in HttpProxy wobject properties.
|
||||
- Collaboration System wobjects can now be subclassed and still work with the
|
||||
existing Thread and Post assets.
|
||||
|
||||
7.3.20
|
||||
- fix: Deactivated Users Subscriptions (perlDreamer Consulting, LLC)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ sub addRevision {
|
|||
my $threadId = $newSelf->get("threadId");
|
||||
my $now = time();
|
||||
if ($threadId eq "") { # new post
|
||||
if ($newSelf->getParent->get("className") eq "WebGUI::Asset::Wobject::Collaboration") {
|
||||
if ($newSelf->getParent->isa("WebGUI::Asset::Wobject::Collaboration")) {
|
||||
$newSelf->update({threadId=>$newSelf->getId, dateSubmitted=>$now});
|
||||
} else {
|
||||
$newSelf->update({threadId=>$newSelf->getParent->get("threadId"), dateSubmitted=>$now});
|
||||
|
|
@ -566,7 +566,7 @@ sub getThread {
|
|||
unless (defined $self->{_thread}) {
|
||||
my $threadId = $self->get("threadId");
|
||||
if ($threadId eq "") { # new post
|
||||
if ($self->getParent->get("className") eq "WebGUI::Asset::Wobject::Collaboration") {
|
||||
if ($self->getParent->isa("WebGUI::Asset::Wobject::Collaboration")) {
|
||||
$threadId=$self->getId;
|
||||
} else {
|
||||
$threadId=$self->getParent->get("threadId");
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ An asset object to make the parent of this asset.
|
|||
sub setParent {
|
||||
my $self = shift;
|
||||
my $newParent = shift;
|
||||
return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Wobject::Collaboration");
|
||||
return 0 unless ($newParent->isa("WebGUI::Asset::Wobject::Collaboration"));
|
||||
# specify the Asset package here directly because we don't want to use the ruls in WebGUI::Asset::Post, as they don't fit for Threads.
|
||||
return $self->WebGUI::Asset::setParent($newParent);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue