diff --git a/src/cryptobox/web/dataset.py b/src/cryptobox/web/dataset.py index bdc6d80..b60ecc0 100644 --- a/src/cryptobox/web/dataset.py +++ b/src/cryptobox/web/dataset.py @@ -33,12 +33,12 @@ class WebInterfaceDataset(dict): templates """ - def __init__(self, cbox, prefs, plugins): + def __init__(self, cbox, prefs, plugin_manager): super(WebInterfaceDataset, self).__init__() self.prefs = prefs self.cbox = cbox self.__set_config_values() - self.plugins = plugins + self.plugin_manager = plugin_manager self.set_crypto_box_state() self.set_plugin_data() self.set_containers_state() @@ -110,7 +110,8 @@ class WebInterfaceDataset(dict): else: self["Data.ScriptParams.%s" % key] = str(value) 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"] = \ cherrypy.request.headers["CRYPTOBOX-Location"] if cherrypy.request.headers.has_key("X-Forwarded-Host"): @@ -193,13 +194,8 @@ class WebInterfaceDataset(dict): for key in self.keys(): if key.startswith("Settings.PluginList."): del self[key] - for plugin in self.plugins: + for plugin in self.plugin_manager.get_plugins(): 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 + ".Rank"] = plugin.get_rank() self[entry_name + ".RequestAuth"] = plugin.is_auth_required() and "1" or "0"