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.'));
}
}
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);
if (DBA::isResult($photos) && !$item_id) {
// Create item container
$title = '';
- $uri = Item::newURI($page_owner_uid);
+ $uri = Item::newURI();
$arr = [];
$arr['guid'] = System::createUUID();
if (count($taginfo)) {
foreach ($taginfo as $tagged) {
- $uri = Item::newURI($page_owner_uid);
+ $uri = Item::newURI();
$arr = [];
$arr['guid'] = System::createUUID();
$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)) {
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;
$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;
}
$smallest = 2;
}
- $uri = Item::newURI($page_owner_uid);
+ $uri = Item::newURI();
// Create item container
$lat = $lon = null;