mirror of https://gitlab.com/bashrc2/epicyon
Check nickname
parent
a26111b0e0
commit
186c35112b
|
|
@ -926,8 +926,9 @@ def html_hashtag_search(nickname: str, domain: str, port: int,
|
||||||
separator_str: str = html_post_separator(base_dir, None)
|
separator_str: str = html_post_separator(base_dir, None)
|
||||||
|
|
||||||
# check that the directory for the nickname exists
|
# check that the directory for the nickname exists
|
||||||
account_dir: str = acct_dir(base_dir, nickname, domain)
|
account_dir: str = None
|
||||||
if nickname:
|
if nickname:
|
||||||
|
account_dir = acct_dir(base_dir, nickname, domain)
|
||||||
if not is_a_dir(account_dir):
|
if not is_a_dir(account_dir):
|
||||||
nickname = None
|
nickname = None
|
||||||
|
|
||||||
|
|
@ -1002,26 +1003,27 @@ def html_hashtag_search(nickname: str, domain: str, port: int,
|
||||||
hashtag_search_form += maps_str
|
hashtag_search_form += maps_str
|
||||||
|
|
||||||
# edit the category for this hashtag
|
# edit the category for this hashtag
|
||||||
show_categories_filename: str = account_dir + '/.showCategories'
|
if account_dir:
|
||||||
show_categories = is_a_file(show_categories_filename)
|
show_categories_filename: str = account_dir + '/.showCategories'
|
||||||
if show_categories and is_editor(base_dir, nickname):
|
show_categories = is_a_file(show_categories_filename)
|
||||||
category: str = get_hashtag_category(base_dir, hashtag)
|
if show_categories and is_editor(base_dir, nickname):
|
||||||
hashtag_search_form += '<div class="hashtagCategoryContainer">\n'
|
category: str = get_hashtag_category(base_dir, hashtag)
|
||||||
hashtag_search_form += ' <form enctype="multipart/form-data" ' + \
|
hashtag_search_form += '<div class="hashtagCategoryContainer">\n'
|
||||||
'method="POST" accept-charset="UTF-8" action="' + \
|
hashtag_search_form += ' <form enctype="multipart/form-data" ' + \
|
||||||
'/users/' + nickname + '/tags/' + hashtag + \
|
'method="POST" accept-charset="UTF-8" action="' + \
|
||||||
'/sethashtagcategory">\n'
|
'/users/' + nickname + '/tags/' + hashtag + \
|
||||||
hashtag_search_form += ' <center>\n'
|
'/sethashtagcategory">\n'
|
||||||
hashtag_search_form += translate['Category']
|
hashtag_search_form += ' <center>\n'
|
||||||
hashtag_search_form += \
|
hashtag_search_form += translate['Category']
|
||||||
' <input type="text" style="width: 20ch" ' + \
|
hashtag_search_form += \
|
||||||
'name="hashtagCategory" value="' + category + '">\n'
|
' <input type="text" style="width: 20ch" ' + \
|
||||||
hashtag_search_form += \
|
'name="hashtagCategory" value="' + category + '">\n'
|
||||||
' <button type="submit" class="button" name="submitYes">' + \
|
hashtag_search_form += \
|
||||||
translate['Publish'] + '</button>\n'
|
' <button type="submit" class="button" ' + \
|
||||||
hashtag_search_form += ' </center>\n'
|
'name="submitYes">' + translate['Publish'] + '</button>\n'
|
||||||
hashtag_search_form += ' </form>\n'
|
hashtag_search_form += ' </center>\n'
|
||||||
hashtag_search_form += '</div>\n'
|
hashtag_search_form += ' </form>\n'
|
||||||
|
hashtag_search_form += '</div>\n'
|
||||||
|
|
||||||
if start_index > 0:
|
if start_index > 0:
|
||||||
# previous page link
|
# previous page link
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue