Some changes after code review
This commit is contained in:
parent
9ca470cc94
commit
cc43b567cb
3 changed files with 6 additions and 6 deletions
|
@ -51,7 +51,7 @@ function tagger_content(App $a) {
|
||||||
|
|
||||||
$item_id = ((DI::args()->getArgc() > 1) ? trim(DI::args()->getArgv()[1]) : 0);
|
$item_id = ((DI::args()->getArgc() > 1) ? trim(DI::args()->getArgv()[1]) : 0);
|
||||||
|
|
||||||
Logger::info('tagger: tag ' . $term . ' item ' . $item_id);
|
Logger::info('tagger: tag', ['term' => $term, 'item' => $item_id]);
|
||||||
|
|
||||||
|
|
||||||
$item = Post::selectFirst([], ['id' => $item_id]);
|
$item = Post::selectFirst([], ['id' => $item_id]);
|
||||||
|
|
|
@ -104,7 +104,7 @@ class Worker
|
||||||
foreach ($r as $entry) {
|
foreach ($r as $entry) {
|
||||||
// The work will be done
|
// The work will be done
|
||||||
if (!self::execute($entry)) {
|
if (!self::execute($entry)) {
|
||||||
Logger::warning('Process execution failed, quitting.');
|
Logger::warning('Process execution failed, quitting.', ['entry' => $entry]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1095,7 +1095,7 @@ class Photo
|
||||||
|
|
||||||
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
$r = self::store($image, $user['uid'], 0, $resource_id, $filename, $album, 0, self::DEFAULT, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
Logger::warning('Photo could not be stored');
|
Logger::warning('Photo could not be stored', ['uid' => $user['uid'], 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1182,7 +1182,7 @@ class Photo
|
||||||
|
|
||||||
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 4, self::USER_AVATAR);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 4, self::USER_AVATAR);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::warning('profile image upload with scale 4 (300) failed');
|
logger::warning('profile image upload with scale 4 (300) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 80 || $height > 80) {
|
if ($width > 80 || $height > 80) {
|
||||||
|
@ -1191,7 +1191,7 @@ class Photo
|
||||||
|
|
||||||
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 5, self::USER_AVATAR);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 5, self::USER_AVATAR);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::warning('profile image upload with scale 5 (80) failed');
|
logger::warning('profile image upload with scale 5 (80) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 48 || $height > 48) {
|
if ($width > 48 || $height > 48) {
|
||||||
|
@ -1200,7 +1200,7 @@ class Photo
|
||||||
|
|
||||||
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 6, self::USER_AVATAR);
|
$r = self::store($image, $uid, 0, $resource_id, $filename, $album, 6, self::USER_AVATAR);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
logger::warning('profile image upload with scale 6 (48) failed');
|
logger::warning('profile image upload with scale 6 (48) failed', ['uid' => $uid, 'resource_id' => $resource_id, 'filename' => $filename, 'album' => $album]);
|
||||||
}
|
}
|
||||||
|
|
||||||
logger::info('new profile image upload ended');
|
logger::info('new profile image upload ended');
|
||||||
|
|
Loading…
Reference in a new issue