mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
a5dcac8679
commit
d2cc61446f
2
utils.py
2
utils.py
|
@ -2859,7 +2859,7 @@ def has_object_dict(post_json_object: {}) -> bool:
|
||||||
return False
|
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
|
"""Returns alternate path from the actor
|
||||||
eg. https://clearnetdomain/path becomes http://oniondomain/path
|
eg. https://clearnetdomain/path becomes http://oniondomain/path
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -17,7 +17,7 @@ from utils import getDomainFromActor
|
||||||
from utils import locatePost
|
from utils import locatePost
|
||||||
from utils import load_json
|
from utils import load_json
|
||||||
from utils import weekDayOfMonthStart
|
from utils import weekDayOfMonthStart
|
||||||
from utils import getAltPath
|
from utils import get_alt_path
|
||||||
from utils import remove_domain_port
|
from utils import remove_domain_port
|
||||||
from utils import acct_dir
|
from utils import acct_dir
|
||||||
from utils import local_actor_url
|
from utils import local_actor_url
|
||||||
|
@ -68,7 +68,7 @@ def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, base_dir: str,
|
||||||
deletePostStr += ' <p class="followText">' + \
|
deletePostStr += ' <p class="followText">' + \
|
||||||
translate['Delete this event'] + '</p>'
|
translate['Delete this event'] + '</p>'
|
||||||
|
|
||||||
postActor = getAltPath(actor, domain_full, calling_domain)
|
postActor = get_alt_path(actor, domain_full, calling_domain)
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
' <form method="POST" action="' + postActor + '/rmpost">\n'
|
' <form method="POST" action="' + postActor + '/rmpost">\n'
|
||||||
deletePostStr += ' <input type="hidden" name="year" value="' + \
|
deletePostStr += ' <input type="hidden" name="year" value="' + \
|
||||||
|
|
|
@ -15,7 +15,7 @@ from utils import getDomainFromActor
|
||||||
from utils import locatePost
|
from utils import locatePost
|
||||||
from utils import load_json
|
from utils import load_json
|
||||||
from utils import get_config_param
|
from utils import get_config_param
|
||||||
from utils import getAltPath
|
from utils import get_alt_path
|
||||||
from utils import acct_dir
|
from utils import acct_dir
|
||||||
from webapp_utils import setCustomBackground
|
from webapp_utils import setCustomBackground
|
||||||
from webapp_utils import htmlHeaderWithExternalStyle
|
from webapp_utils import htmlHeaderWithExternalStyle
|
||||||
|
@ -85,7 +85,7 @@ def htmlConfirmDelete(cssCache: {},
|
||||||
' <p class="followText">' + \
|
' <p class="followText">' + \
|
||||||
translate['Delete this post?'] + '</p>'
|
translate['Delete this post?'] + '</p>'
|
||||||
|
|
||||||
postActor = getAltPath(actor, domain_full, calling_domain)
|
postActor = get_alt_path(actor, domain_full, calling_domain)
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
' <form method="POST" action="' + postActor + '/rmpost">\n'
|
' <form method="POST" action="' + postActor + '/rmpost">\n'
|
||||||
deletePostStr += \
|
deletePostStr += \
|
||||||
|
@ -149,7 +149,7 @@ def htmlConfirmRemoveSharedItem(cssCache: {}, translate: {}, base_dir: str,
|
||||||
sharesStr += \
|
sharesStr += \
|
||||||
' <p class="followText">' + translate['Remove'] + \
|
' <p class="followText">' + translate['Remove'] + \
|
||||||
' ' + sharedItemDisplayName + ' ?</p>\n'
|
' ' + sharedItemDisplayName + ' ?</p>\n'
|
||||||
postActor = getAltPath(actor, domain_full, calling_domain)
|
postActor = get_alt_path(actor, domain_full, calling_domain)
|
||||||
if sharesFileType == 'shares':
|
if sharesFileType == 'shares':
|
||||||
endpoint = 'rmshare'
|
endpoint = 'rmshare'
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -23,7 +23,7 @@ from utils import locatePost
|
||||||
from utils import isPublicPost
|
from utils import isPublicPost
|
||||||
from utils import firstParagraphFromString
|
from utils import firstParagraphFromString
|
||||||
from utils import searchBoxPosts
|
from utils import searchBoxPosts
|
||||||
from utils import getAltPath
|
from utils import get_alt_path
|
||||||
from utils import acct_dir
|
from utils import acct_dir
|
||||||
from utils import local_actor_url
|
from utils import local_actor_url
|
||||||
from skills import noOfActorSkills
|
from skills import noOfActorSkills
|
||||||
|
@ -139,7 +139,7 @@ def _htmlSearchResultSharePage(actor: str, domain_full: str,
|
||||||
previous: bool) -> str:
|
previous: bool) -> str:
|
||||||
"""Returns the html for the previous button on shared items search results
|
"""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
|
# previous page link, needs to be a POST
|
||||||
if previous:
|
if previous:
|
||||||
pageNumber -= 1
|
pageNumber -= 1
|
||||||
|
|
Loading…
Reference in New Issue