mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Use server_dir as replacement for base_href.
This commit is contained in:
parent
1127ff4f99
commit
d48ecb6722
1
cfg.py
1
cfg.py
@ -35,7 +35,6 @@ port = int(get_item(parser, 'Network', 'port'))
|
||||
|
||||
html_root = None
|
||||
main_menu = Menu()
|
||||
base_href = ""
|
||||
|
||||
if store_file.endswith(".sqlite3"):
|
||||
store_file = os.path.splitext(store_file)[0]
|
||||
|
||||
4
menu.py
4
menu.py
@ -39,10 +39,10 @@ class Menu():
|
||||
"""This method creates a menu item with the parameters, adds
|
||||
that menu item to this menu, and returns the item.
|
||||
|
||||
If BASEHREF is true and url start with a slash, prepend the cfg.base_href to it"""
|
||||
If BASEHREF is true and url start with a slash, prepend the cfg.server_dir to it"""
|
||||
|
||||
if basehref and url.startswith("/"):
|
||||
url = cfg.server_dir + cfg.base_href + url
|
||||
url = cfg.server_dir + url
|
||||
|
||||
item = Menu(label=label, icon=icon, url=url, order=order)
|
||||
self.items.append(item)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user