Use server_dir as replacement for base_href.

This commit is contained in:
James Valleroy 2013-11-13 20:47:33 -05:00
parent 1127ff4f99
commit d48ecb6722
2 changed files with 2 additions and 3 deletions

1
cfg.py
View File

@ -35,7 +35,6 @@ port = int(get_item(parser, 'Network', 'port'))
html_root = None html_root = None
main_menu = Menu() main_menu = Menu()
base_href = ""
if store_file.endswith(".sqlite3"): if store_file.endswith(".sqlite3"):
store_file = os.path.splitext(store_file)[0] store_file = os.path.splitext(store_file)[0]

View File

@ -39,10 +39,10 @@ class Menu():
"""This method creates a menu item with the parameters, adds """This method creates a menu item with the parameters, adds
that menu item to this menu, and returns the item. 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("/"): 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) item = Menu(label=label, icon=icon, url=url, order=order)
self.items.append(item) self.items.append(item)