Moved www_approvePost www_denyPost www_post www_postSave www_lockThread www_unlockThread to the wobject superclass.
This commit is contained in:
parent
42227f1194
commit
37a34966eb
4 changed files with 100 additions and 171 deletions
|
|
@ -615,6 +615,23 @@ sub setCollateral {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_approvePost ( )
|
||||
|
||||
Sets the status flag on a discussion message to "approved".
|
||||
|
||||
=cut
|
||||
|
||||
sub www_approvePost {
|
||||
if (WebGUI::Privilege::isInGroup($_[0]->get("groupToModerate"))) {
|
||||
return WebGUI::Discussion::approvePost();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_copy ( )
|
||||
|
|
@ -734,6 +751,22 @@ sub www_deleteMessageConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_denyPost ( )
|
||||
|
||||
Sets the status flag on a discussion message to "denied".
|
||||
|
||||
=cut
|
||||
|
||||
sub www_denyPost {
|
||||
if (WebGUI::Privilege::isInGroup($_[0]->get("groupToModerate"))) {
|
||||
return WebGUI::Discussion::denyPost();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_edit ( formRows )
|
||||
|
||||
Displays the common properties of any/all wobjects.
|
||||
|
|
@ -816,6 +849,23 @@ sub www_editSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_lockThread ( )
|
||||
|
||||
Locks a discussion thread from the current message down.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_lockThread {
|
||||
if (WebGUI::Privilege::isInGroup($_[0]->get("groupToModerate"))) {
|
||||
WebGUI::Discussion::lockThread();
|
||||
return $_[0]->www_showMessage;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_moveBottom ( )
|
||||
|
||||
Moves this instance to the bottom of the page.
|
||||
|
|
@ -922,6 +972,56 @@ sub www_paste {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_post ( )
|
||||
|
||||
Displays a discussion message post form.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_post {
|
||||
if (WebGUI::Privilege::isInGroup($_[0]->get("groupToPost"))) {
|
||||
return WebGUI::Discussion::post();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_post ( )
|
||||
|
||||
Saves a message post to a discussion.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_postSave {
|
||||
if (WebGUI::Privilege::isInGroup($_[0]->get("groupToPost"))) {
|
||||
WebGUI::Discussion::postSave($_[0]);
|
||||
return $_[0]->www_showMessage();
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_unlockThread ( )
|
||||
|
||||
Unlocks a discussion thread from the current message on down.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_unlockThread {
|
||||
if (WebGUI::Privilege::isInGroup($_[0]->get("groupToModerate"))) {
|
||||
WebGUI::Discussion::unlockThread();
|
||||
return $_[0]->www_showMessage;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view ( )
|
||||
|
||||
The default display mechanism for any wobject. This web method MUST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue