Fix errors in Content namespace

This commit is contained in:
Art4 2024-11-19 08:30:26 +00:00
parent 3c84c21318
commit caa826ca06
8 changed files with 28 additions and 16 deletions

View file

@ -402,7 +402,7 @@ class Widget
return '';
}
$commonContacts = Contact\Relation::listCommon($localPCid, $visitorPCid, $condition, 0, 5, true);
$commonContacts = Contact\Relation::listCommon($localPCid, $visitorPCid, $condition, 0, 5);
if (!DBA::isResult($commonContacts)) {
return '';
}
@ -479,6 +479,10 @@ class Widget
DI::cache()->set($cachekey, $dthen, Duration::HOUR);
}
$cutoffday = '';
$thisday = '';
$nextday = '';
if ($dthen) {
// Set the start and end date to the beginning of the month
$cutoffday = $dthen;
@ -513,7 +517,6 @@ class Widget
return $o;
}
$cutoff_year = intval(DateTimeFormat::localNow('Y')) - $visible_years;
$cutoff = array_key_exists($cutoff_year, $ret);