perfs: avoid events/links in critical path (#18965)
This commit is contained in:
parent
c6f0966900
commit
e3abbabb23
|
@ -808,6 +808,8 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
response.filter = {}
|
||||
|
||||
response.filter['auquotidien'] = True
|
||||
if not path or path[0] not in ('api', 'backoffice'):
|
||||
# api & backoffice have no use for a side box
|
||||
response.filter['gauche'] = self.box_side(path)
|
||||
response.filter['keywords'] = template.get_current_theme().get('keywords')
|
||||
get_publisher().substitutions.feed(self)
|
||||
|
@ -1103,6 +1105,7 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
r += htmltext('<input type="submit" value="%s"/>') % _('Load')
|
||||
r += htmltext('</form>')
|
||||
|
||||
if get_cfg('aq-permissions', {}).get('links'):
|
||||
r += self.links()
|
||||
|
||||
cats = Category.select(order_by = 'name')
|
||||
|
@ -1117,7 +1120,8 @@ class AlternateRootDirectory(OldRootDirectory):
|
|||
r += htmltext('</ul>')
|
||||
r += htmltext('</div>')
|
||||
|
||||
if Event.keys(): # if there are events, add a link to the agenda
|
||||
if get_cfg('aq-permissions', {}).get('events') and Event.keys():
|
||||
# if there are events, add a link to the agenda
|
||||
tags = get_cfg('misc', {}).get('event_tags')
|
||||
if not tags:
|
||||
tags = get_default_event_tags()
|
||||
|
|
Reference in New Issue