Moose override for cut (Post only)
This commit is contained in:
parent
c786395eb4
commit
ee725b0b84
1 changed files with 3 additions and 3 deletions
|
|
@ -291,7 +291,7 @@ the parent thread.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub cut {
|
override cut => sub {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
# Fetch the Thread and CS before cutting the asset.
|
# Fetch the Thread and CS before cutting the asset.
|
||||||
|
|
@ -299,7 +299,7 @@ sub cut {
|
||||||
my $cs = $thread->getParent;
|
my $cs = $thread->getParent;
|
||||||
|
|
||||||
# Cut the asset
|
# Cut the asset
|
||||||
my $result = $self->SUPER::cut;
|
my $result = super();
|
||||||
|
|
||||||
# If a post is being cut update the thread reply count first
|
# If a post is being cut update the thread reply count first
|
||||||
if ($thread->getId ne $self->getId) {
|
if ($thread->getId ne $self->getId) {
|
||||||
|
|
@ -311,7 +311,7 @@ sub cut {
|
||||||
$self->_fixReplyCount( $cs );
|
$self->_fixReplyCount( $cs );
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
};
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue