wrong array

This commit is contained in:
nobody 2021-04-13 22:08:41 -07:00
parent db7cdca177
commit a208ef43cc

View file

@ -2594,23 +2594,25 @@ class Activity {
}
}
$s['comment_policy'] = 'authenticated';
if ($s['mid'] === $s['parent_mid']) {
// it is a parent node - decode the comment policy info if present
if (isset($act->obj['commentPolicy'])) {
$until = strpos($act->obj['commentPolicy'],'until=');
if ($until !== false) {
$item['comments_closed'] = datetime_convert('UTC','UTC',substr($act->obj['commentPolicy'],$until + 6));
if ($item['comments_closed'] < datetime_convert()) {
$item['nocomment'] = true;
$s['comments_closed'] = datetime_convert('UTC','UTC',substr($act->obj['commentPolicy'],$until + 6));
if ($s['comments_closed'] < datetime_convert()) {
$s['nocomment'] = true;
}
}
$remainder = substr($act->obj['commentPolicy'],0,(($until) ? $until : strlen($act->obj['commentPolicy'])));
if ($remainder) {
$item['comment_policy'] = $remainder;
$s['comment_policy'] = $remainder;
}
if (! (isset($item['comment_policy']) && strlen($item['comment_policy']))) {
$s['comment_policy'] = 'contacts';
}
}
else {
$item['comment_policy'] = 'authenticated';
}
}