Merge pull request #12058 from Quix0r/fixes/get-remote-userid
Fixed: Undefined property: Friendica\Core\Session\Model\UserSession::$getRemoteUserId
This commit is contained in:
commit
05b15f2824
|
@ -69,10 +69,10 @@ function display_init(App $a)
|
|||
}
|
||||
|
||||
// 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]);
|
||||
if (DBA::isResult($item)) {
|
||||
if (!Contact::isFollower(DI::userSession()->getRemoteUserId, $item['uid'])) {
|
||||
if (!Contact::isFollower(DI::userSession()->getRemoteUserId(), $item['uid'])) {
|
||||
$item = null;
|
||||
} else {
|
||||
$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]);
|
||||
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'];
|
||||
$parent_uri_id = $item['parent-uri-id'];
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
$remotehost = substr($contact['addr'], strpos($contact['addr'], '@') + 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user