]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Debug/ItemBody.php
Merge pull request #12850 from nupplaphil/feat/phpstorm_editorconfig
[friendica.git] / src / Module / Debug / ItemBody.php
index ff392221281e9bfb661c3a70e6768e4a4be28ec4..6bc1419d3463e08e0d550c03b756bbb09d6013f9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,7 +22,6 @@
 namespace Friendica\Module\Debug;
 
 use Friendica\BaseModule;
-use Friendica\Core\Session;
 use Friendica\Core\System;
 use Friendica\DI;
 use Friendica\Model\Post;
@@ -35,7 +34,7 @@ class ItemBody extends BaseModule
 {
        protected function content(array $request = []): string
        {
-               if (!Session::getLocalUser()) {
+               if (!DI::userSession()->getLocalUserId()) {
                        throw new HTTPException\UnauthorizedException(DI::l10n()->t('Access denied.'));
                }
 
@@ -45,7 +44,7 @@ class ItemBody extends BaseModule
 
                $itemId = intval($this->parameters['item']);
 
-               $item = Post::selectFirst(['body'], ['uid' => [0, Session::getLocalUser()], 'uri-id' => $itemId]);
+               $item = Post::selectFirst(['body'], ['uid' => [0, DI::userSession()->getLocalUserId()], 'uri-id' => $itemId]);
 
                if (!empty($item)) {
                        if (DI::mode()->isAjax()) {