Merge pull request #9851 from MrPetovan/bug/fatal-errors

Replace obsolete call to Item::selectFirstThreadForUser in Module\Item\Ignore
2022.09-rc
Michael Vogel 2021-01-22 23:16:25 +01:00 zatwierdzone przez GitHub
commit 615e6f20f0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ use Friendica\BaseModule;
use Friendica\Core\Session; use Friendica\Core\Session;
use Friendica\Core\System; use Friendica\Core\System;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\Item; use Friendica\Model\Post;
use Friendica\Network\HTTPException; use Friendica\Network\HTTPException;
/** /**
@ -50,7 +50,7 @@ class Ignore extends BaseModule
throw new HTTPException\BadRequestException(); throw new HTTPException\BadRequestException();
} }
$thread = Item::selectFirstThreadForUser(local_user(), ['uid', 'ignored'], ['iid' => $message_id]); $thread = Post::selectFirstThreadForUser(local_user(), ['uid', 'ignored'], ['iid' => $message_id]);
if (!$dba->isResult($thread)) { if (!$dba->isResult($thread)) {
throw new HTTPException\BadRequestException(); throw new HTTPException\BadRequestException();
} }