aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Cover_photo.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-08-21 13:19:30 +0200
committerMario Vavti <mario@mariovavti.com>2018-08-21 13:19:30 +0200
commitdb853134e31d5f42344d140339e0dea626fd429a (patch)
tree5fb4798a2549c1b9b83fa806426f6875cccbbb80 /Zotlabs/Widget/Cover_photo.php
parent218029ee578ed40f37ec093e6bb7eafa7127263c (diff)
parent066febdf4092a308d70e9989b322afb470253132 (diff)
downloadvolse-hubzilla-db853134e31d5f42344d140339e0dea626fd429a.tar.gz
volse-hubzilla-db853134e31d5f42344d140339e0dea626fd429a.tar.bz2
volse-hubzilla-db853134e31d5f42344d140339e0dea626fd429a.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Widget/Cover_photo.php')
-rw-r--r--Zotlabs/Widget/Cover_photo.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Cover_photo.php b/Zotlabs/Widget/Cover_photo.php
index d2eb1be92..af1ae5c7f 100644
--- a/Zotlabs/Widget/Cover_photo.php
+++ b/Zotlabs/Widget/Cover_photo.php
@@ -20,6 +20,16 @@ class Cover_photo {
if(! $channel_id)
return '';
+ // only show cover photos once per login session
+
+ if(array_key_exists('channels_visited',$_SESSION) && is_array($_SESSION['channels_visited']) && in_array($channel_id,$_SESSION['channels_visited'])) {
+ return EMPTY_STR;
+ }
+ if(! array_key_exists('channels_visited',$_SESSION)) {
+ $_SESSION['channels_visited'] = [];
+ }
+ $_SESSION['channels_visited'][] = $channel_id;
+
$channel = channelx_by_n($channel_id);
if(array_key_exists('style', $arr) && isset($arr['style']))