Same name for variables

merge-requests/30/head
Bob Mottram 2021-11-03 11:51:53 +00:00
parent b65f7722d4
commit b677b01859
2 changed files with 7 additions and 7 deletions

View File

@ -11894,9 +11894,9 @@ class PubServer(BaseHTTPRequestHandler):
isNewPostEndpoint = False
if '/users/' in path and '/new' in path:
# Various types of new post in the web interface
newPostEnd = getNewPostEndpoints()
for postType in newPostEnd:
if path.endswith('/' + postType):
newPostEndpoints = getNewPostEndpoints()
for currPostType in newPostEndpoints:
if path.endswith('/' + currPostType):
isNewPostEndpoint = True
break
if isNewPostEndpoint:
@ -16697,8 +16697,8 @@ class PubServer(BaseHTTPRequestHandler):
self.server.debug)
# receive different types of post created by htmlNewPost
postTypes = getNewPostEndpoints()
for currPostType in postTypes:
newPostEndpoints = getNewPostEndpoints()
for currPostType in newPostEndpoints:
if not authorized:
if self.server.debug:
print('POST was not authorized')

View File

@ -292,8 +292,8 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
path = path.split('?')[0]
newPostEndpoints = getNewPostEndpoints()
pathBase = path
for newPostReplace in newPostEndpoints:
pathBase = pathBase.replace('/' + newPostReplace, '')
for currPostType in newPostEndpoints:
pathBase = pathBase.replace('/' + currPostType, '')
newPostImageSection = ' <div class="container">'
newPostImageSection += \