From f480b0905ab31d0d69d6f1b9be6d3ec9bdf65099 Mon Sep 17 00:00:00 2001
From: Julian Rother <julianr@fsmpi.rwth-aachen.de>
Date: Sun, 30 Apr 2017 00:15:12 +0200
Subject: [PATCH] Show invisible upcoming lectures when logged in

---
 server.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server.py b/server.py
index 205dec6..0f6902e 100644
--- a/server.py
+++ b/server.py
@@ -331,8 +331,8 @@ def index():
 		SELECT lectures.*, "course" AS sep, courses.*
 		FROM lectures
 		JOIN courses ON (lectures.course_id = courses.id)
-		WHERE (time > ?) AND (time < ?) and lectures.visible and courses.visible and courses.listed and not lectures.norecording
-		ORDER BY time ASC LIMIT 30''',start,end)
+		WHERE (time > ?) AND (time < ?) AND (? OR (lectures.visible AND courses.visible AND courses.listed)) AND NOT lectures.norecording
+		ORDER BY time ASC LIMIT 30''', start, end, ismod())
 	for i in upcomming:
 		i['date'] = i['time'].date()
 	latestvideos=query('''
-- 
GitLab