add [wip template]. Fix corrupt domain if in root domain dir

This commit is contained in:
Cyrille L 2023-04-10 11:09:54 +02:00
parent 64d57d682c
commit e72ed8e9e3
2 changed files with 23 additions and 9 deletions

View File

@ -155,7 +155,10 @@ if not hole:
exec(open(config).read()) exec(open(config).read())
try: try:
os.path.exists(articles_d) os.path.exists(articles_d)
if '/articles' in user_dir:
user_uri_dir = user_dir.rsplit(articles_d)[1] user_uri_dir = user_dir.rsplit(articles_d)[1]
else:
user_uri_dir = ''
os.chdir(articles_d) os.chdir(articles_d)
except: corrupt = True except: corrupt = True
except: except:

View File

@ -62,7 +62,8 @@ def manage(target):
'navbar' : html.create_navbar, 'navbar' : html.create_navbar,
'metas' : html.create_user_metas, 'metas' : html.create_user_metas,
'footer' : html.create_user_footer, 'footer' : html.create_user_footer,
'stats' : stats.manage 'stats' : stats.manage,
'template' : wip_template
} }
try: try:
@ -154,6 +155,16 @@ def wip_all(process):
if not found: sys.exit(28) if not found: sys.exit(28)
#===============================#
# Create all mods in wip server #
#-------------------------------#
def wip_template(server):
html.create_user_metas(server)
html.create_navbar(server)
html.create_sidebar(server)
html.create_user_footer(server)
#===================# #===================#
# Start wip modules # # Start wip modules #
# Set DB # # Set DB #