code comments

This commit is contained in:
Mike Macgirvin 2023-02-25 12:38:54 +11:00
parent 2d21e9834d
commit d75263b9a8

View file

@ -794,7 +794,20 @@ class Ping extends Controller
// This also resets the pconfig storage for seen_items // This also resets the pconfig storage for seen_items
if ((!$my_activity) && (!(intval($result['home']) + intval($result['stream']) + intval($result['pubs'])))) { if ((!$my_activity) && (!(intval($result['home']) + intval($result['stream']) + intval($result['pubs'])))) {
<<<<<<< Updated upstream
PConfig::Delete(local_channel(), 'system', 'seen_items'); PConfig::Delete(local_channel(), 'system', 'seen_items');
=======
// PConfig storage for seen_items is common across all sessions.
// In order to reduce conflicts when multiple sessions are active,
// only perform PConfig deletion if there are seen items in
// *this* session.
if ($_SESSION['seen_items']) {
$_SESSION['seen_items'] = [];
PConfig::Delete(local_channel(), 'system', 'seen_items');
}
>>>>>>> Stashed changes
$_SESSION['loadtime_channel'] = datetime_convert(); $_SESSION['loadtime_channel'] = datetime_convert();
$_SESSION['loadtime_stream'] = datetime_convert(); $_SESSION['loadtime_stream'] = datetime_convert();