mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:45:16 +02:00
UserSession class [2] - Refactor mod/ files
This commit is contained in:
parent
a729f3255d
commit
bfe68702db
25 changed files with 201 additions and 201 deletions
|
@ -76,10 +76,10 @@ function wall_upload_post(App $a, $desktopmode = true)
|
|||
$page_owner_nick = $user['nickname'];
|
||||
$community_page = (($user['page-flags'] == User::PAGE_FLAGS_COMMUNITY) ? true : false);
|
||||
|
||||
if ((Session::getLocalUser()) && (Session::getLocalUser() == $page_owner_uid)) {
|
||||
if ((DI::userSession()->getLocalUserId()) && (DI::userSession()->getLocalUserId() == $page_owner_uid)) {
|
||||
$can_post = true;
|
||||
} elseif ($community_page && !empty(Session::getRemoteContactID($page_owner_uid))) {
|
||||
$contact_id = Session::getRemoteContactID($page_owner_uid);
|
||||
} elseif ($community_page && !empty(DI::userSession()->getRemoteContactID($page_owner_uid))) {
|
||||
$contact_id = DI::userSession()->getRemoteContactID($page_owner_uid);
|
||||
$can_post = DBA::exists('contact', ['blocked' => false, 'pending' => false, 'id' => $contact_id, 'uid' => $page_owner_uid]);
|
||||
$visitor = $contact_id;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue