Switch to event id to avoid confusion with other links

main
Bob Mottram 2021-11-15 10:51:03 +00:00
parent b6d0c667c4
commit 34ac045d6c
3 changed files with 4 additions and 4 deletions

View File

@ -1277,7 +1277,7 @@ def containsInvalidLocalLinks(content: str) -> bool:
invalidStrings = (
'mute', 'unmute', 'editeventpost', 'notifypost',
'delete', 'options', 'page', 'repeat',
'bm', 'tl', 'actor', 'unrepeat',
'bm', 'tl', 'actor', 'unrepeat', 'eventid',
'unannounce', 'like', 'unlike', 'bookmark',
'unbookmark', 'likedBy', 'time',
'year', 'month', 'day', 'editnewpost',

View File

@ -12464,7 +12464,7 @@ class PubServer(BaseHTTPRequestHandler):
GETstartTime) -> bool:
"""Confirm whether to delete a calendar event
"""
postId = path.split('?id=')[1]
postId = path.split('?eventid=')[1]
if '?' in postId:
postId = postId.split('?')[0]
postTime = path.split('?time=')[1]
@ -14766,7 +14766,7 @@ class PubServer(BaseHTTPRequestHandler):
if htmlGET and usersInPath:
if '/eventdelete' in self.path and \
'?time=' in self.path and \
'?id=' in self.path:
'?eventid=' in self.path:
if self._confirmDeleteEvent(callingDomain, self.path,
self.server.baseDir,
self.server.httpPrefix,

View File

@ -188,7 +188,7 @@ def _htmlCalendarDay(personCache: {}, cssCache: {}, translate: {},
if postId:
deleteButtonStr = \
'<td class="calendar__day__icons"><a href="' + calActor + \
'/eventdelete?id=' + postId + '?year=' + str(year) + \
'/eventdelete?eventid=' + postId + '?year=' + str(year) + \
'?month=' + str(monthNumber) + '?day=' + str(dayNumber) + \
'?time=' + eventTime + \
'">\n<img class="calendardayicon" loading="lazy" alt="' + \