From 9eba41598dec3f18b402741aa574475956a64d0e Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 4 Oct 2021 14:01:46 +0000 Subject: [PATCH] Code review changes --- src/Model/Contact.php | 6 +----- src/Module/Photo.php | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 0c7fd3909e..1cff5a0c9c 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2218,11 +2218,7 @@ class Contact self::updateAvatar($id, $ret['photo'], $update); } - if (empty($guid)) { - $uriid = ItemURI::getIdByURI($ret['url']); - } else { - $uriid = ItemURI::insert(['uri' => $ret['url'], 'guid' => $guid]); - } + $uriid = ItemURI::insert(['uri' => $ret['url'], 'guid' => $guid]); if (!$update) { self::updateContact($id, $uid, $contact['url'], $ret['url'], ['failed' => false, 'last-update' => $updated, 'success_update' => $updated]); diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 660f908d22..39a8353b5d 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -113,7 +113,7 @@ class Photo extends BaseModule } if (empty($id)) { - Logger::notice('No picture id was detected', ['parameters' => $parameters]); + Logger::notice('No picture id was detected', ['parameters' => $parameters, 'query' => DI::args()->getQueryString()]); throw new HTTPException\NotFoundException(DI::l10n()->t('The Photo is not available.')); }