Add a validParent check to Post.
This commit is contained in:
parent
a3f58bd841
commit
bc466ab74f
1 changed files with 16 additions and 0 deletions
|
|
@ -1348,6 +1348,22 @@ sub prepareView {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 validParent
|
||||||
|
|
||||||
|
Make sure that the current session asset is a Thread or Post for pasting and adding checks.
|
||||||
|
|
||||||
|
This is a class method.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub validParent {
|
||||||
|
my $class = shift;
|
||||||
|
my $session = shift;
|
||||||
|
return $session->asset->isa('WebGUI::Asset::Post');
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 view
|
=head2 view
|
||||||
|
|
||||||
Increment the number of views for this Post, and then display the Thread containing
|
Increment the number of views for this Post, and then display the Thread containing
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue