mirror of
https://github.com/friendica/friendica
synced 2025-04-24 08:30:11 +00:00
UserSession class [3] - Refactor src/ files excluding Module/Model
This commit is contained in:
parent
a11c125f81
commit
b3f9cef94a
23 changed files with 120 additions and 133 deletions
|
@ -23,7 +23,6 @@ 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;
|
||||
|
@ -76,7 +75,7 @@ class Thread
|
|||
switch ($mode) {
|
||||
case 'network':
|
||||
case 'notes':
|
||||
$this->profile_owner = Session::getLocalUser();
|
||||
$this->profile_owner = DI::userSession()->getLocalUserId();
|
||||
$this->writable = true;
|
||||
break;
|
||||
case 'profile':
|
||||
|
@ -169,7 +168,7 @@ class Thread
|
|||
/*
|
||||
* Only add will be displayed
|
||||
*/
|
||||
if ($item->getDataValue('network') === Protocol::MAIL && Session::getLocalUser() != $item->getDataValue('uid')) {
|
||||
if ($item->getDataValue('network') === Protocol::MAIL && DI::userSession()->getLocalUserId() != $item->getDataValue('uid')) {
|
||||
Logger::info('[WARN] Conversation::addThread : Thread is a mail ('. $item->getId() .').');
|
||||
return false;
|
||||
}
|
||||
|
@ -202,7 +201,7 @@ class Thread
|
|||
$result = [];
|
||||
|
||||
foreach ($this->parents as $item) {
|
||||
if ($item->getDataValue('network') === Protocol::MAIL && Session::getLocalUser() != $item->getDataValue('uid')) {
|
||||
if ($item->getDataValue('network') === Protocol::MAIL && DI::userSession()->getLocalUserId() != $item->getDataValue('uid')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue