aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Web/WebServer.php5
-rw-r--r--Zotlabs/Widget/Cover_photo.php5
2 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php
index c1f43863a..9fa5a7797 100644
--- a/Zotlabs/Web/WebServer.php
+++ b/Zotlabs/Web/WebServer.php
@@ -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();
+ }
}
}
diff --git a/Zotlabs/Widget/Cover_photo.php b/Zotlabs/Widget/Cover_photo.php
index 11d9c4715..8d42becb5 100644
--- a/Zotlabs/Widget/Cover_photo.php
+++ b/Zotlabs/Widget/Cover_photo.php
@@ -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);