diff --git a/modules/monitoring/application/controllers/CommentController.php b/modules/monitoring/application/controllers/CommentController.php index c97f12558..c3fcd18f8 100644 --- a/modules/monitoring/application/controllers/CommentController.php +++ b/modules/monitoring/application/controllers/CommentController.php @@ -64,12 +64,15 @@ class Monitoring_CommentController extends Controller */ public function showAction() { + $listCommentsLink = Url::fromPath('monitoring/list/comments') + ->setQueryString('comment_type=(comment|ack)'); + $this->view->comment = $this->comment; if ($this->hasPermission('monitoring/command/comment/delete')) { $this->view->delCommentForm = $this->createDelCommentForm(); $this->view->delCommentForm->populate( array( - 'redirect' => Url::fromPath('monitoring/list/comments'), + 'redirect' => $listCommentsLink, 'comment_id' => $this->comment->id, 'comment_is_service' => isset($this->comment->service_description) ) diff --git a/modules/monitoring/application/controllers/CommentsController.php b/modules/monitoring/application/controllers/CommentsController.php index dcd1523e8..64eeeb361 100644 --- a/modules/monitoring/application/controllers/CommentsController.php +++ b/modules/monitoring/application/controllers/CommentsController.php @@ -81,9 +81,8 @@ class Monitoring_CommentsController extends Controller { $this->assertPermission('monitoring/command/comment/delete'); - $this->view->comments = $this->comments; - $this->view->listAllLink = Url::fromPath('monitoring/list/comments') - ->setQueryString($this->filter->toQueryString()); + $listCommentsLink = Url::fromPath('monitoring/list/comments') + ->setQueryString('comment_type=(comment|ack)'); $delCommentForm = new DeleteCommentsCommandForm(); $delCommentForm->setTitle($this->view->translate('Remove all Comments')); $delCommentForm->addDescription(sprintf( @@ -91,8 +90,11 @@ class Monitoring_CommentsController extends Controller count($this->comments) )); $delCommentForm->setComments($this->comments) - ->setRedirectUrl(Url::fromPath('monitoring/list/comments')) - ->handleRequest(); + ->setRedirectUrl($listCommentsLink) + ->handleRequest(); $this->view->delCommentForm = $delCommentForm; + $this->view->comments = $this->comments; + $this->view->listAllLink = Url::fromPath('monitoring/list/comments') + ->setQueryString($this->filter->toQueryString()); } }