Code Duplication    Length = 4-4 lines in 2 locations

controller/comments.php 2 locations

@@ 138-141 (lines=4) @@
135
		$result = $this->db->sql_query($sql);
136
		$value = $this->db->sql_fetchrow($result);
137
138
		if (!$this->user->data['is_registered'] || !$this->auth->acl_get('m_delete_comment_dir') && (!$this->auth->acl_get('u_delete_comment_dir') || $this->user->data['user_id'] != $value['comment_user_id']))
139
		{
140
			throw new \phpbb\exception\http_exception(403, 'DIR_ERROR_NOT_AUTH');
141
		}
142
143
		if (confirm_box(true))
144
		{
@@ 177-180 (lines=4) @@
174
		$result = $this->db->sql_query($sql);
175
		$value = $this->db->sql_fetchrow($result);
176
177
		if (!$this->user->data['is_registered'] || !$this->auth->acl_get('m_edit_comment_dir') && (!$this->auth->acl_get('u_edit_comment_dir') || $this->user->data['user_id'] != $value['comment_user_id']))
178
		{
179
			throw new \phpbb\exception\http_exception(403, 'DIR_ERROR_NOT_AUTH');
180
		}
181
182
		$comment_text = generate_text_for_edit($value['comment_text'], $value['comment_uid'], $value['comment_flags']);
183
		$this->s_comment = $comment_text['text'];