Some Bugfixings

- Remove 'adjust' from ping list ( FollowUp 9935e8e711 )
- Fix Photo::selectFirst condition/parameter mixup
This commit is contained in:
Philipp 2021-10-04 12:58:28 +02:00
parent d5285da970
commit 3900cf9874
No known key found for this signature in database
GPG Key ID: 24A7501396EB5432
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ function fbrowser_content(App $a)
$filename_e = $rr['filename']; $filename_e = $rr['filename'];
// Take the largest picture that is smaller or equal 640 pixels // Take the largest picture that is smaller or equal 640 pixels
$photo = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `height` <= ? AND `width` <= ?", $rr['resource-id'], 640, 640, ['order' => ['scale']]]); $photo = Photo::selectFirst(['scale'], ["`resource-id` = ? AND `height` <= ? AND `width` <= ?", $rr['resource-id'], 640, 640], ['order' => ['scale']]);
$scale = $photo['scale'] ?? $rr['loq']; $scale = $photo['scale'] ?? $rr['loq'];
return [ return [

View File

@ -207,7 +207,7 @@ function ping_init(App $a)
$cachekey = "ping_init:".local_user(); $cachekey = "ping_init:".local_user();
$ev = DI::cache()->get($cachekey); $ev = DI::cache()->get($cachekey);
if (is_null($ev)) { if (is_null($ev)) {
$ev = DBA::selectToArray('event', ['type', 'start', 'adjust'], $ev = DBA::selectToArray('event', ['type', 'start'],
["`uid` = ? AND `start` < ? AND `finish` > ? AND NOT `ignore`", ["`uid` = ? AND `start` < ? AND `finish` > ? AND NOT `ignore`",
local_user(), DateTimeFormat::utc('now + 7 days'), DateTimeFormat::utcNow()]); local_user(), DateTimeFormat::utc('now + 7 days'), DateTimeFormat::utcNow()]);
if (DBA::isResult($ev)) { if (DBA::isResult($ev)) {