mirror of
https://github.com/friendica/friendica
synced 2025-04-25 22:30:10 +00:00
old boot.php functions replaced in various places
This commit is contained in:
parent
c54bfd423a
commit
11944dda32
20 changed files with 183 additions and 105 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue