From 93970b9dadccc5f0daa1e1e3fa7b563dcf675ba6 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 14 Jul 2023 12:23:33 +0300 Subject: [PATCH] fix error user count being 0 --- files/templates/header.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/templates/header.html b/files/templates/header.html index 9e0678acb..0c50ec527 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -7,7 +7,7 @@
{{calc_users()}} {% if SITE_NAME == 'rDrama' %} - {% if not hasattr(g, "loggedin_counter") or (range(1,5) | random == 1 and not (v and v.truescore > 1000)) %} + {% if not hasattr(g, "loggedin_counter") or not g.loggedin_counter or (range(1,5) | random == 1 and not (v and v.truescore > 1000)) %} {% include "journoid_banner.html" %} {% else %} {% if IS_DKD() %} @@ -67,7 +67,7 @@ {% endif %} {{g.loggedin_counter+g.loggedout_counter}} {{VISITORS_HERE_FLAVOR|random|safe}} ({{g.loggedin_counter}} logged in) {% endif %} - {% elif hasattr(g, "loggedin_counter") %} + {% elif hasattr(g, "loggedin_counter") and g.loggedin_counter %} {{g.loggedin_counter+g.loggedout_counter}} people here now ({{g.loggedin_counter}} logged in) {% else %} Don't make the mistakes seen here.