- Added missing `()` to `getRemoteUserId` which is a method, and not a property
- `Undefined property: Friendica\Core\Session\Model\UserSession::$getRemoteUserId in /var/www/.../htdocs/mod/display.php on line 192`
This commit is contained in:
Roland Häder 2022-10-24 18:27:38 +02:00
parent b72d727a06
commit 54b89365bb
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77
2 changed files with 5 additions and 5 deletions

View File

@ -69,10 +69,10 @@ function display_init(App $a)
} }
// Is this item private but could be visible to the remove visitor? // Is this item private but could be visible to the remove visitor?
if (!DBA::isResult($item) && DI::userSession()->getRemoteUserId) { if (!DBA::isResult($item) && DI::userSession()->getRemoteUserId()) {
$item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]); $item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]);
if (DBA::isResult($item)) { if (DBA::isResult($item)) {
if (!Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) { if (!Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) {
$item = null; $item = null;
} else { } else {
$item_user = $item['uid']; $item_user = $item['uid'];
@ -189,9 +189,9 @@ function display_content(App $a, $update = false, $update_uid = 0)
} }
} }
if (($parent_uri_id == 0) && DI::userSession()->getRemoteUserId) { if (($parent_uri_id == 0) && DI::userSession()->getRemoteUserId()) {
$item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]); $item = Post::selectFirst($fields, ['guid' => DI::args()->getArgv()[1], 'private' => Item::PRIVATE, 'origin' => true]);
if (DBA::isResult($item) && Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) { if (DBA::isResult($item) && Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) {
$uri_id = $item['uri-id']; $uri_id = $item['uri-id'];
$parent_uri_id = $item['parent-uri-id']; $parent_uri_id = $item['parent-uri-id'];
} }

View File

@ -82,7 +82,7 @@ function redir_init(App $a) {
} }
} }
if (DI::userSession()->getRemoteUserId) { if (DI::userSession()->getRemoteUserId()) {
$host = substr(DI::baseUrl()->getUrlPath() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''), strpos(DI::baseUrl()->getUrlPath(), '://') + 3); $host = substr(DI::baseUrl()->getUrlPath() . (DI::baseUrl()->getUrlPath() ? '/' . DI::baseUrl()->getUrlPath() : ''), strpos(DI::baseUrl()->getUrlPath(), '://') + 3);
$remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1); $remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);