From b677b018590a8907293f3aa6fa38a483ee46b70e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Nov 2021 11:51:53 +0000 Subject: [PATCH] Same name for variables --- daemon.py | 10 +++++----- webapp_create_post.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/daemon.py b/daemon.py index d7b71d7c0..4a5f14d94 100644 --- a/daemon.py +++ b/daemon.py @@ -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') diff --git a/webapp_create_post.py b/webapp_create_post.py index 8de72c025..5b92ac602 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -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 = '
' newPostImageSection += \