old boot.php functions replaced in various places

This commit is contained in:
Michael 2022-10-19 05:06:28 +00:00 committed by Hypolite Petovan
parent c54bfd423a
commit 11944dda32
20 changed files with 183 additions and 105 deletions

View file

@ -23,6 +23,7 @@ namespace Friendica\Object;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Session;
use Friendica\DI;
use Friendica\Protocol\Activity;
use Friendica\Security\Security;
@ -75,7 +76,7 @@ class Thread
switch ($mode) {
case 'network':
case 'notes':
$this->profile_owner = local_user();
$this->profile_owner = Session::getLocalUser();
$this->writable = true;
break;
case 'profile':
@ -168,7 +169,7 @@ class Thread
/*
* Only add will be displayed
*/
if ($item->getDataValue('network') === Protocol::MAIL && local_user() != $item->getDataValue('uid')) {
if ($item->getDataValue('network') === Protocol::MAIL && Session::getLocalUser() != $item->getDataValue('uid')) {
Logger::info('[WARN] Conversation::addThread : Thread is a mail ('. $item->getId() .').');
return false;
}
@ -201,7 +202,7 @@ class Thread
$result = [];
foreach ($this->parents as $item) {
if ($item->getDataValue('network') === Protocol::MAIL && local_user() != $item->getDataValue('uid')) {
if ($item->getDataValue('network') === Protocol::MAIL && Session::getLocalUser() != $item->getDataValue('uid')) {
continue;
}