Some more deprecated function calls are replaced

This commit is contained in:
Michael 2024-05-14 08:37:10 +00:00
parent bd6616e84f
commit e12f92e516
30 changed files with 101 additions and 163 deletions

View file

@ -1071,13 +1071,11 @@ class Post
*/
private function getDefaultText(): string
{
$a = DI::app();
if (!DI::userSession()->getLocalUserId()) {
return '';
}
$owner = User::getOwnerDataById($a->getLoggedInUserId());
$owner = User::getOwnerDataById(DI::userSession()->getLocalUserId());
$item = $this->getData();
if (!empty($item['content-warning']) && Feature::isEnabled(DI::userSession()->getLocalUserId(), Feature::ADD_ABSTRACT)) {
@ -1124,8 +1122,6 @@ class Post
*/
private function getCommentBox(string $indent)
{
$a = DI::app();
$comment_box = '';
$conv = $this->getThread();
@ -1144,7 +1140,7 @@ class Post
$uid = $conv->getProfileOwner();
$parent_uid = $this->getDataValue('uid');
$owner = User::getOwnerDataById($a->getLoggedInUserId());
$owner = User::getOwnerDataById(DI::userSession()->getLocalUserId());
$default_text = $this->getDefaultText();