Skip to content

Commit fabd52d

Browse files
authored
Merge pull request #10 from rbonick/censor-comments
Fix reputation comments not being censored
2 parents cfd0d2f + e99cc0f commit fabd52d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

controller/details_controller.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config
103103
}
104104

105105
/**
106-
* Main reputation details controller
106+
* Main reputation details controller
107107
*
108108
* @param int $uid User ID taken from the URL
109109
* @param string $sort_key Sort key: id|username|time|point|action (default: id)
@@ -132,7 +132,7 @@ public function details($uid, $sort_key, $sort_dir, $page)
132132
AND user_id = $uid";
133133
$result = $this->db->sql_query($sql);
134134
$user_row = $this->db->sql_fetchrow($result);
135-
$this->db->sql_freeresult($result);
135+
$this->db->sql_freeresult($result);
136136

137137
// Check if an user exists - if not, throw the error and return to the index page
138138
if (empty($user_row))
@@ -200,7 +200,7 @@ public function details($uid, $sort_key, $sort_dir, $page)
200200
'ACTION' => $this->user->lang('RS_' . strtoupper($row['reputation_type_name']) . '_RATING'),
201201
'AVATAR' => phpbb_get_user_avatar($row),
202202
'TIME' => $this->user->format_date($row['reputation_time']),
203-
'COMMENT' => $row['reputation_comment'],
203+
'COMMENT' => censor_text($row['reputation_comment']),
204204
'POINTS' => $row['reputation_points'],
205205
'POINTS_CLASS' => $this->reputation_helper->reputation_class($row['reputation_points']),
206206
'POINTS_TITLE' => $this->user->lang('RS_POINTS_TITLE', $row['reputation_points']),
@@ -490,7 +490,7 @@ public function postdetails($post_id, $sort_key, $sort_dir)
490490
'USERNAME' => get_username_string('full', $row['user_id_from'], $row['username'], $row['user_colour']),
491491
'AVATAR' => phpbb_get_user_avatar($row),
492492
'TIME' => $this->user->format_date($row['reputation_time']),
493-
'COMMENT' => $row['reputation_comment'],
493+
'COMMENT' => censor_text($row['reputation_comment']),
494494
'POINTS' => $row['reputation_points'],
495495
'POINTS_CLASS' => $this->reputation_helper->reputation_class($row['reputation_points']),
496496
'POINTS_TITLE' => $this->user->lang('RS_POINTS_TITLE', $row['reputation_points']),
@@ -632,7 +632,7 @@ public function userdetails($uid, $sort_key, $sort_dir)
632632
'ACTION' => $this->user->lang('RS_' . strtoupper($row['reputation_type_name']) . '_RATING'),
633633
'AVATAR' => phpbb_get_user_avatar($row),
634634
'TIME' => $this->user->format_date($row['reputation_time']),
635-
'COMMENT' => $row['reputation_comment'],
635+
'COMMENT' => censor_text($row['reputation_comment']),
636636
'POINTS' => $row['reputation_points'],
637637
'POINTS_CLASS' => $this->reputation_helper->reputation_class($row['reputation_points']),
638638
'POINTS_TITLE' => $this->user->lang('RS_POINTS_TITLE', $row['reputation_points']),
@@ -671,4 +671,4 @@ public function userdetails($uid, $sort_key, $sort_dir)
671671

672672
return $this->helper->render('userdetails.html');
673673
}
674-
}
674+
}

0 commit comments

Comments
 (0)