X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FUpdate%2FProfile.php;h=53406e195f82d9760141cce847c5a5332f5d0416;hb=21f172c585aff8c606774a05fde1548ddff1667d;hp=c1b7522e5c8d9615f87905c5a6e22b1181a66895;hpb=5ea22197ac37c58c82cecb1b8d55bd29077f3924;p=friendica.git diff --git a/src/Module/Update/Profile.php b/src/Module/Update/Profile.php index c1b7522e5c..53406e195f 100644 --- a/src/Module/Update/Profile.php +++ b/src/Module/Update/Profile.php @@ -1,6 +1,6 @@ setProfileOwner((int)($_GET['p'] ?? 0)); + $a->setProfileOwner((int)($request['p'] ?? 0)); if (DI::config()->get('system', 'block_public') && !DI::userSession()->getLocalUserId() && !DI::userSession()->getRemoteContactID($a->getProfileOwner())) { throw new ForbiddenException(); @@ -58,7 +59,7 @@ class Profile extends BaseModule $o = ''; - if (empty($_GET['force']) && DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'no_auto_update')) { + if (empty($request['force'])) { System::htmlUpdateExit($o); } @@ -73,9 +74,9 @@ class Profile extends BaseModule AND `visible` AND (NOT `deleted` OR `gravity` = ?) AND `wall` " . $sql_extra, $a->getProfileOwner(), Item::GRAVITY_ACTIVITY]; - if ($_GET['force'] && !empty($_GET['item'])) { + if ($request['force'] && !empty($request['item'])) { // When the parent is provided, we only fetch this - $condition = DBA::mergeConditions($condition, ['parent' => $_GET['item']]); + $condition = DBA::mergeConditions($condition, ['parent' => $request['item']]); } elseif ($is_owner || !$last_updated) { // If the page user is the owner of the page we should query for unseen // items. Otherwise use a timestamp of the last succesful update request. @@ -115,7 +116,7 @@ class Profile extends BaseModule } } - $o .= DI::conversation()->create($items, 'profile', $a->getProfileOwner(), false, 'received', $a->getProfileOwner()); + $o .= DI::conversation()->create($items, Conversation::MODE_PROFILE, $a->getProfileOwner(), false, 'received', $a->getProfileOwner()); System::htmlUpdateExit($o); }