X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=6a4596bf2427616f8030383a14f521d7062ae9d0;hb=e56e543a791289e27b5f0850a85f441773167447;hp=745cea30ce7ba17e62441f67d33b7905e8328c91;hpb=ee96c26ede6669cef2e77e1c841cfa73cf07d39a;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 745cea30ce..6a4596bf24 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -65,7 +65,7 @@ function photos_init(App $a) { if (DI::args()->getArgc() > 1) { $owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]); - if (empty($owner) || $owner['account_removed']) { + if (!isset($owner['account_removed']) || $owner['account_removed']) { throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); } @@ -304,7 +304,7 @@ function photos_post(App $a) } if (!empty($_POST['rotate']) && (intval($_POST['rotate']) == 1 || intval($_POST['rotate']) == 2)) { - Logger::notice('rotate'); + Logger::debug('rotate'); $photo = Photo::getPhotoForUser($page_owner_uid, $resource_id); @@ -360,7 +360,7 @@ function photos_post(App $a) if (DBA::isResult($photos) && !$item_id) { // Create item container $title = ''; - $uri = Item::newURI($page_owner_uid); + $uri = Item::newURI(); $arr = []; $arr['guid'] = System::createUUID(); @@ -524,7 +524,7 @@ function photos_post(App $a) if (count($taginfo)) { foreach ($taginfo as $tagged) { - $uri = Item::newURI($page_owner_uid); + $uri = Item::newURI(); $arr = []; $arr['guid'] = System::createUUID(); @@ -580,7 +580,7 @@ function photos_post(App $a) $album = trim($_REQUEST['album'] ?? ''); $newalbum = trim($_REQUEST['newalbum'] ?? ''); - Logger::info('album= ' . $album . ' newalbum= ' . $newalbum); + Logger::debug('album= ' . $album . ' newalbum= ' . $newalbum); if (!strlen($album)) { if (strlen($newalbum)) { @@ -678,14 +678,14 @@ function photos_post(App $a) return; } - Logger::info('loading the contents of ' . $src); + Logger::debug('loading contents', ['src' => $src]); $imagedata = @file_get_contents($src); $image = new Image($imagedata, $type); if (!$image->isValid()) { - Logger::info('unable to process image'); + Logger::notice('unable to process image'); notice(DI::l10n()->t('Unable to process image.')); @unlink($src); $foo = 0; @@ -711,7 +711,7 @@ function photos_post(App $a) $r = Photo::store($image, $page_owner_uid, $visitor, $resource_id, $filename, $album, 0 , Photo::DEFAULT, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); if (!$r) { - Logger::info('image store failed'); + Logger::warning('image store failed'); notice(DI::l10n()->t('Image upload failed.')); return; } @@ -728,7 +728,7 @@ function photos_post(App $a) $smallest = 2; } - $uri = Item::newURI($page_owner_uid); + $uri = Item::newURI(); // Create item container $lat = $lon = null;