Switch to event id to avoid confusion with other links

merge-requests/30/head
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 = ( invalidStrings = (
'mute', 'unmute', 'editeventpost', 'notifypost', 'mute', 'unmute', 'editeventpost', 'notifypost',
'delete', 'options', 'page', 'repeat', 'delete', 'options', 'page', 'repeat',
'bm', 'tl', 'actor', 'unrepeat', 'bm', 'tl', 'actor', 'unrepeat', 'eventid',
'unannounce', 'like', 'unlike', 'bookmark', 'unannounce', 'like', 'unlike', 'bookmark',
'unbookmark', 'likedBy', 'time', 'unbookmark', 'likedBy', 'time',
'year', 'month', 'day', 'editnewpost', 'year', 'month', 'day', 'editnewpost',

View File

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

View File

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