old boot.php functions replaced in src/module (2)

This commit is contained in:
Michael 2022-10-19 04:35:37 +00:00 committed by Hypolite Petovan
parent b36d4eb0dd
commit c9f17e1ef5
21 changed files with 102 additions and 88 deletions

View file

@ -55,10 +55,10 @@ class Ignore extends BaseModule
throw new HTTPException\NotFoundException();
}
$ignored = !Post\ThreadUser::getIgnored($thread['uri-id'], local_user());
$ignored = !Post\ThreadUser::getIgnored($thread['uri-id'], Session::getLocalUser());
if (in_array($thread['uid'], [0, local_user()])) {
Post\ThreadUser::setIgnored($thread['uri-id'], local_user(), $ignored);
if (in_array($thread['uid'], [0, Session::getLocalUser()])) {
Post\ThreadUser::setIgnored($thread['uri-id'], Session::getLocalUser(), $ignored);
} else {
throw new HTTPException\BadRequestException();
}