mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
UserSession class [5] - Refactor src/Module/ files with DI
This commit is contained in:
parent
a729f3255d
commit
eecc456e0c
78 changed files with 455 additions and 530 deletions
|
@ -25,7 +25,6 @@ use Friendica\App;
|
|||
use Friendica\BaseModule;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model;
|
||||
use Friendica\Module\Response;
|
||||
|
@ -49,7 +48,7 @@ class Feed extends BaseModule
|
|||
|
||||
$this->httpClient = $httpClient;
|
||||
|
||||
if (!Session::getLocalUser()) {
|
||||
if (!DI::userSession()->getLocalUserId()) {
|
||||
DI::sysmsg()->addNotice($this->t('You must be logged in to use this module'));
|
||||
$baseUrl->redirect();
|
||||
}
|
||||
|
@ -61,7 +60,7 @@ class Feed extends BaseModule
|
|||
if (!empty($_REQUEST['url'])) {
|
||||
$url = $_REQUEST['url'];
|
||||
|
||||
$contact = Model\Contact::getByURLForUser($url, Session::getLocalUser(), null);
|
||||
$contact = Model\Contact::getByURLForUser($url, DI::userSession()->getLocalUserId(), null);
|
||||
|
||||
$xml = $this->httpClient->fetch($contact['poll'], HttpClientAccept::FEED_XML);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue