From d75263b9a84cf5fbfe4f749564733a87480f2f2b Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sat, 25 Feb 2023 12:38:54 +1100 Subject: [PATCH] code comments --- Code/Module/Ping.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Code/Module/Ping.php b/Code/Module/Ping.php index e4b4c0210..84f7d8195 100644 --- a/Code/Module/Ping.php +++ b/Code/Module/Ping.php @@ -794,7 +794,20 @@ class Ping extends Controller // This also resets the pconfig storage for seen_items if ((!$my_activity) && (!(intval($result['home']) + intval($result['stream']) + intval($result['pubs'])))) { +<<<<<<< Updated upstream 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_stream'] = datetime_convert();