improved consistence of plugin list for the webinterface
This commit is contained in:
parent
2cbd564f09
commit
706a4b2b6f
|
@ -33,12 +33,12 @@ class WebInterfaceDataset(dict):
|
||||||
templates
|
templates
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, cbox, prefs, plugins):
|
def __init__(self, cbox, prefs, plugin_manager):
|
||||||
super(WebInterfaceDataset, self).__init__()
|
super(WebInterfaceDataset, self).__init__()
|
||||||
self.prefs = prefs
|
self.prefs = prefs
|
||||||
self.cbox = cbox
|
self.cbox = cbox
|
||||||
self.__set_config_values()
|
self.__set_config_values()
|
||||||
self.plugins = plugins
|
self.plugin_manager = plugin_manager
|
||||||
self.set_crypto_box_state()
|
self.set_crypto_box_state()
|
||||||
self.set_plugin_data()
|
self.set_plugin_data()
|
||||||
self.set_containers_state()
|
self.set_containers_state()
|
||||||
|
@ -110,7 +110,8 @@ class WebInterfaceDataset(dict):
|
||||||
else:
|
else:
|
||||||
self["Data.ScriptParams.%s" % key] = str(value)
|
self["Data.ScriptParams.%s" % key] = str(value)
|
||||||
if cherrypy.request.headers.has_key("CRYPTOBOX-Location"):
|
if cherrypy.request.headers.has_key("CRYPTOBOX-Location"):
|
||||||
self.cbox.log.debug("ProxyLocation: %s" % cherrypy.request.headers["CRYPTOBOX-Location"])
|
self.cbox.log.debug("ProxyLocation: %s" % \
|
||||||
|
cherrypy.request.headers["CRYPTOBOX-Location"])
|
||||||
self["Data.Proxy.ScriptPath"] = \
|
self["Data.Proxy.ScriptPath"] = \
|
||||||
cherrypy.request.headers["CRYPTOBOX-Location"]
|
cherrypy.request.headers["CRYPTOBOX-Location"]
|
||||||
if cherrypy.request.headers.has_key("X-Forwarded-Host"):
|
if cherrypy.request.headers.has_key("X-Forwarded-Host"):
|
||||||
|
@ -193,13 +194,8 @@ class WebInterfaceDataset(dict):
|
||||||
for key in self.keys():
|
for key in self.keys():
|
||||||
if key.startswith("Settings.PluginList."):
|
if key.startswith("Settings.PluginList."):
|
||||||
del self[key]
|
del self[key]
|
||||||
for plugin in self.plugins:
|
for plugin in self.plugin_manager.get_plugins():
|
||||||
entry_name = "Settings.PluginList." + plugin.get_name()
|
entry_name = "Settings.PluginList." + plugin.get_name()
|
||||||
## first: remove all existing settings of this plugin
|
|
||||||
for key in self.keys():
|
|
||||||
if key.startswith(entry_name):
|
|
||||||
del self[key]
|
|
||||||
lang_data = plugin.get_language_data()
|
|
||||||
self[entry_name] = plugin.get_name()
|
self[entry_name] = plugin.get_name()
|
||||||
self[entry_name + ".Rank"] = plugin.get_rank()
|
self[entry_name + ".Rank"] = plugin.get_rank()
|
||||||
self[entry_name + ".RequestAuth"] = plugin.is_auth_required() and "1" or "0"
|
self[entry_name + ".RequestAuth"] = plugin.is_auth_required() and "1" or "0"
|
||||||
|
|
Loading…
Reference in a new issue