X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=5aba7eb81d273c613a91c12f41dd59c887d6bc30;hb=7e06127d74565b1c63ca897437ef084a0a7415e0;hp=bc667dd5e122750a6c429683eda2144008f745c6;hpb=069c1d0b350fb7c3b1492c091ec796aebf39acd5;p=friendica.git diff --git a/mod/display.php b/mod/display.php index bc667dd5e1..5aba7eb81d 100644 --- a/mod/display.php +++ b/mod/display.php @@ -102,7 +102,7 @@ function display_init(App $a) } if (!empty($_SERVER['HTTP_ACCEPT']) && strstr($_SERVER['HTTP_ACCEPT'], 'application/atom+xml')) { - Logger::info('Directly serving XML for uri-id '.$item['uri-id']); + Logger::debug('Directly serving XML', ['uri-id' => $item['uri-id']]); displayShowFeed($item['uri-id'], $item['uid'], false); } @@ -160,15 +160,19 @@ function display_content(App $a, $update = false, $update_uid = 0) } $parent_uri_id = $item['parent-uri-id']; } - $browser_update = intval(DI::pConfig()->get($update_uid, 'system', 'update_interval')); - if (!empty($browser_update)) { - $update_date = date(DateTimeFormat::MYSQL, time() - ($browser_update / 500)); - if (!Post::exists(["`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?", $parent_uri_id, 0, $update_uid, $update_date])) { - Logger::debug('No updated content', ['uri-id' => $uri_id, 'uid' => $update_uid, 'updated' => $update_date]); - return ''; - } else { - Logger::debug('Updated content found', ['uri-id' => $uri_id, 'uid' => $update_uid, 'updated' => $update_date]); - } + if (empty($_REQUEST['force'])) { + $browser_update = intval(DI::pConfig()->get($update_uid, 'system', 'update_interval')); + if (!empty($browser_update)) { + $update_date = date(DateTimeFormat::MYSQL, time() - ($browser_update / 500)); + if (!Post::exists(["`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?", $parent_uri_id, 0, $update_uid, $update_date])) { + Logger::debug('No updated content', ['uri-id' => $uri_id, 'uid' => $update_uid, 'updated' => $update_date]); + return ''; + } else { + Logger::debug('Updated content found', ['uri-id' => $uri_id, 'uid' => $update_uid, 'updated' => $update_date]); + } + } + } else { + Logger::debug('Forced content update', ['uri-id' => $uri_id, 'uid' => $update_uid]); } } else { $uri_id = ((DI::args()->getArgc() > 2) ? DI::args()->getArgv()[2] : 0); @@ -298,7 +302,7 @@ function display_content(App $a, $update = false, $update_uid = 0) // Preparing the meta header $description = trim(BBCode::toPlaintext($item['body'])); - $title = trim(BBCode::toPlaintext($item['title'])); + $title = trim(BBCode::toPlaintext($item['title'] ?? '')); $author_name = $item['author-name']; $image = DI::baseUrl()->remove($item['author-avatar']);