X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FUpdate%2FDisplay.php;h=4b84cba7a82bce91dae06941bfb59d863c960ffa;hb=79235b6db1c9badd6c9602d54ad0d550e4bec2fd;hp=a8dea82e1ccdc0d5895e7193f71bdce95802a415;hpb=3259bd17dc97ddfa4518c9fade8df06c16c64e6b;p=friendica.git diff --git a/src/Module/Update/Display.php b/src/Module/Update/Display.php index a8dea82e1c..4b84cba7a8 100644 --- a/src/Module/Update/Display.php +++ b/src/Module/Update/Display.php @@ -17,7 +17,6 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . * - * See update_profile.php for documentation */ namespace Friendica\Module\Update; @@ -38,9 +37,9 @@ class Display extends DisplayModule throw new HTTPException\UnauthorizedException($this->t('Access denied.')); } - $profileUid = $request['p'] ?? 0; - $force = $request['force'] ?? false; - $uriId = $request['uri_id'] ?? 0; + $profileUid = $request['p'] ?? 0; + $force = $request['force'] ?? false; + $uriId = $request['uri_id'] ?? 0; if (empty($uriId)) { throw new HTTPException\BadRequestException($this->t('Parameter uri_id is missing.')); @@ -49,22 +48,24 @@ class Display extends DisplayModule $item = Post::selectFirst( ['uid', 'parent-uri-id', 'uri-id'], ['uri-id' => $uriId, 'uid' => [0, $profileUid]], - ['order' => ['uid' => true]] + ['order' => ['uid' => true]] ); if (empty($item)) { throw new HTTPException\NotFoundException($this->t('The requested item doesn\'t exist or has been deleted.')); } - $this->app->setProfileOwner($item['uid'] ?? $profileUid); + $this->app->setProfileOwner($item['uid'] ?: $profileUid); $parentUriId = $item['parent-uri-id']; if (empty($force)) { $browserUpdate = $this->pConfig->get($profileUid, 'system', 'update_interval'); if (!empty($browserUpdate)) { $updateDate = date(DateTimeFormat::MYSQL, time() - (intval($browserUpdate) / 500)); - if (!Post::exists(["`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?", $parentUriId, 0, - $profileUid, $updateDate])) { + if (!Post::exists([ + "`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?", + $parentUriId, 0, + $profileUid, $updateDate])) { $this->logger->debug('No updated content. Ending process', ['uri-id' => $uriId, 'uid' => $profileUid, 'updated' => $updateDate]); return '';