dont allow "hot" with "all" to prevent query timeout

master
Aevann 2023-08-12 01:36:24 +03:00
parent 39098fe323
commit 0f8c75f252
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ def front_all(v, sub=None):
sort=request.values.get("sort", defaultsorting)
t=request.values.get('t', defaulttime)
if t == 'all' and sort == 'hot':
sort = 'top'
try: gt=int(request.values.get("after", 0))
except: gt=0