Skip forums-redirect when selecting unfollow

This commit is contained in:
Visman 2023-11-17 18:53:52 +07:00
parent 3299b641a7
commit 85e2c3ed29

View file

@ -52,7 +52,15 @@ class Search extends Profile
if ($v->validation($_POST)) {
if (! empty($v->follow)) {
$unfollow = \array_diff(\array_keys($this->curForums), $v->follow);
$unfollow = [];
foreach ($this->curForums as $id => $forum) {
if ('' == $forum->redirect_url) {
$unfollow[$id] = $id;
}
}
$unfollow = \array_diff($unfollow, $v->follow);
\sort($unfollow, \SORT_NUMERIC);