X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=81dce59e2f8fcfe5159c18ca320c3d57d325eb89;hb=122ad0af14f046c2462a03fe33967dc41abfc8b5;hp=1a429948a9d8de8ae2342c03da49910bf4ec47a0;hpb=aa0b485f3dca72c5448076e913fa54d948cd7731;p=friendica.git diff --git a/mod/display.php b/mod/display.php index 1a429948a9..81dce59e2f 100644 --- a/mod/display.php +++ b/mod/display.php @@ -187,7 +187,7 @@ function display_content(App $a, $update = false, $update_uid = 0) if ($update) { $item_id = $_REQUEST['item_id']; - $item = Item::selectFirst(['uid', 'parent', 'parent-uri'], ['id' => $item_id]); + $item = Item::selectFirst(['uid', 'parent', 'parent-uri', 'parent-uri-id'], ['id' => $item_id]); if ($item['uid'] != 0) { $a->profile = ['uid' => intval($item['uid'])]; } else { @@ -201,7 +201,7 @@ function display_content(App $a, $update = false, $update_uid = 0) if ($a->argc == 2) { $item_parent = 0; - $fields = ['id', 'parent', 'parent-uri', 'uid']; + $fields = ['id', 'parent', 'parent-uri', 'parent-uri-id', 'uid']; if (local_user()) { $condition = ['guid' => $a->argv[1], 'uid' => local_user()]; @@ -238,6 +238,10 @@ function display_content(App $a, $update = false, $update_uid = 0) throw new HTTPException\NotFoundException(DI::l10n()->t('The requested item doesn\'t exist or has been deleted.')); } + if (!DI::pConfig()->get(local_user(), 'system', 'detailed_notif')) { + DBA::update('notify', ['seen' => true], ['parent-uri-id' => $item['parent-uri-id'], 'uid' => local_user()]); + } + // We are displaying an "alternate" link if that post was public. See issue 2864 $is_public = Item::exists(['id' => $item_id, 'private' => [Item::PUBLIC, Item::UNLISTED]]); if ($is_public) {