Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Trash user messages in backend use new logic (for the users selected)

  • Loading branch information...
commit 112b3592177a28aadc4da28c1d9a49c354edc600 1 parent a0c836a
@xillibit authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 administrator/components/com_kunena/controllers/users.php
View
8 administrator/components/com_kunena/controllers/users.php
@@ -96,9 +96,11 @@ function trashusermessages() {
$uids = JRequest::getVar ( 'cid', array (), 'post', 'array' );
if ($uids) {
- list($total, $messages) = KunenaForumMessageHelper::getLatestMessages(false, 0, 0, array('starttime'=> '-1','user' => $uids));
- foreach($messages as $mes) {
- $mes->publish(KunenaForum::DELETED);
+ foreach($uids as $id) {
+ list($total, $messages) = KunenaForumMessageHelper::getLatestMessages(false, 0, 0, array('starttime'=> '-1','user' => $id));
+ foreach($messages as $mes) {
+ $mes->publish(KunenaForum::DELETED);
+ }
}
} else {
$this->app->enqueueMessage ( JText::_('COM_KUNENA_PROFILE_NO_USER'), 'error' );
Please sign in to comment.
Something went wrong with that request. Please try again.