Ãfix regression

This commit is contained in:
Mario
2022-09-26 08:31:57 +00:00
parent bb9411e7dc
commit 03475bfb15
2 changed files with 7 additions and 3 deletions

View File

@@ -58,12 +58,13 @@ class WebServer {
if((x($_GET,'zid')) && (! \App::$install)) {
\App::$query_string = strip_zids(\App::$query_string);
if(! local_channel()) {
if (isset($_SESSION['my_address']) && $_SESSION['my_address'] != $_GET['zid']) {
if (!isset($_SESSION['my_address']) || $_SESSION['my_address'] != $_GET['zid']) {
$_SESSION['my_address'] = $_GET['zid'];
$_SESSION['authenticated'] = 0;
}
if(! $_SESSION['authenticated'])
if(!$_SESSION['authenticated']) {
zid_init();
}
}
}

View File

@@ -34,7 +34,10 @@ class Cover_photo {
if(! array_key_exists('channels_visited',$_SESSION)) {
$_SESSION['channels_visited'] = [];
}
$_SESSION['channels_visited'][] = $channel_id;
if (!in_array($channel_id, $_SESSION['channels_visited'])) {
$_SESSION['channels_visited'][] = $channel_id;
}
$channel = channelx_by_n($channel_id);