2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-17 13:07:11 +00:00

NOEDIT fixed

This commit is contained in:
2023-08-02 13:41:12 +03:00
parent 585eb534a9
commit 6bca75b877
2 changed files with 8 additions and 3 deletions

View File

@@ -179,12 +179,11 @@ def expowebpage(request, expowebpath, path):
(title,) = m.groups()
else:
title = ""
m = re.search(r"^<meta([^>]*)noedit", head, re.DOTALL + re.IGNORECASE)
m = re.search(r"noedit", head, re.DOTALL + re.IGNORECASE)
if m:
editable = False
else:
editable = os.access(expowebpath / path, os.W_OK) # are file permissions writeable?
has_menu = False
menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE)
if menumatch: