monitoring: Don't call getQuery() on the comment data view in the CommentController

This commit is contained in:
Eric Lippmann 2015-08-27 16:20:28 +02:00
parent b82306e2bb
commit e2a4b51429

View File

@ -43,7 +43,7 @@ class CommentController extends Controller
))->where('comment_internal_id', $commentId); ))->where('comment_internal_id', $commentId);
$this->applyRestriction('monitoring/filter/objects', $query); $this->applyRestriction('monitoring/filter/objects', $query);
if (false === $this->comment = $query->getQuery()->fetchRow()) { if (false === $this->comment = $query->fetchRow()) {
$this->httpNotFound($this->translate('Comment not found')); $this->httpNotFound($this->translate('Comment not found'));
} }
@ -52,9 +52,7 @@ class CommentController extends Controller
array( array(
'icon' => 'comment', 'icon' => 'comment',
'label' => $this->translate('Comment'), 'label' => $this->translate('Comment'),
'title' => $this->translate( 'title' => $this->translate('Display detailed information about a comment.'),
'Display detailed information about a comment.'
),
'url' =>'monitoring/comments/show' 'url' =>'monitoring/comments/show'
) )
)->activate('comment')->extend(new DashboardAction()); )->activate('comment')->extend(new DashboardAction());
@ -72,9 +70,9 @@ class CommentController extends Controller
$form = new DeleteCommentCommandForm(); $form = new DeleteCommentCommandForm();
$form $form
->populate(array( ->populate(array(
'redirect' => $listUrl,
'comment_id' => $this->comment->id, 'comment_id' => $this->comment->id,
'comment_is_service' => isset($this->comment->service_description) 'comment_is_service' => isset($this->comment->service_description),
'redirect' => $listUrl
)) ))
->handleRequest(); ->handleRequest();
$this->view->delCommentForm = $form; $this->view->delCommentForm = $form;