Snake case

main
Bob Mottram 2021-12-26 18:32:02 +00:00
parent a5dcac8679
commit d2cc61446f
4 changed files with 8 additions and 8 deletions

View File

@ -2859,7 +2859,7 @@ def has_object_dict(post_json_object: {}) -> bool:
return False
def getAltPath(actor: str, domain_full: str, calling_domain: str) -> str:
def get_alt_path(actor: str, domain_full: str, calling_domain: str) -> str:
"""Returns alternate path from the actor
eg. https://clearnetdomain/path becomes http://oniondomain/path
"""

View File

@ -17,7 +17,7 @@ from utils import getDomainFromActor
from utils import locatePost
from utils import load_json
from utils import weekDayOfMonthStart
from utils import getAltPath
from utils import get_alt_path
from utils import remove_domain_port
from utils import acct_dir
from utils import local_actor_url
@ -68,7 +68,7 @@ def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, base_dir: str,
deletePostStr += ' <p class="followText">' + \
translate['Delete this event'] + '</p>'
postActor = getAltPath(actor, domain_full, calling_domain)
postActor = get_alt_path(actor, domain_full, calling_domain)
deletePostStr += \
' <form method="POST" action="' + postActor + '/rmpost">\n'
deletePostStr += ' <input type="hidden" name="year" value="' + \

View File

@ -15,7 +15,7 @@ from utils import getDomainFromActor
from utils import locatePost
from utils import load_json
from utils import get_config_param
from utils import getAltPath
from utils import get_alt_path
from utils import acct_dir
from webapp_utils import setCustomBackground
from webapp_utils import htmlHeaderWithExternalStyle
@ -85,7 +85,7 @@ def htmlConfirmDelete(cssCache: {},
' <p class="followText">' + \
translate['Delete this post?'] + '</p>'
postActor = getAltPath(actor, domain_full, calling_domain)
postActor = get_alt_path(actor, domain_full, calling_domain)
deletePostStr += \
' <form method="POST" action="' + postActor + '/rmpost">\n'
deletePostStr += \
@ -149,7 +149,7 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, base_dir: str,
sharesStr += \
' <p class="followText">' + translate['Remove'] + \
' ' + sharedItemDisplayName + ' ?</p>\n'
postActor = getAltPath(actor, domain_full, calling_domain)
postActor = get_alt_path(actor, domain_full, calling_domain)
if sharesFileType == 'shares':
endpoint = 'rmshare'
else:

View File

@ -23,7 +23,7 @@ from utils import locatePost
from utils import isPublicPost
from utils import firstParagraphFromString
from utils import searchBoxPosts
from utils import getAltPath
from utils import get_alt_path
from utils import acct_dir
from utils import local_actor_url
from skills import noOfActorSkills
@ -139,7 +139,7 @@ def _htmlSearchResultSharePage(actor: str, domain_full: str,
previous: bool) -> str:
"""Returns the html for the previous button on shared items search results
"""
postActor = getAltPath(actor, domain_full, calling_domain)
postActor = get_alt_path(actor, domain_full, calling_domain)
# previous page link, needs to be a POST
if previous:
pageNumber -= 1