Merge pull request #8464 from annando/notice

Fixes two notices
This commit is contained in:
Tobias Diekershoff 2020-03-29 08:37:57 +02:00 committed by GitHub
commit cb1696bfaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View file

@ -356,7 +356,6 @@ class Item
unset($row['internal-iid']); unset($row['internal-iid']);
unset($row['internal-psid']); unset($row['internal-psid']);
unset($row['internal-iaid']); unset($row['internal-iaid']);
unset($row['internal-icid']);
unset($row['internal-user-ignored']); unset($row['internal-user-ignored']);
unset($row['interaction']); unset($row['interaction']);
@ -680,8 +679,7 @@ class Item
'private', 'pubmail', 'moderated', 'visible', 'starred', 'bookmark', 'private', 'pubmail', 'moderated', 'visible', 'starred', 'bookmark',
'unseen', 'deleted', 'origin', 'forum_mode', 'mention', 'global', 'unseen', 'deleted', 'origin', 'forum_mode', 'mention', 'global',
'id' => 'item_id', 'network', 'icid', 'iaid', 'id' => 'internal-iid', 'id' => 'item_id', 'network', 'icid', 'iaid', 'id' => 'internal-iid',
'network' => 'internal-network', 'icid' => 'internal-icid', 'network' => 'internal-network', 'iaid' => 'internal-iaid', 'psid' => 'internal-psid'];
'iaid' => 'internal-iaid', 'psid' => 'internal-psid'];
if ($usermode) { if ($usermode) {
$fields['user-item'] = ['pinned', 'notification-type', 'ignored' => 'internal-user-ignored']; $fields['user-item'] = ['pinned', 'notification-type', 'ignored' => 'internal-user-ignored'];
@ -846,15 +844,9 @@ class Item
* *
* @return string The field list * @return string The field list
*/ */
private static function constructSelectFields($fields, $selected) private static function constructSelectFields(array $fields, array $selected)
{ {
if (!empty($selected)) { $selected = array_merge($selected, ['internal-iid', 'internal-psid', 'internal-iaid', 'internal-network']);
$selected[] = 'internal-iid';
$selected[] = 'internal-psid';
$selected[] = 'internal-iaid';
$selected[] = 'internal-icid';
$selected[] = 'internal-network';
}
if (in_array('verb', $selected)) { if (in_array('verb', $selected)) {
$selected[] = 'internal-activity'; $selected[] = 'internal-activity';

View file

@ -63,7 +63,7 @@ class Objects extends BaseModule
$activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type']; $activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type'];
// Only display "Create" activity objects here, no reshares or anything else // Only display "Create" activity objects here, no reshares or anything else
if (!is_array($activity['object']) || ($activity['type'] != 'Create')) { if (empty($activity['object']) || ($activity['type'] != 'Create')) {
throw new \Friendica\Network\HTTPException\NotFoundException(); throw new \Friendica\Network\HTTPException\NotFoundException();
} }