parent
1a08102531
commit
b83abc4dbc
|
@ -25,7 +25,7 @@ class Monitoring_CommentController extends Controller
|
|||
{
|
||||
$commentId = $this->params->getRequired('comment_id');
|
||||
|
||||
$this->comment = $this->backend->select()->from('comment', array(
|
||||
$query = $this->backend->select()->from('comment', array(
|
||||
'id' => 'comment_internal_id',
|
||||
'objecttype' => 'object_type',
|
||||
'comment' => 'comment_data',
|
||||
|
@ -38,8 +38,10 @@ class Monitoring_CommentController extends Controller
|
|||
'service_description',
|
||||
'host_display_name',
|
||||
'service_display_name'
|
||||
))->where('comment_internal_id', $commentId)->getQuery()->fetchRow();
|
||||
))->where('comment_internal_id', $commentId);
|
||||
$this->applyRestriction('monitoring/filter/objects', $query);
|
||||
|
||||
$this->comment = $query->getQuery()->fetchRow();
|
||||
if ($this->comment === false) {
|
||||
$this->httpNotFound($this->translate('Comment not found'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue